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 CCACHE
 599 USE_PRECOMPILED_HEADER
 600 SJAVAC_SERVER_DIR
 601 ENABLE_SJAVAC
 602 SJAVAC_SERVER_JAVA
 603 JOBS
 604 MEMORY_SIZE
 605 NUM_CORES
 606 ENABLE_INTREE_EC
 607 SALIB_NAME
 608 HOTSPOT_MAKE_ARGS
 609 FIXPATH
 610 LIBCXX
 611 LLVM_LIBS
 612 LLVM_LDFLAGS
 613 LLVM_CFLAGS
 614 LLVM_CONFIG
 615 LIBFFI_LIBS
 616 LIBFFI_CFLAGS
 617 STATIC_CXX_SETTING
 618 LIBDL
 619 LIBM
 620 LIBZIP_CAN_USE_MMAP
 621 USE_EXTERNAL_LIBZ
 622 USE_EXTERNAL_LIBGIF
 623 USE_EXTERNAL_LIBJPEG
 624 ALSA_LIBS
 625 ALSA_CFLAGS
 626 FREETYPE2_LIB_PATH
 627 USING_SYSTEM_FT_LIB
 628 FREETYPE2_LIBS
 629 FREETYPE2_CFLAGS
 630 CUPS_CFLAGS
 631 OPENWIN_HOME
 632 X_EXTRA_LIBS
 633 X_LIBS
 634 X_PRE_LIBS
 635 X_CFLAGS
 636 XMKMF
 637 CXXFLAGS_DEBUG_SYMBOLS
 638 CFLAGS_DEBUG_SYMBOLS
 639 ZIP_DEBUGINFO_FILES
 640 ENABLE_DEBUG_SYMBOLS
 641 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 642 ZERO_ARCHFLAG
 643 LDFLAGS_CXX_JDK
 644 LDFLAGS_JDKEXE_SUFFIX
 645 LDFLAGS_JDKLIB_SUFFIX
 646 LDFLAGS_JDKEXE
 647 LDFLAGS_JDKLIB
 648 CXXFLAGS_JDKEXE
 649 CXXFLAGS_JDKLIB
 650 CFLAGS_JDKEXE
 651 CFLAGS_JDKLIB
 652 MACOSX_VERSION_MIN
 653 PACKAGE_PATH
 654 LEGACY_EXTRA_LDFLAGS
 655 LEGACY_EXTRA_CXXFLAGS
 656 LEGACY_EXTRA_CFLAGS
 657 CXX_FLAG_DEPS
 658 C_FLAG_DEPS
 659 CXX_O_FLAG_NONE
 660 CXX_O_FLAG_NORM
 661 CXX_O_FLAG_HI
 662 CXX_O_FLAG_HIGHEST
 663 C_O_FLAG_NONE
 664 C_O_FLAG_NORM
 665 C_O_FLAG_HI
 666 C_O_FLAG_HIGHEST
 667 POST_MCS_CMD
 668 POST_STRIP_CMD
 669 SET_EXECUTABLE_ORIGIN
 670 SET_SHARED_LIBRARY_ORIGIN
 671 CXX_FLAG_REORDER
 672 C_FLAG_REORDER
 673 SET_SHARED_LIBRARY_MAPFILE
 674 SET_SHARED_LIBRARY_NAME
 675 SHARED_LIBRARY_FLAGS
 676 EXE_SUFFIX
 677 STATIC_LIBRARY_SUFFIX
 678 SHARED_LIBRARY_SUFFIX
 679 LIBRARY_PREFIX
 680 STATIC_LIBRARY
 681 SHARED_LIBRARY
 682 OBJ_SUFFIX
 683 COMPILER_NAME
 684 JT_HOME
 685 JTREGEXE
 686 LIPO
 687 ac_ct_OBJDUMP
 688 OBJDUMP
 689 ac_ct_OBJCOPY
 690 OBJCOPY
 691 MCS
 692 STRIP
 693 GNM
 694 NM
 695 AS
 696 CXXCPP
 697 CPP
 698 COMPILER_TYPE
 699 RC_FLAGS
 700 DUMPBIN
 701 WINAR
 702 HOTSPOT_RC
 703 HOTSPOT_MT
 704 RC
 705 MT
 706 WINLD
 707 HOTSPOT_LD
 708 HOTSPOT_CXX
 709 ARFLAGS
 710 AR
 711 LDEXECXX
 712 LDCXX
 713 LDEXE
 714 LD
 715 ac_ct_OBJC
 716 OBJCFLAGS
 717 OBJC
 718 ac_ct_CXX
 719 CXXFLAGS
 720 CXX
 721 ac_ct_PROPER_COMPILER_CXX
 722 PROPER_COMPILER_CXX
 723 POTENTIAL_CXX
 724 TOOLS_DIR_CXX
 725 OBJEXT
 726 EXEEXT
 727 ac_ct_CC
 728 CPPFLAGS
 729 LDFLAGS
 730 CFLAGS
 731 CC
 732 ac_ct_PROPER_COMPILER_CC
 733 PROPER_COMPILER_CC
 734 POTENTIAL_CC
 735 TOOLS_DIR_CC
 736 BUILD_LD
 737 BUILD_CXX
 738 BUILD_CC
 739 MSVCR_DLL
 740 DXSDK_INCLUDE_PATH
 741 DXSDK_LIB_PATH
 742 VS_PATH
 743 VS_LIB
 744 VS_INCLUDE
 745 CYGWIN_LINK
 746 AR_OUT_OPTION
 747 LD_OUT_OPTION
 748 EXE_OUT_OPTION
 749 CC_OUT_OPTION
 750 BUILD_HOTSPOT
 751 HOTSPOT_DIST
 752 BUILD_OUTPUT
 753 OVERRIDE_SRC_ROOT
 754 ADD_SRC_ROOT
 755 JDK_TOPDIR
 756 NASHORN_TOPDIR
 757 HOTSPOT_TOPDIR
 758 JAXWS_TOPDIR
 759 JAXP_TOPDIR
 760 CORBA_TOPDIR
 761 LANGTOOLS_TOPDIR
 762 BOOT_JDK_JVMARGS
 763 JAVAC_FLAGS
 764 BOOT_JDK_SOURCETARGET
 765 BOOT_JDK
 766 BOOT_TOOLSJAR
 767 BOOT_RTJAR
 768 JAVA_CHECK
 769 JAVAC_CHECK
 770 COOKED_BUILD_NUMBER
 771 JDK_VERSION
 772 COPYRIGHT_YEAR
 773 MACOSX_BUNDLE_ID_BASE
 774 MACOSX_BUNDLE_NAME_BASE
 775 COMPANY_NAME
 776 JDK_RC_PLATFORM_NAME
 777 PRODUCT_SUFFIX
 778 PRODUCT_NAME
 779 LAUNCHER_NAME
 780 MILESTONE
 781 JDK_BUILD_NUMBER
 782 JDK_UPDATE_VERSION
 783 JDK_MICRO_VERSION
 784 JDK_MINOR_VERSION
 785 JDK_MAJOR_VERSION
 786 USER_RELEASE_SUFFIX
 787 COMPRESS_JARS
 788 UNLIMITED_CRYPTO
 789 CACERTS_FILE
 790 TEST_IN_BUILD
 791 BUILD_HEADLESS
 792 SUPPORT_HEADFUL
 793 SUPPORT_HEADLESS
 794 BDEPS_FTP
 795 BDEPS_UNZIP
 796 OS_VERSION_MICRO
 797 OS_VERSION_MINOR
 798 OS_VERSION_MAJOR
 799 PKG_CONFIG
 800 CODESIGN
 801 XATTR
 802 TIME
 803 STAT
 804 HG
 805 READELF
 806 OTOOL
 807 LDD
 808 ZIP
 809 UNZIP
 810 FIND_DELETE
 811 MAKE
 812 CHECK_TOOLSDIR_MAKE
 813 CHECK_TOOLSDIR_GMAKE
 814 CHECK_MAKE
 815 CHECK_GMAKE
 816 PKGHANDLER
 817 OUTPUT_ROOT
 818 CONF_NAME
 819 SPEC
 820 BUILD_VARIANT_RELEASE
 821 DEBUG_CLASSFILES
 822 FASTDEBUG
 823 VARIANT
 824 DEBUG_LEVEL
 825 MACOSX_UNIVERSAL
 826 INCLUDE_SA
 827 JVM_VARIANT_ZEROSHARK
 828 JVM_VARIANT_ZERO
 829 JVM_VARIANT_KERNEL
 830 JVM_VARIANT_MINIMAL1
 831 JVM_VARIANT_CLIENT
 832 JVM_VARIANT_SERVER
 833 JVM_VARIANTS
 834 JDK_VARIANT
 835 SET_OPENJDK
 836 BUILD_LOG_WRAPPER
 837 BUILD_LOG_PREVIOUS
 838 BUILD_LOG
 839 SYS_ROOT
 840 PATH_SEP
 841 SRC_ROOT
 842 ZERO_ARCHDEF
 843 DEFINE_CROSS_COMPILE_ARCH
 844 LP64
 845 OPENJDK_TARGET_OS_API_DIR
 846 OPENJDK_TARGET_CPU_JLI_CFLAGS
 847 OPENJDK_TARGET_CPU_OSARCH
 848 OPENJDK_TARGET_CPU_ISADIR
 849 OPENJDK_TARGET_CPU_LIBDIR
 850 OPENJDK_TARGET_CPU_LEGACY_LIB
 851 OPENJDK_TARGET_CPU_LEGACY
 852 REQUIRED_OS_VERSION
 853 REQUIRED_OS_NAME
 854 COMPILE_TYPE
 855 OPENJDK_TARGET_CPU_ENDIAN
 856 OPENJDK_TARGET_CPU_BITS
 857 OPENJDK_TARGET_CPU_ARCH
 858 OPENJDK_TARGET_CPU
 859 OPENJDK_TARGET_OS_API
 860 OPENJDK_TARGET_OS
 861 OPENJDK_BUILD_CPU_ENDIAN
 862 OPENJDK_BUILD_CPU_BITS
 863 OPENJDK_BUILD_CPU_ARCH
 864 OPENJDK_BUILD_CPU
 865 OPENJDK_BUILD_OS_API
 866 OPENJDK_BUILD_OS
 867 OPENJDK_BUILD_AUTOCONF_NAME
 868 OPENJDK_TARGET_AUTOCONF_NAME
 869 target_os
 870 target_vendor
 871 target_cpu
 872 target
 873 host_os
 874 host_vendor
 875 host_cpu
 876 host
 877 build_os
 878 build_vendor
 879 build_cpu
 880 build
 881 SETFILE
 882 DF
 883 READLINK
 884 CYGPATH
 885 NAWK
 886 SED
 887 FGREP
 888 EGREP
 889 GREP
 890 AWK
 891 XARGS
 892 WHICH
 893 WC
 894 UNIQ
 895 UNAME
 896 TR
 897 TOUCH
 898 TEE
 899 TAR
 900 TAIL
 901 SORT
 902 SH
 903 RM
 904 PRINTF
 905 MV
 906 MKTEMP
 907 MKDIR
 908 LS
 909 LN
 910 HEAD
 911 FIND
 912 FILE
 913 EXPR
 914 ECHO
 915 DIRNAME
 916 DIFF
 917 DATE
 918 CUT
 919 CPIO
 920 CP
 921 COMM
 922 CMP
 923 CHMOD
 924 CAT
 925 BASH
 926 BASENAME
 927 DATE_WHEN_CONFIGURED
 928 CONFIGURE_COMMAND_LINE
 929 CUSTOM_MAKE_DIR
 930 target_alias
 931 host_alias
 932 build_alias
 933 LIBS
 934 ECHO_T
 935 ECHO_N
 936 ECHO_C
 937 DEFS
 938 mandir
 939 localedir
 940 libdir
 941 psdir
 942 pdfdir
 943 dvidir
 944 htmldir
 945 infodir
 946 docdir
 947 oldincludedir
 948 includedir
 949 localstatedir
 950 sharedstatedir
 951 sysconfdir
 952 datadir
 953 datarootdir
 954 libexecdir
 955 sbindir
 956 bindir
 957 program_transform_name
 958 prefix
 959 exec_prefix
 960 PACKAGE_URL
 961 PACKAGE_BUGREPORT
 962 PACKAGE_STRING
 963 PACKAGE_VERSION
 964 PACKAGE_TARNAME
 965 PACKAGE_NAME
 966 PATH_SEPARATOR
 967 SHELL'
 968 ac_subst_files=''
 969 ac_user_opts='
 970 enable_option_checking
 971 with_custom_make_dir
 972 with_target_bits
 973 with_sys_root
 974 with_tools_dir
 975 with_devkit
 976 enable_openjdk_only
 977 with_jdk_variant
 978 with_jvm_variants
 979 enable_debug
 980 with_debug_level
 981 with_conf_name
 982 with_builddeps_conf
 983 with_builddeps_server
 984 with_builddeps_dir
 985 with_builddeps_group
 986 enable_headful
 987 enable_hotspot_test_in_build
 988 with_cacerts_file
 989 enable_unlimited_crypto
 990 with_milestone
 991 with_update_version
 992 with_build_number
 993 with_user_release_suffix
 994 with_boot_jdk
 995 with_boot_jdk_jvmargs
 996 with_add_source_root
 997 with_override_source_root
 998 with_adds_and_overrides
 999 with_override_langtools
1000 with_override_corba
1001 with_override_jaxp
1002 with_override_jaxws
1003 with_override_hotspot
1004 with_override_jdk
1005 with_import_hotspot
1006 with_msvcr_dll
1007 with_dxsdk
1008 with_dxsdk_lib
1009 with_dxsdk_include
1010 with_jtreg
1011 with_extra_cflags
1012 with_extra_cxxflags
1013 with_extra_ldflags
1014 enable_debug_symbols
1015 enable_zip_debug_info
1016 enable_macosx_runtime_support
1017 with_x
1018 with_cups
1019 with_cups_include
1020 with_freetype
1021 with_alsa
1022 with_alsa_include
1023 with_alsa_lib
1024 with_giflib
1025 with_zlib
1026 with_stdc__lib
1027 with_num_cores
1028 with_memory_size
1029 with_jobs
1030 with_sjavac_server_java
1031 enable_sjavac
1032 enable_precompiled_headers
1033 enable_ccache
1034 with_ccache_dir
1035 '
1036       ac_precious_vars='build_alias
1037 host_alias
1038 target_alias
1039 PKG_CONFIG
1040 CC
1041 CFLAGS
1042 LDFLAGS
1043 LIBS
1044 CPPFLAGS
1045 CXX
1046 CXXFLAGS
1047 CCC
1048 OBJC
1049 OBJCFLAGS
1050 CPP
1051 CXXCPP
1052 XMKMF
1053 FREETYPE2_CFLAGS
1054 FREETYPE2_LIBS
1055 ALSA_CFLAGS
1056 ALSA_LIBS
1057 LIBFFI_CFLAGS
1058 LIBFFI_LIBS'
1059 
1060 
1061 # Initialize some variables set by options.
1062 ac_init_help=
1063 ac_init_version=false
1064 ac_unrecognized_opts=
1065 ac_unrecognized_sep=
1066 # The variables have the same names as the options, with
1067 # dashes changed to underlines.
1068 cache_file=/dev/null
1069 exec_prefix=NONE
1070 no_create=
1071 no_recursion=
1072 prefix=NONE
1073 program_prefix=NONE
1074 program_suffix=NONE
1075 program_transform_name=s,x,x,
1076 silent=
1077 site=
1078 srcdir=
1079 verbose=
1080 x_includes=NONE
1081 x_libraries=NONE
1082 
1083 # Installation directory options.
1084 # These are left unexpanded so users can "make install exec_prefix=/foo"
1085 # and all the variables that are supposed to be based on exec_prefix
1086 # by default will actually change.
1087 # Use braces instead of parens because sh, perl, etc. also accept them.
1088 # (The list follows the same order as the GNU Coding Standards.)
1089 bindir='${exec_prefix}/bin'
1090 sbindir='${exec_prefix}/sbin'
1091 libexecdir='${exec_prefix}/libexec'
1092 datarootdir='${prefix}/share'
1093 datadir='${datarootdir}'
1094 sysconfdir='${prefix}/etc'
1095 sharedstatedir='${prefix}/com'
1096 localstatedir='${prefix}/var'
1097 includedir='${prefix}/include'
1098 oldincludedir='/usr/include'
1099 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1100 infodir='${datarootdir}/info'
1101 htmldir='${docdir}'
1102 dvidir='${docdir}'
1103 pdfdir='${docdir}'
1104 psdir='${docdir}'
1105 libdir='${exec_prefix}/lib'
1106 localedir='${datarootdir}/locale'
1107 mandir='${datarootdir}/man'
1108 
1109 ac_prev=
1110 ac_dashdash=
1111 for ac_option
1112 do
1113   # If the previous option needs an argument, assign it.
1114   if test -n "$ac_prev"; then
1115     eval $ac_prev=\$ac_option
1116     ac_prev=
1117     continue
1118   fi
1119 
1120   case $ac_option in
1121   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1122   *=)   ac_optarg= ;;
1123   *)    ac_optarg=yes ;;
1124   esac
1125 
1126   # Accept the important Cygnus configure options, so we can diagnose typos.
1127 
1128   case $ac_dashdash$ac_option in
1129   --)
1130     ac_dashdash=yes ;;
1131 
1132   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1133     ac_prev=bindir ;;
1134   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1135     bindir=$ac_optarg ;;
1136 
1137   -build | --build | --buil | --bui | --bu)
1138     ac_prev=build_alias ;;
1139   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1140     build_alias=$ac_optarg ;;
1141 
1142   -cache-file | --cache-file | --cache-fil | --cache-fi \
1143   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1144     ac_prev=cache_file ;;
1145   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1146   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1147     cache_file=$ac_optarg ;;
1148 
1149   --config-cache | -C)
1150     cache_file=config.cache ;;
1151 
1152   -datadir | --datadir | --datadi | --datad)
1153     ac_prev=datadir ;;
1154   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1155     datadir=$ac_optarg ;;
1156 
1157   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1158   | --dataroo | --dataro | --datar)
1159     ac_prev=datarootdir ;;
1160   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1161   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1162     datarootdir=$ac_optarg ;;
1163 
1164   -disable-* | --disable-*)
1165     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1166     # Reject names that are not valid shell variable names.
1167     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168       as_fn_error $? "invalid feature name: $ac_useropt"
1169     ac_useropt_orig=$ac_useropt
1170     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171     case $ac_user_opts in
1172       *"
1173 "enable_$ac_useropt"
1174 "*) ;;
1175       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1176          ac_unrecognized_sep=', ';;
1177     esac
1178     eval enable_$ac_useropt=no ;;
1179 
1180   -docdir | --docdir | --docdi | --doc | --do)
1181     ac_prev=docdir ;;
1182   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1183     docdir=$ac_optarg ;;
1184 
1185   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1186     ac_prev=dvidir ;;
1187   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1188     dvidir=$ac_optarg ;;
1189 
1190   -enable-* | --enable-*)
1191     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1192     # Reject names that are not valid shell variable names.
1193     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194       as_fn_error $? "invalid feature name: $ac_useropt"
1195     ac_useropt_orig=$ac_useropt
1196     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197     case $ac_user_opts in
1198       *"
1199 "enable_$ac_useropt"
1200 "*) ;;
1201       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1202          ac_unrecognized_sep=', ';;
1203     esac
1204     eval enable_$ac_useropt=\$ac_optarg ;;
1205 
1206   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1207   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1208   | --exec | --exe | --ex)
1209     ac_prev=exec_prefix ;;
1210   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1211   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1212   | --exec=* | --exe=* | --ex=*)
1213     exec_prefix=$ac_optarg ;;
1214 
1215   -gas | --gas | --ga | --g)
1216     # Obsolete; use --with-gas.
1217     with_gas=yes ;;
1218 
1219   -help | --help | --hel | --he | -h)
1220     ac_init_help=long ;;
1221   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1222     ac_init_help=recursive ;;
1223   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1224     ac_init_help=short ;;
1225 
1226   -host | --host | --hos | --ho)
1227     ac_prev=host_alias ;;
1228   -host=* | --host=* | --hos=* | --ho=*)
1229     host_alias=$ac_optarg ;;
1230 
1231   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1232     ac_prev=htmldir ;;
1233   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1234   | --ht=*)
1235     htmldir=$ac_optarg ;;
1236 
1237   -includedir | --includedir | --includedi | --included | --include \
1238   | --includ | --inclu | --incl | --inc)
1239     ac_prev=includedir ;;
1240   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1241   | --includ=* | --inclu=* | --incl=* | --inc=*)
1242     includedir=$ac_optarg ;;
1243 
1244   -infodir | --infodir | --infodi | --infod | --info | --inf)
1245     ac_prev=infodir ;;
1246   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1247     infodir=$ac_optarg ;;
1248 
1249   -libdir | --libdir | --libdi | --libd)
1250     ac_prev=libdir ;;
1251   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1252     libdir=$ac_optarg ;;
1253 
1254   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1255   | --libexe | --libex | --libe)
1256     ac_prev=libexecdir ;;
1257   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1258   | --libexe=* | --libex=* | --libe=*)
1259     libexecdir=$ac_optarg ;;
1260 
1261   -localedir | --localedir | --localedi | --localed | --locale)
1262     ac_prev=localedir ;;
1263   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1264     localedir=$ac_optarg ;;
1265 
1266   -localstatedir | --localstatedir | --localstatedi | --localstated \
1267   | --localstate | --localstat | --localsta | --localst | --locals)
1268     ac_prev=localstatedir ;;
1269   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1270   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1271     localstatedir=$ac_optarg ;;
1272 
1273   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1274     ac_prev=mandir ;;
1275   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1276     mandir=$ac_optarg ;;
1277 
1278   -nfp | --nfp | --nf)
1279     # Obsolete; use --without-fp.
1280     with_fp=no ;;
1281 
1282   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1283   | --no-cr | --no-c | -n)
1284     no_create=yes ;;
1285 
1286   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1287   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1288     no_recursion=yes ;;
1289 
1290   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1291   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1292   | --oldin | --oldi | --old | --ol | --o)
1293     ac_prev=oldincludedir ;;
1294   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1295   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1296   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1297     oldincludedir=$ac_optarg ;;
1298 
1299   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1300     ac_prev=prefix ;;
1301   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1302     prefix=$ac_optarg ;;
1303 
1304   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1305   | --program-pre | --program-pr | --program-p)
1306     ac_prev=program_prefix ;;
1307   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1308   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1309     program_prefix=$ac_optarg ;;
1310 
1311   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1312   | --program-suf | --program-su | --program-s)
1313     ac_prev=program_suffix ;;
1314   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1315   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1316     program_suffix=$ac_optarg ;;
1317 
1318   -program-transform-name | --program-transform-name \
1319   | --program-transform-nam | --program-transform-na \
1320   | --program-transform-n | --program-transform- \
1321   | --program-transform | --program-transfor \
1322   | --program-transfo | --program-transf \
1323   | --program-trans | --program-tran \
1324   | --progr-tra | --program-tr | --program-t)
1325     ac_prev=program_transform_name ;;
1326   -program-transform-name=* | --program-transform-name=* \
1327   | --program-transform-nam=* | --program-transform-na=* \
1328   | --program-transform-n=* | --program-transform-=* \
1329   | --program-transform=* | --program-transfor=* \
1330   | --program-transfo=* | --program-transf=* \
1331   | --program-trans=* | --program-tran=* \
1332   | --progr-tra=* | --program-tr=* | --program-t=*)
1333     program_transform_name=$ac_optarg ;;
1334 
1335   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1336     ac_prev=pdfdir ;;
1337   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1338     pdfdir=$ac_optarg ;;
1339 
1340   -psdir | --psdir | --psdi | --psd | --ps)
1341     ac_prev=psdir ;;
1342   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1343     psdir=$ac_optarg ;;
1344 
1345   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1346   | -silent | --silent | --silen | --sile | --sil)
1347     silent=yes ;;
1348 
1349   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1350     ac_prev=sbindir ;;
1351   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1352   | --sbi=* | --sb=*)
1353     sbindir=$ac_optarg ;;
1354 
1355   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1356   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1357   | --sharedst | --shareds | --shared | --share | --shar \
1358   | --sha | --sh)
1359     ac_prev=sharedstatedir ;;
1360   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1361   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1362   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1363   | --sha=* | --sh=*)
1364     sharedstatedir=$ac_optarg ;;
1365 
1366   -site | --site | --sit)
1367     ac_prev=site ;;
1368   -site=* | --site=* | --sit=*)
1369     site=$ac_optarg ;;
1370 
1371   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1372     ac_prev=srcdir ;;
1373   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1374     srcdir=$ac_optarg ;;
1375 
1376   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1377   | --syscon | --sysco | --sysc | --sys | --sy)
1378     ac_prev=sysconfdir ;;
1379   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1380   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1381     sysconfdir=$ac_optarg ;;
1382 
1383   -target | --target | --targe | --targ | --tar | --ta | --t)
1384     ac_prev=target_alias ;;
1385   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1386     target_alias=$ac_optarg ;;
1387 
1388   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1389     verbose=yes ;;
1390 
1391   -version | --version | --versio | --versi | --vers | -V)
1392     ac_init_version=: ;;
1393 
1394   -with-* | --with-*)
1395     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1396     # Reject names that are not valid shell variable names.
1397     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398       as_fn_error $? "invalid package name: $ac_useropt"
1399     ac_useropt_orig=$ac_useropt
1400     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401     case $ac_user_opts in
1402       *"
1403 "with_$ac_useropt"
1404 "*) ;;
1405       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1406          ac_unrecognized_sep=', ';;
1407     esac
1408     eval with_$ac_useropt=\$ac_optarg ;;
1409 
1410   -without-* | --without-*)
1411     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1412     # Reject names that are not valid shell variable names.
1413     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1414       as_fn_error $? "invalid package name: $ac_useropt"
1415     ac_useropt_orig=$ac_useropt
1416     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1417     case $ac_user_opts in
1418       *"
1419 "with_$ac_useropt"
1420 "*) ;;
1421       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1422          ac_unrecognized_sep=', ';;
1423     esac
1424     eval with_$ac_useropt=no ;;
1425 
1426   --x)
1427     # Obsolete; use --with-x.
1428     with_x=yes ;;
1429 
1430   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1431   | --x-incl | --x-inc | --x-in | --x-i)
1432     ac_prev=x_includes ;;
1433   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1434   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1435     x_includes=$ac_optarg ;;
1436 
1437   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1438   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1439     ac_prev=x_libraries ;;
1440   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1441   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1442     x_libraries=$ac_optarg ;;
1443 
1444   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1445 Try \`$0 --help' for more information"
1446     ;;
1447 
1448   *=*)
1449     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1450     # Reject names that are not valid shell variable names.
1451     case $ac_envvar in #(
1452       '' | [0-9]* | *[!_$as_cr_alnum]* )
1453       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1454     esac
1455     eval $ac_envvar=\$ac_optarg
1456     export $ac_envvar ;;
1457 
1458   *)
1459     # FIXME: should be removed in autoconf 3.0.
1460     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1461     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1462       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1463     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1464     ;;
1465 
1466   esac
1467 done
1468 
1469 if test -n "$ac_prev"; then
1470   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1471   as_fn_error $? "missing argument to $ac_option"
1472 fi
1473 
1474 if test -n "$ac_unrecognized_opts"; then
1475   case $enable_option_checking in
1476     no) ;;
1477     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1478     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1479   esac
1480 fi
1481 
1482 # Check all directory arguments for consistency.
1483 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1484                 datadir sysconfdir sharedstatedir localstatedir includedir \
1485                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1486                 libdir localedir mandir
1487 do
1488   eval ac_val=\$$ac_var
1489   # Remove trailing slashes.
1490   case $ac_val in
1491     */ )
1492       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1493       eval $ac_var=\$ac_val;;
1494   esac
1495   # Be sure to have absolute directory names.
1496   case $ac_val in
1497     [\\/$]* | ?:[\\/]* )  continue;;
1498     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1499   esac
1500   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1501 done
1502 
1503 # There might be people who depend on the old broken behavior: `$host'
1504 # used to hold the argument of --host etc.
1505 # FIXME: To remove some day.
1506 build=$build_alias
1507 host=$host_alias
1508 target=$target_alias
1509 
1510 # FIXME: To remove some day.
1511 if test "x$host_alias" != x; then
1512   if test "x$build_alias" = x; then
1513     cross_compiling=maybe
1514     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1515     If a cross compiler is detected then cross compile mode will be used" >&2
1516   elif test "x$build_alias" != "x$host_alias"; then
1517     cross_compiling=yes
1518   fi
1519 fi
1520 
1521 ac_tool_prefix=
1522 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1523 
1524 test "$silent" = yes && exec 6>/dev/null
1525 
1526 
1527 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1528 ac_ls_di=`ls -di .` &&
1529 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1530   as_fn_error $? "working directory cannot be determined"
1531 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1532   as_fn_error $? "pwd does not report name of working directory"
1533 
1534 
1535 # Find the source files, if location was not specified.
1536 if test -z "$srcdir"; then
1537   ac_srcdir_defaulted=yes
1538   # Try the directory containing this script, then the parent directory.
1539   ac_confdir=`$as_dirname -- "$as_myself" ||
1540 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1541          X"$as_myself" : 'X\(//\)[^/]' \| \
1542          X"$as_myself" : 'X\(//\)$' \| \
1543          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1544 $as_echo X"$as_myself" |
1545     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1546             s//\1/
1547             q
1548           }
1549           /^X\(\/\/\)[^/].*/{
1550             s//\1/
1551             q
1552           }
1553           /^X\(\/\/\)$/{
1554             s//\1/
1555             q
1556           }
1557           /^X\(\/\).*/{
1558             s//\1/
1559             q
1560           }
1561           s/.*/./; q'`
1562   srcdir=$ac_confdir
1563   if test ! -r "$srcdir/$ac_unique_file"; then
1564     srcdir=..
1565   fi
1566 else
1567   ac_srcdir_defaulted=no
1568 fi
1569 if test ! -r "$srcdir/$ac_unique_file"; then
1570   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1571   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1572 fi
1573 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1574 ac_abs_confdir=`(
1575         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1576         pwd)`
1577 # When building in place, set srcdir=.
1578 if test "$ac_abs_confdir" = "$ac_pwd"; then
1579   srcdir=.
1580 fi
1581 # Remove unnecessary trailing slashes from srcdir.
1582 # Double slashes in file names in object file debugging info
1583 # mess up M-x gdb in Emacs.
1584 case $srcdir in
1585 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1586 esac
1587 for ac_var in $ac_precious_vars; do
1588   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1589   eval ac_env_${ac_var}_value=\$${ac_var}
1590   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1591   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1592 done
1593 
1594 #
1595 # Report the --help message.
1596 #
1597 if test "$ac_init_help" = "long"; then
1598   # Omit some internal or obsolete options to make the list less imposing.
1599   # This message is too long to be a string in the A/UX 3.1 sh.
1600   cat <<_ACEOF
1601 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1602 
1603 Usage: $0 [OPTION]... [VAR=VALUE]...
1604 
1605 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1606 VAR=VALUE.  See below for descriptions of some of the useful variables.
1607 
1608 Defaults for the options are specified in brackets.
1609 
1610 Configuration:
1611   -h, --help              display this help and exit
1612       --help=short        display options specific to this package
1613       --help=recursive    display the short help of all the included packages
1614   -V, --version           display version information and exit
1615   -q, --quiet, --silent   do not print \`checking ...' messages
1616       --cache-file=FILE   cache test results in FILE [disabled]
1617   -C, --config-cache      alias for \`--cache-file=config.cache'
1618   -n, --no-create         do not create output files
1619       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1620 
1621 Installation directories:
1622   --prefix=PREFIX         install architecture-independent files in PREFIX
1623                           [$ac_default_prefix]
1624   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1625                           [PREFIX]
1626 
1627 By default, \`make install' will install all the files in
1628 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1629 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1630 for instance \`--prefix=\$HOME'.
1631 
1632 For better control, use the options below.
1633 
1634 Fine tuning of the installation directories:
1635   --bindir=DIR            user executables [EPREFIX/bin]
1636   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1637   --libexecdir=DIR        program executables [EPREFIX/libexec]
1638   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1639   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1640   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1641   --libdir=DIR            object code libraries [EPREFIX/lib]
1642   --includedir=DIR        C header files [PREFIX/include]
1643   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1644   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1645   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1646   --infodir=DIR           info documentation [DATAROOTDIR/info]
1647   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1648   --mandir=DIR            man documentation [DATAROOTDIR/man]
1649   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1650   --htmldir=DIR           html documentation [DOCDIR]
1651   --dvidir=DIR            dvi documentation [DOCDIR]
1652   --pdfdir=DIR            pdf documentation [DOCDIR]
1653   --psdir=DIR             ps documentation [DOCDIR]
1654 _ACEOF
1655 
1656   cat <<\_ACEOF
1657 
1658 X features:
1659   --x-includes=DIR    X include files are in DIR
1660   --x-libraries=DIR   X library files are in DIR
1661 
1662 System types:
1663   --build=BUILD     configure for building on BUILD [guessed]
1664   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1665   --target=TARGET   configure for building compilers for TARGET [HOST]
1666 _ACEOF
1667 fi
1668 
1669 if test -n "$ac_init_help"; then
1670   case $ac_init_help in
1671      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1672    esac
1673   cat <<\_ACEOF
1674 
1675 Optional Features:
1676   --disable-option-checking  ignore unrecognized --enable/--with options
1677   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1678   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1679   --enable-openjdk-only   suppress building custom source even if present
1680                           [disabled]
1681   --enable-debug          set the debug level to fastdebug (shorthand for
1682                           --with-debug-level=fastdebug) [disabled]
1683   --disable-headful       disable building headful support (graphical UI
1684                           support) [enabled]
1685   --enable-hotspot-test-in-build
1686                           run the Queens test after Hotspot build [disabled]
1687   --enable-unlimited-crypto
1688                           Enable unlimited crypto policy [disabled]
1689   --disable-debug-symbols disable generation of debug symbols [enabled]
1690   --disable-zip-debug-info
1691                           disable zipping of debug-info files [enabled]
1692   --disable-macosx-runtime-support
1693                           disable the use of MacOSX Java runtime support
1694                           framework [enabled]
1695   --enable-sjavac         use sjavac to do fast incremental compiles
1696                           [disabled]
1697   --disable-precompiled-headers
1698                           disable using precompiled headers when compiling C++
1699                           [enabled]
1700   --disable-ccache        disable using ccache to speed up recompilations
1701                           [enabled]
1702 
1703 Optional Packages:
1704   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1705   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1706   --with-custom-make-dir  use this directory for custom build/make files
1707   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1708                           support it), e.g. --with-target-bits=32 [guessed]
1709   --with-sys-root         pass this sys-root to the compilers and tools (for
1710                           cross-compiling)
1711   --with-tools-dir        search this directory for compilers and tools (for
1712                           cross-compiling)
1713   --with-devkit           use this directory as base for tools-dir and
1714                           sys-root (for cross-compiling)
1715   --with-jdk-variant      JDK variant to build (normal) [normal]
1716   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1717                           client, minimal1, kernel, zero, zeroshark) [server]
1718   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1719                           [release]
1720   --with-conf-name        use this as the name of the configuration [generated
1721                           from important configuration options]
1722   --with-builddeps-conf   use this configuration file for the builddeps
1723   --with-builddeps-server download and use build dependencies from this server
1724                           url
1725   --with-builddeps-dir    store downloaded build dependencies here
1726                           [/localhome/builddeps]
1727   --with-builddeps-group  chgrp the downloaded build dependencies to this
1728                           group
1729   --with-cacerts-file     specify alternative cacerts file
1730   --with-milestone        Set milestone value for build [internal]
1731   --with-update-version   Set update version value for build [b00]
1732   --with-build-number     Set build number value for build [b00]
1733   --with-user-release-suffix
1734                           Add a custom string to the version string if build
1735                           number isn't set.[username_builddateb00]
1736   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1737   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1738                           invocations of the Boot JDK, overriding the default
1739                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1740                           -enableassertions"
1741   --with-add-source-root  for each and every source directory, look in this
1742                           additional source root for the same directory; if it
1743                           exists and have files in it, include it in the build
1744   --with-override-source-root
1745                           for each and every source directory, look in this
1746                           override source root for the same directory; if it
1747                           exists, use that directory instead and ignore the
1748                           directory in the original source root
1749   --with-adds-and-overrides
1750                           use the subdirs 'adds' and 'overrides' in the
1751                           specified directory as add-source-root and
1752                           override-source-root
1753   --with-override-langtools
1754                           use this langtools dir for the build
1755   --with-override-corba   use this corba dir for the build
1756   --with-override-jaxp    use this jaxp dir for the build
1757   --with-override-jaxws   use this jaxws dir for the build
1758   --with-override-hotspot use this hotspot dir for the build
1759   --with-override-jdk     use this jdk dir for the build
1760   --with-import-hotspot   import hotspot binaries from this jdk image or
1761                           hotspot build dist dir instead of building from
1762                           source
1763   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1764                           only) [probed]
1765   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1766   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1767                           [probed]
1768   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1769                           [probed]
1770   --with-jtreg            Regression Test Harness [probed]
1771   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1772   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1773   --with-extra-ldflags    extra flags to be used when linking jdk
1774   --with-x                use the X Window System
1775   --with-cups             specify prefix directory for the cups package
1776                           (expecting the headers under PATH/include)
1777   --with-cups-include     specify directory for the cups include files
1778   --with-freetype         specify prefix directory for the freetype2 package
1779                           (expecting the libraries under PATH/lib and the
1780                           headers under PATH/include)
1781   --with-alsa             specify prefix directory for the alsa package
1782                           (expecting the libraries under PATH/lib and the
1783                           headers under PATH/include)
1784   --with-alsa-include     specify directory for the alsa include files
1785   --with-alsa-lib         specify directory for the alsa library
1786   --with-giflib           use giflib from build system or OpenJDK source
1787                           (system, bundled) [bundled]
1788   --with-zlib             use zlib from build system or OpenJDK source
1789                           (system, bundled) [bundled]
1790   --with-stdc++lib=<static>,<dynamic>,<default>
1791                           force linking of the C++ runtime on Linux to either
1792                           static or dynamic, default is static with dynamic as
1793                           fallback
1794   --with-num-cores        number of cores in the build system, e.g.
1795                           --with-num-cores=8 [probed]
1796   --with-memory-size      memory (in MB) available in the build system, e.g.
1797                           --with-memory-size=1024 [probed]
1798   --with-jobs             number of parallel jobs to let make run [calculated
1799                           based on cores and memory]
1800   --with-sjavac-server-java
1801                           use this java binary for running the sjavac
1802                           background server [Boot JDK java]
1803   --with-ccache-dir       where to store ccache files [~/.ccache]
1804 
1805 Some influential environment variables:
1806   PKG_CONFIG  path to pkg-config utility
1807   CC          C compiler command
1808   CFLAGS      C compiler flags
1809   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1810               nonstandard directory <lib dir>
1811   LIBS        libraries to pass to the linker, e.g. -l<library>
1812   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1813               you have headers in a nonstandard directory <include dir>
1814   CXX         C++ compiler command
1815   CXXFLAGS    C++ compiler flags
1816   OBJC        Objective C compiler command
1817   OBJCFLAGS   Objective C compiler flags
1818   CPP         C preprocessor
1819   CXXCPP      C++ preprocessor
1820   XMKMF       Path to xmkmf, Makefile generator for X Window System
1821   FREETYPE2_CFLAGS
1822               C compiler flags for FREETYPE2, overriding pkg-config
1823   FREETYPE2_LIBS
1824               linker flags for FREETYPE2, overriding pkg-config
1825   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1826   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1827   LIBFFI_CFLAGS
1828               C compiler flags for LIBFFI, overriding pkg-config
1829   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1830 
1831 Use these variables to override the choices made by `configure' or to help
1832 it to find libraries and programs with nonstandard names/locations.
1833 
1834 Report bugs to <build-dev@openjdk.java.net>.
1835 OpenJDK home page: <http://openjdk.java.net>.
1836 _ACEOF
1837 ac_status=$?
1838 fi
1839 
1840 if test "$ac_init_help" = "recursive"; then
1841   # If there are subdirs, report their specific --help.
1842   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1843     test -d "$ac_dir" ||
1844       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1845       continue
1846     ac_builddir=.
1847 
1848 case "$ac_dir" in
1849 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1850 *)
1851   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1852   # A ".." for each directory in $ac_dir_suffix.
1853   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1854   case $ac_top_builddir_sub in
1855   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1856   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1857   esac ;;
1858 esac
1859 ac_abs_top_builddir=$ac_pwd
1860 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1861 # for backward compatibility:
1862 ac_top_builddir=$ac_top_build_prefix
1863 
1864 case $srcdir in
1865   .)  # We are building in place.
1866     ac_srcdir=.
1867     ac_top_srcdir=$ac_top_builddir_sub
1868     ac_abs_top_srcdir=$ac_pwd ;;
1869   [\\/]* | ?:[\\/]* )  # Absolute name.
1870     ac_srcdir=$srcdir$ac_dir_suffix;
1871     ac_top_srcdir=$srcdir
1872     ac_abs_top_srcdir=$srcdir ;;
1873   *) # Relative name.
1874     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1875     ac_top_srcdir=$ac_top_build_prefix$srcdir
1876     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1877 esac
1878 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1879 
1880     cd "$ac_dir" || { ac_status=$?; continue; }
1881     # Check for guested configure.
1882     if test -f "$ac_srcdir/configure.gnu"; then
1883       echo &&
1884       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1885     elif test -f "$ac_srcdir/configure"; then
1886       echo &&
1887       $SHELL "$ac_srcdir/configure" --help=recursive
1888     else
1889       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1890     fi || ac_status=$?
1891     cd "$ac_pwd" || { ac_status=$?; break; }
1892   done
1893 fi
1894 
1895 test -n "$ac_init_help" && exit $ac_status
1896 if $ac_init_version; then
1897   cat <<\_ACEOF
1898 OpenJDK configure jdk8
1899 generated by GNU Autoconf 2.67
1900 
1901 Copyright (C) 2010 Free Software Foundation, Inc.
1902 This configure script is free software; the Free Software Foundation
1903 gives unlimited permission to copy, distribute and modify it.
1904 _ACEOF
1905   exit
1906 fi
1907 
1908 ## ------------------------ ##
1909 ## Autoconf initialization. ##
1910 ## ------------------------ ##
1911 
1912 # ac_fn_c_try_compile LINENO
1913 # --------------------------
1914 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1915 ac_fn_c_try_compile ()
1916 {
1917   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918   rm -f conftest.$ac_objext
1919   if { { ac_try="$ac_compile"
1920 case "(($ac_try" in
1921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922   *) ac_try_echo=$ac_try;;
1923 esac
1924 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925 $as_echo "$ac_try_echo"; } >&5
1926   (eval "$ac_compile") 2>conftest.err
1927   ac_status=$?
1928   if test -s conftest.err; then
1929     grep -v '^ *+' conftest.err >conftest.er1
1930     cat conftest.er1 >&5
1931     mv -f conftest.er1 conftest.err
1932   fi
1933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934   test $ac_status = 0; } && {
1935          test -z "$ac_c_werror_flag" ||
1936          test ! -s conftest.err
1937        } && test -s conftest.$ac_objext; then :
1938   ac_retval=0
1939 else
1940   $as_echo "$as_me: failed program was:" >&5
1941 sed 's/^/| /' conftest.$ac_ext >&5
1942 
1943         ac_retval=1
1944 fi
1945   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946   as_fn_set_status $ac_retval
1947 
1948 } # ac_fn_c_try_compile
1949 
1950 # ac_fn_cxx_try_compile LINENO
1951 # ----------------------------
1952 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1953 ac_fn_cxx_try_compile ()
1954 {
1955   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956   rm -f conftest.$ac_objext
1957   if { { ac_try="$ac_compile"
1958 case "(($ac_try" in
1959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960   *) ac_try_echo=$ac_try;;
1961 esac
1962 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963 $as_echo "$ac_try_echo"; } >&5
1964   (eval "$ac_compile") 2>conftest.err
1965   ac_status=$?
1966   if test -s conftest.err; then
1967     grep -v '^ *+' conftest.err >conftest.er1
1968     cat conftest.er1 >&5
1969     mv -f conftest.er1 conftest.err
1970   fi
1971   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972   test $ac_status = 0; } && {
1973          test -z "$ac_cxx_werror_flag" ||
1974          test ! -s conftest.err
1975        } && test -s conftest.$ac_objext; then :
1976   ac_retval=0
1977 else
1978   $as_echo "$as_me: failed program was:" >&5
1979 sed 's/^/| /' conftest.$ac_ext >&5
1980 
1981         ac_retval=1
1982 fi
1983   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984   as_fn_set_status $ac_retval
1985 
1986 } # ac_fn_cxx_try_compile
1987 
1988 # ac_fn_objc_try_compile LINENO
1989 # -----------------------------
1990 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1991 ac_fn_objc_try_compile ()
1992 {
1993   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994   rm -f conftest.$ac_objext
1995   if { { ac_try="$ac_compile"
1996 case "(($ac_try" in
1997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998   *) ac_try_echo=$ac_try;;
1999 esac
2000 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001 $as_echo "$ac_try_echo"; } >&5
2002   (eval "$ac_compile") 2>conftest.err
2003   ac_status=$?
2004   if test -s conftest.err; then
2005     grep -v '^ *+' conftest.err >conftest.er1
2006     cat conftest.er1 >&5
2007     mv -f conftest.er1 conftest.err
2008   fi
2009   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010   test $ac_status = 0; } && {
2011          test -z "$ac_objc_werror_flag" ||
2012          test ! -s conftest.err
2013        } && test -s conftest.$ac_objext; then :
2014   ac_retval=0
2015 else
2016   $as_echo "$as_me: failed program was:" >&5
2017 sed 's/^/| /' conftest.$ac_ext >&5
2018 
2019         ac_retval=1
2020 fi
2021   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022   as_fn_set_status $ac_retval
2023 
2024 } # ac_fn_objc_try_compile
2025 
2026 # ac_fn_c_try_cpp LINENO
2027 # ----------------------
2028 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029 ac_fn_c_try_cpp ()
2030 {
2031   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032   if { { ac_try="$ac_cpp conftest.$ac_ext"
2033 case "(($ac_try" in
2034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035   *) ac_try_echo=$ac_try;;
2036 esac
2037 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038 $as_echo "$ac_try_echo"; } >&5
2039   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040   ac_status=$?
2041   if test -s conftest.err; then
2042     grep -v '^ *+' conftest.err >conftest.er1
2043     cat conftest.er1 >&5
2044     mv -f conftest.er1 conftest.err
2045   fi
2046   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047   test $ac_status = 0; } > conftest.i && {
2048          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2049          test ! -s conftest.err
2050        }; then :
2051   ac_retval=0
2052 else
2053   $as_echo "$as_me: failed program was:" >&5
2054 sed 's/^/| /' conftest.$ac_ext >&5
2055 
2056     ac_retval=1
2057 fi
2058   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059   as_fn_set_status $ac_retval
2060 
2061 } # ac_fn_c_try_cpp
2062 
2063 # ac_fn_cxx_try_cpp LINENO
2064 # ------------------------
2065 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2066 ac_fn_cxx_try_cpp ()
2067 {
2068   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069   if { { ac_try="$ac_cpp conftest.$ac_ext"
2070 case "(($ac_try" in
2071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072   *) ac_try_echo=$ac_try;;
2073 esac
2074 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075 $as_echo "$ac_try_echo"; } >&5
2076   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2077   ac_status=$?
2078   if test -s conftest.err; then
2079     grep -v '^ *+' conftest.err >conftest.er1
2080     cat conftest.er1 >&5
2081     mv -f conftest.er1 conftest.err
2082   fi
2083   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084   test $ac_status = 0; } > conftest.i && {
2085          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2086          test ! -s conftest.err
2087        }; then :
2088   ac_retval=0
2089 else
2090   $as_echo "$as_me: failed program was:" >&5
2091 sed 's/^/| /' conftest.$ac_ext >&5
2092 
2093     ac_retval=1
2094 fi
2095   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2096   as_fn_set_status $ac_retval
2097 
2098 } # ac_fn_cxx_try_cpp
2099 
2100 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2101 # ---------------------------------------------------------
2102 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2103 # the include files in INCLUDES and setting the cache variable VAR
2104 # accordingly.
2105 ac_fn_cxx_check_header_mongrel ()
2106 {
2107   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108   if eval "test \"\${$3+set}\"" = set; then :
2109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2110 $as_echo_n "checking for $2... " >&6; }
2111 if eval "test \"\${$3+set}\"" = set; then :
2112   $as_echo_n "(cached) " >&6
2113 fi
2114 eval ac_res=\$$3
2115                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116 $as_echo "$ac_res" >&6; }
2117 else
2118   # Is the header compilable?
2119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2120 $as_echo_n "checking $2 usability... " >&6; }
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h.  */
2123 $4
2124 #include <$2>
2125 _ACEOF
2126 if ac_fn_cxx_try_compile "$LINENO"; then :
2127   ac_header_compiler=yes
2128 else
2129   ac_header_compiler=no
2130 fi
2131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2133 $as_echo "$ac_header_compiler" >&6; }
2134 
2135 # Is the header present?
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2137 $as_echo_n "checking $2 presence... " >&6; }
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h.  */
2140 #include <$2>
2141 _ACEOF
2142 if ac_fn_cxx_try_cpp "$LINENO"; then :
2143   ac_header_preproc=yes
2144 else
2145   ac_header_preproc=no
2146 fi
2147 rm -f conftest.err conftest.i conftest.$ac_ext
2148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2149 $as_echo "$ac_header_preproc" >&6; }
2150 
2151 # So?  What about this header?
2152 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2153   yes:no: )
2154     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2155 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2156     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2157 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2158     ;;
2159   no:yes:* )
2160     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2161 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2162     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2163 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2164     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2165 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2166     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2167 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2168     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2169 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2170 ( $as_echo "## ----------------------------------------- ##
2171 ## Report this to build-dev@openjdk.java.net ##
2172 ## ----------------------------------------- ##"
2173      ) | sed "s/^/$as_me: WARNING:     /" >&2
2174     ;;
2175 esac
2176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177 $as_echo_n "checking for $2... " >&6; }
2178 if eval "test \"\${$3+set}\"" = set; then :
2179   $as_echo_n "(cached) " >&6
2180 else
2181   eval "$3=\$ac_header_compiler"
2182 fi
2183 eval ac_res=\$$3
2184                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2185 $as_echo "$ac_res" >&6; }
2186 fi
2187   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2188 
2189 } # ac_fn_cxx_check_header_mongrel
2190 
2191 # ac_fn_cxx_try_run LINENO
2192 # ------------------------
2193 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2194 # that executables *can* be run.
2195 ac_fn_cxx_try_run ()
2196 {
2197   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198   if { { ac_try="$ac_link"
2199 case "(($ac_try" in
2200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201   *) ac_try_echo=$ac_try;;
2202 esac
2203 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204 $as_echo "$ac_try_echo"; } >&5
2205   (eval "$ac_link") 2>&5
2206   ac_status=$?
2207   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2208   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2209   { { case "(($ac_try" in
2210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2211   *) ac_try_echo=$ac_try;;
2212 esac
2213 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2214 $as_echo "$ac_try_echo"; } >&5
2215   (eval "$ac_try") 2>&5
2216   ac_status=$?
2217   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2218   test $ac_status = 0; }; }; then :
2219   ac_retval=0
2220 else
2221   $as_echo "$as_me: program exited with status $ac_status" >&5
2222        $as_echo "$as_me: failed program was:" >&5
2223 sed 's/^/| /' conftest.$ac_ext >&5
2224 
2225        ac_retval=$ac_status
2226 fi
2227   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2228   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229   as_fn_set_status $ac_retval
2230 
2231 } # ac_fn_cxx_try_run
2232 
2233 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2234 # ---------------------------------------------------------
2235 # Tests whether HEADER exists and can be compiled using the include files in
2236 # INCLUDES, setting the cache variable VAR accordingly.
2237 ac_fn_cxx_check_header_compile ()
2238 {
2239   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2241 $as_echo_n "checking for $2... " >&6; }
2242 if eval "test \"\${$3+set}\"" = set; then :
2243   $as_echo_n "(cached) " >&6
2244 else
2245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246 /* end confdefs.h.  */
2247 $4
2248 #include <$2>
2249 _ACEOF
2250 if ac_fn_cxx_try_compile "$LINENO"; then :
2251   eval "$3=yes"
2252 else
2253   eval "$3=no"
2254 fi
2255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2256 fi
2257 eval ac_res=\$$3
2258                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2259 $as_echo "$ac_res" >&6; }
2260   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2261 
2262 } # ac_fn_cxx_check_header_compile
2263 
2264 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2265 # ----------------------------------------------
2266 # Tries to find the compile-time value of EXPR in a program that includes
2267 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2268 # computed
2269 ac_fn_cxx_compute_int ()
2270 {
2271   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272   if test "$cross_compiling" = yes; then
2273     # Depending upon the size, compute the lo and hi bounds.
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275 /* end confdefs.h.  */
2276 $4
2277 int
2278 main ()
2279 {
2280 static int test_array [1 - 2 * !(($2) >= 0)];
2281 test_array [0] = 0
2282 
2283   ;
2284   return 0;
2285 }
2286 _ACEOF
2287 if ac_fn_cxx_try_compile "$LINENO"; then :
2288   ac_lo=0 ac_mid=0
2289   while :; do
2290     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291 /* end confdefs.h.  */
2292 $4
2293 int
2294 main ()
2295 {
2296 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2297 test_array [0] = 0
2298 
2299   ;
2300   return 0;
2301 }
2302 _ACEOF
2303 if ac_fn_cxx_try_compile "$LINENO"; then :
2304   ac_hi=$ac_mid; break
2305 else
2306   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2307                         if test $ac_lo -le $ac_mid; then
2308                           ac_lo= ac_hi=
2309                           break
2310                         fi
2311                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2312 fi
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314   done
2315 else
2316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h.  */
2318 $4
2319 int
2320 main ()
2321 {
2322 static int test_array [1 - 2 * !(($2) < 0)];
2323 test_array [0] = 0
2324 
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 if ac_fn_cxx_try_compile "$LINENO"; then :
2330   ac_hi=-1 ac_mid=-1
2331   while :; do
2332     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333 /* end confdefs.h.  */
2334 $4
2335 int
2336 main ()
2337 {
2338 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2339 test_array [0] = 0
2340 
2341   ;
2342   return 0;
2343 }
2344 _ACEOF
2345 if ac_fn_cxx_try_compile "$LINENO"; then :
2346   ac_lo=$ac_mid; break
2347 else
2348   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2349                         if test $ac_mid -le $ac_hi; then
2350                           ac_lo= ac_hi=
2351                           break
2352                         fi
2353                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2354 fi
2355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356   done
2357 else
2358   ac_lo= ac_hi=
2359 fi
2360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361 fi
2362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363 # Binary search between lo and hi bounds.
2364 while test "x$ac_lo" != "x$ac_hi"; do
2365   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367 /* end confdefs.h.  */
2368 $4
2369 int
2370 main ()
2371 {
2372 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2373 test_array [0] = 0
2374 
2375   ;
2376   return 0;
2377 }
2378 _ACEOF
2379 if ac_fn_cxx_try_compile "$LINENO"; then :
2380   ac_hi=$ac_mid
2381 else
2382   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2383 fi
2384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385 done
2386 case $ac_lo in #((
2387 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2388 '') ac_retval=1 ;;
2389 esac
2390   else
2391     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392 /* end confdefs.h.  */
2393 $4
2394 static long int longval () { return $2; }
2395 static unsigned long int ulongval () { return $2; }
2396 #include <stdio.h>
2397 #include <stdlib.h>
2398 int
2399 main ()
2400 {
2401 
2402   FILE *f = fopen ("conftest.val", "w");
2403   if (! f)
2404     return 1;
2405   if (($2) < 0)
2406     {
2407       long int i = longval ();
2408       if (i != ($2))
2409         return 1;
2410       fprintf (f, "%ld", i);
2411     }
2412   else
2413     {
2414       unsigned long int i = ulongval ();
2415       if (i != ($2))
2416         return 1;
2417       fprintf (f, "%lu", i);
2418     }
2419   /* Do not output a trailing newline, as this causes \r\n confusion
2420      on some platforms.  */
2421   return ferror (f) || fclose (f) != 0;
2422 
2423   ;
2424   return 0;
2425 }
2426 _ACEOF
2427 if ac_fn_cxx_try_run "$LINENO"; then :
2428   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2429 else
2430   ac_retval=1
2431 fi
2432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2433   conftest.$ac_objext conftest.beam conftest.$ac_ext
2434 rm -f conftest.val
2435 
2436   fi
2437   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438   as_fn_set_status $ac_retval
2439 
2440 } # ac_fn_cxx_compute_int
2441 
2442 # ac_fn_cxx_try_link LINENO
2443 # -------------------------
2444 # Try to link conftest.$ac_ext, and return whether this succeeded.
2445 ac_fn_cxx_try_link ()
2446 {
2447   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448   rm -f conftest.$ac_objext conftest$ac_exeext
2449   if { { ac_try="$ac_link"
2450 case "(($ac_try" in
2451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2452   *) ac_try_echo=$ac_try;;
2453 esac
2454 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2455 $as_echo "$ac_try_echo"; } >&5
2456   (eval "$ac_link") 2>conftest.err
2457   ac_status=$?
2458   if test -s conftest.err; then
2459     grep -v '^ *+' conftest.err >conftest.er1
2460     cat conftest.er1 >&5
2461     mv -f conftest.er1 conftest.err
2462   fi
2463   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2464   test $ac_status = 0; } && {
2465          test -z "$ac_cxx_werror_flag" ||
2466          test ! -s conftest.err
2467        } && test -s conftest$ac_exeext && {
2468          test "$cross_compiling" = yes ||
2469          $as_test_x conftest$ac_exeext
2470        }; then :
2471   ac_retval=0
2472 else
2473   $as_echo "$as_me: failed program was:" >&5
2474 sed 's/^/| /' conftest.$ac_ext >&5
2475 
2476         ac_retval=1
2477 fi
2478   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2479   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2480   # interfere with the next link command; also delete a directory that is
2481   # left behind by Apple's compiler.  We do this before executing the actions.
2482   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2483   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2484   as_fn_set_status $ac_retval
2485 
2486 } # ac_fn_cxx_try_link
2487 
2488 # ac_fn_cxx_check_func LINENO FUNC VAR
2489 # ------------------------------------
2490 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2491 ac_fn_cxx_check_func ()
2492 {
2493   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495 $as_echo_n "checking for $2... " >&6; }
2496 if eval "test \"\${$3+set}\"" = set; then :
2497   $as_echo_n "(cached) " >&6
2498 else
2499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500 /* end confdefs.h.  */
2501 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2502    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2503 #define $2 innocuous_$2
2504 
2505 /* System header to define __stub macros and hopefully few prototypes,
2506     which can conflict with char $2 (); below.
2507     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2508     <limits.h> exists even on freestanding compilers.  */
2509 
2510 #ifdef __STDC__
2511 # include <limits.h>
2512 #else
2513 # include <assert.h>
2514 #endif
2515 
2516 #undef $2
2517 
2518 /* Override any GCC internal prototype to avoid an error.
2519    Use char because int might match the return type of a GCC
2520    builtin and then its argument prototype would still apply.  */
2521 #ifdef __cplusplus
2522 extern "C"
2523 #endif
2524 char $2 ();
2525 /* The GNU C library defines this for functions which it implements
2526     to always fail with ENOSYS.  Some functions are actually named
2527     something starting with __ and the normal name is an alias.  */
2528 #if defined __stub_$2 || defined __stub___$2
2529 choke me
2530 #endif
2531 
2532 int
2533 main ()
2534 {
2535 return $2 ();
2536   ;
2537   return 0;
2538 }
2539 _ACEOF
2540 if ac_fn_cxx_try_link "$LINENO"; then :
2541   eval "$3=yes"
2542 else
2543   eval "$3=no"
2544 fi
2545 rm -f core conftest.err conftest.$ac_objext \
2546     conftest$ac_exeext conftest.$ac_ext
2547 fi
2548 eval ac_res=\$$3
2549                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550 $as_echo "$ac_res" >&6; }
2551   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2552 
2553 } # ac_fn_cxx_check_func
2554 
2555 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2556 # -------------------------------------------------------
2557 # Tests whether HEADER exists and can be compiled using the include files in
2558 # INCLUDES, setting the cache variable VAR accordingly.
2559 ac_fn_c_check_header_compile ()
2560 {
2561   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2563 $as_echo_n "checking for $2... " >&6; }
2564 if eval "test \"\${$3+set}\"" = set; then :
2565   $as_echo_n "(cached) " >&6
2566 else
2567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568 /* end confdefs.h.  */
2569 $4
2570 #include <$2>
2571 _ACEOF
2572 if ac_fn_c_try_compile "$LINENO"; then :
2573   eval "$3=yes"
2574 else
2575   eval "$3=no"
2576 fi
2577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578 fi
2579 eval ac_res=\$$3
2580                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2581 $as_echo "$ac_res" >&6; }
2582   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2583 
2584 } # ac_fn_c_check_header_compile
2585 cat >config.log <<_ACEOF
2586 This file contains any messages produced by compilers while
2587 running configure, to aid debugging if configure makes a mistake.
2588 
2589 It was created by OpenJDK $as_me jdk8, which was
2590 generated by GNU Autoconf 2.67.  Invocation command line was
2591 
2592   $ $0 $@
2593 
2594 _ACEOF
2595 exec 5>>config.log
2596 {
2597 cat <<_ASUNAME
2598 ## --------- ##
2599 ## Platform. ##
2600 ## --------- ##
2601 
2602 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2603 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2604 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2605 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2606 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2607 
2608 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2609 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2610 
2611 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2612 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2613 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2614 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2615 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2616 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2617 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2618 
2619 _ASUNAME
2620 
2621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622 for as_dir in $PATH
2623 do
2624   IFS=$as_save_IFS
2625   test -z "$as_dir" && as_dir=.
2626     $as_echo "PATH: $as_dir"
2627   done
2628 IFS=$as_save_IFS
2629 
2630 } >&5
2631 
2632 cat >&5 <<_ACEOF
2633 
2634 
2635 ## ----------- ##
2636 ## Core tests. ##
2637 ## ----------- ##
2638 
2639 _ACEOF
2640 
2641 
2642 # Keep a trace of the command line.
2643 # Strip out --no-create and --no-recursion so they do not pile up.
2644 # Strip out --silent because we don't want to record it for future runs.
2645 # Also quote any args containing shell meta-characters.
2646 # Make two passes to allow for proper duplicate-argument suppression.
2647 ac_configure_args=
2648 ac_configure_args0=
2649 ac_configure_args1=
2650 ac_must_keep_next=false
2651 for ac_pass in 1 2
2652 do
2653   for ac_arg
2654   do
2655     case $ac_arg in
2656     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2657     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2658     | -silent | --silent | --silen | --sile | --sil)
2659       continue ;;
2660     *\'*)
2661       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2662     esac
2663     case $ac_pass in
2664     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2665     2)
2666       as_fn_append ac_configure_args1 " '$ac_arg'"
2667       if test $ac_must_keep_next = true; then
2668         ac_must_keep_next=false # Got value, back to normal.
2669       else
2670         case $ac_arg in
2671           *=* | --config-cache | -C | -disable-* | --disable-* \
2672           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2673           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2674           | -with-* | --with-* | -without-* | --without-* | --x)
2675             case "$ac_configure_args0 " in
2676               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2677             esac
2678             ;;
2679           -* ) ac_must_keep_next=true ;;
2680         esac
2681       fi
2682       as_fn_append ac_configure_args " '$ac_arg'"
2683       ;;
2684     esac
2685   done
2686 done
2687 { ac_configure_args0=; unset ac_configure_args0;}
2688 { ac_configure_args1=; unset ac_configure_args1;}
2689 
2690 # When interrupted or exit'd, cleanup temporary files, and complete
2691 # config.log.  We remove comments because anyway the quotes in there
2692 # would cause problems or look ugly.
2693 # WARNING: Use '\'' to represent an apostrophe within the trap.
2694 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2695 trap 'exit_status=$?
2696   # Save into config.log some information that might help in debugging.
2697   {
2698     echo
2699 
2700     $as_echo "## ---------------- ##
2701 ## Cache variables. ##
2702 ## ---------------- ##"
2703     echo
2704     # The following way of writing the cache mishandles newlines in values,
2705 (
2706   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2707     eval ac_val=\$$ac_var
2708     case $ac_val in #(
2709     *${as_nl}*)
2710       case $ac_var in #(
2711       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2712 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2713       esac
2714       case $ac_var in #(
2715       _ | IFS | as_nl) ;; #(
2716       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2717       *) { eval $ac_var=; unset $ac_var;} ;;
2718       esac ;;
2719     esac
2720   done
2721   (set) 2>&1 |
2722     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2723     *${as_nl}ac_space=\ *)
2724       sed -n \
2725         "s/'\''/'\''\\\\'\'''\''/g;
2726           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2727       ;; #(
2728     *)
2729       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2730       ;;
2731     esac |
2732     sort
2733 )
2734     echo
2735 
2736     $as_echo "## ----------------- ##
2737 ## Output variables. ##
2738 ## ----------------- ##"
2739     echo
2740     for ac_var in $ac_subst_vars
2741     do
2742       eval ac_val=\$$ac_var
2743       case $ac_val in
2744       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2745       esac
2746       $as_echo "$ac_var='\''$ac_val'\''"
2747     done | sort
2748     echo
2749 
2750     if test -n "$ac_subst_files"; then
2751       $as_echo "## ------------------- ##
2752 ## File substitutions. ##
2753 ## ------------------- ##"
2754       echo
2755       for ac_var in $ac_subst_files
2756       do
2757         eval ac_val=\$$ac_var
2758         case $ac_val in
2759         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2760         esac
2761         $as_echo "$ac_var='\''$ac_val'\''"
2762       done | sort
2763       echo
2764     fi
2765 
2766     if test -s confdefs.h; then
2767       $as_echo "## ----------- ##
2768 ## confdefs.h. ##
2769 ## ----------- ##"
2770       echo
2771       cat confdefs.h
2772       echo
2773     fi
2774     test "$ac_signal" != 0 &&
2775       $as_echo "$as_me: caught signal $ac_signal"
2776     $as_echo "$as_me: exit $exit_status"
2777   } >&5
2778   rm -f core *.core core.conftest.* &&
2779     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2780     exit $exit_status
2781 ' 0
2782 for ac_signal in 1 2 13 15; do
2783   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2784 done
2785 ac_signal=0
2786 
2787 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2788 rm -f -r conftest* confdefs.h
2789 
2790 $as_echo "/* confdefs.h */" > confdefs.h
2791 
2792 # Predefined preprocessor variables.
2793 
2794 cat >>confdefs.h <<_ACEOF
2795 #define PACKAGE_NAME "$PACKAGE_NAME"
2796 _ACEOF
2797 
2798 cat >>confdefs.h <<_ACEOF
2799 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2800 _ACEOF
2801 
2802 cat >>confdefs.h <<_ACEOF
2803 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2804 _ACEOF
2805 
2806 cat >>confdefs.h <<_ACEOF
2807 #define PACKAGE_STRING "$PACKAGE_STRING"
2808 _ACEOF
2809 
2810 cat >>confdefs.h <<_ACEOF
2811 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2812 _ACEOF
2813 
2814 cat >>confdefs.h <<_ACEOF
2815 #define PACKAGE_URL "$PACKAGE_URL"
2816 _ACEOF
2817 
2818 
2819 # Let the site file select an alternate cache file if it wants to.
2820 # Prefer an explicitly selected file to automatically selected ones.
2821 ac_site_file1=NONE
2822 ac_site_file2=NONE
2823 if test -n "$CONFIG_SITE"; then
2824   # We do not want a PATH search for config.site.
2825   case $CONFIG_SITE in #((
2826     -*)  ac_site_file1=./$CONFIG_SITE;;
2827     */*) ac_site_file1=$CONFIG_SITE;;
2828     *)   ac_site_file1=./$CONFIG_SITE;;
2829   esac
2830 elif test "x$prefix" != xNONE; then
2831   ac_site_file1=$prefix/share/config.site
2832   ac_site_file2=$prefix/etc/config.site
2833 else
2834   ac_site_file1=$ac_default_prefix/share/config.site
2835   ac_site_file2=$ac_default_prefix/etc/config.site
2836 fi
2837 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2838 do
2839   test "x$ac_site_file" = xNONE && continue
2840   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2841     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2842 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2843     sed 's/^/| /' "$ac_site_file" >&5
2844     . "$ac_site_file" \
2845       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2846 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2847 as_fn_error $? "failed to load site script $ac_site_file
2848 See \`config.log' for more details" "$LINENO" 5 ; }
2849   fi
2850 done
2851 
2852 if test -r "$cache_file"; then
2853   # Some versions of bash will fail to source /dev/null (special files
2854   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2855   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2856     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2857 $as_echo "$as_me: loading cache $cache_file" >&6;}
2858     case $cache_file in
2859       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2860       *)                      . "./$cache_file";;
2861     esac
2862   fi
2863 else
2864   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2865 $as_echo "$as_me: creating cache $cache_file" >&6;}
2866   >$cache_file
2867 fi
2868 
2869 # Check that the precious variables saved in the cache have kept the same
2870 # value.
2871 ac_cache_corrupted=false
2872 for ac_var in $ac_precious_vars; do
2873   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2874   eval ac_new_set=\$ac_env_${ac_var}_set
2875   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2876   eval ac_new_val=\$ac_env_${ac_var}_value
2877   case $ac_old_set,$ac_new_set in
2878     set,)
2879       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2880 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2881       ac_cache_corrupted=: ;;
2882     ,set)
2883       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2884 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2885       ac_cache_corrupted=: ;;
2886     ,);;
2887     *)
2888       if test "x$ac_old_val" != "x$ac_new_val"; then
2889         # differences in whitespace do not lead to failure.
2890         ac_old_val_w=`echo x $ac_old_val`
2891         ac_new_val_w=`echo x $ac_new_val`
2892         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2893           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2894 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2895           ac_cache_corrupted=:
2896         else
2897           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2898 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2899           eval $ac_var=\$ac_old_val
2900         fi
2901         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2902 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2903         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2904 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2905       fi;;
2906   esac
2907   # Pass precious variables to config.status.
2908   if test "$ac_new_set" = set; then
2909     case $ac_new_val in
2910     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2911     *) ac_arg=$ac_var=$ac_new_val ;;
2912     esac
2913     case " $ac_configure_args " in
2914       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2915       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2916     esac
2917   fi
2918 done
2919 if $ac_cache_corrupted; then
2920   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2921 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2922   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2923 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2924   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2925 fi
2926 ## -------------------- ##
2927 ## Main body of script. ##
2928 ## -------------------- ##
2929 
2930 ac_ext=c
2931 ac_cpp='$CPP $CPPFLAGS'
2932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2935 
2936 
2937 
2938 ac_aux_dir=
2939 for ac_dir in build-aux "$srcdir"/build-aux; do
2940   if test -f "$ac_dir/install-sh"; then
2941     ac_aux_dir=$ac_dir
2942     ac_install_sh="$ac_aux_dir/install-sh -c"
2943     break
2944   elif test -f "$ac_dir/install.sh"; then
2945     ac_aux_dir=$ac_dir
2946     ac_install_sh="$ac_aux_dir/install.sh -c"
2947     break
2948   elif test -f "$ac_dir/shtool"; then
2949     ac_aux_dir=$ac_dir
2950     ac_install_sh="$ac_aux_dir/shtool install -c"
2951     break
2952   fi
2953 done
2954 if test -z "$ac_aux_dir"; then
2955   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2956 fi
2957 
2958 # These three variables are undocumented and unsupported,
2959 # and are intended to be withdrawn in a future Autoconf release.
2960 # They can cause serious problems if a builder's source tree is in a directory
2961 # whose full name contains unusual characters.
2962 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2963 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2964 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2965 
2966 
2967 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2968 
2969 #
2970 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2971 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2972 #
2973 # This code is free software; you can redistribute it and/or modify it
2974 # under the terms of the GNU General Public License version 2 only, as
2975 # published by the Free Software Foundation.  Oracle designates this
2976 # particular file as subject to the "Classpath" exception as provided
2977 # by Oracle in the LICENSE file that accompanied this code.
2978 #
2979 # This code is distributed in the hope that it will be useful, but WITHOUT
2980 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2981 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2982 # version 2 for more details (a copy is included in the LICENSE file that
2983 # accompanied this code).
2984 #
2985 # You should have received a copy of the GNU General Public License version
2986 # 2 along with this work; if not, write to the Free Software Foundation,
2987 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2988 #
2989 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2990 # or visit www.oracle.com if you need additional information or have any
2991 # questions.
2992 #
2993 
2994 #
2995 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2996 #
2997 # This program is free software; you can redistribute it and/or modify
2998 # it under the terms of the GNU General Public License as published by
2999 # the Free Software Foundation; either version 2 of the License, or
3000 # (at your option) any later version.
3001 #
3002 # This program is distributed in the hope that it will be useful, but
3003 # WITHOUT ANY WARRANTY; without even the implied warranty of
3004 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3005 # General Public License for more details.
3006 #
3007 # You should have received a copy of the GNU General Public License
3008 # along with this program; if not, write to the Free Software
3009 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3010 #
3011 # As a special exception to the GNU General Public License, if you
3012 # distribute this file as part of a program that contains a
3013 # configuration script generated by Autoconf, you may include it under
3014 # the same distribution terms that you use for the rest of that program.
3015 
3016 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3017 # ----------------------------------
3018 # PKG_PROG_PKG_CONFIG
3019 
3020 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3021 #
3022 # Check to see whether a particular set of modules exists.  Similar
3023 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3024 #
3025 #
3026 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3027 # this or PKG_CHECK_MODULES is called, or make sure to call
3028 # PKG_CHECK_EXISTS manually
3029 # --------------------------------------------------------------
3030 
3031 
3032 
3033 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3034 # ---------------------------------------------
3035 # _PKG_CONFIG
3036 
3037 # _PKG_SHORT_ERRORS_SUPPORTED
3038 # -----------------------------
3039 # _PKG_SHORT_ERRORS_SUPPORTED
3040 
3041 
3042 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3043 # [ACTION-IF-NOT-FOUND])
3044 #
3045 #
3046 # Note that if there is a possibility the first call to
3047 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3048 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3049 #
3050 #
3051 # --------------------------------------------------------------
3052 # PKG_CHECK_MODULES
3053 
3054 
3055 # Include these first...
3056 #
3057 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3058 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3059 #
3060 # This code is free software; you can redistribute it and/or modify it
3061 # under the terms of the GNU General Public License version 2 only, as
3062 # published by the Free Software Foundation.  Oracle designates this
3063 # particular file as subject to the "Classpath" exception as provided
3064 # by Oracle in the LICENSE file that accompanied this code.
3065 #
3066 # This code is distributed in the hope that it will be useful, but WITHOUT
3067 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3068 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3069 # version 2 for more details (a copy is included in the LICENSE file that
3070 # accompanied this code).
3071 #
3072 # You should have received a copy of the GNU General Public License version
3073 # 2 along with this work; if not, write to the Free Software Foundation,
3074 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3075 #
3076 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3077 # or visit www.oracle.com if you need additional information or have any
3078 # questions.
3079 #
3080 
3081 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3082 # If so, then append $1 to $2\
3083 # Also set JVM_ARG_OK to true/false depending on outcome.
3084 
3085 
3086 # This will make sure the given variable points to a full and proper
3087 # path. This means:
3088 # 1) There will be no spaces in the path. On posix platforms,
3089 #    spaces in the path will result in an error. On Windows,
3090 #    the path will be rewritten using short-style to be space-free.
3091 # 2) The path will be absolute, and it will be in unix-style (on
3092 #     cygwin).
3093 # $1: The name of the variable to fix
3094 
3095 
3096 # This will make sure the given variable points to a executable
3097 # with a full and proper path. This means:
3098 # 1) There will be no spaces in the path. On posix platforms,
3099 #    spaces in the path will result in an error. On Windows,
3100 #    the path will be rewritten using short-style to be space-free.
3101 # 2) The path will be absolute, and it will be in unix-style (on
3102 #     cygwin).
3103 # Any arguments given to the executable is preserved.
3104 # If the input variable does not have a directory specification, then
3105 # it need to be in the PATH.
3106 # $1: The name of the variable to fix
3107 
3108 
3109 
3110 
3111 
3112 
3113 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3114 # $1: variable to check
3115 # $2: executable name to print in warning (optional)
3116 
3117 
3118 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3119 # Arguments as AC_PATH_PROG:
3120 # $1: variable to set
3121 # $2: executable name to look for
3122 
3123 
3124 # Setup the most fundamental tools that relies on not much else to set up,
3125 # but is used by much of the early bootstrap code.
3126 
3127 
3128 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3129 
3130 
3131 
3132 
3133 
3134 
3135 
3136 #%%% Simple tools %%%
3137 
3138 # Check if we have found a usable version of make
3139 # $1: the path to a potential make binary (or empty)
3140 # $2: the description on how we found this
3141 
3142 
3143 # Goes looking for a usable version of GNU make.
3144 
3145 
3146 
3147 
3148 
3149 
3150 # Check if build directory is on local disk. If not possible to determine,
3151 # we prefer to claim it's local.
3152 # Argument 1: directory to test
3153 # Argument 2: what to do if it is on local disk
3154 # Argument 3: what to do otherwise (remote disk or failure)
3155 
3156 
3157 # Check that source files have basic read permissions set. This might
3158 # not be the case in cygwin in certain conditions.
3159 
3160 
3161 
3162 
3163 #
3164 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3165 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3166 #
3167 # This code is free software; you can redistribute it and/or modify it
3168 # under the terms of the GNU General Public License version 2 only, as
3169 # published by the Free Software Foundation.  Oracle designates this
3170 # particular file as subject to the "Classpath" exception as provided
3171 # by Oracle in the LICENSE file that accompanied this code.
3172 #
3173 # This code is distributed in the hope that it will be useful, but WITHOUT
3174 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3175 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3176 # version 2 for more details (a copy is included in the LICENSE file that
3177 # accompanied this code).
3178 #
3179 # You should have received a copy of the GNU General Public License version
3180 # 2 along with this work; if not, write to the Free Software Foundation,
3181 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3182 #
3183 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3184 # or visit www.oracle.com if you need additional information or have any
3185 # questions.
3186 #
3187 
3188 
3189 
3190 
3191 
3192 # Helper function which possibly converts a path using DOS-style short mode.
3193 # If so, the updated path is stored in $new_path.
3194 # $1: The path to check
3195 
3196 
3197 # Helper function which possibly converts a path using DOS-style short mode.
3198 # If so, the updated path is stored in $new_path.
3199 # $1: The path to check
3200 
3201 
3202 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3203 # and could probably be heavily simplified. However, all changes in this
3204 # area tend to need lot of testing in different scenarios, and in lack of
3205 # proper unit testing, cleaning this up has not been deemed worth the effort
3206 # at the moment.
3207 
3208 
3209 
3210 
3211 
3212 
3213 
3214 
3215 
3216 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3217 
3218 
3219 
3220 
3221 #
3222 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3223 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3224 #
3225 # This code is free software; you can redistribute it and/or modify it
3226 # under the terms of the GNU General Public License version 2 only, as
3227 # published by the Free Software Foundation.  Oracle designates this
3228 # particular file as subject to the "Classpath" exception as provided
3229 # by Oracle in the LICENSE file that accompanied this code.
3230 #
3231 # This code is distributed in the hope that it will be useful, but WITHOUT
3232 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3233 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3234 # version 2 for more details (a copy is included in the LICENSE file that
3235 # accompanied this code).
3236 #
3237 # You should have received a copy of the GNU General Public License version
3238 # 2 along with this work; if not, write to the Free Software Foundation,
3239 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3240 #
3241 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3242 # or visit www.oracle.com if you need additional information or have any
3243 # questions.
3244 #
3245 
3246 
3247 
3248 
3249 
3250 
3251 
3252 
3253 
3254 
3255 
3256 # ... then the rest
3257 #
3258 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3259 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3260 #
3261 # This code is free software; you can redistribute it and/or modify it
3262 # under the terms of the GNU General Public License version 2 only, as
3263 # published by the Free Software Foundation.  Oracle designates this
3264 # particular file as subject to the "Classpath" exception as provided
3265 # by Oracle in the LICENSE file that accompanied this code.
3266 #
3267 # This code is distributed in the hope that it will be useful, but WITHOUT
3268 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3269 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3270 # version 2 for more details (a copy is included in the LICENSE file that
3271 # accompanied this code).
3272 #
3273 # You should have received a copy of the GNU General Public License version
3274 # 2 along with this work; if not, write to the Free Software Foundation,
3275 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3276 #
3277 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3278 # or visit www.oracle.com if you need additional information or have any
3279 # questions.
3280 #
3281 
3282 # Execute the check given as argument, and verify the result
3283 # If the Boot JDK was previously found, do nothing
3284 # $1 A command line (typically autoconf macro) to execute
3285 
3286 
3287 # Test: Is bootjdk explicitely set by command line arguments?
3288 
3289 
3290 # Test: Is bootjdk available from builddeps?
3291 
3292 
3293 # Test: Is $JAVA_HOME set?
3294 
3295 
3296 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3297 
3298 
3299 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3300 
3301 
3302 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3303 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3304 # $1 = Path to directory containing jdk installations.
3305 # $2 = String to append to the found JDK directory to get the proper JDK home
3306 
3307 
3308 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3309 # environmental variable as base for where to look.
3310 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3311 
3312 
3313 # Test: Is there a JDK installed in default, well-known locations?
3314 
3315 
3316 # Check that a command-line tool in the Boot JDK is correct
3317 # $1 = name of variable to assign
3318 # $2 = name of binary
3319 
3320 
3321 ###############################################################################
3322 #
3323 # We need a Boot JDK to bootstrap the build.
3324 #
3325 
3326 
3327 
3328 
3329 
3330 #
3331 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3332 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3333 #
3334 # This code is free software; you can redistribute it and/or modify it
3335 # under the terms of the GNU General Public License version 2 only, as
3336 # published by the Free Software Foundation.  Oracle designates this
3337 # particular file as subject to the "Classpath" exception as provided
3338 # by Oracle in the LICENSE file that accompanied this code.
3339 #
3340 # This code is distributed in the hope that it will be useful, but WITHOUT
3341 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3342 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3343 # version 2 for more details (a copy is included in the LICENSE file that
3344 # accompanied this code).
3345 #
3346 # You should have received a copy of the GNU General Public License version
3347 # 2 along with this work; if not, write to the Free Software Foundation,
3348 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3349 #
3350 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3351 # or visit www.oracle.com if you need additional information or have any
3352 # questions.
3353 #
3354 
3355 
3356 
3357 
3358 
3359 
3360 
3361 
3362 
3363 
3364 
3365 
3366 
3367 
3368 
3369 
3370 
3371 
3372 
3373 
3374 #
3375 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3376 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3377 #
3378 # This code is free software; you can redistribute it and/or modify it
3379 # under the terms of the GNU General Public License version 2 only, as
3380 # published by the Free Software Foundation.  Oracle designates this
3381 # particular file as subject to the "Classpath" exception as provided
3382 # by Oracle in the LICENSE file that accompanied this code.
3383 #
3384 # This code is distributed in the hope that it will be useful, but WITHOUT
3385 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3386 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3387 # version 2 for more details (a copy is included in the LICENSE file that
3388 # accompanied this code).
3389 #
3390 # You should have received a copy of the GNU General Public License version
3391 # 2 along with this work; if not, write to the Free Software Foundation,
3392 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3393 #
3394 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3395 # or visit www.oracle.com if you need additional information or have any
3396 # questions.
3397 #
3398 
3399 
3400 
3401 
3402 
3403 cygwin_help() {
3404     case $1 in
3405     unzip)
3406         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3407     zip)
3408         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3409     make)
3410         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3411     * )
3412        break ;;
3413     esac
3414 }
3415 
3416 apt_help() {
3417     case $1 in
3418     devkit)
3419         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3420     openjdk)
3421         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3422     alsa)
3423         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3424     cups)
3425         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3426     freetype2)
3427         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3428     pulse)
3429         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3430     x11)
3431         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3432     ccache)
3433         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3434     * )
3435        break ;;
3436     esac
3437 }
3438 
3439 yum_help() {
3440     case $1 in
3441     devkit)
3442         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3443     openjdk)
3444         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3445     alsa)
3446         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3447     cups)
3448         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3449     freetype2)
3450         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3451     pulse)
3452         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3453     x11)
3454         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3455     ccache)
3456         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3457     * )
3458        break ;;
3459     esac
3460 }
3461 
3462 port_help() {
3463     PKGHANDLER_COMMAND=""
3464 }
3465 
3466 pkgutil_help() {
3467     PKGHANDLER_COMMAND=""
3468 }
3469 
3470 pkgadd_help() {
3471     PKGHANDLER_COMMAND=""
3472 }
3473 
3474 
3475 
3476 #
3477 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3478 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479 #
3480 # This code is free software; you can redistribute it and/or modify it
3481 # under the terms of the GNU General Public License version 2 only, as
3482 # published by the Free Software Foundation.  Oracle designates this
3483 # particular file as subject to the "Classpath" exception as provided
3484 # by Oracle in the LICENSE file that accompanied this code.
3485 #
3486 # This code is distributed in the hope that it will be useful, but WITHOUT
3487 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489 # version 2 for more details (a copy is included in the LICENSE file that
3490 # accompanied this code).
3491 #
3492 # You should have received a copy of the GNU General Public License version
3493 # 2 along with this work; if not, write to the Free Software Foundation,
3494 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495 #
3496 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497 # or visit www.oracle.com if you need additional information or have any
3498 # questions.
3499 #
3500 
3501 
3502 
3503 
3504 
3505 
3506 
3507 
3508 ###############################################################################
3509 #
3510 # Should we build only OpenJDK even if closed sources are present?
3511 #
3512 
3513 
3514 
3515 
3516 ###############################################################################
3517 #
3518 # Setup version numbers
3519 #
3520 
3521 
3522 
3523 
3524 
3525 
3526 # Support for customization of the build process. Some build files
3527 # will include counterparts from this location, if they exist. This allows
3528 # for a degree of customization of the build targets and the rules/recipes
3529 # to create them
3530 
3531 # Check whether --with-custom-make-dir was given.
3532 if test "${with_custom_make_dir+set}" = set; then :
3533   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3534 fi
3535 
3536 
3537 
3538 #
3539 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541 #
3542 # This code is free software; you can redistribute it and/or modify it
3543 # under the terms of the GNU General Public License version 2 only, as
3544 # published by the Free Software Foundation.  Oracle designates this
3545 # particular file as subject to the "Classpath" exception as provided
3546 # by Oracle in the LICENSE file that accompanied this code.
3547 #
3548 # This code is distributed in the hope that it will be useful, but WITHOUT
3549 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551 # version 2 for more details (a copy is included in the LICENSE file that
3552 # accompanied this code).
3553 #
3554 # You should have received a copy of the GNU General Public License version
3555 # 2 along with this work; if not, write to the Free Software Foundation,
3556 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557 #
3558 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559 # or visit www.oracle.com if you need additional information or have any
3560 # questions.
3561 #
3562 
3563 
3564 
3565 
3566 
3567 
3568 
3569 
3570 
3571 
3572 
3573 
3574 
3575 
3576 
3577 #
3578 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3579 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3580 #
3581 # This code is free software; you can redistribute it and/or modify it
3582 # under the terms of the GNU General Public License version 2 only, as
3583 # published by the Free Software Foundation.  Oracle designates this
3584 # particular file as subject to the "Classpath" exception as provided
3585 # by Oracle in the LICENSE file that accompanied this code.
3586 #
3587 # This code is distributed in the hope that it will be useful, but WITHOUT
3588 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3589 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3590 # version 2 for more details (a copy is included in the LICENSE file that
3591 # accompanied this code).
3592 #
3593 # You should have received a copy of the GNU General Public License version
3594 # 2 along with this work; if not, write to the Free Software Foundation,
3595 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3596 #
3597 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3598 # or visit www.oracle.com if you need additional information or have any
3599 # questions.
3600 #
3601 
3602 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3603 # Converts autoconf style CPU name to OpenJDK style, into
3604 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3605 
3606 
3607 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3608 # Converts autoconf style OS name to OpenJDK style, into
3609 # VAR_OS and VAR_OS_API.
3610 
3611 
3612 # Expects $host_os $host_cpu $build_os and $build_cpu
3613 # and $with_target_bits to have been setup!
3614 #
3615 # Translate the standard triplet(quadruplet) definition
3616 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3617 # OPENJDK_BUILD_OS, etc.
3618 
3619 
3620 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3621 # accordingly. Must be done after setting up build and target system, but before
3622 # doing anything else with these values.
3623 
3624 
3625     # Setup the legacy variables, for controlling the old makefiles.
3626     #
3627 
3628 
3629 
3630 
3631 #%%% Build and target systems %%%
3632 
3633 
3634 
3635 
3636 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3637 # Add -mX to various FLAGS variables.
3638 
3639 
3640 
3641 
3642 
3643 
3644 #
3645 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3646 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3647 #
3648 # This code is free software; you can redistribute it and/or modify it
3649 # under the terms of the GNU General Public License version 2 only, as
3650 # published by the Free Software Foundation.  Oracle designates this
3651 # particular file as subject to the "Classpath" exception as provided
3652 # by Oracle in the LICENSE file that accompanied this code.
3653 #
3654 # This code is distributed in the hope that it will be useful, but WITHOUT
3655 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3656 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3657 # version 2 for more details (a copy is included in the LICENSE file that
3658 # accompanied this code).
3659 #
3660 # You should have received a copy of the GNU General Public License version
3661 # 2 along with this work; if not, write to the Free Software Foundation,
3662 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3663 #
3664 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3665 # or visit www.oracle.com if you need additional information or have any
3666 # questions.
3667 #
3668 
3669 
3670 
3671 
3672 
3673 
3674 
3675 
3676 #
3677 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3678 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3679 #
3680 # This code is free software; you can redistribute it and/or modify it
3681 # under the terms of the GNU General Public License version 2 only, as
3682 # published by the Free Software Foundation.  Oracle designates this
3683 # particular file as subject to the "Classpath" exception as provided
3684 # by Oracle in the LICENSE file that accompanied this code.
3685 #
3686 # This code is distributed in the hope that it will be useful, but WITHOUT
3687 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3688 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3689 # version 2 for more details (a copy is included in the LICENSE file that
3690 # accompanied this code).
3691 #
3692 # You should have received a copy of the GNU General Public License version
3693 # 2 along with this work; if not, write to the Free Software Foundation,
3694 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3695 #
3696 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3697 # or visit www.oracle.com if you need additional information or have any
3698 # questions.
3699 #
3700 
3701 # $1 = compiler to test (CC or CXX)
3702 # $2 = human readable name of compiler (C or C++)
3703 
3704 
3705 
3706 
3707 
3708 # $1 = compiler to test (CC or CXX)
3709 # $2 = human readable name of compiler (C or C++)
3710 # $3 = list of compiler names to search for
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 
3719 
3720 
3721 
3722 
3723 
3724 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3725 #                                   [RUN-IF-FALSE])
3726 # ------------------------------------------------------------
3727 # Check that the c and c++ compilers support an argument
3728 
3729 
3730 
3731 
3732 # Setup the JTREG paths
3733 
3734 
3735 #
3736 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738 #
3739 # This code is free software; you can redistribute it and/or modify it
3740 # under the terms of the GNU General Public License version 2 only, as
3741 # published by the Free Software Foundation.  Oracle designates this
3742 # particular file as subject to the "Classpath" exception as provided
3743 # by Oracle in the LICENSE file that accompanied this code.
3744 #
3745 # This code is distributed in the hope that it will be useful, but WITHOUT
3746 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748 # version 2 for more details (a copy is included in the LICENSE file that
3749 # accompanied this code).
3750 #
3751 # You should have received a copy of the GNU General Public License version
3752 # 2 along with this work; if not, write to the Free Software Foundation,
3753 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754 #
3755 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756 # or visit www.oracle.com if you need additional information or have any
3757 # questions.
3758 #
3759 
3760 
3761 
3762 
3763 
3764 
3765 
3766 # Check if the VS env variables were setup prior to running configure.
3767 # If not, then find vcvarsall.bat and run it automatically, and integrate
3768 # the set env variables into the spec file.
3769 
3770 
3771 
3772 # Setup the DXSDK paths
3773 
3774 
3775 
3776 
3777 
3778 
3779 # This line needs to be here, verbatim, after all includes and the dummy hook
3780 # definitions. It is replaced with custom functionality when building
3781 # custom sources.
3782 #CUSTOM_AUTOCONF_INCLUDE
3783 
3784 # Do not change or remove the following line, it is needed for consistency checks:
3785 DATE_WHEN_GENERATED=1370334570
3786 
3787 ###############################################################################
3788 #
3789 # Initialization / Boot-strapping
3790 #
3791 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3792 # thus it jumps back and forth, each time gaining something needed later on.
3793 #
3794 ###############################################################################
3795 
3796 # Basic initialization that must happen first of all
3797 
3798 # Save the original command line. This is passed to us by the wrapper configure script.
3799 
3800 DATE_WHEN_CONFIGURED=`LANG=C date`
3801 
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3803 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3805 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3806 
3807 
3808 
3809 # Start with tools that do not need have cross compilation support
3810 # and can be expected to be found in the default PATH. These tools are
3811 # used by configure. Nor are these tools expected to be found in the
3812 # devkit from the builddeps server either, since they are
3813 # needed to download the devkit.
3814 
3815 # First are all the simple required tools.
3816 
3817     for ac_prog in basename
3818 do
3819   # Extract the first word of "$ac_prog", so it can be a program name with args.
3820 set dummy $ac_prog; ac_word=$2
3821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822 $as_echo_n "checking for $ac_word... " >&6; }
3823 if test "${ac_cv_path_BASENAME+set}" = set; then :
3824   $as_echo_n "(cached) " >&6
3825 else
3826   case $BASENAME in
3827   [\\/]* | ?:[\\/]*)
3828   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3829   ;;
3830   *)
3831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832 for as_dir in $PATH
3833 do
3834   IFS=$as_save_IFS
3835   test -z "$as_dir" && as_dir=.
3836     for ac_exec_ext in '' $ac_executable_extensions; do
3837   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3838     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840     break 2
3841   fi
3842 done
3843   done
3844 IFS=$as_save_IFS
3845 
3846   ;;
3847 esac
3848 fi
3849 BASENAME=$ac_cv_path_BASENAME
3850 if test -n "$BASENAME"; then
3851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3852 $as_echo "$BASENAME" >&6; }
3853 else
3854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855 $as_echo "no" >&6; }
3856 fi
3857 
3858 
3859   test -n "$BASENAME" && break
3860 done
3861 
3862 
3863     if test "x$BASENAME" = x; then
3864         if test "xbasename" = x; then
3865           PROG_NAME=basename
3866         else
3867           PROG_NAME=basename
3868         fi
3869         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3870 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3871         as_fn_error $? "Cannot continue" "$LINENO" 5
3872     fi
3873 
3874 
3875 
3876     for ac_prog in bash
3877 do
3878   # Extract the first word of "$ac_prog", so it can be a program name with args.
3879 set dummy $ac_prog; ac_word=$2
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881 $as_echo_n "checking for $ac_word... " >&6; }
3882 if test "${ac_cv_path_BASH+set}" = set; then :
3883   $as_echo_n "(cached) " >&6
3884 else
3885   case $BASH in
3886   [\\/]* | ?:[\\/]*)
3887   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3888   ;;
3889   *)
3890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891 for as_dir in $PATH
3892 do
3893   IFS=$as_save_IFS
3894   test -z "$as_dir" && as_dir=.
3895     for ac_exec_ext in '' $ac_executable_extensions; do
3896   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3897     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3899     break 2
3900   fi
3901 done
3902   done
3903 IFS=$as_save_IFS
3904 
3905   ;;
3906 esac
3907 fi
3908 BASH=$ac_cv_path_BASH
3909 if test -n "$BASH"; then
3910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3911 $as_echo "$BASH" >&6; }
3912 else
3913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914 $as_echo "no" >&6; }
3915 fi
3916 
3917 
3918   test -n "$BASH" && break
3919 done
3920 
3921 
3922     if test "x$BASH" = x; then
3923         if test "xbash" = x; then
3924           PROG_NAME=bash
3925         else
3926           PROG_NAME=bash
3927         fi
3928         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3929 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3930         as_fn_error $? "Cannot continue" "$LINENO" 5
3931     fi
3932 
3933 
3934 
3935     for ac_prog in cat
3936 do
3937   # Extract the first word of "$ac_prog", so it can be a program name with args.
3938 set dummy $ac_prog; ac_word=$2
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940 $as_echo_n "checking for $ac_word... " >&6; }
3941 if test "${ac_cv_path_CAT+set}" = set; then :
3942   $as_echo_n "(cached) " >&6
3943 else
3944   case $CAT in
3945   [\\/]* | ?:[\\/]*)
3946   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3947   ;;
3948   *)
3949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950 for as_dir in $PATH
3951 do
3952   IFS=$as_save_IFS
3953   test -z "$as_dir" && as_dir=.
3954     for ac_exec_ext in '' $ac_executable_extensions; do
3955   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3956     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3958     break 2
3959   fi
3960 done
3961   done
3962 IFS=$as_save_IFS
3963 
3964   ;;
3965 esac
3966 fi
3967 CAT=$ac_cv_path_CAT
3968 if test -n "$CAT"; then
3969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3970 $as_echo "$CAT" >&6; }
3971 else
3972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973 $as_echo "no" >&6; }
3974 fi
3975 
3976 
3977   test -n "$CAT" && break
3978 done
3979 
3980 
3981     if test "x$CAT" = x; then
3982         if test "xcat" = x; then
3983           PROG_NAME=cat
3984         else
3985           PROG_NAME=cat
3986         fi
3987         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3988 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3989         as_fn_error $? "Cannot continue" "$LINENO" 5
3990     fi
3991 
3992 
3993 
3994     for ac_prog in chmod
3995 do
3996   # Extract the first word of "$ac_prog", so it can be a program name with args.
3997 set dummy $ac_prog; ac_word=$2
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999 $as_echo_n "checking for $ac_word... " >&6; }
4000 if test "${ac_cv_path_CHMOD+set}" = set; then :
4001   $as_echo_n "(cached) " >&6
4002 else
4003   case $CHMOD in
4004   [\\/]* | ?:[\\/]*)
4005   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4006   ;;
4007   *)
4008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009 for as_dir in $PATH
4010 do
4011   IFS=$as_save_IFS
4012   test -z "$as_dir" && as_dir=.
4013     for ac_exec_ext in '' $ac_executable_extensions; do
4014   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4015     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017     break 2
4018   fi
4019 done
4020   done
4021 IFS=$as_save_IFS
4022 
4023   ;;
4024 esac
4025 fi
4026 CHMOD=$ac_cv_path_CHMOD
4027 if test -n "$CHMOD"; then
4028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4029 $as_echo "$CHMOD" >&6; }
4030 else
4031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032 $as_echo "no" >&6; }
4033 fi
4034 
4035 
4036   test -n "$CHMOD" && break
4037 done
4038 
4039 
4040     if test "x$CHMOD" = x; then
4041         if test "xchmod" = x; then
4042           PROG_NAME=chmod
4043         else
4044           PROG_NAME=chmod
4045         fi
4046         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4047 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4048         as_fn_error $? "Cannot continue" "$LINENO" 5
4049     fi
4050 
4051 
4052 
4053     for ac_prog in cmp
4054 do
4055   # Extract the first word of "$ac_prog", so it can be a program name with args.
4056 set dummy $ac_prog; ac_word=$2
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058 $as_echo_n "checking for $ac_word... " >&6; }
4059 if test "${ac_cv_path_CMP+set}" = set; then :
4060   $as_echo_n "(cached) " >&6
4061 else
4062   case $CMP in
4063   [\\/]* | ?:[\\/]*)
4064   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4065   ;;
4066   *)
4067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068 for as_dir in $PATH
4069 do
4070   IFS=$as_save_IFS
4071   test -z "$as_dir" && as_dir=.
4072     for ac_exec_ext in '' $ac_executable_extensions; do
4073   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4074     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4076     break 2
4077   fi
4078 done
4079   done
4080 IFS=$as_save_IFS
4081 
4082   ;;
4083 esac
4084 fi
4085 CMP=$ac_cv_path_CMP
4086 if test -n "$CMP"; then
4087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4088 $as_echo "$CMP" >&6; }
4089 else
4090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091 $as_echo "no" >&6; }
4092 fi
4093 
4094 
4095   test -n "$CMP" && break
4096 done
4097 
4098 
4099     if test "x$CMP" = x; then
4100         if test "xcmp" = x; then
4101           PROG_NAME=cmp
4102         else
4103           PROG_NAME=cmp
4104         fi
4105         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4106 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4107         as_fn_error $? "Cannot continue" "$LINENO" 5
4108     fi
4109 
4110 
4111 
4112     for ac_prog in comm
4113 do
4114   # Extract the first word of "$ac_prog", so it can be a program name with args.
4115 set dummy $ac_prog; ac_word=$2
4116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117 $as_echo_n "checking for $ac_word... " >&6; }
4118 if test "${ac_cv_path_COMM+set}" = set; then :
4119   $as_echo_n "(cached) " >&6
4120 else
4121   case $COMM in
4122   [\\/]* | ?:[\\/]*)
4123   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4124   ;;
4125   *)
4126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127 for as_dir in $PATH
4128 do
4129   IFS=$as_save_IFS
4130   test -z "$as_dir" && as_dir=.
4131     for ac_exec_ext in '' $ac_executable_extensions; do
4132   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4133     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4135     break 2
4136   fi
4137 done
4138   done
4139 IFS=$as_save_IFS
4140 
4141   ;;
4142 esac
4143 fi
4144 COMM=$ac_cv_path_COMM
4145 if test -n "$COMM"; then
4146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4147 $as_echo "$COMM" >&6; }
4148 else
4149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150 $as_echo "no" >&6; }
4151 fi
4152 
4153 
4154   test -n "$COMM" && break
4155 done
4156 
4157 
4158     if test "x$COMM" = x; then
4159         if test "xcomm" = x; then
4160           PROG_NAME=comm
4161         else
4162           PROG_NAME=comm
4163         fi
4164         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4165 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4166         as_fn_error $? "Cannot continue" "$LINENO" 5
4167     fi
4168 
4169 
4170 
4171     for ac_prog in cp
4172 do
4173   # Extract the first word of "$ac_prog", so it can be a program name with args.
4174 set dummy $ac_prog; ac_word=$2
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176 $as_echo_n "checking for $ac_word... " >&6; }
4177 if test "${ac_cv_path_CP+set}" = set; then :
4178   $as_echo_n "(cached) " >&6
4179 else
4180   case $CP in
4181   [\\/]* | ?:[\\/]*)
4182   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4183   ;;
4184   *)
4185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186 for as_dir in $PATH
4187 do
4188   IFS=$as_save_IFS
4189   test -z "$as_dir" && as_dir=.
4190     for ac_exec_ext in '' $ac_executable_extensions; do
4191   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194     break 2
4195   fi
4196 done
4197   done
4198 IFS=$as_save_IFS
4199 
4200   ;;
4201 esac
4202 fi
4203 CP=$ac_cv_path_CP
4204 if test -n "$CP"; then
4205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4206 $as_echo "$CP" >&6; }
4207 else
4208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209 $as_echo "no" >&6; }
4210 fi
4211 
4212 
4213   test -n "$CP" && break
4214 done
4215 
4216 
4217     if test "x$CP" = x; then
4218         if test "xcp" = x; then
4219           PROG_NAME=cp
4220         else
4221           PROG_NAME=cp
4222         fi
4223         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4224 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4225         as_fn_error $? "Cannot continue" "$LINENO" 5
4226     fi
4227 
4228 
4229 
4230     for ac_prog in cpio
4231 do
4232   # Extract the first word of "$ac_prog", so it can be a program name with args.
4233 set dummy $ac_prog; ac_word=$2
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235 $as_echo_n "checking for $ac_word... " >&6; }
4236 if test "${ac_cv_path_CPIO+set}" = set; then :
4237   $as_echo_n "(cached) " >&6
4238 else
4239   case $CPIO in
4240   [\\/]* | ?:[\\/]*)
4241   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4242   ;;
4243   *)
4244   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245 for as_dir in $PATH
4246 do
4247   IFS=$as_save_IFS
4248   test -z "$as_dir" && as_dir=.
4249     for ac_exec_ext in '' $ac_executable_extensions; do
4250   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4253     break 2
4254   fi
4255 done
4256   done
4257 IFS=$as_save_IFS
4258 
4259   ;;
4260 esac
4261 fi
4262 CPIO=$ac_cv_path_CPIO
4263 if test -n "$CPIO"; then
4264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4265 $as_echo "$CPIO" >&6; }
4266 else
4267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268 $as_echo "no" >&6; }
4269 fi
4270 
4271 
4272   test -n "$CPIO" && break
4273 done
4274 
4275 
4276     if test "x$CPIO" = x; then
4277         if test "xcpio" = x; then
4278           PROG_NAME=cpio
4279         else
4280           PROG_NAME=cpio
4281         fi
4282         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4283 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4284         as_fn_error $? "Cannot continue" "$LINENO" 5
4285     fi
4286 
4287 
4288 
4289     for ac_prog in cut
4290 do
4291   # Extract the first word of "$ac_prog", so it can be a program name with args.
4292 set dummy $ac_prog; ac_word=$2
4293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294 $as_echo_n "checking for $ac_word... " >&6; }
4295 if test "${ac_cv_path_CUT+set}" = set; then :
4296   $as_echo_n "(cached) " >&6
4297 else
4298   case $CUT in
4299   [\\/]* | ?:[\\/]*)
4300   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4301   ;;
4302   *)
4303   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304 for as_dir in $PATH
4305 do
4306   IFS=$as_save_IFS
4307   test -z "$as_dir" && as_dir=.
4308     for ac_exec_ext in '' $ac_executable_extensions; do
4309   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312     break 2
4313   fi
4314 done
4315   done
4316 IFS=$as_save_IFS
4317 
4318   ;;
4319 esac
4320 fi
4321 CUT=$ac_cv_path_CUT
4322 if test -n "$CUT"; then
4323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4324 $as_echo "$CUT" >&6; }
4325 else
4326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327 $as_echo "no" >&6; }
4328 fi
4329 
4330 
4331   test -n "$CUT" && break
4332 done
4333 
4334 
4335     if test "x$CUT" = x; then
4336         if test "xcut" = x; then
4337           PROG_NAME=cut
4338         else
4339           PROG_NAME=cut
4340         fi
4341         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4342 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4343         as_fn_error $? "Cannot continue" "$LINENO" 5
4344     fi
4345 
4346 
4347 
4348     for ac_prog in date
4349 do
4350   # Extract the first word of "$ac_prog", so it can be a program name with args.
4351 set dummy $ac_prog; ac_word=$2
4352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353 $as_echo_n "checking for $ac_word... " >&6; }
4354 if test "${ac_cv_path_DATE+set}" = set; then :
4355   $as_echo_n "(cached) " >&6
4356 else
4357   case $DATE in
4358   [\\/]* | ?:[\\/]*)
4359   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4360   ;;
4361   *)
4362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363 for as_dir in $PATH
4364 do
4365   IFS=$as_save_IFS
4366   test -z "$as_dir" && as_dir=.
4367     for ac_exec_ext in '' $ac_executable_extensions; do
4368   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371     break 2
4372   fi
4373 done
4374   done
4375 IFS=$as_save_IFS
4376 
4377   ;;
4378 esac
4379 fi
4380 DATE=$ac_cv_path_DATE
4381 if test -n "$DATE"; then
4382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4383 $as_echo "$DATE" >&6; }
4384 else
4385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386 $as_echo "no" >&6; }
4387 fi
4388 
4389 
4390   test -n "$DATE" && break
4391 done
4392 
4393 
4394     if test "x$DATE" = x; then
4395         if test "xdate" = x; then
4396           PROG_NAME=date
4397         else
4398           PROG_NAME=date
4399         fi
4400         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4401 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4402         as_fn_error $? "Cannot continue" "$LINENO" 5
4403     fi
4404 
4405 
4406 
4407     for ac_prog in gdiff diff
4408 do
4409   # Extract the first word of "$ac_prog", so it can be a program name with args.
4410 set dummy $ac_prog; ac_word=$2
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412 $as_echo_n "checking for $ac_word... " >&6; }
4413 if test "${ac_cv_path_DIFF+set}" = set; then :
4414   $as_echo_n "(cached) " >&6
4415 else
4416   case $DIFF in
4417   [\\/]* | ?:[\\/]*)
4418   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4419   ;;
4420   *)
4421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422 for as_dir in $PATH
4423 do
4424   IFS=$as_save_IFS
4425   test -z "$as_dir" && as_dir=.
4426     for ac_exec_ext in '' $ac_executable_extensions; do
4427   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4428     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430     break 2
4431   fi
4432 done
4433   done
4434 IFS=$as_save_IFS
4435 
4436   ;;
4437 esac
4438 fi
4439 DIFF=$ac_cv_path_DIFF
4440 if test -n "$DIFF"; then
4441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4442 $as_echo "$DIFF" >&6; }
4443 else
4444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445 $as_echo "no" >&6; }
4446 fi
4447 
4448 
4449   test -n "$DIFF" && break
4450 done
4451 
4452 
4453     if test "x$DIFF" = x; then
4454         if test "xgdiff diff" = x; then
4455           PROG_NAME=diff
4456         else
4457           PROG_NAME=gdiff diff
4458         fi
4459         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4460 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4461         as_fn_error $? "Cannot continue" "$LINENO" 5
4462     fi
4463 
4464 
4465 
4466     for ac_prog in dirname
4467 do
4468   # Extract the first word of "$ac_prog", so it can be a program name with args.
4469 set dummy $ac_prog; ac_word=$2
4470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471 $as_echo_n "checking for $ac_word... " >&6; }
4472 if test "${ac_cv_path_DIRNAME+set}" = set; then :
4473   $as_echo_n "(cached) " >&6
4474 else
4475   case $DIRNAME in
4476   [\\/]* | ?:[\\/]*)
4477   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4478   ;;
4479   *)
4480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481 for as_dir in $PATH
4482 do
4483   IFS=$as_save_IFS
4484   test -z "$as_dir" && as_dir=.
4485     for ac_exec_ext in '' $ac_executable_extensions; do
4486   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4487     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489     break 2
4490   fi
4491 done
4492   done
4493 IFS=$as_save_IFS
4494 
4495   ;;
4496 esac
4497 fi
4498 DIRNAME=$ac_cv_path_DIRNAME
4499 if test -n "$DIRNAME"; then
4500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4501 $as_echo "$DIRNAME" >&6; }
4502 else
4503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504 $as_echo "no" >&6; }
4505 fi
4506 
4507 
4508   test -n "$DIRNAME" && break
4509 done
4510 
4511 
4512     if test "x$DIRNAME" = x; then
4513         if test "xdirname" = x; then
4514           PROG_NAME=dirname
4515         else
4516           PROG_NAME=dirname
4517         fi
4518         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4519 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4520         as_fn_error $? "Cannot continue" "$LINENO" 5
4521     fi
4522 
4523 
4524 
4525     for ac_prog in echo
4526 do
4527   # Extract the first word of "$ac_prog", so it can be a program name with args.
4528 set dummy $ac_prog; ac_word=$2
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530 $as_echo_n "checking for $ac_word... " >&6; }
4531 if test "${ac_cv_path_ECHO+set}" = set; then :
4532   $as_echo_n "(cached) " >&6
4533 else
4534   case $ECHO in
4535   [\\/]* | ?:[\\/]*)
4536   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4537   ;;
4538   *)
4539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540 for as_dir in $PATH
4541 do
4542   IFS=$as_save_IFS
4543   test -z "$as_dir" && as_dir=.
4544     for ac_exec_ext in '' $ac_executable_extensions; do
4545   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548     break 2
4549   fi
4550 done
4551   done
4552 IFS=$as_save_IFS
4553 
4554   ;;
4555 esac
4556 fi
4557 ECHO=$ac_cv_path_ECHO
4558 if test -n "$ECHO"; then
4559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4560 $as_echo "$ECHO" >&6; }
4561 else
4562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563 $as_echo "no" >&6; }
4564 fi
4565 
4566 
4567   test -n "$ECHO" && break
4568 done
4569 
4570 
4571     if test "x$ECHO" = x; then
4572         if test "xecho" = x; then
4573           PROG_NAME=echo
4574         else
4575           PROG_NAME=echo
4576         fi
4577         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4578 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4579         as_fn_error $? "Cannot continue" "$LINENO" 5
4580     fi
4581 
4582 
4583 
4584     for ac_prog in expr
4585 do
4586   # Extract the first word of "$ac_prog", so it can be a program name with args.
4587 set dummy $ac_prog; ac_word=$2
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589 $as_echo_n "checking for $ac_word... " >&6; }
4590 if test "${ac_cv_path_EXPR+set}" = set; then :
4591   $as_echo_n "(cached) " >&6
4592 else
4593   case $EXPR in
4594   [\\/]* | ?:[\\/]*)
4595   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4596   ;;
4597   *)
4598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599 for as_dir in $PATH
4600 do
4601   IFS=$as_save_IFS
4602   test -z "$as_dir" && as_dir=.
4603     for ac_exec_ext in '' $ac_executable_extensions; do
4604   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4605     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607     break 2
4608   fi
4609 done
4610   done
4611 IFS=$as_save_IFS
4612 
4613   ;;
4614 esac
4615 fi
4616 EXPR=$ac_cv_path_EXPR
4617 if test -n "$EXPR"; then
4618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4619 $as_echo "$EXPR" >&6; }
4620 else
4621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622 $as_echo "no" >&6; }
4623 fi
4624 
4625 
4626   test -n "$EXPR" && break
4627 done
4628 
4629 
4630     if test "x$EXPR" = x; then
4631         if test "xexpr" = x; then
4632           PROG_NAME=expr
4633         else
4634           PROG_NAME=expr
4635         fi
4636         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4637 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4638         as_fn_error $? "Cannot continue" "$LINENO" 5
4639     fi
4640 
4641 
4642 
4643     for ac_prog in file
4644 do
4645   # Extract the first word of "$ac_prog", so it can be a program name with args.
4646 set dummy $ac_prog; ac_word=$2
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648 $as_echo_n "checking for $ac_word... " >&6; }
4649 if test "${ac_cv_path_FILE+set}" = set; then :
4650   $as_echo_n "(cached) " >&6
4651 else
4652   case $FILE in
4653   [\\/]* | ?:[\\/]*)
4654   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4655   ;;
4656   *)
4657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658 for as_dir in $PATH
4659 do
4660   IFS=$as_save_IFS
4661   test -z "$as_dir" && as_dir=.
4662     for ac_exec_ext in '' $ac_executable_extensions; do
4663   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666     break 2
4667   fi
4668 done
4669   done
4670 IFS=$as_save_IFS
4671 
4672   ;;
4673 esac
4674 fi
4675 FILE=$ac_cv_path_FILE
4676 if test -n "$FILE"; then
4677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4678 $as_echo "$FILE" >&6; }
4679 else
4680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681 $as_echo "no" >&6; }
4682 fi
4683 
4684 
4685   test -n "$FILE" && break
4686 done
4687 
4688 
4689     if test "x$FILE" = x; then
4690         if test "xfile" = x; then
4691           PROG_NAME=file
4692         else
4693           PROG_NAME=file
4694         fi
4695         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4696 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4697         as_fn_error $? "Cannot continue" "$LINENO" 5
4698     fi
4699 
4700 
4701 
4702     for ac_prog in find
4703 do
4704   # Extract the first word of "$ac_prog", so it can be a program name with args.
4705 set dummy $ac_prog; ac_word=$2
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707 $as_echo_n "checking for $ac_word... " >&6; }
4708 if test "${ac_cv_path_FIND+set}" = set; then :
4709   $as_echo_n "(cached) " >&6
4710 else
4711   case $FIND in
4712   [\\/]* | ?:[\\/]*)
4713   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4714   ;;
4715   *)
4716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717 for as_dir in $PATH
4718 do
4719   IFS=$as_save_IFS
4720   test -z "$as_dir" && as_dir=.
4721     for ac_exec_ext in '' $ac_executable_extensions; do
4722   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725     break 2
4726   fi
4727 done
4728   done
4729 IFS=$as_save_IFS
4730 
4731   ;;
4732 esac
4733 fi
4734 FIND=$ac_cv_path_FIND
4735 if test -n "$FIND"; then
4736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4737 $as_echo "$FIND" >&6; }
4738 else
4739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740 $as_echo "no" >&6; }
4741 fi
4742 
4743 
4744   test -n "$FIND" && break
4745 done
4746 
4747 
4748     if test "x$FIND" = x; then
4749         if test "xfind" = x; then
4750           PROG_NAME=find
4751         else
4752           PROG_NAME=find
4753         fi
4754         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4755 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4756         as_fn_error $? "Cannot continue" "$LINENO" 5
4757     fi
4758 
4759 
4760 
4761     for ac_prog in head
4762 do
4763   # Extract the first word of "$ac_prog", so it can be a program name with args.
4764 set dummy $ac_prog; ac_word=$2
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766 $as_echo_n "checking for $ac_word... " >&6; }
4767 if test "${ac_cv_path_HEAD+set}" = set; then :
4768   $as_echo_n "(cached) " >&6
4769 else
4770   case $HEAD in
4771   [\\/]* | ?:[\\/]*)
4772   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4773   ;;
4774   *)
4775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776 for as_dir in $PATH
4777 do
4778   IFS=$as_save_IFS
4779   test -z "$as_dir" && as_dir=.
4780     for ac_exec_ext in '' $ac_executable_extensions; do
4781   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4784     break 2
4785   fi
4786 done
4787   done
4788 IFS=$as_save_IFS
4789 
4790   ;;
4791 esac
4792 fi
4793 HEAD=$ac_cv_path_HEAD
4794 if test -n "$HEAD"; then
4795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4796 $as_echo "$HEAD" >&6; }
4797 else
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799 $as_echo "no" >&6; }
4800 fi
4801 
4802 
4803   test -n "$HEAD" && break
4804 done
4805 
4806 
4807     if test "x$HEAD" = x; then
4808         if test "xhead" = x; then
4809           PROG_NAME=head
4810         else
4811           PROG_NAME=head
4812         fi
4813         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4814 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4815         as_fn_error $? "Cannot continue" "$LINENO" 5
4816     fi
4817 
4818 
4819 
4820     for ac_prog in ln
4821 do
4822   # Extract the first word of "$ac_prog", so it can be a program name with args.
4823 set dummy $ac_prog; ac_word=$2
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825 $as_echo_n "checking for $ac_word... " >&6; }
4826 if test "${ac_cv_path_LN+set}" = set; then :
4827   $as_echo_n "(cached) " >&6
4828 else
4829   case $LN in
4830   [\\/]* | ?:[\\/]*)
4831   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4832   ;;
4833   *)
4834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835 for as_dir in $PATH
4836 do
4837   IFS=$as_save_IFS
4838   test -z "$as_dir" && as_dir=.
4839     for ac_exec_ext in '' $ac_executable_extensions; do
4840   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843     break 2
4844   fi
4845 done
4846   done
4847 IFS=$as_save_IFS
4848 
4849   ;;
4850 esac
4851 fi
4852 LN=$ac_cv_path_LN
4853 if test -n "$LN"; then
4854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4855 $as_echo "$LN" >&6; }
4856 else
4857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858 $as_echo "no" >&6; }
4859 fi
4860 
4861 
4862   test -n "$LN" && break
4863 done
4864 
4865 
4866     if test "x$LN" = x; then
4867         if test "xln" = x; then
4868           PROG_NAME=ln
4869         else
4870           PROG_NAME=ln
4871         fi
4872         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4873 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4874         as_fn_error $? "Cannot continue" "$LINENO" 5
4875     fi
4876 
4877 
4878 
4879     for ac_prog in ls
4880 do
4881   # Extract the first word of "$ac_prog", so it can be a program name with args.
4882 set dummy $ac_prog; ac_word=$2
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884 $as_echo_n "checking for $ac_word... " >&6; }
4885 if test "${ac_cv_path_LS+set}" = set; then :
4886   $as_echo_n "(cached) " >&6
4887 else
4888   case $LS in
4889   [\\/]* | ?:[\\/]*)
4890   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4891   ;;
4892   *)
4893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894 for as_dir in $PATH
4895 do
4896   IFS=$as_save_IFS
4897   test -z "$as_dir" && as_dir=.
4898     for ac_exec_ext in '' $ac_executable_extensions; do
4899   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4900     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902     break 2
4903   fi
4904 done
4905   done
4906 IFS=$as_save_IFS
4907 
4908   ;;
4909 esac
4910 fi
4911 LS=$ac_cv_path_LS
4912 if test -n "$LS"; then
4913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4914 $as_echo "$LS" >&6; }
4915 else
4916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917 $as_echo "no" >&6; }
4918 fi
4919 
4920 
4921   test -n "$LS" && break
4922 done
4923 
4924 
4925     if test "x$LS" = x; then
4926         if test "xls" = x; then
4927           PROG_NAME=ls
4928         else
4929           PROG_NAME=ls
4930         fi
4931         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4932 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4933         as_fn_error $? "Cannot continue" "$LINENO" 5
4934     fi
4935 
4936 
4937 
4938     for ac_prog in mkdir
4939 do
4940   # Extract the first word of "$ac_prog", so it can be a program name with args.
4941 set dummy $ac_prog; ac_word=$2
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943 $as_echo_n "checking for $ac_word... " >&6; }
4944 if test "${ac_cv_path_MKDIR+set}" = set; then :
4945   $as_echo_n "(cached) " >&6
4946 else
4947   case $MKDIR in
4948   [\\/]* | ?:[\\/]*)
4949   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4950   ;;
4951   *)
4952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953 for as_dir in $PATH
4954 do
4955   IFS=$as_save_IFS
4956   test -z "$as_dir" && as_dir=.
4957     for ac_exec_ext in '' $ac_executable_extensions; do
4958   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961     break 2
4962   fi
4963 done
4964   done
4965 IFS=$as_save_IFS
4966 
4967   ;;
4968 esac
4969 fi
4970 MKDIR=$ac_cv_path_MKDIR
4971 if test -n "$MKDIR"; then
4972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4973 $as_echo "$MKDIR" >&6; }
4974 else
4975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976 $as_echo "no" >&6; }
4977 fi
4978 
4979 
4980   test -n "$MKDIR" && break
4981 done
4982 
4983 
4984     if test "x$MKDIR" = x; then
4985         if test "xmkdir" = x; then
4986           PROG_NAME=mkdir
4987         else
4988           PROG_NAME=mkdir
4989         fi
4990         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4991 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4992         as_fn_error $? "Cannot continue" "$LINENO" 5
4993     fi
4994 
4995 
4996 
4997     for ac_prog in mktemp
4998 do
4999   # Extract the first word of "$ac_prog", so it can be a program name with args.
5000 set dummy $ac_prog; ac_word=$2
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002 $as_echo_n "checking for $ac_word... " >&6; }
5003 if test "${ac_cv_path_MKTEMP+set}" = set; then :
5004   $as_echo_n "(cached) " >&6
5005 else
5006   case $MKTEMP in
5007   [\\/]* | ?:[\\/]*)
5008   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5009   ;;
5010   *)
5011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012 for as_dir in $PATH
5013 do
5014   IFS=$as_save_IFS
5015   test -z "$as_dir" && as_dir=.
5016     for ac_exec_ext in '' $ac_executable_extensions; do
5017   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020     break 2
5021   fi
5022 done
5023   done
5024 IFS=$as_save_IFS
5025 
5026   ;;
5027 esac
5028 fi
5029 MKTEMP=$ac_cv_path_MKTEMP
5030 if test -n "$MKTEMP"; then
5031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5032 $as_echo "$MKTEMP" >&6; }
5033 else
5034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035 $as_echo "no" >&6; }
5036 fi
5037 
5038 
5039   test -n "$MKTEMP" && break
5040 done
5041 
5042 
5043     if test "x$MKTEMP" = x; then
5044         if test "xmktemp" = x; then
5045           PROG_NAME=mktemp
5046         else
5047           PROG_NAME=mktemp
5048         fi
5049         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5050 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5051         as_fn_error $? "Cannot continue" "$LINENO" 5
5052     fi
5053 
5054 
5055 
5056     for ac_prog in mv
5057 do
5058   # Extract the first word of "$ac_prog", so it can be a program name with args.
5059 set dummy $ac_prog; ac_word=$2
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061 $as_echo_n "checking for $ac_word... " >&6; }
5062 if test "${ac_cv_path_MV+set}" = set; then :
5063   $as_echo_n "(cached) " >&6
5064 else
5065   case $MV in
5066   [\\/]* | ?:[\\/]*)
5067   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5068   ;;
5069   *)
5070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071 for as_dir in $PATH
5072 do
5073   IFS=$as_save_IFS
5074   test -z "$as_dir" && as_dir=.
5075     for ac_exec_ext in '' $ac_executable_extensions; do
5076   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079     break 2
5080   fi
5081 done
5082   done
5083 IFS=$as_save_IFS
5084 
5085   ;;
5086 esac
5087 fi
5088 MV=$ac_cv_path_MV
5089 if test -n "$MV"; then
5090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5091 $as_echo "$MV" >&6; }
5092 else
5093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094 $as_echo "no" >&6; }
5095 fi
5096 
5097 
5098   test -n "$MV" && break
5099 done
5100 
5101 
5102     if test "x$MV" = x; then
5103         if test "xmv" = x; then
5104           PROG_NAME=mv
5105         else
5106           PROG_NAME=mv
5107         fi
5108         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5109 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5110         as_fn_error $? "Cannot continue" "$LINENO" 5
5111     fi
5112 
5113 
5114 
5115     for ac_prog in printf
5116 do
5117   # Extract the first word of "$ac_prog", so it can be a program name with args.
5118 set dummy $ac_prog; ac_word=$2
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120 $as_echo_n "checking for $ac_word... " >&6; }
5121 if test "${ac_cv_path_PRINTF+set}" = set; then :
5122   $as_echo_n "(cached) " >&6
5123 else
5124   case $PRINTF in
5125   [\\/]* | ?:[\\/]*)
5126   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5127   ;;
5128   *)
5129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130 for as_dir in $PATH
5131 do
5132   IFS=$as_save_IFS
5133   test -z "$as_dir" && as_dir=.
5134     for ac_exec_ext in '' $ac_executable_extensions; do
5135   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138     break 2
5139   fi
5140 done
5141   done
5142 IFS=$as_save_IFS
5143 
5144   ;;
5145 esac
5146 fi
5147 PRINTF=$ac_cv_path_PRINTF
5148 if test -n "$PRINTF"; then
5149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5150 $as_echo "$PRINTF" >&6; }
5151 else
5152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153 $as_echo "no" >&6; }
5154 fi
5155 
5156 
5157   test -n "$PRINTF" && break
5158 done
5159 
5160 
5161     if test "x$PRINTF" = x; then
5162         if test "xprintf" = x; then
5163           PROG_NAME=printf
5164         else
5165           PROG_NAME=printf
5166         fi
5167         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5168 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169         as_fn_error $? "Cannot continue" "$LINENO" 5
5170     fi
5171 
5172 
5173 
5174     for ac_prog in rm
5175 do
5176   # Extract the first word of "$ac_prog", so it can be a program name with args.
5177 set dummy $ac_prog; ac_word=$2
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179 $as_echo_n "checking for $ac_word... " >&6; }
5180 if test "${ac_cv_path_RM+set}" = set; then :
5181   $as_echo_n "(cached) " >&6
5182 else
5183   case $RM in
5184   [\\/]* | ?:[\\/]*)
5185   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5186   ;;
5187   *)
5188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189 for as_dir in $PATH
5190 do
5191   IFS=$as_save_IFS
5192   test -z "$as_dir" && as_dir=.
5193     for ac_exec_ext in '' $ac_executable_extensions; do
5194   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197     break 2
5198   fi
5199 done
5200   done
5201 IFS=$as_save_IFS
5202 
5203   ;;
5204 esac
5205 fi
5206 RM=$ac_cv_path_RM
5207 if test -n "$RM"; then
5208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5209 $as_echo "$RM" >&6; }
5210 else
5211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212 $as_echo "no" >&6; }
5213 fi
5214 
5215 
5216   test -n "$RM" && break
5217 done
5218 
5219 
5220     if test "x$RM" = x; then
5221         if test "xrm" = x; then
5222           PROG_NAME=rm
5223         else
5224           PROG_NAME=rm
5225         fi
5226         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5227 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5228         as_fn_error $? "Cannot continue" "$LINENO" 5
5229     fi
5230 
5231 
5232 
5233     for ac_prog in sh
5234 do
5235   # Extract the first word of "$ac_prog", so it can be a program name with args.
5236 set dummy $ac_prog; ac_word=$2
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238 $as_echo_n "checking for $ac_word... " >&6; }
5239 if test "${ac_cv_path_SH+set}" = set; then :
5240   $as_echo_n "(cached) " >&6
5241 else
5242   case $SH in
5243   [\\/]* | ?:[\\/]*)
5244   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5245   ;;
5246   *)
5247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248 for as_dir in $PATH
5249 do
5250   IFS=$as_save_IFS
5251   test -z "$as_dir" && as_dir=.
5252     for ac_exec_ext in '' $ac_executable_extensions; do
5253   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256     break 2
5257   fi
5258 done
5259   done
5260 IFS=$as_save_IFS
5261 
5262   ;;
5263 esac
5264 fi
5265 SH=$ac_cv_path_SH
5266 if test -n "$SH"; then
5267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5268 $as_echo "$SH" >&6; }
5269 else
5270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271 $as_echo "no" >&6; }
5272 fi
5273 
5274 
5275   test -n "$SH" && break
5276 done
5277 
5278 
5279     if test "x$SH" = x; then
5280         if test "xsh" = x; then
5281           PROG_NAME=sh
5282         else
5283           PROG_NAME=sh
5284         fi
5285         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5286 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5287         as_fn_error $? "Cannot continue" "$LINENO" 5
5288     fi
5289 
5290 
5291 
5292     for ac_prog in sort
5293 do
5294   # Extract the first word of "$ac_prog", so it can be a program name with args.
5295 set dummy $ac_prog; ac_word=$2
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297 $as_echo_n "checking for $ac_word... " >&6; }
5298 if test "${ac_cv_path_SORT+set}" = set; then :
5299   $as_echo_n "(cached) " >&6
5300 else
5301   case $SORT in
5302   [\\/]* | ?:[\\/]*)
5303   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5304   ;;
5305   *)
5306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307 for as_dir in $PATH
5308 do
5309   IFS=$as_save_IFS
5310   test -z "$as_dir" && as_dir=.
5311     for ac_exec_ext in '' $ac_executable_extensions; do
5312   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315     break 2
5316   fi
5317 done
5318   done
5319 IFS=$as_save_IFS
5320 
5321   ;;
5322 esac
5323 fi
5324 SORT=$ac_cv_path_SORT
5325 if test -n "$SORT"; then
5326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5327 $as_echo "$SORT" >&6; }
5328 else
5329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330 $as_echo "no" >&6; }
5331 fi
5332 
5333 
5334   test -n "$SORT" && break
5335 done
5336 
5337 
5338     if test "x$SORT" = x; then
5339         if test "xsort" = x; then
5340           PROG_NAME=sort
5341         else
5342           PROG_NAME=sort
5343         fi
5344         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5345 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5346         as_fn_error $? "Cannot continue" "$LINENO" 5
5347     fi
5348 
5349 
5350 
5351     for ac_prog in tail
5352 do
5353   # Extract the first word of "$ac_prog", so it can be a program name with args.
5354 set dummy $ac_prog; ac_word=$2
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356 $as_echo_n "checking for $ac_word... " >&6; }
5357 if test "${ac_cv_path_TAIL+set}" = set; then :
5358   $as_echo_n "(cached) " >&6
5359 else
5360   case $TAIL in
5361   [\\/]* | ?:[\\/]*)
5362   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5363   ;;
5364   *)
5365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366 for as_dir in $PATH
5367 do
5368   IFS=$as_save_IFS
5369   test -z "$as_dir" && as_dir=.
5370     for ac_exec_ext in '' $ac_executable_extensions; do
5371   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5372     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374     break 2
5375   fi
5376 done
5377   done
5378 IFS=$as_save_IFS
5379 
5380   ;;
5381 esac
5382 fi
5383 TAIL=$ac_cv_path_TAIL
5384 if test -n "$TAIL"; then
5385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5386 $as_echo "$TAIL" >&6; }
5387 else
5388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389 $as_echo "no" >&6; }
5390 fi
5391 
5392 
5393   test -n "$TAIL" && break
5394 done
5395 
5396 
5397     if test "x$TAIL" = x; then
5398         if test "xtail" = x; then
5399           PROG_NAME=tail
5400         else
5401           PROG_NAME=tail
5402         fi
5403         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5404 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5405         as_fn_error $? "Cannot continue" "$LINENO" 5
5406     fi
5407 
5408 
5409 
5410     for ac_prog in tar
5411 do
5412   # Extract the first word of "$ac_prog", so it can be a program name with args.
5413 set dummy $ac_prog; ac_word=$2
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415 $as_echo_n "checking for $ac_word... " >&6; }
5416 if test "${ac_cv_path_TAR+set}" = set; then :
5417   $as_echo_n "(cached) " >&6
5418 else
5419   case $TAR in
5420   [\\/]* | ?:[\\/]*)
5421   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5422   ;;
5423   *)
5424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425 for as_dir in $PATH
5426 do
5427   IFS=$as_save_IFS
5428   test -z "$as_dir" && as_dir=.
5429     for ac_exec_ext in '' $ac_executable_extensions; do
5430   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5431     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433     break 2
5434   fi
5435 done
5436   done
5437 IFS=$as_save_IFS
5438 
5439   ;;
5440 esac
5441 fi
5442 TAR=$ac_cv_path_TAR
5443 if test -n "$TAR"; then
5444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5445 $as_echo "$TAR" >&6; }
5446 else
5447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448 $as_echo "no" >&6; }
5449 fi
5450 
5451 
5452   test -n "$TAR" && break
5453 done
5454 
5455 
5456     if test "x$TAR" = x; then
5457         if test "xtar" = x; then
5458           PROG_NAME=tar
5459         else
5460           PROG_NAME=tar
5461         fi
5462         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5463 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5464         as_fn_error $? "Cannot continue" "$LINENO" 5
5465     fi
5466 
5467 
5468 
5469     for ac_prog in tee
5470 do
5471   # Extract the first word of "$ac_prog", so it can be a program name with args.
5472 set dummy $ac_prog; ac_word=$2
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474 $as_echo_n "checking for $ac_word... " >&6; }
5475 if test "${ac_cv_path_TEE+set}" = set; then :
5476   $as_echo_n "(cached) " >&6
5477 else
5478   case $TEE in
5479   [\\/]* | ?:[\\/]*)
5480   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5481   ;;
5482   *)
5483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484 for as_dir in $PATH
5485 do
5486   IFS=$as_save_IFS
5487   test -z "$as_dir" && as_dir=.
5488     for ac_exec_ext in '' $ac_executable_extensions; do
5489   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5490     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492     break 2
5493   fi
5494 done
5495   done
5496 IFS=$as_save_IFS
5497 
5498   ;;
5499 esac
5500 fi
5501 TEE=$ac_cv_path_TEE
5502 if test -n "$TEE"; then
5503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5504 $as_echo "$TEE" >&6; }
5505 else
5506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507 $as_echo "no" >&6; }
5508 fi
5509 
5510 
5511   test -n "$TEE" && break
5512 done
5513 
5514 
5515     if test "x$TEE" = x; then
5516         if test "xtee" = x; then
5517           PROG_NAME=tee
5518         else
5519           PROG_NAME=tee
5520         fi
5521         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5522 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5523         as_fn_error $? "Cannot continue" "$LINENO" 5
5524     fi
5525 
5526 
5527 
5528     for ac_prog in touch
5529 do
5530   # Extract the first word of "$ac_prog", so it can be a program name with args.
5531 set dummy $ac_prog; ac_word=$2
5532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533 $as_echo_n "checking for $ac_word... " >&6; }
5534 if test "${ac_cv_path_TOUCH+set}" = set; then :
5535   $as_echo_n "(cached) " >&6
5536 else
5537   case $TOUCH in
5538   [\\/]* | ?:[\\/]*)
5539   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5540   ;;
5541   *)
5542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543 for as_dir in $PATH
5544 do
5545   IFS=$as_save_IFS
5546   test -z "$as_dir" && as_dir=.
5547     for ac_exec_ext in '' $ac_executable_extensions; do
5548   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5549     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551     break 2
5552   fi
5553 done
5554   done
5555 IFS=$as_save_IFS
5556 
5557   ;;
5558 esac
5559 fi
5560 TOUCH=$ac_cv_path_TOUCH
5561 if test -n "$TOUCH"; then
5562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5563 $as_echo "$TOUCH" >&6; }
5564 else
5565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566 $as_echo "no" >&6; }
5567 fi
5568 
5569 
5570   test -n "$TOUCH" && break
5571 done
5572 
5573 
5574     if test "x$TOUCH" = x; then
5575         if test "xtouch" = x; then
5576           PROG_NAME=touch
5577         else
5578           PROG_NAME=touch
5579         fi
5580         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5581 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5582         as_fn_error $? "Cannot continue" "$LINENO" 5
5583     fi
5584 
5585 
5586 
5587     for ac_prog in tr
5588 do
5589   # Extract the first word of "$ac_prog", so it can be a program name with args.
5590 set dummy $ac_prog; ac_word=$2
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592 $as_echo_n "checking for $ac_word... " >&6; }
5593 if test "${ac_cv_path_TR+set}" = set; then :
5594   $as_echo_n "(cached) " >&6
5595 else
5596   case $TR in
5597   [\\/]* | ?:[\\/]*)
5598   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5599   ;;
5600   *)
5601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602 for as_dir in $PATH
5603 do
5604   IFS=$as_save_IFS
5605   test -z "$as_dir" && as_dir=.
5606     for ac_exec_ext in '' $ac_executable_extensions; do
5607   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610     break 2
5611   fi
5612 done
5613   done
5614 IFS=$as_save_IFS
5615 
5616   ;;
5617 esac
5618 fi
5619 TR=$ac_cv_path_TR
5620 if test -n "$TR"; then
5621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5622 $as_echo "$TR" >&6; }
5623 else
5624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625 $as_echo "no" >&6; }
5626 fi
5627 
5628 
5629   test -n "$TR" && break
5630 done
5631 
5632 
5633     if test "x$TR" = x; then
5634         if test "xtr" = x; then
5635           PROG_NAME=tr
5636         else
5637           PROG_NAME=tr
5638         fi
5639         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5640 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5641         as_fn_error $? "Cannot continue" "$LINENO" 5
5642     fi
5643 
5644 
5645 
5646     for ac_prog in uname
5647 do
5648   # Extract the first word of "$ac_prog", so it can be a program name with args.
5649 set dummy $ac_prog; ac_word=$2
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651 $as_echo_n "checking for $ac_word... " >&6; }
5652 if test "${ac_cv_path_UNAME+set}" = set; then :
5653   $as_echo_n "(cached) " >&6
5654 else
5655   case $UNAME in
5656   [\\/]* | ?:[\\/]*)
5657   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5658   ;;
5659   *)
5660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661 for as_dir in $PATH
5662 do
5663   IFS=$as_save_IFS
5664   test -z "$as_dir" && as_dir=.
5665     for ac_exec_ext in '' $ac_executable_extensions; do
5666   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669     break 2
5670   fi
5671 done
5672   done
5673 IFS=$as_save_IFS
5674 
5675   ;;
5676 esac
5677 fi
5678 UNAME=$ac_cv_path_UNAME
5679 if test -n "$UNAME"; then
5680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5681 $as_echo "$UNAME" >&6; }
5682 else
5683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684 $as_echo "no" >&6; }
5685 fi
5686 
5687 
5688   test -n "$UNAME" && break
5689 done
5690 
5691 
5692     if test "x$UNAME" = x; then
5693         if test "xuname" = x; then
5694           PROG_NAME=uname
5695         else
5696           PROG_NAME=uname
5697         fi
5698         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5699 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5700         as_fn_error $? "Cannot continue" "$LINENO" 5
5701     fi
5702 
5703 
5704 
5705     for ac_prog in uniq
5706 do
5707   # Extract the first word of "$ac_prog", so it can be a program name with args.
5708 set dummy $ac_prog; ac_word=$2
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710 $as_echo_n "checking for $ac_word... " >&6; }
5711 if test "${ac_cv_path_UNIQ+set}" = set; then :
5712   $as_echo_n "(cached) " >&6
5713 else
5714   case $UNIQ in
5715   [\\/]* | ?:[\\/]*)
5716   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5717   ;;
5718   *)
5719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720 for as_dir in $PATH
5721 do
5722   IFS=$as_save_IFS
5723   test -z "$as_dir" && as_dir=.
5724     for ac_exec_ext in '' $ac_executable_extensions; do
5725   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5726     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728     break 2
5729   fi
5730 done
5731   done
5732 IFS=$as_save_IFS
5733 
5734   ;;
5735 esac
5736 fi
5737 UNIQ=$ac_cv_path_UNIQ
5738 if test -n "$UNIQ"; then
5739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5740 $as_echo "$UNIQ" >&6; }
5741 else
5742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743 $as_echo "no" >&6; }
5744 fi
5745 
5746 
5747   test -n "$UNIQ" && break
5748 done
5749 
5750 
5751     if test "x$UNIQ" = x; then
5752         if test "xuniq" = x; then
5753           PROG_NAME=uniq
5754         else
5755           PROG_NAME=uniq
5756         fi
5757         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5758 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5759         as_fn_error $? "Cannot continue" "$LINENO" 5
5760     fi
5761 
5762 
5763 
5764     for ac_prog in wc
5765 do
5766   # Extract the first word of "$ac_prog", so it can be a program name with args.
5767 set dummy $ac_prog; ac_word=$2
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769 $as_echo_n "checking for $ac_word... " >&6; }
5770 if test "${ac_cv_path_WC+set}" = set; then :
5771   $as_echo_n "(cached) " >&6
5772 else
5773   case $WC in
5774   [\\/]* | ?:[\\/]*)
5775   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5776   ;;
5777   *)
5778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779 for as_dir in $PATH
5780 do
5781   IFS=$as_save_IFS
5782   test -z "$as_dir" && as_dir=.
5783     for ac_exec_ext in '' $ac_executable_extensions; do
5784   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787     break 2
5788   fi
5789 done
5790   done
5791 IFS=$as_save_IFS
5792 
5793   ;;
5794 esac
5795 fi
5796 WC=$ac_cv_path_WC
5797 if test -n "$WC"; then
5798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5799 $as_echo "$WC" >&6; }
5800 else
5801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802 $as_echo "no" >&6; }
5803 fi
5804 
5805 
5806   test -n "$WC" && break
5807 done
5808 
5809 
5810     if test "x$WC" = x; then
5811         if test "xwc" = x; then
5812           PROG_NAME=wc
5813         else
5814           PROG_NAME=wc
5815         fi
5816         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5817 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5818         as_fn_error $? "Cannot continue" "$LINENO" 5
5819     fi
5820 
5821 
5822 
5823     for ac_prog in which
5824 do
5825   # Extract the first word of "$ac_prog", so it can be a program name with args.
5826 set dummy $ac_prog; ac_word=$2
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828 $as_echo_n "checking for $ac_word... " >&6; }
5829 if test "${ac_cv_path_WHICH+set}" = set; then :
5830   $as_echo_n "(cached) " >&6
5831 else
5832   case $WHICH in
5833   [\\/]* | ?:[\\/]*)
5834   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5835   ;;
5836   *)
5837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838 for as_dir in $PATH
5839 do
5840   IFS=$as_save_IFS
5841   test -z "$as_dir" && as_dir=.
5842     for ac_exec_ext in '' $ac_executable_extensions; do
5843   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5844     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846     break 2
5847   fi
5848 done
5849   done
5850 IFS=$as_save_IFS
5851 
5852   ;;
5853 esac
5854 fi
5855 WHICH=$ac_cv_path_WHICH
5856 if test -n "$WHICH"; then
5857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5858 $as_echo "$WHICH" >&6; }
5859 else
5860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861 $as_echo "no" >&6; }
5862 fi
5863 
5864 
5865   test -n "$WHICH" && break
5866 done
5867 
5868 
5869     if test "x$WHICH" = x; then
5870         if test "xwhich" = x; then
5871           PROG_NAME=which
5872         else
5873           PROG_NAME=which
5874         fi
5875         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5876 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5877         as_fn_error $? "Cannot continue" "$LINENO" 5
5878     fi
5879 
5880 
5881 
5882     for ac_prog in xargs
5883 do
5884   # Extract the first word of "$ac_prog", so it can be a program name with args.
5885 set dummy $ac_prog; ac_word=$2
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887 $as_echo_n "checking for $ac_word... " >&6; }
5888 if test "${ac_cv_path_XARGS+set}" = set; then :
5889   $as_echo_n "(cached) " >&6
5890 else
5891   case $XARGS in
5892   [\\/]* | ?:[\\/]*)
5893   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5894   ;;
5895   *)
5896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897 for as_dir in $PATH
5898 do
5899   IFS=$as_save_IFS
5900   test -z "$as_dir" && as_dir=.
5901     for ac_exec_ext in '' $ac_executable_extensions; do
5902   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905     break 2
5906   fi
5907 done
5908   done
5909 IFS=$as_save_IFS
5910 
5911   ;;
5912 esac
5913 fi
5914 XARGS=$ac_cv_path_XARGS
5915 if test -n "$XARGS"; then
5916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5917 $as_echo "$XARGS" >&6; }
5918 else
5919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920 $as_echo "no" >&6; }
5921 fi
5922 
5923 
5924   test -n "$XARGS" && break
5925 done
5926 
5927 
5928     if test "x$XARGS" = x; then
5929         if test "xxargs" = x; then
5930           PROG_NAME=xargs
5931         else
5932           PROG_NAME=xargs
5933         fi
5934         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5935 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5936         as_fn_error $? "Cannot continue" "$LINENO" 5
5937     fi
5938 
5939 
5940 
5941 # Then required tools that require some special treatment.
5942 for ac_prog in gawk mawk nawk awk
5943 do
5944   # Extract the first word of "$ac_prog", so it can be a program name with args.
5945 set dummy $ac_prog; ac_word=$2
5946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947 $as_echo_n "checking for $ac_word... " >&6; }
5948 if test "${ac_cv_prog_AWK+set}" = set; then :
5949   $as_echo_n "(cached) " >&6
5950 else
5951   if test -n "$AWK"; then
5952   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5953 else
5954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955 for as_dir in $PATH
5956 do
5957   IFS=$as_save_IFS
5958   test -z "$as_dir" && as_dir=.
5959     for ac_exec_ext in '' $ac_executable_extensions; do
5960   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961     ac_cv_prog_AWK="$ac_prog"
5962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963     break 2
5964   fi
5965 done
5966   done
5967 IFS=$as_save_IFS
5968 
5969 fi
5970 fi
5971 AWK=$ac_cv_prog_AWK
5972 if test -n "$AWK"; then
5973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5974 $as_echo "$AWK" >&6; }
5975 else
5976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977 $as_echo "no" >&6; }
5978 fi
5979 
5980 
5981   test -n "$AWK" && break
5982 done
5983 
5984 
5985     if test "x$AWK" = x; then
5986         if test "x" = x; then
5987           PROG_NAME=awk
5988         else
5989           PROG_NAME=
5990         fi
5991         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993         as_fn_error $? "Cannot continue" "$LINENO" 5
5994     fi
5995 
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5997 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5998 if test "${ac_cv_path_GREP+set}" = set; then :
5999   $as_echo_n "(cached) " >&6
6000 else
6001   if test -z "$GREP"; then
6002   ac_path_GREP_found=false
6003   # Loop through the user's path and test for each of PROGNAME-LIST
6004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006 do
6007   IFS=$as_save_IFS
6008   test -z "$as_dir" && as_dir=.
6009     for ac_prog in grep ggrep; do
6010     for ac_exec_ext in '' $ac_executable_extensions; do
6011       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6012       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6013 # Check for GNU ac_path_GREP and select it if it is found.
6014   # Check for GNU $ac_path_GREP
6015 case `"$ac_path_GREP" --version 2>&1` in
6016 *GNU*)
6017   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6018 *)
6019   ac_count=0
6020   $as_echo_n 0123456789 >"conftest.in"
6021   while :
6022   do
6023     cat "conftest.in" "conftest.in" >"conftest.tmp"
6024     mv "conftest.tmp" "conftest.in"
6025     cp "conftest.in" "conftest.nl"
6026     $as_echo 'GREP' >> "conftest.nl"
6027     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6028     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6029     as_fn_arith $ac_count + 1 && ac_count=$as_val
6030     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6031       # Best one so far, save it but keep looking for a better one
6032       ac_cv_path_GREP="$ac_path_GREP"
6033       ac_path_GREP_max=$ac_count
6034     fi
6035     # 10*(2^10) chars as input seems more than enough
6036     test $ac_count -gt 10 && break
6037   done
6038   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039 esac
6040 
6041       $ac_path_GREP_found && break 3
6042     done
6043   done
6044   done
6045 IFS=$as_save_IFS
6046   if test -z "$ac_cv_path_GREP"; then
6047     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048   fi
6049 else
6050   ac_cv_path_GREP=$GREP
6051 fi
6052 
6053 fi
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6055 $as_echo "$ac_cv_path_GREP" >&6; }
6056  GREP="$ac_cv_path_GREP"
6057 
6058 
6059 
6060     if test "x$GREP" = x; then
6061         if test "x" = x; then
6062           PROG_NAME=grep
6063         else
6064           PROG_NAME=
6065         fi
6066         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068         as_fn_error $? "Cannot continue" "$LINENO" 5
6069     fi
6070 
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6072 $as_echo_n "checking for egrep... " >&6; }
6073 if test "${ac_cv_path_EGREP+set}" = set; then :
6074   $as_echo_n "(cached) " >&6
6075 else
6076   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6077    then ac_cv_path_EGREP="$GREP -E"
6078    else
6079      if test -z "$EGREP"; then
6080   ac_path_EGREP_found=false
6081   # Loop through the user's path and test for each of PROGNAME-LIST
6082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6084 do
6085   IFS=$as_save_IFS
6086   test -z "$as_dir" && as_dir=.
6087     for ac_prog in egrep; do
6088     for ac_exec_ext in '' $ac_executable_extensions; do
6089       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6090       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6091 # Check for GNU ac_path_EGREP and select it if it is found.
6092   # Check for GNU $ac_path_EGREP
6093 case `"$ac_path_EGREP" --version 2>&1` in
6094 *GNU*)
6095   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6096 *)
6097   ac_count=0
6098   $as_echo_n 0123456789 >"conftest.in"
6099   while :
6100   do
6101     cat "conftest.in" "conftest.in" >"conftest.tmp"
6102     mv "conftest.tmp" "conftest.in"
6103     cp "conftest.in" "conftest.nl"
6104     $as_echo 'EGREP' >> "conftest.nl"
6105     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6106     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6107     as_fn_arith $ac_count + 1 && ac_count=$as_val
6108     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6109       # Best one so far, save it but keep looking for a better one
6110       ac_cv_path_EGREP="$ac_path_EGREP"
6111       ac_path_EGREP_max=$ac_count
6112     fi
6113     # 10*(2^10) chars as input seems more than enough
6114     test $ac_count -gt 10 && break
6115   done
6116   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6117 esac
6118 
6119       $ac_path_EGREP_found && break 3
6120     done
6121   done
6122   done
6123 IFS=$as_save_IFS
6124   if test -z "$ac_cv_path_EGREP"; then
6125     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6126   fi
6127 else
6128   ac_cv_path_EGREP=$EGREP
6129 fi
6130 
6131    fi
6132 fi
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6134 $as_echo "$ac_cv_path_EGREP" >&6; }
6135  EGREP="$ac_cv_path_EGREP"
6136 
6137 
6138 
6139     if test "x$EGREP" = x; then
6140         if test "x" = x; then
6141           PROG_NAME=egrep
6142         else
6143           PROG_NAME=
6144         fi
6145         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6146 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6147         as_fn_error $? "Cannot continue" "$LINENO" 5
6148     fi
6149 
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6151 $as_echo_n "checking for fgrep... " >&6; }
6152 if test "${ac_cv_path_FGREP+set}" = set; then :
6153   $as_echo_n "(cached) " >&6
6154 else
6155   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6156    then ac_cv_path_FGREP="$GREP -F"
6157    else
6158      if test -z "$FGREP"; then
6159   ac_path_FGREP_found=false
6160   # Loop through the user's path and test for each of PROGNAME-LIST
6161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163 do
6164   IFS=$as_save_IFS
6165   test -z "$as_dir" && as_dir=.
6166     for ac_prog in fgrep; do
6167     for ac_exec_ext in '' $ac_executable_extensions; do
6168       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6169       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6170 # Check for GNU ac_path_FGREP and select it if it is found.
6171   # Check for GNU $ac_path_FGREP
6172 case `"$ac_path_FGREP" --version 2>&1` in
6173 *GNU*)
6174   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6175 *)
6176   ac_count=0
6177   $as_echo_n 0123456789 >"conftest.in"
6178   while :
6179   do
6180     cat "conftest.in" "conftest.in" >"conftest.tmp"
6181     mv "conftest.tmp" "conftest.in"
6182     cp "conftest.in" "conftest.nl"
6183     $as_echo 'FGREP' >> "conftest.nl"
6184     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186     as_fn_arith $ac_count + 1 && ac_count=$as_val
6187     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6188       # Best one so far, save it but keep looking for a better one
6189       ac_cv_path_FGREP="$ac_path_FGREP"
6190       ac_path_FGREP_max=$ac_count
6191     fi
6192     # 10*(2^10) chars as input seems more than enough
6193     test $ac_count -gt 10 && break
6194   done
6195   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196 esac
6197 
6198       $ac_path_FGREP_found && break 3
6199     done
6200   done
6201   done
6202 IFS=$as_save_IFS
6203   if test -z "$ac_cv_path_FGREP"; then
6204     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205   fi
6206 else
6207   ac_cv_path_FGREP=$FGREP
6208 fi
6209 
6210    fi
6211 fi
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6213 $as_echo "$ac_cv_path_FGREP" >&6; }
6214  FGREP="$ac_cv_path_FGREP"
6215 
6216 
6217 
6218     if test "x$FGREP" = x; then
6219         if test "x" = x; then
6220           PROG_NAME=fgrep
6221         else
6222           PROG_NAME=
6223         fi
6224         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6225 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6226         as_fn_error $? "Cannot continue" "$LINENO" 5
6227     fi
6228 
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6230 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6231 if test "${ac_cv_path_SED+set}" = set; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6235      for ac_i in 1 2 3 4 5 6 7; do
6236        ac_script="$ac_script$as_nl$ac_script"
6237      done
6238      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6239      { ac_script=; unset ac_script;}
6240      if test -z "$SED"; then
6241   ac_path_SED_found=false
6242   # Loop through the user's path and test for each of PROGNAME-LIST
6243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244 for as_dir in $PATH
6245 do
6246   IFS=$as_save_IFS
6247   test -z "$as_dir" && as_dir=.
6248     for ac_prog in sed gsed; do
6249     for ac_exec_ext in '' $ac_executable_extensions; do
6250       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6251       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6252 # Check for GNU ac_path_SED and select it if it is found.
6253   # Check for GNU $ac_path_SED
6254 case `"$ac_path_SED" --version 2>&1` in
6255 *GNU*)
6256   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6257 *)
6258   ac_count=0
6259   $as_echo_n 0123456789 >"conftest.in"
6260   while :
6261   do
6262     cat "conftest.in" "conftest.in" >"conftest.tmp"
6263     mv "conftest.tmp" "conftest.in"
6264     cp "conftest.in" "conftest.nl"
6265     $as_echo '' >> "conftest.nl"
6266     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268     as_fn_arith $ac_count + 1 && ac_count=$as_val
6269     if test $ac_count -gt ${ac_path_SED_max-0}; then
6270       # Best one so far, save it but keep looking for a better one
6271       ac_cv_path_SED="$ac_path_SED"
6272       ac_path_SED_max=$ac_count
6273     fi
6274     # 10*(2^10) chars as input seems more than enough
6275     test $ac_count -gt 10 && break
6276   done
6277   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278 esac
6279 
6280       $ac_path_SED_found && break 3
6281     done
6282   done
6283   done
6284 IFS=$as_save_IFS
6285   if test -z "$ac_cv_path_SED"; then
6286     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6287   fi
6288 else
6289   ac_cv_path_SED=$SED
6290 fi
6291 
6292 fi
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6294 $as_echo "$ac_cv_path_SED" >&6; }
6295  SED="$ac_cv_path_SED"
6296   rm -f conftest.sed
6297 
6298 
6299     if test "x$SED" = x; then
6300         if test "x" = x; then
6301           PROG_NAME=sed
6302         else
6303           PROG_NAME=
6304         fi
6305         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6306 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6307         as_fn_error $? "Cannot continue" "$LINENO" 5
6308     fi
6309 
6310 
6311 for ac_prog in nawk gawk awk
6312 do
6313   # Extract the first word of "$ac_prog", so it can be a program name with args.
6314 set dummy $ac_prog; ac_word=$2
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316 $as_echo_n "checking for $ac_word... " >&6; }
6317 if test "${ac_cv_path_NAWK+set}" = set; then :
6318   $as_echo_n "(cached) " >&6
6319 else
6320   case $NAWK in
6321   [\\/]* | ?:[\\/]*)
6322   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6323   ;;
6324   *)
6325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326 for as_dir in $PATH
6327 do
6328   IFS=$as_save_IFS
6329   test -z "$as_dir" && as_dir=.
6330     for ac_exec_ext in '' $ac_executable_extensions; do
6331   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334     break 2
6335   fi
6336 done
6337   done
6338 IFS=$as_save_IFS
6339 
6340   ;;
6341 esac
6342 fi
6343 NAWK=$ac_cv_path_NAWK
6344 if test -n "$NAWK"; then
6345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6346 $as_echo "$NAWK" >&6; }
6347 else
6348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349 $as_echo "no" >&6; }
6350 fi
6351 
6352 
6353   test -n "$NAWK" && break
6354 done
6355 
6356 
6357     if test "x$NAWK" = x; then
6358         if test "x" = x; then
6359           PROG_NAME=nawk
6360         else
6361           PROG_NAME=
6362         fi
6363         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6364 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6365         as_fn_error $? "Cannot continue" "$LINENO" 5
6366     fi
6367 
6368 
6369 # Always force rm.
6370 RM="$RM -f"
6371 
6372 # pwd behaves differently on various platforms and some don't support the -L flag.
6373 # Always use the bash builtin pwd to get uniform behavior.
6374 THEPWDCMD=pwd
6375 
6376 # These are not required on all platforms
6377 # Extract the first word of "cygpath", so it can be a program name with args.
6378 set dummy cygpath; ac_word=$2
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380 $as_echo_n "checking for $ac_word... " >&6; }
6381 if test "${ac_cv_path_CYGPATH+set}" = set; then :
6382   $as_echo_n "(cached) " >&6
6383 else
6384   case $CYGPATH in
6385   [\\/]* | ?:[\\/]*)
6386   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6387   ;;
6388   *)
6389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390 for as_dir in $PATH
6391 do
6392   IFS=$as_save_IFS
6393   test -z "$as_dir" && as_dir=.
6394     for ac_exec_ext in '' $ac_executable_extensions; do
6395   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6396     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398     break 2
6399   fi
6400 done
6401   done
6402 IFS=$as_save_IFS
6403 
6404   ;;
6405 esac
6406 fi
6407 CYGPATH=$ac_cv_path_CYGPATH
6408 if test -n "$CYGPATH"; then
6409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6410 $as_echo "$CYGPATH" >&6; }
6411 else
6412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413 $as_echo "no" >&6; }
6414 fi
6415 
6416 
6417 # Extract the first word of "readlink", so it can be a program name with args.
6418 set dummy readlink; ac_word=$2
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420 $as_echo_n "checking for $ac_word... " >&6; }
6421 if test "${ac_cv_path_READLINK+set}" = set; then :
6422   $as_echo_n "(cached) " >&6
6423 else
6424   case $READLINK in
6425   [\\/]* | ?:[\\/]*)
6426   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6427   ;;
6428   *)
6429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430 for as_dir in $PATH
6431 do
6432   IFS=$as_save_IFS
6433   test -z "$as_dir" && as_dir=.
6434     for ac_exec_ext in '' $ac_executable_extensions; do
6435   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6436     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438     break 2
6439   fi
6440 done
6441   done
6442 IFS=$as_save_IFS
6443 
6444   ;;
6445 esac
6446 fi
6447 READLINK=$ac_cv_path_READLINK
6448 if test -n "$READLINK"; then
6449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6450 $as_echo "$READLINK" >&6; }
6451 else
6452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453 $as_echo "no" >&6; }
6454 fi
6455 
6456 
6457 # Extract the first word of "df", so it can be a program name with args.
6458 set dummy df; ac_word=$2
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6460 $as_echo_n "checking for $ac_word... " >&6; }
6461 if test "${ac_cv_path_DF+set}" = set; then :
6462   $as_echo_n "(cached) " >&6
6463 else
6464   case $DF in
6465   [\\/]* | ?:[\\/]*)
6466   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6467   ;;
6468   *)
6469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470 for as_dir in $PATH
6471 do
6472   IFS=$as_save_IFS
6473   test -z "$as_dir" && as_dir=.
6474     for ac_exec_ext in '' $ac_executable_extensions; do
6475   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6476     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6478     break 2
6479   fi
6480 done
6481   done
6482 IFS=$as_save_IFS
6483 
6484   ;;
6485 esac
6486 fi
6487 DF=$ac_cv_path_DF
6488 if test -n "$DF"; then
6489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6490 $as_echo "$DF" >&6; }
6491 else
6492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493 $as_echo "no" >&6; }
6494 fi
6495 
6496 
6497 # Extract the first word of "SetFile", so it can be a program name with args.
6498 set dummy SetFile; ac_word=$2
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500 $as_echo_n "checking for $ac_word... " >&6; }
6501 if test "${ac_cv_path_SETFILE+set}" = set; then :
6502   $as_echo_n "(cached) " >&6
6503 else
6504   case $SETFILE in
6505   [\\/]* | ?:[\\/]*)
6506   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6507   ;;
6508   *)
6509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510 for as_dir in $PATH
6511 do
6512   IFS=$as_save_IFS
6513   test -z "$as_dir" && as_dir=.
6514     for ac_exec_ext in '' $ac_executable_extensions; do
6515   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6516     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518     break 2
6519   fi
6520 done
6521   done
6522 IFS=$as_save_IFS
6523 
6524   ;;
6525 esac
6526 fi
6527 SETFILE=$ac_cv_path_SETFILE
6528 if test -n "$SETFILE"; then
6529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6530 $as_echo "$SETFILE" >&6; }
6531 else
6532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533 $as_echo "no" >&6; }
6534 fi
6535 
6536 
6537 
6538 
6539 # Now we can determine OpenJDK build and target platforms. This is required to
6540 # have early on.
6541 # Make sure we can run config.sub.
6542 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6543   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6544 
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6546 $as_echo_n "checking build system type... " >&6; }
6547 if test "${ac_cv_build+set}" = set; then :
6548   $as_echo_n "(cached) " >&6
6549 else
6550   ac_build_alias=$build_alias
6551 test "x$ac_build_alias" = x &&
6552   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6553 test "x$ac_build_alias" = x &&
6554   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6555 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6556   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6557 
6558 fi
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6560 $as_echo "$ac_cv_build" >&6; }
6561 case $ac_cv_build in
6562 *-*-*) ;;
6563 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6564 esac
6565 build=$ac_cv_build
6566 ac_save_IFS=$IFS; IFS='-'
6567 set x $ac_cv_build
6568 shift
6569 build_cpu=$1
6570 build_vendor=$2
6571 shift; shift
6572 # Remember, the first character of IFS is used to create $*,
6573 # except with old shells:
6574 build_os=$*
6575 IFS=$ac_save_IFS
6576 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6577 
6578 
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6580 $as_echo_n "checking host system type... " >&6; }
6581 if test "${ac_cv_host+set}" = set; then :
6582   $as_echo_n "(cached) " >&6
6583 else
6584   if test "x$host_alias" = x; then
6585   ac_cv_host=$ac_cv_build
6586 else
6587   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6588     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6589 fi
6590 
6591 fi
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6593 $as_echo "$ac_cv_host" >&6; }
6594 case $ac_cv_host in
6595 *-*-*) ;;
6596 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6597 esac
6598 host=$ac_cv_host
6599 ac_save_IFS=$IFS; IFS='-'
6600 set x $ac_cv_host
6601 shift
6602 host_cpu=$1
6603 host_vendor=$2
6604 shift; shift
6605 # Remember, the first character of IFS is used to create $*,
6606 # except with old shells:
6607 host_os=$*
6608 IFS=$ac_save_IFS
6609 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6610 
6611 
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6613 $as_echo_n "checking target system type... " >&6; }
6614 if test "${ac_cv_target+set}" = set; then :
6615   $as_echo_n "(cached) " >&6
6616 else
6617   if test "x$target_alias" = x; then
6618   ac_cv_target=$ac_cv_host
6619 else
6620   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6621     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6622 fi
6623 
6624 fi
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6626 $as_echo "$ac_cv_target" >&6; }
6627 case $ac_cv_target in
6628 *-*-*) ;;
6629 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6630 esac
6631 target=$ac_cv_target
6632 ac_save_IFS=$IFS; IFS='-'
6633 set x $ac_cv_target
6634 shift
6635 target_cpu=$1
6636 target_vendor=$2
6637 shift; shift
6638 # Remember, the first character of IFS is used to create $*,
6639 # except with old shells:
6640 target_os=$*
6641 IFS=$ac_save_IFS
6642 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6643 
6644 
6645 # The aliases save the names the user supplied, while $host etc.
6646 # will get canonicalized.
6647 test -n "$target_alias" &&
6648   test "$program_prefix$program_suffix$program_transform_name" = \
6649     NONENONEs,x,x, &&
6650   program_prefix=${target_alias}-
6651 
6652 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6653 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6654 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6655 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6656 # to use the configure naming style.
6657 
6658 
6659 
6660 
6661 
6662     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6663     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6664     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6665     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6666     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6667     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6668 
6669 
6670 
6671     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6672 
6673   case "$build_os" in
6674     *linux*)
6675       VAR_OS=linux
6676       VAR_OS_API=posix
6677       VAR_OS_ENV=linux
6678       ;;
6679     *solaris*)
6680       VAR_OS=solaris
6681       VAR_OS_API=posix
6682       VAR_OS_ENV=solaris
6683       ;;
6684     *darwin*)
6685       VAR_OS=macosx
6686       VAR_OS_API=posix
6687       VAR_OS_ENV=macosx
6688       ;;
6689     *bsd*)
6690       VAR_OS=bsd
6691       VAR_OS_API=posix
6692       VAR_OS_ENV=bsd
6693       ;;
6694     *cygwin*)
6695       VAR_OS=windows
6696       VAR_OS_API=winapi
6697       VAR_OS_ENV=windows.cygwin
6698       ;;
6699     *mingw*)
6700       VAR_OS=windows
6701       VAR_OS_API=winapi
6702       VAR_OS_ENV=windows.msys
6703       ;;
6704     *)
6705       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6706       ;;
6707   esac
6708 
6709 
6710   # First argument is the cpu name from the trip/quad
6711   case "$build_cpu" in
6712     x86_64)
6713       VAR_CPU=x86_64
6714       VAR_CPU_ARCH=x86
6715       VAR_CPU_BITS=64
6716       VAR_CPU_ENDIAN=little
6717       ;;
6718     i?86)
6719       VAR_CPU=x86
6720       VAR_CPU_ARCH=x86
6721       VAR_CPU_BITS=32
6722       VAR_CPU_ENDIAN=little
6723       ;;
6724     arm*)
6725       VAR_CPU=arm
6726       VAR_CPU_ARCH=arm
6727       VAR_CPU_BITS=32
6728       VAR_CPU_ENDIAN=little
6729       ;;
6730     powerpc)
6731       VAR_CPU=ppc
6732       VAR_CPU_ARCH=ppc
6733       VAR_CPU_BITS=32
6734       VAR_CPU_ENDIAN=big
6735        ;;
6736     powerpc64)
6737       VAR_CPU=ppc64
6738       VAR_CPU_ARCH=ppc
6739       VAR_CPU_BITS=64
6740       VAR_CPU_ENDIAN=big
6741        ;;
6742     sparc)
6743       VAR_CPU=sparc
6744       VAR_CPU_ARCH=sparc
6745       VAR_CPU_BITS=32
6746       VAR_CPU_ENDIAN=big
6747        ;;
6748     sparcv9)
6749       VAR_CPU=sparcv9
6750       VAR_CPU_ARCH=sparc
6751       VAR_CPU_BITS=64
6752       VAR_CPU_ENDIAN=big
6753        ;;
6754     *)
6755       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6756       ;;
6757   esac
6758 
6759     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6760     OPENJDK_BUILD_OS="$VAR_OS"
6761     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6762     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6763     OPENJDK_BUILD_CPU="$VAR_CPU"
6764     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6765     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6766     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6767 
6768 
6769 
6770 
6771 
6772 
6773 
6774     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6775 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6776     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6777 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6778 
6779     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6780 
6781   case "$host_os" in
6782     *linux*)
6783       VAR_OS=linux
6784       VAR_OS_API=posix
6785       VAR_OS_ENV=linux
6786       ;;
6787     *solaris*)
6788       VAR_OS=solaris
6789       VAR_OS_API=posix
6790       VAR_OS_ENV=solaris
6791       ;;
6792     *darwin*)
6793       VAR_OS=macosx
6794       VAR_OS_API=posix
6795       VAR_OS_ENV=macosx
6796       ;;
6797     *bsd*)
6798       VAR_OS=bsd
6799       VAR_OS_API=posix
6800       VAR_OS_ENV=bsd
6801       ;;
6802     *cygwin*)
6803       VAR_OS=windows
6804       VAR_OS_API=winapi
6805       VAR_OS_ENV=windows.cygwin
6806       ;;
6807     *mingw*)
6808       VAR_OS=windows
6809       VAR_OS_API=winapi
6810       VAR_OS_ENV=windows.msys
6811       ;;
6812     *)
6813       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6814       ;;
6815   esac
6816 
6817 
6818   # First argument is the cpu name from the trip/quad
6819   case "$host_cpu" in
6820     x86_64)
6821       VAR_CPU=x86_64
6822       VAR_CPU_ARCH=x86
6823       VAR_CPU_BITS=64
6824       VAR_CPU_ENDIAN=little
6825       ;;
6826     i?86)
6827       VAR_CPU=x86
6828       VAR_CPU_ARCH=x86
6829       VAR_CPU_BITS=32
6830       VAR_CPU_ENDIAN=little
6831       ;;
6832     arm*)
6833       VAR_CPU=arm
6834       VAR_CPU_ARCH=arm
6835       VAR_CPU_BITS=32
6836       VAR_CPU_ENDIAN=little
6837       ;;
6838     powerpc)
6839       VAR_CPU=ppc
6840       VAR_CPU_ARCH=ppc
6841       VAR_CPU_BITS=32
6842       VAR_CPU_ENDIAN=big
6843        ;;
6844     powerpc64)
6845       VAR_CPU=ppc64
6846       VAR_CPU_ARCH=ppc
6847       VAR_CPU_BITS=64
6848       VAR_CPU_ENDIAN=big
6849        ;;
6850     sparc)
6851       VAR_CPU=sparc
6852       VAR_CPU_ARCH=sparc
6853       VAR_CPU_BITS=32
6854       VAR_CPU_ENDIAN=big
6855        ;;
6856     sparcv9)
6857       VAR_CPU=sparcv9
6858       VAR_CPU_ARCH=sparc
6859       VAR_CPU_BITS=64
6860       VAR_CPU_ENDIAN=big
6861        ;;
6862     *)
6863       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6864       ;;
6865   esac
6866 
6867     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6868     OPENJDK_TARGET_OS="$VAR_OS"
6869     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6870     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6871     OPENJDK_TARGET_CPU="$VAR_CPU"
6872     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6873     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6874     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6875 
6876 
6877 
6878 
6879 
6880 
6881 
6882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6883 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6884     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6885 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6886 
6887 
6888 
6889 # Check whether --with-target-bits was given.
6890 if test "${with_target_bits+set}" = set; then :
6891   withval=$with_target_bits;
6892 fi
6893 
6894 
6895   # We have three types of compiles:
6896   # native  == normal compilation, target system == build system
6897   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6898   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6899   #
6900   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6901     # We're doing a proper cross-compilation
6902     COMPILE_TYPE="cross"
6903   else
6904     COMPILE_TYPE="native"
6905   fi
6906 
6907   if test "x$with_target_bits" != x; then
6908     if test "x$COMPILE_TYPE" = "xcross"; then
6909       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6910     fi
6911 
6912     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6913       # A reduced build is requested
6914       COMPILE_TYPE="reduced"
6915       OPENJDK_TARGET_CPU_BITS=32
6916       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6917         OPENJDK_TARGET_CPU=x86
6918       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6919         OPENJDK_TARGET_CPU=sparc
6920       else
6921         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6922       fi
6923     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6924       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
6925     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6926       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6927 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6928     else
6929       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6930     fi
6931   fi
6932 
6933 
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6935 $as_echo_n "checking compilation type... " >&6; }
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6937 $as_echo "$COMPILE_TYPE" >&6; }
6938 
6939 
6940     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6941        REQUIRED_OS_NAME=SunOS
6942        REQUIRED_OS_VERSION=5.10
6943     fi
6944     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6945        REQUIRED_OS_NAME=Linux
6946        REQUIRED_OS_VERSION=2.6
6947     fi
6948     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6949         REQUIRED_OS_NAME=Windows
6950         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6951             REQUIRED_OS_VERSION=5.2
6952         else
6953             REQUIRED_OS_VERSION=5.1
6954         fi
6955     fi
6956     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6957         REQUIRED_OS_NAME=Darwin
6958         REQUIRED_OS_VERSION=11.2
6959     fi
6960 
6961 
6962 
6963 
6964 
6965     # Also store the legacy naming of the cpu.
6966     # Ie i586 and amd64 instead of x86 and x86_64
6967     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6968     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6969       OPENJDK_TARGET_CPU_LEGACY="i586"
6970     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6971       # On all platforms except MacOSX replace x86_64 with amd64.
6972       OPENJDK_TARGET_CPU_LEGACY="amd64"
6973     fi
6974 
6975 
6976     # And the second legacy naming of the cpu.
6977     # Ie i386 and amd64 instead of x86 and x86_64.
6978     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6979     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6980       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6981     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6982       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6983     fi
6984 
6985 
6986     # This is the name of the cpu (but using i386 and amd64 instead of
6987     # x86 and x86_64, respectively), preceeded by a /, to be used when
6988     # locating libraries. On macosx, it's empty, though.
6989     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6990     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6991         OPENJDK_TARGET_CPU_LIBDIR=""
6992     fi
6993 
6994 
6995     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6996     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6997     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6998     OPENJDK_TARGET_CPU_ISADIR=""
6999     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7000       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7001           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7002       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7003           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7004       fi
7005     fi
7006 
7007 
7008     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7009     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7010     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7011       # On linux only, we replace x86 with i386.
7012       OPENJDK_TARGET_CPU_OSARCH="i386"
7013     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7014       # On all platforms except macosx, we replace x86_64 with amd64.
7015       OPENJDK_TARGET_CPU_OSARCH="amd64"
7016     fi
7017 
7018 
7019     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7020     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7021       OPENJDK_TARGET_CPU_JLI="i386"
7022     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7023       # On all platforms except macosx, we replace x86_64 with amd64.
7024       OPENJDK_TARGET_CPU_JLI="amd64"
7025     fi
7026     # Now setup the -D flags for building libjli.
7027     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7028     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7029       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7030         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7031       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7032         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7033       fi
7034     fi
7035 
7036 
7037     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7038     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7039         OPENJDK_TARGET_OS_API_DIR="solaris"
7040     fi
7041     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7042         OPENJDK_TARGET_OS_API_DIR="windows"
7043     fi
7044 
7045 
7046     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7047         A_LP64="LP64:="
7048         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7049         # unpack200.exe
7050         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051             ADD_LP64="-D_LP64=1"
7052         fi
7053     fi
7054     LP64=$A_LP64
7055 
7056 
7057     if test "x$COMPILE_TYPE" = "xcross"; then
7058       # FIXME: ... or should this include reduced builds..?
7059       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7060     else
7061       DEFINE_CROSS_COMPILE_ARCH=""
7062     fi
7063 
7064 
7065     # ZERO_ARCHDEF is used to enable architecture-specific code
7066     case "${OPENJDK_TARGET_CPU}" in
7067       ppc*)    ZERO_ARCHDEF=PPC   ;;
7068       s390*)   ZERO_ARCHDEF=S390  ;;
7069       sparc*)  ZERO_ARCHDEF=SPARC ;;
7070       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7071       x86)     ZERO_ARCHDEF=IA32  ;;
7072       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7073     esac
7074 
7075 
7076 
7077 
7078 
7079 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7080 
7081 # Locate the directory of this script.
7082 SCRIPT="$0"
7083 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7084 
7085 # Where is the source? It is located two levels above the configure script.
7086 CURDIR="$PWD"
7087 cd "$AUTOCONF_DIR/../.."
7088 SRC_ROOT="`$THEPWDCMD -L`"
7089 
7090 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7091   PATH_SEP=";"
7092 
7093   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7094   if test $SRC_ROOT_LENGTH -gt 100; then
7095       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7096   fi
7097 
7098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7099     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7100 $as_echo_n "checking cygwin release... " >&6; }
7101     CYGWIN_VERSION=`$UNAME -r`
7102     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7103 $as_echo "$CYGWIN_VERSION" >&6; }
7104     WINDOWS_ENV_VENDOR='cygwin'
7105     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7106 
7107     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7108     if test "x$CYGWIN_VERSION_OK" = x; then
7109       { $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
7110 $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;}
7111       as_fn_error $? "Cannot continue" "$LINENO" 5
7112     fi
7113     if test "x$CYGPATH" = x; then
7114         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7115     fi
7116     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7117 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7118     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7119     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7120     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7121     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7123 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7124     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7125     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7126     if test "x$test_cygdrive_prefix" = x; then
7127         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7128     fi
7129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7130     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7131 $as_echo_n "checking msys release... " >&6; }
7132     MSYS_VERSION=`$UNAME -r`
7133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7134 $as_echo "$MSYS_VERSION" >&6; }
7135 
7136     WINDOWS_ENV_VENDOR='msys'
7137     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7138 
7139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7140 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7141     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7142     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7143 
7144   windows_path="$MSYS_ROOT_PATH"
7145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7146     unix_path=`$CYGPATH -u "$windows_path"`
7147     MSYS_ROOT_PATH="$unix_path"
7148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7150     MSYS_ROOT_PATH="$unix_path"
7151   fi
7152 
7153     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7154 $as_echo "$MSYS_ROOT_PATH" >&6; }
7155     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7156   else
7157     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7158   fi
7159 
7160   # Test if windows or unix (cygwin/msys) find is first in path.
7161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7162 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7163   FIND_BINARY_OUTPUT=`find --version 2>&1`
7164   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7166 $as_echo "unix style" >&6; }
7167   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7169 $as_echo "Windows" >&6; }
7170     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7171 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7172     { $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
7173 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7174     as_fn_error $? "Cannot continue" "$LINENO" 5
7175   else
7176     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7177 $as_echo "unknown" >&6; }
7178     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7179 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7180   fi
7181 
7182 else
7183   PATH_SEP=":"
7184 fi
7185 
7186 
7187 
7188 cd "$CURDIR"
7189 
7190 
7191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7192 
7193   # Input might be given as Windows format, start by converting to
7194   # unix format.
7195   path="$SRC_ROOT"
7196   new_path=`$CYGPATH -u "$path"`
7197 
7198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7201   # "foo.exe" is OK but "foo" is an error.
7202   #
7203   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7204   # It is also a way to make sure we got the proper file name for the real test later on.
7205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7206   if test "x$test_shortpath" = x; then
7207     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7208 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7209     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7210   fi
7211 
7212   # Call helper function which possibly converts this using DOS-style short mode.
7213   # If so, the updated path is stored in $new_path.
7214 
7215   input_path="$new_path"
7216   # Check if we need to convert this using DOS-style short mode. If the path
7217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7218   # take no chances and rewrite it.
7219   # Note: m4 eats our [], so we need to use [ and ] instead.
7220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7221   if test "x$has_forbidden_chars" != x; then
7222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7223     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7224     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7225     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7226       # Going to short mode and back again did indeed matter. Since short mode is
7227       # case insensitive, let's make it lowercase to improve readability.
7228       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7229       # Now convert it back to Unix-stile (cygpath)
7230       input_path=`$CYGPATH -u "$shortmode_path"`
7231       new_path="$input_path"
7232     fi
7233   fi
7234 
7235   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7236   if test "x$test_cygdrive_prefix" = x; then
7237     # As a simple fix, exclude /usr/bin since it's not a real path.
7238     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7239       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7240       # a path prefixed by /cygdrive for fixpath to work.
7241       new_path="$CYGWIN_ROOT_PATH$input_path"
7242     fi
7243   fi
7244 
7245 
7246   if test "x$path" != "x$new_path"; then
7247     SRC_ROOT="$new_path"
7248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7249 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7250   fi
7251 
7252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7253 
7254   path="$SRC_ROOT"
7255   has_colon=`$ECHO $path | $GREP ^.:`
7256   new_path="$path"
7257   if test "x$has_colon" = x; then
7258     # Not in mixed or Windows style, start by that.
7259     new_path=`cmd //c echo $path`
7260   fi
7261 
7262 
7263   input_path="$new_path"
7264   # Check if we need to convert this using DOS-style short mode. If the path
7265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7266   # take no chances and rewrite it.
7267   # Note: m4 eats our [], so we need to use [ and ] instead.
7268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7269   if test "x$has_forbidden_chars" != x; then
7270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7272   fi
7273 
7274 
7275   windows_path="$new_path"
7276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7277     unix_path=`$CYGPATH -u "$windows_path"`
7278     new_path="$unix_path"
7279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7281     new_path="$unix_path"
7282   fi
7283 
7284   if test "x$path" != "x$new_path"; then
7285     SRC_ROOT="$new_path"
7286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7287 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7288   fi
7289 
7290   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7291   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7292 
7293   else
7294     # We're on a posix platform. Hooray! :)
7295     path="$SRC_ROOT"
7296     has_space=`$ECHO "$path" | $GREP " "`
7297     if test "x$has_space" != x; then
7298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7299 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7300       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7301     fi
7302 
7303     # Use eval to expand a potential ~
7304     eval path="$path"
7305     if test ! -f "$path" && test ! -d "$path"; then
7306       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7307     fi
7308 
7309     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7310   fi
7311 
7312 
7313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7314 
7315   # Input might be given as Windows format, start by converting to
7316   # unix format.
7317   path="$CURDIR"
7318   new_path=`$CYGPATH -u "$path"`
7319 
7320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7323   # "foo.exe" is OK but "foo" is an error.
7324   #
7325   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7326   # It is also a way to make sure we got the proper file name for the real test later on.
7327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7328   if test "x$test_shortpath" = x; then
7329     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7330 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7331     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7332   fi
7333 
7334   # Call helper function which possibly converts this using DOS-style short mode.
7335   # If so, the updated path is stored in $new_path.
7336 
7337   input_path="$new_path"
7338   # Check if we need to convert this using DOS-style short mode. If the path
7339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7340   # take no chances and rewrite it.
7341   # Note: m4 eats our [], so we need to use [ and ] instead.
7342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7343   if test "x$has_forbidden_chars" != x; then
7344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7348       # Going to short mode and back again did indeed matter. Since short mode is
7349       # case insensitive, let's make it lowercase to improve readability.
7350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7351       # Now convert it back to Unix-stile (cygpath)
7352       input_path=`$CYGPATH -u "$shortmode_path"`
7353       new_path="$input_path"
7354     fi
7355   fi
7356 
7357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7358   if test "x$test_cygdrive_prefix" = x; then
7359     # As a simple fix, exclude /usr/bin since it's not a real path.
7360     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7362       # a path prefixed by /cygdrive for fixpath to work.
7363       new_path="$CYGWIN_ROOT_PATH$input_path"
7364     fi
7365   fi
7366 
7367 
7368   if test "x$path" != "x$new_path"; then
7369     CURDIR="$new_path"
7370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7371 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7372   fi
7373 
7374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375 
7376   path="$CURDIR"
7377   has_colon=`$ECHO $path | $GREP ^.:`
7378   new_path="$path"
7379   if test "x$has_colon" = x; then
7380     # Not in mixed or Windows style, start by that.
7381     new_path=`cmd //c echo $path`
7382   fi
7383 
7384 
7385   input_path="$new_path"
7386   # Check if we need to convert this using DOS-style short mode. If the path
7387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7388   # take no chances and rewrite it.
7389   # Note: m4 eats our [], so we need to use [ and ] instead.
7390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7391   if test "x$has_forbidden_chars" != x; then
7392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7394   fi
7395 
7396 
7397   windows_path="$new_path"
7398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7399     unix_path=`$CYGPATH -u "$windows_path"`
7400     new_path="$unix_path"
7401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7403     new_path="$unix_path"
7404   fi
7405 
7406   if test "x$path" != "x$new_path"; then
7407     CURDIR="$new_path"
7408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7409 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7410   fi
7411 
7412   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7413   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7414 
7415   else
7416     # We're on a posix platform. Hooray! :)
7417     path="$CURDIR"
7418     has_space=`$ECHO "$path" | $GREP " "`
7419     if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
7423     fi
7424 
7425     # Use eval to expand a potential ~
7426     eval path="$path"
7427     if test ! -f "$path" && test ! -d "$path"; then
7428       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7429     fi
7430 
7431     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7432   fi
7433 
7434 
7435 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7436     # Add extra search paths on solaris for utilities like ar and as etc...
7437     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7438 fi
7439 
7440 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7441 # is not correct.
7442 
7443 # Check whether --with-sys-root was given.
7444 if test "${with_sys_root+set}" = set; then :
7445   withval=$with_sys_root;
7446 fi
7447 
7448 
7449 if test "x$with_sys_root" != x; then
7450   SYS_ROOT=$with_sys_root
7451 else
7452   SYS_ROOT=/
7453 fi
7454 
7455 
7456 
7457 # Check whether --with-tools-dir was given.
7458 if test "${with_tools_dir+set}" = set; then :
7459   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7460 fi
7461 
7462 
7463 
7464 # Check whether --with-devkit was given.
7465 if test "${with_devkit+set}" = set; then :
7466   withval=$with_devkit;
7467     if test "x$with_sys_root" != x; then
7468       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7469     fi
7470     if test "x$with_tools_dir" != x; then
7471       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7472     fi
7473     TOOLS_DIR=$with_devkit/bin
7474     SYS_ROOT=$with_devkit/$host_alias/libc
7475 
7476 fi
7477 
7478 
7479 
7480 
7481 # Setup default logging of stdout and stderr to build.log in the output root.
7482 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7483 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7484 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7485 
7486 
7487 
7488 
7489 
7490 # Check if it's a pure open build or if custom sources are to be used.
7491 
7492   # Check whether --enable-openjdk-only was given.
7493 if test "${enable_openjdk_only+set}" = set; then :
7494   enableval=$enable_openjdk_only;
7495 else
7496   enable_openjdk_only="no"
7497 fi
7498 
7499 
7500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7501 $as_echo_n "checking for presence of closed sources... " >&6; }
7502   if test -d "$SRC_ROOT/jdk/src/closed"; then
7503     CLOSED_SOURCE_PRESENT=yes
7504   else
7505     CLOSED_SOURCE_PRESENT=no
7506   fi
7507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7508 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7509 
7510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7511 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7512   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7514 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7515 
7516   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7517     OPENJDK=true
7518     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7519       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7520 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7521     fi
7522   else
7523     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7524       OPENJDK=true
7525     else
7526       OPENJDK=false
7527     fi
7528   fi
7529 
7530   if test "x$OPENJDK" = "xtrue"; then
7531     SET_OPENJDK="OPENJDK=true"
7532   fi
7533 
7534 
7535 
7536 
7537 # These are needed to be able to create a configuration name (and thus the output directory)
7538 
7539 ###############################################################################
7540 #
7541 # Check which variant of the JDK that we want to build.
7542 # Currently we have:
7543 #    normal:   standard edition
7544 # but the custom make system may add other variants
7545 #
7546 # Effectively the JDK variant gives a name to a specific set of
7547 # modules to compile into the JDK. In the future, these modules
7548 # might even be Jigsaw modules.
7549 #
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7551 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7552 
7553 # Check whether --with-jdk-variant was given.
7554 if test "${with_jdk_variant+set}" = set; then :
7555   withval=$with_jdk_variant;
7556 fi
7557 
7558 
7559 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7560     JDK_VARIANT="normal"
7561 else
7562     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7563 fi
7564 
7565 
7566 
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7568 $as_echo "$JDK_VARIANT" >&6; }
7569 
7570 
7571 
7572 ###############################################################################
7573 #
7574 # Check which variants of the JVM that we want to build.
7575 # Currently we have:
7576 #    server: normal interpreter and a tiered C1/C2 compiler
7577 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7578 #    minimal1: reduced form of client with optional VM services and features stripped out
7579 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7580 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7581 #    zero: no machine code interpreter, no compiler
7582 #    zeroshark: zero interpreter and shark/llvm compiler backend
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7584 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7585 
7586 # Check whether --with-jvm-variants was given.
7587 if test "${with_jvm_variants+set}" = set; then :
7588   withval=$with_jvm_variants;
7589 fi
7590 
7591 
7592 if test "x$with_jvm_variants" = x; then
7593      with_jvm_variants="server"
7594 fi
7595 
7596 JVM_VARIANTS=",$with_jvm_variants,"
7597 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7598 
7599 if test "x$TEST_VARIANTS" != "x,"; then
7600    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7601 fi
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7603 $as_echo "$with_jvm_variants" >&6; }
7604 
7605 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7606 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7607 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7608 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7609 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7610 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7611 
7612 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7613     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7614         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7615     fi
7616 fi
7617 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7618     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7619         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7620     fi
7621 fi
7622 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7623     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7624         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7625     fi
7626 fi
7627 
7628 # Replace the commas with AND for use in the build directory name.
7629 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7630 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/'`
7631 if test "x$COUNT_VARIANTS" != "x,1"; then
7632     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7633 else
7634     BUILDING_MULTIPLE_JVM_VARIANTS=no
7635 fi
7636 
7637 
7638 
7639 
7640 
7641 
7642 
7643 
7644 
7645 INCLUDE_SA=true
7646 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7647     INCLUDE_SA=false
7648 fi
7649 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7650     INCLUDE_SA=false
7651 fi
7652 
7653 
7654 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7655    MACOSX_UNIVERSAL="true"
7656 fi
7657 
7658 
7659 
7660 
7661 
7662 ###############################################################################
7663 #
7664 # Set the debug level
7665 #    release: no debug information, all optimizations, no asserts.
7666 #    fastdebug: debug information (-g), all optimizations, all asserts
7667 #    slowdebug: debug information (-g), no optimizations, all asserts
7668 #
7669 DEBUG_LEVEL="release"
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7671 $as_echo_n "checking which debug level to use... " >&6; }
7672 # Check whether --enable-debug was given.
7673 if test "${enable_debug+set}" = set; then :
7674   enableval=$enable_debug;
7675         ENABLE_DEBUG="${enableval}"
7676         DEBUG_LEVEL="fastdebug"
7677 
7678 else
7679   ENABLE_DEBUG="no"
7680 fi
7681 
7682 
7683 
7684 # Check whether --with-debug-level was given.
7685 if test "${with_debug_level+set}" = set; then :
7686   withval=$with_debug_level;
7687         DEBUG_LEVEL="${withval}"
7688         if test "x$ENABLE_DEBUG" = xyes; then
7689                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7690         fi
7691 
7692 fi
7693 
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7695 $as_echo "$DEBUG_LEVEL" >&6; }
7696 
7697 if test "x$DEBUG_LEVEL" != xrelease && \
7698    test "x$DEBUG_LEVEL" != xfastdebug && \
7699    test "x$DEBUG_LEVEL" != xslowdebug; then
7700    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7701 fi
7702 
7703 
7704 ###############################################################################
7705 #
7706 # Setup legacy vars/targets and new vars to deal with different debug levels.
7707 #
7708 
7709 case $DEBUG_LEVEL in
7710       release )
7711           VARIANT="OPT"
7712           FASTDEBUG="false"
7713           DEBUG_CLASSFILES="false"
7714           BUILD_VARIANT_RELEASE=""
7715           HOTSPOT_DEBUG_LEVEL="product"
7716           HOTSPOT_EXPORT="product"
7717            ;;
7718       fastdebug )
7719           VARIANT="DBG"
7720           FASTDEBUG="true"
7721           DEBUG_CLASSFILES="true"
7722           BUILD_VARIANT_RELEASE="-fastdebug"
7723           HOTSPOT_DEBUG_LEVEL="fastdebug"
7724           HOTSPOT_EXPORT="fastdebug"
7725            ;;
7726       slowdebug )
7727           VARIANT="DBG"
7728           FASTDEBUG="false"
7729           DEBUG_CLASSFILES="true"
7730           BUILD_VARIANT_RELEASE="-debug"
7731           HOTSPOT_DEBUG_LEVEL="jvmg"
7732           HOTSPOT_EXPORT="debug"
7733            ;;
7734 esac
7735 
7736 #####
7737 # Generate the legacy makefile targets for hotspot.
7738 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7739 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7740 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7741 # But until then ...
7742 HOTSPOT_TARGET=""
7743 
7744 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7745     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7746 fi
7747 
7748 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7749     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7750 fi
7751 
7752 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7753     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7754 fi
7755 
7756 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7757     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7758 fi
7759 
7760 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7761     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7762 fi
7763 
7764 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7765     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7766 fi
7767 
7768 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7769 
7770 # On Macosx universal binaries are produced, but they only contain
7771 # 64 bit intel. This invalidates control of which jvms are built
7772 # from configure, but only server is valid anyway. Fix this
7773 # when hotspot makefiles are rewritten.
7774 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7775     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7776 fi
7777 
7778 #####
7779 
7780 
7781 
7782 
7783 
7784 
7785 
7786 
7787 # With basic setup done, call the custom early hook.
7788 
7789 
7790 # To properly create a configuration name, we need to have the OpenJDK target
7791 # and options (variants and debug level) parsed.
7792 
7793 
7794 
7795 # Check whether --with-conf-name was given.
7796 if test "${with_conf_name+set}" = set; then :
7797   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7798 fi
7799 
7800 
7801 # Test from where we are running configure, in or outside of src root.
7802 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7803         || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7804         || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7805     # We are running configure from the src root.
7806     # Create a default ./build/target-variant-debuglevel output root.
7807     if test "x${CONF_NAME}" = x; then
7808         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7809     fi
7810     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7811     $MKDIR -p "$OUTPUT_ROOT"
7812     if test ! -d "$OUTPUT_ROOT"; then
7813         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7814     fi
7815 else
7816     # We are running configure from outside of the src dir.
7817     # Then use the current directory as output dir!
7818     # If configuration is situated in normal build directory, just use the build
7819     # directory name as configuration name, otherwise use the complete path.
7820     if test "x${CONF_NAME}" = x; then
7821         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7822     fi
7823     OUTPUT_ROOT="$CURDIR"
7824 
7825     # WARNING: This might be a bad thing to do. You need to be sure you want to
7826     # have a configuration in this directory. Do some sanity checks!
7827 
7828     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7829       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7830       # other files
7831       files_present=`$LS $OUTPUT_ROOT`
7832       # Configure has already touched config.log and confdefs.h in the current dir when this check
7833       # is performed.
7834       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7835                                              | $TR -d '\n'`
7836       if test "x$filtered_files" != x; then
7837         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7838 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7839         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7840 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7841         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7842 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7843         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7844 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7845         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7846 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7847         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7848 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7849         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7850 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7851         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7852       fi
7853     fi
7854 fi
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7856 $as_echo_n "checking what configuration name to use... " >&6; }
7857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7858 $as_echo "$CONF_NAME" >&6; }
7859 
7860 
7861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7862 
7863   # Input might be given as Windows format, start by converting to
7864   # unix format.
7865   path="$OUTPUT_ROOT"
7866   new_path=`$CYGPATH -u "$path"`
7867 
7868   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7869   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7870   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7871   # "foo.exe" is OK but "foo" is an error.
7872   #
7873   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7874   # It is also a way to make sure we got the proper file name for the real test later on.
7875   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7876   if test "x$test_shortpath" = x; then
7877     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7878 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7879     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7880   fi
7881 
7882   # Call helper function which possibly converts this using DOS-style short mode.
7883   # If so, the updated path is stored in $new_path.
7884 
7885   input_path="$new_path"
7886   # Check if we need to convert this using DOS-style short mode. If the path
7887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7888   # take no chances and rewrite it.
7889   # Note: m4 eats our [], so we need to use [ and ] instead.
7890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7891   if test "x$has_forbidden_chars" != x; then
7892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7896       # Going to short mode and back again did indeed matter. Since short mode is
7897       # case insensitive, let's make it lowercase to improve readability.
7898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7899       # Now convert it back to Unix-stile (cygpath)
7900       input_path=`$CYGPATH -u "$shortmode_path"`
7901       new_path="$input_path"
7902     fi
7903   fi
7904 
7905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7906   if test "x$test_cygdrive_prefix" = x; then
7907     # As a simple fix, exclude /usr/bin since it's not a real path.
7908     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7910       # a path prefixed by /cygdrive for fixpath to work.
7911       new_path="$CYGWIN_ROOT_PATH$input_path"
7912     fi
7913   fi
7914 
7915 
7916   if test "x$path" != "x$new_path"; then
7917     OUTPUT_ROOT="$new_path"
7918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7919 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7920   fi
7921 
7922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7923 
7924   path="$OUTPUT_ROOT"
7925   has_colon=`$ECHO $path | $GREP ^.:`
7926   new_path="$path"
7927   if test "x$has_colon" = x; then
7928     # Not in mixed or Windows style, start by that.
7929     new_path=`cmd //c echo $path`
7930   fi
7931 
7932 
7933   input_path="$new_path"
7934   # Check if we need to convert this using DOS-style short mode. If the path
7935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7936   # take no chances and rewrite it.
7937   # Note: m4 eats our [], so we need to use [ and ] instead.
7938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7939   if test "x$has_forbidden_chars" != x; then
7940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7941     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7942   fi
7943 
7944 
7945   windows_path="$new_path"
7946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7947     unix_path=`$CYGPATH -u "$windows_path"`
7948     new_path="$unix_path"
7949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7951     new_path="$unix_path"
7952   fi
7953 
7954   if test "x$path" != "x$new_path"; then
7955     OUTPUT_ROOT="$new_path"
7956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7957 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7958   fi
7959 
7960   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7961   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7962 
7963   else
7964     # We're on a posix platform. Hooray! :)
7965     path="$OUTPUT_ROOT"
7966     has_space=`$ECHO "$path" | $GREP " "`
7967     if test "x$has_space" != x; then
7968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7969 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7970       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7971     fi
7972 
7973     # Use eval to expand a potential ~
7974     eval path="$path"
7975     if test ! -f "$path" && test ! -d "$path"; then
7976       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7977     fi
7978 
7979     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
7980   fi
7981 
7982 
7983 SPEC=$OUTPUT_ROOT/spec.gmk
7984 
7985 CONF_NAME=$CONF_NAME
7986 
7987 OUTPUT_ROOT=$OUTPUT_ROOT
7988 
7989 
7990 # Most of the probed defines are put into config.h
7991 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7992 
7993 # The spec.gmk file contains all variables for the make system.
7994 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7995 
7996 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7997 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7998 
7999 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8000 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8001 
8002 # The compare.sh is used to compare the build output to other builds.
8003 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8004 
8005 # Spec.sh is currently used by compare-objects.sh
8006 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8007 
8008 # The generated Makefile knows where the spec.gmk is and where the source is.
8009 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8010 # which will look for generated configurations
8011 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8012 
8013 
8014 # Save the arguments given to us
8015 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8016 
8017 
8018 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8019 
8020     for ac_prog in apt-get yum port pkgutil pkgadd
8021 do
8022   # Extract the first word of "$ac_prog", so it can be a program name with args.
8023 set dummy $ac_prog; ac_word=$2
8024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025 $as_echo_n "checking for $ac_word... " >&6; }
8026 if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8027   $as_echo_n "(cached) " >&6
8028 else
8029   if test -n "$PKGHANDLER"; then
8030   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8031 else
8032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033 for as_dir in $PATH
8034 do
8035   IFS=$as_save_IFS
8036   test -z "$as_dir" && as_dir=.
8037     for ac_exec_ext in '' $ac_executable_extensions; do
8038   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8039     ac_cv_prog_PKGHANDLER="$ac_prog"
8040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041     break 2
8042   fi
8043 done
8044   done
8045 IFS=$as_save_IFS
8046 
8047 fi
8048 fi
8049 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8050 if test -n "$PKGHANDLER"; then
8051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8052 $as_echo "$PKGHANDLER" >&6; }
8053 else
8054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055 $as_echo "no" >&6; }
8056 fi
8057 
8058 
8059   test -n "$PKGHANDLER" && break
8060 done
8061 
8062 
8063 
8064 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8065 
8066 
8067   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8068   if test "x$MAKE" != x; then
8069     # User has supplied a make, test it.
8070     if test ! -f "$MAKE"; then
8071       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8072     fi
8073 
8074   MAKE_CANDIDATE=""$MAKE""
8075   DESCRIPTION="user supplied MAKE=$MAKE"
8076   if test "x$MAKE_CANDIDATE" != x; then
8077     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8078 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8079     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8080     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8081     if test "x$IS_GNU_MAKE" = x; then
8082       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8083 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8084     else
8085       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8086       if test "x$IS_MODERN_MAKE" = x; then
8087         { $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
8088 $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;}
8089       else
8090         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8091           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8092             MAKE_EXPECTED_ENV='cygwin'
8093           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8094             MAKE_EXPECTED_ENV='msys'
8095           else
8096             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8097           fi
8098           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8099           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8100         else
8101           # Not relevant for non-Windows
8102           IS_MAKE_CORRECT_ENV=true
8103         fi
8104         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8105           { $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
8106 $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;}
8107         else
8108           FOUND_MAKE=$MAKE_CANDIDATE
8109 
8110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8111 
8112   # First separate the path from the arguments. This will split at the first
8113   # space.
8114   complete="$FOUND_MAKE"
8115   path="${complete%% *}"
8116   tmp="$complete EOL"
8117   arguments="${tmp#* }"
8118 
8119   # Input might be given as Windows format, start by converting to
8120   # unix format.
8121   new_path=`$CYGPATH -u "$path"`
8122 
8123   # Now try to locate executable using which
8124   new_path=`$WHICH "$new_path" 2> /dev/null`
8125   # bat and cmd files are not always considered executable in cygwin causing which
8126   # to not find them
8127   if test "x$new_path" = x \
8128            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8129            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8130     new_path=`$CYGPATH -u "$path"`
8131   fi
8132   if test "x$new_path" = x; then
8133     # Oops. Which didn't find the executable.
8134     # The splitting of arguments from the executable at a space might have been incorrect,
8135     # since paths with space are more likely in Windows. Give it another try with the whole
8136     # argument.
8137     path="$complete"
8138     arguments="EOL"
8139     new_path=`$CYGPATH -u "$path"`
8140     new_path=`$WHICH "$new_path" 2> /dev/null`
8141     # bat and cmd files are not always considered executable in cygwin causing which
8142     # to not find them
8143     if test "x$new_path" = x \
8144              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8145              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8146       new_path=`$CYGPATH -u "$path"`
8147     fi
8148     if test "x$new_path" = x; then
8149       # It's still not found. Now this is an unrecoverable error.
8150       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8151 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8152       has_space=`$ECHO "$complete" | $GREP " "`
8153       if test "x$has_space" != x; then
8154         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8155 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8156       fi
8157       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8158     fi
8159   fi
8160 
8161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8164   # "foo.exe" is OK but "foo" is an error.
8165   #
8166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8167   # It is also a way to make sure we got the proper file name for the real test later on.
8168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8169   if test "x$test_shortpath" = x; then
8170     # Short path failed, file does not exist as specified.
8171     # Try adding .exe or .cmd
8172     if test -f "${new_path}.exe"; then
8173        input_to_shortpath="${new_path}.exe"
8174     elif test -f "${new_path}.cmd"; then
8175        input_to_shortpath="${new_path}.cmd"
8176     else
8177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8178 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8179       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8180 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8181       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8182     fi
8183   else
8184     input_to_shortpath="$new_path"
8185   fi
8186 
8187   # Call helper function which possibly converts this using DOS-style short mode.
8188   # If so, the updated path is stored in $new_path.
8189   new_path="$input_to_shortpath"
8190 
8191   input_path="$input_to_shortpath"
8192   # Check if we need to convert this using DOS-style short mode. If the path
8193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8194   # take no chances and rewrite it.
8195   # Note: m4 eats our [], so we need to use [ and ] instead.
8196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8197   if test "x$has_forbidden_chars" != x; then
8198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8199     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8200     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8201     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8202       # Going to short mode and back again did indeed matter. Since short mode is
8203       # case insensitive, let's make it lowercase to improve readability.
8204       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8205       # Now convert it back to Unix-stile (cygpath)
8206       input_path=`$CYGPATH -u "$shortmode_path"`
8207       new_path="$input_path"
8208     fi
8209   fi
8210 
8211   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8212   if test "x$test_cygdrive_prefix" = x; then
8213     # As a simple fix, exclude /usr/bin since it's not a real path.
8214     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8215       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8216       # a path prefixed by /cygdrive for fixpath to work.
8217       new_path="$CYGWIN_ROOT_PATH$input_path"
8218     fi
8219   fi
8220 
8221   # remove trailing .exe if any
8222   new_path="${new_path/%.exe/}"
8223 
8224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8225 
8226   # First separate the path from the arguments. This will split at the first
8227   # space.
8228   complete="$FOUND_MAKE"
8229   path="${complete%% *}"
8230   tmp="$complete EOL"
8231   arguments="${tmp#* }"
8232 
8233   # Input might be given as Windows format, start by converting to
8234   # unix format.
8235   new_path="$path"
8236 
8237   windows_path="$new_path"
8238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8239     unix_path=`$CYGPATH -u "$windows_path"`
8240     new_path="$unix_path"
8241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8243     new_path="$unix_path"
8244   fi
8245 
8246 
8247   # Now try to locate executable using which
8248   new_path=`$WHICH "$new_path" 2> /dev/null`
8249 
8250   if test "x$new_path" = x; then
8251     # Oops. Which didn't find the executable.
8252     # The splitting of arguments from the executable at a space might have been incorrect,
8253     # since paths with space are more likely in Windows. Give it another try with the whole
8254     # argument.
8255     path="$complete"
8256     arguments="EOL"
8257     new_path="$path"
8258 
8259   windows_path="$new_path"
8260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8261     unix_path=`$CYGPATH -u "$windows_path"`
8262     new_path="$unix_path"
8263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8265     new_path="$unix_path"
8266   fi
8267 
8268 
8269     new_path=`$WHICH "$new_path" 2> /dev/null`
8270 
8271     if test "x$new_path" = x; then
8272       # It's still not found. Now this is an unrecoverable error.
8273       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8274 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8275       has_space=`$ECHO "$complete" | $GREP " "`
8276       if test "x$has_space" != x; then
8277         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8279       fi
8280       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8281     fi
8282   fi
8283 
8284   # Now new_path has a complete unix path to the binary
8285   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8286     # Keep paths in /bin as-is, but remove trailing .exe if any
8287     new_path="${new_path/%.exe/}"
8288     # Do not save /bin paths to all_fixpath_prefixes!
8289   else
8290     # Not in mixed or Windows style, start by that.
8291     new_path=`cmd //c echo $new_path`
8292 
8293   input_path="$new_path"
8294   # Check if we need to convert this using DOS-style short mode. If the path
8295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8296   # take no chances and rewrite it.
8297   # Note: m4 eats our [], so we need to use [ and ] instead.
8298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8299   if test "x$has_forbidden_chars" != x; then
8300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8301     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8302   fi
8303 
8304     # Output is in $new_path
8305 
8306   windows_path="$new_path"
8307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8308     unix_path=`$CYGPATH -u "$windows_path"`
8309     new_path="$unix_path"
8310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8312     new_path="$unix_path"
8313   fi
8314 
8315     # remove trailing .exe if any
8316     new_path="${new_path/%.exe/}"
8317 
8318     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8319     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8320   fi
8321 
8322   else
8323     # We're on a posix platform. Hooray! :)
8324     # First separate the path from the arguments. This will split at the first
8325     # space.
8326     complete="$FOUND_MAKE"
8327     path="${complete%% *}"
8328     tmp="$complete EOL"
8329     arguments="${tmp#* }"
8330 
8331     # Cannot rely on the command "which" here since it doesn't always work.
8332     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8333     if test -z "$is_absolute_path"; then
8334       # Path to executable is not absolute. Find it.
8335       IFS_save="$IFS"
8336       IFS=:
8337       for p in $PATH; do
8338         if test -f "$p/$path" && test -x "$p/$path"; then
8339           new_path="$p/$path"
8340           break
8341         fi
8342       done
8343       IFS="$IFS_save"
8344     else
8345       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8346 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8347       new_path="$path"
8348     fi
8349 
8350     if test "x$new_path" = x; then
8351         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8352 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8353         has_space=`$ECHO "$complete" | $GREP " "`
8354         if test "x$has_space" != x; then
8355           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8356 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8357         fi
8358         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8359       fi
8360   fi
8361 
8362       # Now join together the path and the arguments once again
8363       if test "x$arguments" != xEOL; then
8364         new_complete="$new_path ${arguments% *}"
8365       else
8366         new_complete="$new_path"
8367       fi
8368 
8369   if test "x$complete" != "x$new_complete"; then
8370       FOUND_MAKE="$new_complete"
8371       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8372 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8373     fi
8374 
8375         fi
8376       fi
8377     fi
8378   fi
8379 
8380     if test "x$FOUND_MAKE" = x; then
8381       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8382     fi
8383   else
8384     # Try our hardest to locate a correct version of GNU make
8385     for ac_prog in gmake
8386 do
8387   # Extract the first word of "$ac_prog", so it can be a program name with args.
8388 set dummy $ac_prog; ac_word=$2
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8390 $as_echo_n "checking for $ac_word... " >&6; }
8391 if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8392   $as_echo_n "(cached) " >&6
8393 else
8394   case $CHECK_GMAKE in
8395   [\\/]* | ?:[\\/]*)
8396   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8397   ;;
8398   *)
8399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8400 for as_dir in $PATH
8401 do
8402   IFS=$as_save_IFS
8403   test -z "$as_dir" && as_dir=.
8404     for ac_exec_ext in '' $ac_executable_extensions; do
8405   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8406     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8408     break 2
8409   fi
8410 done
8411   done
8412 IFS=$as_save_IFS
8413 
8414   ;;
8415 esac
8416 fi
8417 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8418 if test -n "$CHECK_GMAKE"; then
8419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8420 $as_echo "$CHECK_GMAKE" >&6; }
8421 else
8422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8423 $as_echo "no" >&6; }
8424 fi
8425 
8426 
8427   test -n "$CHECK_GMAKE" && break
8428 done
8429 
8430 
8431   MAKE_CANDIDATE=""$CHECK_GMAKE""
8432   DESCRIPTION="gmake in PATH"
8433   if test "x$MAKE_CANDIDATE" != x; then
8434     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8435 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8436     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8437     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8438     if test "x$IS_GNU_MAKE" = x; then
8439       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8440 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8441     else
8442       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8443       if test "x$IS_MODERN_MAKE" = x; then
8444         { $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
8445 $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;}
8446       else
8447         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8448           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8449             MAKE_EXPECTED_ENV='cygwin'
8450           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8451             MAKE_EXPECTED_ENV='msys'
8452           else
8453             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8454           fi
8455           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8456           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8457         else
8458           # Not relevant for non-Windows
8459           IS_MAKE_CORRECT_ENV=true
8460         fi
8461         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8462           { $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
8463 $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;}
8464         else
8465           FOUND_MAKE=$MAKE_CANDIDATE
8466 
8467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8468 
8469   # First separate the path from the arguments. This will split at the first
8470   # space.
8471   complete="$FOUND_MAKE"
8472   path="${complete%% *}"
8473   tmp="$complete EOL"
8474   arguments="${tmp#* }"
8475 
8476   # Input might be given as Windows format, start by converting to
8477   # unix format.
8478   new_path=`$CYGPATH -u "$path"`
8479 
8480   # Now try to locate executable using which
8481   new_path=`$WHICH "$new_path" 2> /dev/null`
8482   # bat and cmd files are not always considered executable in cygwin causing which
8483   # to not find them
8484   if test "x$new_path" = x \
8485            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8486            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8487     new_path=`$CYGPATH -u "$path"`
8488   fi
8489   if test "x$new_path" = x; then
8490     # Oops. Which didn't find the executable.
8491     # The splitting of arguments from the executable at a space might have been incorrect,
8492     # since paths with space are more likely in Windows. Give it another try with the whole
8493     # argument.
8494     path="$complete"
8495     arguments="EOL"
8496     new_path=`$CYGPATH -u "$path"`
8497     new_path=`$WHICH "$new_path" 2> /dev/null`
8498     # bat and cmd files are not always considered executable in cygwin causing which
8499     # to not find them
8500     if test "x$new_path" = x \
8501              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8502              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8503       new_path=`$CYGPATH -u "$path"`
8504     fi
8505     if test "x$new_path" = x; then
8506       # It's still not found. Now this is an unrecoverable error.
8507       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8508 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8509       has_space=`$ECHO "$complete" | $GREP " "`
8510       if test "x$has_space" != x; then
8511         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8512 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8513       fi
8514       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8515     fi
8516   fi
8517 
8518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8521   # "foo.exe" is OK but "foo" is an error.
8522   #
8523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8524   # It is also a way to make sure we got the proper file name for the real test later on.
8525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8526   if test "x$test_shortpath" = x; then
8527     # Short path failed, file does not exist as specified.
8528     # Try adding .exe or .cmd
8529     if test -f "${new_path}.exe"; then
8530        input_to_shortpath="${new_path}.exe"
8531     elif test -f "${new_path}.cmd"; then
8532        input_to_shortpath="${new_path}.cmd"
8533     else
8534       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8535 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8536       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8537 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8538       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8539     fi
8540   else
8541     input_to_shortpath="$new_path"
8542   fi
8543 
8544   # Call helper function which possibly converts this using DOS-style short mode.
8545   # If so, the updated path is stored in $new_path.
8546   new_path="$input_to_shortpath"
8547 
8548   input_path="$input_to_shortpath"
8549   # Check if we need to convert this using DOS-style short mode. If the path
8550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8551   # take no chances and rewrite it.
8552   # Note: m4 eats our [], so we need to use [ and ] instead.
8553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8554   if test "x$has_forbidden_chars" != x; then
8555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8556     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8557     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8558     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8559       # Going to short mode and back again did indeed matter. Since short mode is
8560       # case insensitive, let's make it lowercase to improve readability.
8561       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8562       # Now convert it back to Unix-stile (cygpath)
8563       input_path=`$CYGPATH -u "$shortmode_path"`
8564       new_path="$input_path"
8565     fi
8566   fi
8567 
8568   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8569   if test "x$test_cygdrive_prefix" = x; then
8570     # As a simple fix, exclude /usr/bin since it's not a real path.
8571     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8572       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8573       # a path prefixed by /cygdrive for fixpath to work.
8574       new_path="$CYGWIN_ROOT_PATH$input_path"
8575     fi
8576   fi
8577 
8578   # remove trailing .exe if any
8579   new_path="${new_path/%.exe/}"
8580 
8581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8582 
8583   # First separate the path from the arguments. This will split at the first
8584   # space.
8585   complete="$FOUND_MAKE"
8586   path="${complete%% *}"
8587   tmp="$complete EOL"
8588   arguments="${tmp#* }"
8589 
8590   # Input might be given as Windows format, start by converting to
8591   # unix format.
8592   new_path="$path"
8593 
8594   windows_path="$new_path"
8595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8596     unix_path=`$CYGPATH -u "$windows_path"`
8597     new_path="$unix_path"
8598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8600     new_path="$unix_path"
8601   fi
8602 
8603 
8604   # Now try to locate executable using which
8605   new_path=`$WHICH "$new_path" 2> /dev/null`
8606 
8607   if test "x$new_path" = x; then
8608     # Oops. Which didn't find the executable.
8609     # The splitting of arguments from the executable at a space might have been incorrect,
8610     # since paths with space are more likely in Windows. Give it another try with the whole
8611     # argument.
8612     path="$complete"
8613     arguments="EOL"
8614     new_path="$path"
8615 
8616   windows_path="$new_path"
8617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8618     unix_path=`$CYGPATH -u "$windows_path"`
8619     new_path="$unix_path"
8620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8622     new_path="$unix_path"
8623   fi
8624 
8625 
8626     new_path=`$WHICH "$new_path" 2> /dev/null`
8627 
8628     if test "x$new_path" = x; then
8629       # It's still not found. Now this is an unrecoverable error.
8630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8631 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8632       has_space=`$ECHO "$complete" | $GREP " "`
8633       if test "x$has_space" != x; then
8634         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8635 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8636       fi
8637       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8638     fi
8639   fi
8640 
8641   # Now new_path has a complete unix path to the binary
8642   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8643     # Keep paths in /bin as-is, but remove trailing .exe if any
8644     new_path="${new_path/%.exe/}"
8645     # Do not save /bin paths to all_fixpath_prefixes!
8646   else
8647     # Not in mixed or Windows style, start by that.
8648     new_path=`cmd //c echo $new_path`
8649 
8650   input_path="$new_path"
8651   # Check if we need to convert this using DOS-style short mode. If the path
8652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8653   # take no chances and rewrite it.
8654   # Note: m4 eats our [], so we need to use [ and ] instead.
8655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8656   if test "x$has_forbidden_chars" != x; then
8657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8659   fi
8660 
8661     # Output is in $new_path
8662 
8663   windows_path="$new_path"
8664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8665     unix_path=`$CYGPATH -u "$windows_path"`
8666     new_path="$unix_path"
8667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8669     new_path="$unix_path"
8670   fi
8671 
8672     # remove trailing .exe if any
8673     new_path="${new_path/%.exe/}"
8674 
8675     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8676     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8677   fi
8678 
8679   else
8680     # We're on a posix platform. Hooray! :)
8681     # First separate the path from the arguments. This will split at the first
8682     # space.
8683     complete="$FOUND_MAKE"
8684     path="${complete%% *}"
8685     tmp="$complete EOL"
8686     arguments="${tmp#* }"
8687 
8688     # Cannot rely on the command "which" here since it doesn't always work.
8689     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8690     if test -z "$is_absolute_path"; then
8691       # Path to executable is not absolute. Find it.
8692       IFS_save="$IFS"
8693       IFS=:
8694       for p in $PATH; do
8695         if test -f "$p/$path" && test -x "$p/$path"; then
8696           new_path="$p/$path"
8697           break
8698         fi
8699       done
8700       IFS="$IFS_save"
8701     else
8702       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8703 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8704       new_path="$path"
8705     fi
8706 
8707     if test "x$new_path" = x; then
8708         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8709 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8710         has_space=`$ECHO "$complete" | $GREP " "`
8711         if test "x$has_space" != x; then
8712           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8713 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8714         fi
8715         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8716       fi
8717   fi
8718 
8719       # Now join together the path and the arguments once again
8720       if test "x$arguments" != xEOL; then
8721         new_complete="$new_path ${arguments% *}"
8722       else
8723         new_complete="$new_path"
8724       fi
8725 
8726   if test "x$complete" != "x$new_complete"; then
8727       FOUND_MAKE="$new_complete"
8728       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8729 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8730     fi
8731 
8732         fi
8733       fi
8734     fi
8735   fi
8736 
8737 
8738     if test "x$FOUND_MAKE" = x; then
8739       for ac_prog in make
8740 do
8741   # Extract the first word of "$ac_prog", so it can be a program name with args.
8742 set dummy $ac_prog; ac_word=$2
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8744 $as_echo_n "checking for $ac_word... " >&6; }
8745 if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8746   $as_echo_n "(cached) " >&6
8747 else
8748   case $CHECK_MAKE in
8749   [\\/]* | ?:[\\/]*)
8750   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8751   ;;
8752   *)
8753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8754 for as_dir in $PATH
8755 do
8756   IFS=$as_save_IFS
8757   test -z "$as_dir" && as_dir=.
8758     for ac_exec_ext in '' $ac_executable_extensions; do
8759   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8760     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8762     break 2
8763   fi
8764 done
8765   done
8766 IFS=$as_save_IFS
8767 
8768   ;;
8769 esac
8770 fi
8771 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8772 if test -n "$CHECK_MAKE"; then
8773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8774 $as_echo "$CHECK_MAKE" >&6; }
8775 else
8776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8777 $as_echo "no" >&6; }
8778 fi
8779 
8780 
8781   test -n "$CHECK_MAKE" && break
8782 done
8783 
8784 
8785   MAKE_CANDIDATE=""$CHECK_MAKE""
8786   DESCRIPTION="make in PATH"
8787   if test "x$MAKE_CANDIDATE" != x; then
8788     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8789 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8790     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8791     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8792     if test "x$IS_GNU_MAKE" = x; then
8793       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8794 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8795     else
8796       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8797       if test "x$IS_MODERN_MAKE" = x; then
8798         { $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
8799 $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;}
8800       else
8801         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8802           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8803             MAKE_EXPECTED_ENV='cygwin'
8804           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8805             MAKE_EXPECTED_ENV='msys'
8806           else
8807             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8808           fi
8809           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8810           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8811         else
8812           # Not relevant for non-Windows
8813           IS_MAKE_CORRECT_ENV=true
8814         fi
8815         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8816           { $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
8817 $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;}
8818         else
8819           FOUND_MAKE=$MAKE_CANDIDATE
8820 
8821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8822 
8823   # First separate the path from the arguments. This will split at the first
8824   # space.
8825   complete="$FOUND_MAKE"
8826   path="${complete%% *}"
8827   tmp="$complete EOL"
8828   arguments="${tmp#* }"
8829 
8830   # Input might be given as Windows format, start by converting to
8831   # unix format.
8832   new_path=`$CYGPATH -u "$path"`
8833 
8834   # Now try to locate executable using which
8835   new_path=`$WHICH "$new_path" 2> /dev/null`
8836   # bat and cmd files are not always considered executable in cygwin causing which
8837   # to not find them
8838   if test "x$new_path" = x \
8839            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8840            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8841     new_path=`$CYGPATH -u "$path"`
8842   fi
8843   if test "x$new_path" = x; then
8844     # Oops. Which didn't find the executable.
8845     # The splitting of arguments from the executable at a space might have been incorrect,
8846     # since paths with space are more likely in Windows. Give it another try with the whole
8847     # argument.
8848     path="$complete"
8849     arguments="EOL"
8850     new_path=`$CYGPATH -u "$path"`
8851     new_path=`$WHICH "$new_path" 2> /dev/null`
8852     # bat and cmd files are not always considered executable in cygwin causing which
8853     # to not find them
8854     if test "x$new_path" = x \
8855              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8856              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8857       new_path=`$CYGPATH -u "$path"`
8858     fi
8859     if test "x$new_path" = x; then
8860       # It's still not found. Now this is an unrecoverable error.
8861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8862 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8863       has_space=`$ECHO "$complete" | $GREP " "`
8864       if test "x$has_space" != x; then
8865         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8866 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8867       fi
8868       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8869     fi
8870   fi
8871 
8872   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8873   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8874   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8875   # "foo.exe" is OK but "foo" is an error.
8876   #
8877   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8878   # It is also a way to make sure we got the proper file name for the real test later on.
8879   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8880   if test "x$test_shortpath" = x; then
8881     # Short path failed, file does not exist as specified.
8882     # Try adding .exe or .cmd
8883     if test -f "${new_path}.exe"; then
8884        input_to_shortpath="${new_path}.exe"
8885     elif test -f "${new_path}.cmd"; then
8886        input_to_shortpath="${new_path}.cmd"
8887     else
8888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8889 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8890       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8891 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8892       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8893     fi
8894   else
8895     input_to_shortpath="$new_path"
8896   fi
8897 
8898   # Call helper function which possibly converts this using DOS-style short mode.
8899   # If so, the updated path is stored in $new_path.
8900   new_path="$input_to_shortpath"
8901 
8902   input_path="$input_to_shortpath"
8903   # Check if we need to convert this using DOS-style short mode. If the path
8904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8905   # take no chances and rewrite it.
8906   # Note: m4 eats our [], so we need to use [ and ] instead.
8907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8908   if test "x$has_forbidden_chars" != x; then
8909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8910     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8911     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8912     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8913       # Going to short mode and back again did indeed matter. Since short mode is
8914       # case insensitive, let's make it lowercase to improve readability.
8915       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8916       # Now convert it back to Unix-stile (cygpath)
8917       input_path=`$CYGPATH -u "$shortmode_path"`
8918       new_path="$input_path"
8919     fi
8920   fi
8921 
8922   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8923   if test "x$test_cygdrive_prefix" = x; then
8924     # As a simple fix, exclude /usr/bin since it's not a real path.
8925     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8926       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8927       # a path prefixed by /cygdrive for fixpath to work.
8928       new_path="$CYGWIN_ROOT_PATH$input_path"
8929     fi
8930   fi
8931 
8932   # remove trailing .exe if any
8933   new_path="${new_path/%.exe/}"
8934 
8935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8936 
8937   # First separate the path from the arguments. This will split at the first
8938   # space.
8939   complete="$FOUND_MAKE"
8940   path="${complete%% *}"
8941   tmp="$complete EOL"
8942   arguments="${tmp#* }"
8943 
8944   # Input might be given as Windows format, start by converting to
8945   # unix format.
8946   new_path="$path"
8947 
8948   windows_path="$new_path"
8949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8950     unix_path=`$CYGPATH -u "$windows_path"`
8951     new_path="$unix_path"
8952   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8953     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8954     new_path="$unix_path"
8955   fi
8956 
8957 
8958   # Now try to locate executable using which
8959   new_path=`$WHICH "$new_path" 2> /dev/null`
8960 
8961   if test "x$new_path" = x; then
8962     # Oops. Which didn't find the executable.
8963     # The splitting of arguments from the executable at a space might have been incorrect,
8964     # since paths with space are more likely in Windows. Give it another try with the whole
8965     # argument.
8966     path="$complete"
8967     arguments="EOL"
8968     new_path="$path"
8969 
8970   windows_path="$new_path"
8971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8972     unix_path=`$CYGPATH -u "$windows_path"`
8973     new_path="$unix_path"
8974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8976     new_path="$unix_path"
8977   fi
8978 
8979 
8980     new_path=`$WHICH "$new_path" 2> /dev/null`
8981 
8982     if test "x$new_path" = x; then
8983       # It's still not found. Now this is an unrecoverable error.
8984       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8985 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8986       has_space=`$ECHO "$complete" | $GREP " "`
8987       if test "x$has_space" != x; then
8988         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8989 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8990       fi
8991       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8992     fi
8993   fi
8994 
8995   # Now new_path has a complete unix path to the binary
8996   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8997     # Keep paths in /bin as-is, but remove trailing .exe if any
8998     new_path="${new_path/%.exe/}"
8999     # Do not save /bin paths to all_fixpath_prefixes!
9000   else
9001     # Not in mixed or Windows style, start by that.
9002     new_path=`cmd //c echo $new_path`
9003 
9004   input_path="$new_path"
9005   # Check if we need to convert this using DOS-style short mode. If the path
9006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9007   # take no chances and rewrite it.
9008   # Note: m4 eats our [], so we need to use [ and ] instead.
9009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9010   if test "x$has_forbidden_chars" != x; then
9011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9013   fi
9014 
9015     # Output is in $new_path
9016 
9017   windows_path="$new_path"
9018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9019     unix_path=`$CYGPATH -u "$windows_path"`
9020     new_path="$unix_path"
9021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9023     new_path="$unix_path"
9024   fi
9025 
9026     # remove trailing .exe if any
9027     new_path="${new_path/%.exe/}"
9028 
9029     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9030     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9031   fi
9032 
9033   else
9034     # We're on a posix platform. Hooray! :)
9035     # First separate the path from the arguments. This will split at the first
9036     # space.
9037     complete="$FOUND_MAKE"
9038     path="${complete%% *}"
9039     tmp="$complete EOL"
9040     arguments="${tmp#* }"
9041 
9042     # Cannot rely on the command "which" here since it doesn't always work.
9043     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9044     if test -z "$is_absolute_path"; then
9045       # Path to executable is not absolute. Find it.
9046       IFS_save="$IFS"
9047       IFS=:
9048       for p in $PATH; do
9049         if test -f "$p/$path" && test -x "$p/$path"; then
9050           new_path="$p/$path"
9051           break
9052         fi
9053       done
9054       IFS="$IFS_save"
9055     else
9056       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9057 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9058       new_path="$path"
9059     fi
9060 
9061     if test "x$new_path" = x; then
9062         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9063 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9064         has_space=`$ECHO "$complete" | $GREP " "`
9065         if test "x$has_space" != x; then
9066           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9067 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9068         fi
9069         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9070       fi
9071   fi
9072 
9073       # Now join together the path and the arguments once again
9074       if test "x$arguments" != xEOL; then
9075         new_complete="$new_path ${arguments% *}"
9076       else
9077         new_complete="$new_path"
9078       fi
9079 
9080   if test "x$complete" != "x$new_complete"; then
9081       FOUND_MAKE="$new_complete"
9082       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9083 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9084     fi
9085 
9086         fi
9087       fi
9088     fi
9089   fi
9090 
9091     fi
9092 
9093     if test "x$FOUND_MAKE" = x; then
9094       if test "x$TOOLS_DIR" != x; then
9095         # We have a tools-dir, check that as well before giving up.
9096         OLD_PATH=$PATH
9097         PATH=$TOOLS_DIR:$PATH
9098         for ac_prog in gmake
9099 do
9100   # Extract the first word of "$ac_prog", so it can be a program name with args.
9101 set dummy $ac_prog; ac_word=$2
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103 $as_echo_n "checking for $ac_word... " >&6; }
9104 if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9105   $as_echo_n "(cached) " >&6
9106 else
9107   case $CHECK_TOOLSDIR_GMAKE in
9108   [\\/]* | ?:[\\/]*)
9109   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9110   ;;
9111   *)
9112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113 for as_dir in $PATH
9114 do
9115   IFS=$as_save_IFS
9116   test -z "$as_dir" && as_dir=.
9117     for ac_exec_ext in '' $ac_executable_extensions; do
9118   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9119     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121     break 2
9122   fi
9123 done
9124   done
9125 IFS=$as_save_IFS
9126 
9127   ;;
9128 esac
9129 fi
9130 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9131 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9133 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9134 else
9135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136 $as_echo "no" >&6; }
9137 fi
9138 
9139 
9140   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9141 done
9142 
9143 
9144   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9145   DESCRIPTION="gmake in tools-dir"
9146   if test "x$MAKE_CANDIDATE" != x; then
9147     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9148 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9149     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9150     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9151     if test "x$IS_GNU_MAKE" = x; then
9152       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9153 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9154     else
9155       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9156       if test "x$IS_MODERN_MAKE" = x; then
9157         { $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
9158 $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;}
9159       else
9160         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9161           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9162             MAKE_EXPECTED_ENV='cygwin'
9163           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9164             MAKE_EXPECTED_ENV='msys'
9165           else
9166             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9167           fi
9168           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9169           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9170         else
9171           # Not relevant for non-Windows
9172           IS_MAKE_CORRECT_ENV=true
9173         fi
9174         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9175           { $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
9176 $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;}
9177         else
9178           FOUND_MAKE=$MAKE_CANDIDATE
9179 
9180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9181 
9182   # First separate the path from the arguments. This will split at the first
9183   # space.
9184   complete="$FOUND_MAKE"
9185   path="${complete%% *}"
9186   tmp="$complete EOL"
9187   arguments="${tmp#* }"
9188 
9189   # Input might be given as Windows format, start by converting to
9190   # unix format.
9191   new_path=`$CYGPATH -u "$path"`
9192 
9193   # Now try to locate executable using which
9194   new_path=`$WHICH "$new_path" 2> /dev/null`
9195   # bat and cmd files are not always considered executable in cygwin causing which
9196   # to not find them
9197   if test "x$new_path" = x \
9198            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9199            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9200     new_path=`$CYGPATH -u "$path"`
9201   fi
9202   if test "x$new_path" = x; then
9203     # Oops. Which didn't find the executable.
9204     # The splitting of arguments from the executable at a space might have been incorrect,
9205     # since paths with space are more likely in Windows. Give it another try with the whole
9206     # argument.
9207     path="$complete"
9208     arguments="EOL"
9209     new_path=`$CYGPATH -u "$path"`
9210     new_path=`$WHICH "$new_path" 2> /dev/null`
9211     # bat and cmd files are not always considered executable in cygwin causing which
9212     # to not find them
9213     if test "x$new_path" = x \
9214              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9215              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9216       new_path=`$CYGPATH -u "$path"`
9217     fi
9218     if test "x$new_path" = x; then
9219       # It's still not found. Now this is an unrecoverable error.
9220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9221 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9222       has_space=`$ECHO "$complete" | $GREP " "`
9223       if test "x$has_space" != x; then
9224         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9225 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9226       fi
9227       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9228     fi
9229   fi
9230 
9231   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9232   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9233   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9234   # "foo.exe" is OK but "foo" is an error.
9235   #
9236   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9237   # It is also a way to make sure we got the proper file name for the real test later on.
9238   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9239   if test "x$test_shortpath" = x; then
9240     # Short path failed, file does not exist as specified.
9241     # Try adding .exe or .cmd
9242     if test -f "${new_path}.exe"; then
9243        input_to_shortpath="${new_path}.exe"
9244     elif test -f "${new_path}.cmd"; then
9245        input_to_shortpath="${new_path}.cmd"
9246     else
9247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9248 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9249       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9250 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9251       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9252     fi
9253   else
9254     input_to_shortpath="$new_path"
9255   fi
9256 
9257   # Call helper function which possibly converts this using DOS-style short mode.
9258   # If so, the updated path is stored in $new_path.
9259   new_path="$input_to_shortpath"
9260 
9261   input_path="$input_to_shortpath"
9262   # Check if we need to convert this using DOS-style short mode. If the path
9263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9264   # take no chances and rewrite it.
9265   # Note: m4 eats our [], so we need to use [ and ] instead.
9266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9267   if test "x$has_forbidden_chars" != x; then
9268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9272       # Going to short mode and back again did indeed matter. Since short mode is
9273       # case insensitive, let's make it lowercase to improve readability.
9274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9275       # Now convert it back to Unix-stile (cygpath)
9276       input_path=`$CYGPATH -u "$shortmode_path"`
9277       new_path="$input_path"
9278     fi
9279   fi
9280 
9281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9282   if test "x$test_cygdrive_prefix" = x; then
9283     # As a simple fix, exclude /usr/bin since it's not a real path.
9284     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9286       # a path prefixed by /cygdrive for fixpath to work.
9287       new_path="$CYGWIN_ROOT_PATH$input_path"
9288     fi
9289   fi
9290 
9291   # remove trailing .exe if any
9292   new_path="${new_path/%.exe/}"
9293 
9294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9295 
9296   # First separate the path from the arguments. This will split at the first
9297   # space.
9298   complete="$FOUND_MAKE"
9299   path="${complete%% *}"
9300   tmp="$complete EOL"
9301   arguments="${tmp#* }"
9302 
9303   # Input might be given as Windows format, start by converting to
9304   # unix format.
9305   new_path="$path"
9306 
9307   windows_path="$new_path"
9308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9309     unix_path=`$CYGPATH -u "$windows_path"`
9310     new_path="$unix_path"
9311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9313     new_path="$unix_path"
9314   fi
9315 
9316 
9317   # Now try to locate executable using which
9318   new_path=`$WHICH "$new_path" 2> /dev/null`
9319 
9320   if test "x$new_path" = x; then
9321     # Oops. Which didn't find the executable.
9322     # The splitting of arguments from the executable at a space might have been incorrect,
9323     # since paths with space are more likely in Windows. Give it another try with the whole
9324     # argument.
9325     path="$complete"
9326     arguments="EOL"
9327     new_path="$path"
9328 
9329   windows_path="$new_path"
9330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9331     unix_path=`$CYGPATH -u "$windows_path"`
9332     new_path="$unix_path"
9333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9335     new_path="$unix_path"
9336   fi
9337 
9338 
9339     new_path=`$WHICH "$new_path" 2> /dev/null`
9340 
9341     if test "x$new_path" = x; then
9342       # It's still not found. Now this is an unrecoverable error.
9343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9344 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9345       has_space=`$ECHO "$complete" | $GREP " "`
9346       if test "x$has_space" != x; then
9347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9349       fi
9350       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9351     fi
9352   fi
9353 
9354   # Now new_path has a complete unix path to the binary
9355   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9356     # Keep paths in /bin as-is, but remove trailing .exe if any
9357     new_path="${new_path/%.exe/}"
9358     # Do not save /bin paths to all_fixpath_prefixes!
9359   else
9360     # Not in mixed or Windows style, start by that.
9361     new_path=`cmd //c echo $new_path`
9362 
9363   input_path="$new_path"
9364   # Check if we need to convert this using DOS-style short mode. If the path
9365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9366   # take no chances and rewrite it.
9367   # Note: m4 eats our [], so we need to use [ and ] instead.
9368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9369   if test "x$has_forbidden_chars" != x; then
9370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9372   fi
9373 
9374     # Output is in $new_path
9375 
9376   windows_path="$new_path"
9377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9378     unix_path=`$CYGPATH -u "$windows_path"`
9379     new_path="$unix_path"
9380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9382     new_path="$unix_path"
9383   fi
9384 
9385     # remove trailing .exe if any
9386     new_path="${new_path/%.exe/}"
9387 
9388     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9389     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9390   fi
9391 
9392   else
9393     # We're on a posix platform. Hooray! :)
9394     # First separate the path from the arguments. This will split at the first
9395     # space.
9396     complete="$FOUND_MAKE"
9397     path="${complete%% *}"
9398     tmp="$complete EOL"
9399     arguments="${tmp#* }"
9400 
9401     # Cannot rely on the command "which" here since it doesn't always work.
9402     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9403     if test -z "$is_absolute_path"; then
9404       # Path to executable is not absolute. Find it.
9405       IFS_save="$IFS"
9406       IFS=:
9407       for p in $PATH; do
9408         if test -f "$p/$path" && test -x "$p/$path"; then
9409           new_path="$p/$path"
9410           break
9411         fi
9412       done
9413       IFS="$IFS_save"
9414     else
9415       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9416 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9417       new_path="$path"
9418     fi
9419 
9420     if test "x$new_path" = x; then
9421         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9422 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9423         has_space=`$ECHO "$complete" | $GREP " "`
9424         if test "x$has_space" != x; then
9425           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9426 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9427         fi
9428         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9429       fi
9430   fi
9431 
9432       # Now join together the path and the arguments once again
9433       if test "x$arguments" != xEOL; then
9434         new_complete="$new_path ${arguments% *}"
9435       else
9436         new_complete="$new_path"
9437       fi
9438 
9439   if test "x$complete" != "x$new_complete"; then
9440       FOUND_MAKE="$new_complete"
9441       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9442 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9443     fi
9444 
9445         fi
9446       fi
9447     fi
9448   fi
9449 
9450         if test "x$FOUND_MAKE" = x; then
9451           for ac_prog in make
9452 do
9453   # Extract the first word of "$ac_prog", so it can be a program name with args.
9454 set dummy $ac_prog; ac_word=$2
9455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9456 $as_echo_n "checking for $ac_word... " >&6; }
9457 if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9458   $as_echo_n "(cached) " >&6
9459 else
9460   case $CHECK_TOOLSDIR_MAKE in
9461   [\\/]* | ?:[\\/]*)
9462   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9463   ;;
9464   *)
9465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466 for as_dir in $PATH
9467 do
9468   IFS=$as_save_IFS
9469   test -z "$as_dir" && as_dir=.
9470     for ac_exec_ext in '' $ac_executable_extensions; do
9471   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9472     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9474     break 2
9475   fi
9476 done
9477   done
9478 IFS=$as_save_IFS
9479 
9480   ;;
9481 esac
9482 fi
9483 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9484 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9486 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9487 else
9488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489 $as_echo "no" >&6; }
9490 fi
9491 
9492 
9493   test -n "$CHECK_TOOLSDIR_MAKE" && break
9494 done
9495 
9496 
9497   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9498   DESCRIPTION="make in tools-dir"
9499   if test "x$MAKE_CANDIDATE" != x; then
9500     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9501 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9502     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9503     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9504     if test "x$IS_GNU_MAKE" = x; then
9505       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9506 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9507     else
9508       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9509       if test "x$IS_MODERN_MAKE" = x; then
9510         { $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
9511 $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;}
9512       else
9513         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9514           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9515             MAKE_EXPECTED_ENV='cygwin'
9516           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517             MAKE_EXPECTED_ENV='msys'
9518           else
9519             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9520           fi
9521           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9522           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9523         else
9524           # Not relevant for non-Windows
9525           IS_MAKE_CORRECT_ENV=true
9526         fi
9527         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9528           { $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
9529 $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;}
9530         else
9531           FOUND_MAKE=$MAKE_CANDIDATE
9532 
9533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9534 
9535   # First separate the path from the arguments. This will split at the first
9536   # space.
9537   complete="$FOUND_MAKE"
9538   path="${complete%% *}"
9539   tmp="$complete EOL"
9540   arguments="${tmp#* }"
9541 
9542   # Input might be given as Windows format, start by converting to
9543   # unix format.
9544   new_path=`$CYGPATH -u "$path"`
9545 
9546   # Now try to locate executable using which
9547   new_path=`$WHICH "$new_path" 2> /dev/null`
9548   # bat and cmd files are not always considered executable in cygwin causing which
9549   # to not find them
9550   if test "x$new_path" = x \
9551            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9552            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9553     new_path=`$CYGPATH -u "$path"`
9554   fi
9555   if test "x$new_path" = x; then
9556     # Oops. Which didn't find the executable.
9557     # The splitting of arguments from the executable at a space might have been incorrect,
9558     # since paths with space are more likely in Windows. Give it another try with the whole
9559     # argument.
9560     path="$complete"
9561     arguments="EOL"
9562     new_path=`$CYGPATH -u "$path"`
9563     new_path=`$WHICH "$new_path" 2> /dev/null`
9564     # bat and cmd files are not always considered executable in cygwin causing which
9565     # to not find them
9566     if test "x$new_path" = x \
9567              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9568              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9569       new_path=`$CYGPATH -u "$path"`
9570     fi
9571     if test "x$new_path" = x; then
9572       # It's still not found. Now this is an unrecoverable error.
9573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9574 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9575       has_space=`$ECHO "$complete" | $GREP " "`
9576       if test "x$has_space" != x; then
9577         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9578 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9579       fi
9580       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9581     fi
9582   fi
9583 
9584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9587   # "foo.exe" is OK but "foo" is an error.
9588   #
9589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9590   # It is also a way to make sure we got the proper file name for the real test later on.
9591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9592   if test "x$test_shortpath" = x; then
9593     # Short path failed, file does not exist as specified.
9594     # Try adding .exe or .cmd
9595     if test -f "${new_path}.exe"; then
9596        input_to_shortpath="${new_path}.exe"
9597     elif test -f "${new_path}.cmd"; then
9598        input_to_shortpath="${new_path}.cmd"
9599     else
9600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9601 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9602       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9603 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9604       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9605     fi
9606   else
9607     input_to_shortpath="$new_path"
9608   fi
9609 
9610   # Call helper function which possibly converts this using DOS-style short mode.
9611   # If so, the updated path is stored in $new_path.
9612   new_path="$input_to_shortpath"
9613 
9614   input_path="$input_to_shortpath"
9615   # Check if we need to convert this using DOS-style short mode. If the path
9616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9617   # take no chances and rewrite it.
9618   # Note: m4 eats our [], so we need to use [ and ] instead.
9619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9620   if test "x$has_forbidden_chars" != x; then
9621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9625       # Going to short mode and back again did indeed matter. Since short mode is
9626       # case insensitive, let's make it lowercase to improve readability.
9627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9628       # Now convert it back to Unix-stile (cygpath)
9629       input_path=`$CYGPATH -u "$shortmode_path"`
9630       new_path="$input_path"
9631     fi
9632   fi
9633 
9634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9635   if test "x$test_cygdrive_prefix" = x; then
9636     # As a simple fix, exclude /usr/bin since it's not a real path.
9637     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9639       # a path prefixed by /cygdrive for fixpath to work.
9640       new_path="$CYGWIN_ROOT_PATH$input_path"
9641     fi
9642   fi
9643 
9644   # remove trailing .exe if any
9645   new_path="${new_path/%.exe/}"
9646 
9647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9648 
9649   # First separate the path from the arguments. This will split at the first
9650   # space.
9651   complete="$FOUND_MAKE"
9652   path="${complete%% *}"
9653   tmp="$complete EOL"
9654   arguments="${tmp#* }"
9655 
9656   # Input might be given as Windows format, start by converting to
9657   # unix format.
9658   new_path="$path"
9659 
9660   windows_path="$new_path"
9661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9662     unix_path=`$CYGPATH -u "$windows_path"`
9663     new_path="$unix_path"
9664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9666     new_path="$unix_path"
9667   fi
9668 
9669 
9670   # Now try to locate executable using which
9671   new_path=`$WHICH "$new_path" 2> /dev/null`
9672 
9673   if test "x$new_path" = x; then
9674     # Oops. Which didn't find the executable.
9675     # The splitting of arguments from the executable at a space might have been incorrect,
9676     # since paths with space are more likely in Windows. Give it another try with the whole
9677     # argument.
9678     path="$complete"
9679     arguments="EOL"
9680     new_path="$path"
9681 
9682   windows_path="$new_path"
9683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9684     unix_path=`$CYGPATH -u "$windows_path"`
9685     new_path="$unix_path"
9686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9688     new_path="$unix_path"
9689   fi
9690 
9691 
9692     new_path=`$WHICH "$new_path" 2> /dev/null`
9693 
9694     if test "x$new_path" = x; then
9695       # It's still not found. Now this is an unrecoverable error.
9696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9697 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9698       has_space=`$ECHO "$complete" | $GREP " "`
9699       if test "x$has_space" != x; then
9700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9702       fi
9703       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9704     fi
9705   fi
9706 
9707   # Now new_path has a complete unix path to the binary
9708   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9709     # Keep paths in /bin as-is, but remove trailing .exe if any
9710     new_path="${new_path/%.exe/}"
9711     # Do not save /bin paths to all_fixpath_prefixes!
9712   else
9713     # Not in mixed or Windows style, start by that.
9714     new_path=`cmd //c echo $new_path`
9715 
9716   input_path="$new_path"
9717   # Check if we need to convert this using DOS-style short mode. If the path
9718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9719   # take no chances and rewrite it.
9720   # Note: m4 eats our [], so we need to use [ and ] instead.
9721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9722   if test "x$has_forbidden_chars" != x; then
9723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9725   fi
9726 
9727     # Output is in $new_path
9728 
9729   windows_path="$new_path"
9730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9731     unix_path=`$CYGPATH -u "$windows_path"`
9732     new_path="$unix_path"
9733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9735     new_path="$unix_path"
9736   fi
9737 
9738     # remove trailing .exe if any
9739     new_path="${new_path/%.exe/}"
9740 
9741     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9742     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9743   fi
9744 
9745   else
9746     # We're on a posix platform. Hooray! :)
9747     # First separate the path from the arguments. This will split at the first
9748     # space.
9749     complete="$FOUND_MAKE"
9750     path="${complete%% *}"
9751     tmp="$complete EOL"
9752     arguments="${tmp#* }"
9753 
9754     # Cannot rely on the command "which" here since it doesn't always work.
9755     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9756     if test -z "$is_absolute_path"; then
9757       # Path to executable is not absolute. Find it.
9758       IFS_save="$IFS"
9759       IFS=:
9760       for p in $PATH; do
9761         if test -f "$p/$path" && test -x "$p/$path"; then
9762           new_path="$p/$path"
9763           break
9764         fi
9765       done
9766       IFS="$IFS_save"
9767     else
9768       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9769 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9770       new_path="$path"
9771     fi
9772 
9773     if test "x$new_path" = x; then
9774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9775 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9776         has_space=`$ECHO "$complete" | $GREP " "`
9777         if test "x$has_space" != x; then
9778           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9779 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9780         fi
9781         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9782       fi
9783   fi
9784 
9785       # Now join together the path and the arguments once again
9786       if test "x$arguments" != xEOL; then
9787         new_complete="$new_path ${arguments% *}"
9788       else
9789         new_complete="$new_path"
9790       fi
9791 
9792   if test "x$complete" != "x$new_complete"; then
9793       FOUND_MAKE="$new_complete"
9794       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9795 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9796     fi
9797 
9798         fi
9799       fi
9800     fi
9801   fi
9802 
9803         fi
9804         PATH=$OLD_PATH
9805       fi
9806     fi
9807 
9808     if test "x$FOUND_MAKE" = x; then
9809       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
9810     fi
9811   fi
9812 
9813   MAKE=$FOUND_MAKE
9814 
9815   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9816 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9817 
9818 
9819 
9820     # Test if find supports -delete
9821     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9822 $as_echo_n "checking if find supports -delete... " >&6; }
9823     FIND_DELETE="-delete"
9824 
9825     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9826 
9827     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9828 
9829     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9830     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9831         # No, it does not.
9832         rm $DELETEDIR/TestIfFindSupportsDelete
9833         FIND_DELETE="-exec rm \{\} \+"
9834         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9835 $as_echo "no" >&6; }
9836     else
9837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9838 $as_echo "yes" >&6; }
9839     fi
9840     rmdir $DELETEDIR
9841 
9842 
9843 
9844 # These tools might not be installed by default,
9845 # need hint on how to install them.
9846 
9847     for ac_prog in unzip
9848 do
9849   # Extract the first word of "$ac_prog", so it can be a program name with args.
9850 set dummy $ac_prog; ac_word=$2
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852 $as_echo_n "checking for $ac_word... " >&6; }
9853 if test "${ac_cv_path_UNZIP+set}" = set; then :
9854   $as_echo_n "(cached) " >&6
9855 else
9856   case $UNZIP in
9857   [\\/]* | ?:[\\/]*)
9858   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9859   ;;
9860   *)
9861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9862 for as_dir in $PATH
9863 do
9864   IFS=$as_save_IFS
9865   test -z "$as_dir" && as_dir=.
9866     for ac_exec_ext in '' $ac_executable_extensions; do
9867   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9868     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9870     break 2
9871   fi
9872 done
9873   done
9874 IFS=$as_save_IFS
9875 
9876   ;;
9877 esac
9878 fi
9879 UNZIP=$ac_cv_path_UNZIP
9880 if test -n "$UNZIP"; then
9881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9882 $as_echo "$UNZIP" >&6; }
9883 else
9884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885 $as_echo "no" >&6; }
9886 fi
9887 
9888 
9889   test -n "$UNZIP" && break
9890 done
9891 
9892 
9893     if test "x$UNZIP" = x; then
9894         if test "xunzip" = x; then
9895           PROG_NAME=unzip
9896         else
9897           PROG_NAME=unzip
9898         fi
9899         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9900 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9901         as_fn_error $? "Cannot continue" "$LINENO" 5
9902     fi
9903 
9904 
9905 
9906     for ac_prog in zip
9907 do
9908   # Extract the first word of "$ac_prog", so it can be a program name with args.
9909 set dummy $ac_prog; ac_word=$2
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911 $as_echo_n "checking for $ac_word... " >&6; }
9912 if test "${ac_cv_path_ZIP+set}" = set; then :
9913   $as_echo_n "(cached) " >&6
9914 else
9915   case $ZIP in
9916   [\\/]* | ?:[\\/]*)
9917   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9918   ;;
9919   *)
9920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9921 for as_dir in $PATH
9922 do
9923   IFS=$as_save_IFS
9924   test -z "$as_dir" && as_dir=.
9925     for ac_exec_ext in '' $ac_executable_extensions; do
9926   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9927     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9929     break 2
9930   fi
9931 done
9932   done
9933 IFS=$as_save_IFS
9934 
9935   ;;
9936 esac
9937 fi
9938 ZIP=$ac_cv_path_ZIP
9939 if test -n "$ZIP"; then
9940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9941 $as_echo "$ZIP" >&6; }
9942 else
9943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944 $as_echo "no" >&6; }
9945 fi
9946 
9947 
9948   test -n "$ZIP" && break
9949 done
9950 
9951 
9952     if test "x$ZIP" = x; then
9953         if test "xzip" = x; then
9954           PROG_NAME=zip
9955         else
9956           PROG_NAME=zip
9957         fi
9958         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9959 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9960         as_fn_error $? "Cannot continue" "$LINENO" 5
9961     fi
9962 
9963 
9964 
9965 # Non-required basic tools
9966 
9967 # Extract the first word of "ldd", so it can be a program name with args.
9968 set dummy ldd; ac_word=$2
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9970 $as_echo_n "checking for $ac_word... " >&6; }
9971 if test "${ac_cv_path_LDD+set}" = set; then :
9972   $as_echo_n "(cached) " >&6
9973 else
9974   case $LDD in
9975   [\\/]* | ?:[\\/]*)
9976   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9977   ;;
9978   *)
9979   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9980 for as_dir in $PATH
9981 do
9982   IFS=$as_save_IFS
9983   test -z "$as_dir" && as_dir=.
9984     for ac_exec_ext in '' $ac_executable_extensions; do
9985   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9986     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9988     break 2
9989   fi
9990 done
9991   done
9992 IFS=$as_save_IFS
9993 
9994   ;;
9995 esac
9996 fi
9997 LDD=$ac_cv_path_LDD
9998 if test -n "$LDD"; then
9999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10000 $as_echo "$LDD" >&6; }
10001 else
10002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10003 $as_echo "no" >&6; }
10004 fi
10005 
10006 
10007 if test "x$LDD" = "x"; then
10008     # List shared lib dependencies is used for
10009     # debug output and checking for forbidden dependencies.
10010     # We can build without it.
10011     LDD="true"
10012 fi
10013 # Extract the first word of "otool", so it can be a program name with args.
10014 set dummy otool; ac_word=$2
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10016 $as_echo_n "checking for $ac_word... " >&6; }
10017 if test "${ac_cv_path_OTOOL+set}" = set; then :
10018   $as_echo_n "(cached) " >&6
10019 else
10020   case $OTOOL in
10021   [\\/]* | ?:[\\/]*)
10022   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10023   ;;
10024   *)
10025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10026 for as_dir in $PATH
10027 do
10028   IFS=$as_save_IFS
10029   test -z "$as_dir" && as_dir=.
10030     for ac_exec_ext in '' $ac_executable_extensions; do
10031   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10032     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10033     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10034     break 2
10035   fi
10036 done
10037   done
10038 IFS=$as_save_IFS
10039 
10040   ;;
10041 esac
10042 fi
10043 OTOOL=$ac_cv_path_OTOOL
10044 if test -n "$OTOOL"; then
10045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10046 $as_echo "$OTOOL" >&6; }
10047 else
10048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10049 $as_echo "no" >&6; }
10050 fi
10051 
10052 
10053 if test "x$OTOOL" = "x"; then
10054    OTOOL="true"
10055 fi
10056 for ac_prog in readelf greadelf
10057 do
10058   # Extract the first word of "$ac_prog", so it can be a program name with args.
10059 set dummy $ac_prog; ac_word=$2
10060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061 $as_echo_n "checking for $ac_word... " >&6; }
10062 if test "${ac_cv_path_READELF+set}" = set; then :
10063   $as_echo_n "(cached) " >&6
10064 else
10065   case $READELF in
10066   [\\/]* | ?:[\\/]*)
10067   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10068   ;;
10069   *)
10070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071 for as_dir in $PATH
10072 do
10073   IFS=$as_save_IFS
10074   test -z "$as_dir" && as_dir=.
10075     for ac_exec_ext in '' $ac_executable_extensions; do
10076   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10077     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079     break 2
10080   fi
10081 done
10082   done
10083 IFS=$as_save_IFS
10084 
10085   ;;
10086 esac
10087 fi
10088 READELF=$ac_cv_path_READELF
10089 if test -n "$READELF"; then
10090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10091 $as_echo "$READELF" >&6; }
10092 else
10093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094 $as_echo "no" >&6; }
10095 fi
10096 
10097 
10098   test -n "$READELF" && break
10099 done
10100 
10101 # Extract the first word of "hg", so it can be a program name with args.
10102 set dummy hg; ac_word=$2
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10104 $as_echo_n "checking for $ac_word... " >&6; }
10105 if test "${ac_cv_path_HG+set}" = set; then :
10106   $as_echo_n "(cached) " >&6
10107 else
10108   case $HG in
10109   [\\/]* | ?:[\\/]*)
10110   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10111   ;;
10112   *)
10113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114 for as_dir in $PATH
10115 do
10116   IFS=$as_save_IFS
10117   test -z "$as_dir" && as_dir=.
10118     for ac_exec_ext in '' $ac_executable_extensions; do
10119   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10120     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10122     break 2
10123   fi
10124 done
10125   done
10126 IFS=$as_save_IFS
10127 
10128   ;;
10129 esac
10130 fi
10131 HG=$ac_cv_path_HG
10132 if test -n "$HG"; then
10133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10134 $as_echo "$HG" >&6; }
10135 else
10136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137 $as_echo "no" >&6; }
10138 fi
10139 
10140 
10141 # Extract the first word of "stat", so it can be a program name with args.
10142 set dummy stat; ac_word=$2
10143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144 $as_echo_n "checking for $ac_word... " >&6; }
10145 if test "${ac_cv_path_STAT+set}" = set; then :
10146   $as_echo_n "(cached) " >&6
10147 else
10148   case $STAT in
10149   [\\/]* | ?:[\\/]*)
10150   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10151   ;;
10152   *)
10153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154 for as_dir in $PATH
10155 do
10156   IFS=$as_save_IFS
10157   test -z "$as_dir" && as_dir=.
10158     for ac_exec_ext in '' $ac_executable_extensions; do
10159   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10160     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162     break 2
10163   fi
10164 done
10165   done
10166 IFS=$as_save_IFS
10167 
10168   ;;
10169 esac
10170 fi
10171 STAT=$ac_cv_path_STAT
10172 if test -n "$STAT"; then
10173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10174 $as_echo "$STAT" >&6; }
10175 else
10176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177 $as_echo "no" >&6; }
10178 fi
10179 
10180 
10181 # Extract the first word of "time", so it can be a program name with args.
10182 set dummy time; ac_word=$2
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10184 $as_echo_n "checking for $ac_word... " >&6; }
10185 if test "${ac_cv_path_TIME+set}" = set; then :
10186   $as_echo_n "(cached) " >&6
10187 else
10188   case $TIME in
10189   [\\/]* | ?:[\\/]*)
10190   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10191   ;;
10192   *)
10193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10194 for as_dir in $PATH
10195 do
10196   IFS=$as_save_IFS
10197   test -z "$as_dir" && as_dir=.
10198     for ac_exec_ext in '' $ac_executable_extensions; do
10199   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10200     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10202     break 2
10203   fi
10204 done
10205   done
10206 IFS=$as_save_IFS
10207 
10208   ;;
10209 esac
10210 fi
10211 TIME=$ac_cv_path_TIME
10212 if test -n "$TIME"; then
10213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10214 $as_echo "$TIME" >&6; }
10215 else
10216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217 $as_echo "no" >&6; }
10218 fi
10219 
10220 
10221 
10222 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10223 
10224     for ac_prog in comm
10225 do
10226   # Extract the first word of "$ac_prog", so it can be a program name with args.
10227 set dummy $ac_prog; ac_word=$2
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10229 $as_echo_n "checking for $ac_word... " >&6; }
10230 if test "${ac_cv_path_COMM+set}" = set; then :
10231   $as_echo_n "(cached) " >&6
10232 else
10233   case $COMM in
10234   [\\/]* | ?:[\\/]*)
10235   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10236   ;;
10237   *)
10238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10239 for as_dir in $PATH
10240 do
10241   IFS=$as_save_IFS
10242   test -z "$as_dir" && as_dir=.
10243     for ac_exec_ext in '' $ac_executable_extensions; do
10244   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10245     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10247     break 2
10248   fi
10249 done
10250   done
10251 IFS=$as_save_IFS
10252 
10253   ;;
10254 esac
10255 fi
10256 COMM=$ac_cv_path_COMM
10257 if test -n "$COMM"; then
10258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10259 $as_echo "$COMM" >&6; }
10260 else
10261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262 $as_echo "no" >&6; }
10263 fi
10264 
10265 
10266   test -n "$COMM" && break
10267 done
10268 
10269 
10270     if test "x$COMM" = x; then
10271         if test "xcomm" = x; then
10272           PROG_NAME=comm
10273         else
10274           PROG_NAME=comm
10275         fi
10276         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10277 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10278         as_fn_error $? "Cannot continue" "$LINENO" 5
10279     fi
10280 
10281 
10282 fi
10283 
10284 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10285 
10286     for ac_prog in xattr
10287 do
10288   # Extract the first word of "$ac_prog", so it can be a program name with args.
10289 set dummy $ac_prog; ac_word=$2
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291 $as_echo_n "checking for $ac_word... " >&6; }
10292 if test "${ac_cv_path_XATTR+set}" = set; then :
10293   $as_echo_n "(cached) " >&6
10294 else
10295   case $XATTR in
10296   [\\/]* | ?:[\\/]*)
10297   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10298   ;;
10299   *)
10300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301 for as_dir in $PATH
10302 do
10303   IFS=$as_save_IFS
10304   test -z "$as_dir" && as_dir=.
10305     for ac_exec_ext in '' $ac_executable_extensions; do
10306   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10307     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309     break 2
10310   fi
10311 done
10312   done
10313 IFS=$as_save_IFS
10314 
10315   ;;
10316 esac
10317 fi
10318 XATTR=$ac_cv_path_XATTR
10319 if test -n "$XATTR"; then
10320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10321 $as_echo "$XATTR" >&6; }
10322 else
10323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324 $as_echo "no" >&6; }
10325 fi
10326 
10327 
10328   test -n "$XATTR" && break
10329 done
10330 
10331 
10332     if test "x$XATTR" = x; then
10333         if test "xxattr" = x; then
10334           PROG_NAME=xattr
10335         else
10336           PROG_NAME=xattr
10337         fi
10338         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10339 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10340         as_fn_error $? "Cannot continue" "$LINENO" 5
10341     fi
10342 
10343 
10344   # Extract the first word of "codesign", so it can be a program name with args.
10345 set dummy codesign; ac_word=$2
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10347 $as_echo_n "checking for $ac_word... " >&6; }
10348 if test "${ac_cv_path_CODESIGN+set}" = set; then :
10349   $as_echo_n "(cached) " >&6
10350 else
10351   case $CODESIGN in
10352   [\\/]* | ?:[\\/]*)
10353   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10354   ;;
10355   *)
10356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10357 for as_dir in $PATH
10358 do
10359   IFS=$as_save_IFS
10360   test -z "$as_dir" && as_dir=.
10361     for ac_exec_ext in '' $ac_executable_extensions; do
10362   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10363     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10365     break 2
10366   fi
10367 done
10368   done
10369 IFS=$as_save_IFS
10370 
10371   ;;
10372 esac
10373 fi
10374 CODESIGN=$ac_cv_path_CODESIGN
10375 if test -n "$CODESIGN"; then
10376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10377 $as_echo "$CODESIGN" >&6; }
10378 else
10379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380 $as_echo "no" >&6; }
10381 fi
10382 
10383 
10384   if test "x$CODESIGN" != "x"; then
10385     # Verify that the openjdk_codesign certificate is present
10386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10387 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10388     rm -f codesign-testfile
10389     touch codesign-testfile
10390     codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10391     rm -f codesign-testfile
10392     if test "x$CODESIGN" = x; then
10393       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394 $as_echo "no" >&6; }
10395     else
10396       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10397 $as_echo "yes" >&6; }
10398     fi
10399   fi
10400 fi
10401 
10402 
10403 # Check if pkg-config is available.
10404 
10405 
10406 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10407         if test -n "$ac_tool_prefix"; then
10408   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10409 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411 $as_echo_n "checking for $ac_word... " >&6; }
10412 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10413   $as_echo_n "(cached) " >&6
10414 else
10415   case $PKG_CONFIG in
10416   [\\/]* | ?:[\\/]*)
10417   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10418   ;;
10419   *)
10420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421 for as_dir in $PATH
10422 do
10423   IFS=$as_save_IFS
10424   test -z "$as_dir" && as_dir=.
10425     for ac_exec_ext in '' $ac_executable_extensions; do
10426   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10427     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429     break 2
10430   fi
10431 done
10432   done
10433 IFS=$as_save_IFS
10434 
10435   ;;
10436 esac
10437 fi
10438 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10439 if test -n "$PKG_CONFIG"; then
10440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10441 $as_echo "$PKG_CONFIG" >&6; }
10442 else
10443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444 $as_echo "no" >&6; }
10445 fi
10446 
10447 
10448 fi
10449 if test -z "$ac_cv_path_PKG_CONFIG"; then
10450   ac_pt_PKG_CONFIG=$PKG_CONFIG
10451   # Extract the first word of "pkg-config", so it can be a program name with args.
10452 set dummy pkg-config; ac_word=$2
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10454 $as_echo_n "checking for $ac_word... " >&6; }
10455 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10456   $as_echo_n "(cached) " >&6
10457 else
10458   case $ac_pt_PKG_CONFIG in
10459   [\\/]* | ?:[\\/]*)
10460   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10461   ;;
10462   *)
10463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10464 for as_dir in $PATH
10465 do
10466   IFS=$as_save_IFS
10467   test -z "$as_dir" && as_dir=.
10468     for ac_exec_ext in '' $ac_executable_extensions; do
10469   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10470     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10472     break 2
10473   fi
10474 done
10475   done
10476 IFS=$as_save_IFS
10477 
10478   ;;
10479 esac
10480 fi
10481 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10482 if test -n "$ac_pt_PKG_CONFIG"; then
10483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10484 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10485 else
10486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487 $as_echo "no" >&6; }
10488 fi
10489 
10490   if test "x$ac_pt_PKG_CONFIG" = x; then
10491     PKG_CONFIG=""
10492   else
10493     case $cross_compiling:$ac_tool_warned in
10494 yes:)
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10496 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10497 ac_tool_warned=yes ;;
10498 esac
10499     PKG_CONFIG=$ac_pt_PKG_CONFIG
10500   fi
10501 else
10502   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10503 fi
10504 
10505 fi
10506 if test -n "$PKG_CONFIG"; then
10507         _pkg_min_version=0.9.0
10508         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10509 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10510         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10511                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10512 $as_echo "yes" >&6; }
10513         else
10514                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515 $as_echo "no" >&6; }
10516                 PKG_CONFIG=""
10517         fi
10518 
10519 fi
10520 
10521 # After basic tools have been setup, we can check build os specific details.
10522 
10523 ###############################################################################
10524 
10525 # Note that this is the build platform OS version!
10526 
10527 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10528 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10529 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10530 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10531 
10532 
10533 
10534 
10535 
10536 # Setup builddeps, for automatic downloading of tools we need.
10537 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10538 # boot-jdk setup, but we need to have basic tools setup first.
10539 
10540 
10541 # Check whether --with-builddeps-conf was given.
10542 if test "${with_builddeps_conf+set}" = set; then :
10543   withval=$with_builddeps_conf;
10544 fi
10545 
10546 
10547 
10548 # Check whether --with-builddeps-server was given.
10549 if test "${with_builddeps_server+set}" = set; then :
10550   withval=$with_builddeps_server;
10551 fi
10552 
10553 
10554 
10555 # Check whether --with-builddeps-dir was given.
10556 if test "${with_builddeps_dir+set}" = set; then :
10557   withval=$with_builddeps_dir;
10558 else
10559   with_builddeps_dir=/localhome/builddeps
10560 fi
10561 
10562 
10563 
10564 # Check whether --with-builddeps-group was given.
10565 if test "${with_builddeps_group+set}" = set; then :
10566   withval=$with_builddeps_group;
10567 fi
10568 
10569 
10570 
10571 
10572     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10573         if test "x$with_builddeps_conf" != x; then
10574             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10575 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10576             builddepsfile=$with_builddeps_conf
10577             if test -s $builddepsfile; then
10578                 . $builddepsfile
10579                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10580 $as_echo "loaded!" >&6; }
10581             else
10582                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10583            fi
10584         else
10585             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10586 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10587             builddepsfile=`mktemp`
10588             touch $builddepsfile
10589             # Put all found confs into a single file.
10590             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10591             # Source the file to acquire the variables
10592             if test -s $builddepsfile; then
10593                 . $builddepsfile
10594                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10595 $as_echo "found at least one!" >&6; }
10596             else
10597                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10598            fi
10599         fi
10600         # Create build and target names that use _ instead of "-" and ".".
10601         # This is necessary to use them in variable names.
10602         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10603         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10604         # Extract rewrite information for build and target
10605         eval rewritten_build=\${REWRITE_${build_var}}
10606         if test "x$rewritten_build" = x; then
10607             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10608             echo Build stays the same $rewritten_build
10609         else
10610             echo Rewriting build for builddeps into $rewritten_build
10611         fi
10612         eval rewritten_target=\${REWRITE_${target_var}}
10613         if test "x$rewritten_target" = x; then
10614             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10615             echo Target stays the same $rewritten_target
10616         else
10617             echo Rewriting target for builddeps into $rewritten_target
10618         fi
10619         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10620         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10621     fi
10622     for ac_prog in 7z unzip
10623 do
10624   # Extract the first word of "$ac_prog", so it can be a program name with args.
10625 set dummy $ac_prog; ac_word=$2
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627 $as_echo_n "checking for $ac_word... " >&6; }
10628 if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10629   $as_echo_n "(cached) " >&6
10630 else
10631   if test -n "$BDEPS_UNZIP"; then
10632   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10633 else
10634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10635 for as_dir in $PATH
10636 do
10637   IFS=$as_save_IFS
10638   test -z "$as_dir" && as_dir=.
10639     for ac_exec_ext in '' $ac_executable_extensions; do
10640   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10641     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10643     break 2
10644   fi
10645 done
10646   done
10647 IFS=$as_save_IFS
10648 
10649 fi
10650 fi
10651 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10652 if test -n "$BDEPS_UNZIP"; then
10653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10654 $as_echo "$BDEPS_UNZIP" >&6; }
10655 else
10656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657 $as_echo "no" >&6; }
10658 fi
10659 
10660 
10661   test -n "$BDEPS_UNZIP" && break
10662 done
10663 
10664     if test "x$BDEPS_UNZIP" = x7z; then
10665         BDEPS_UNZIP="7z x"
10666     fi
10667 
10668     for ac_prog in wget lftp ftp
10669 do
10670   # Extract the first word of "$ac_prog", so it can be a program name with args.
10671 set dummy $ac_prog; ac_word=$2
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673 $as_echo_n "checking for $ac_word... " >&6; }
10674 if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10675   $as_echo_n "(cached) " >&6
10676 else
10677   if test -n "$BDEPS_FTP"; then
10678   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10679 else
10680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10681 for as_dir in $PATH
10682 do
10683   IFS=$as_save_IFS
10684   test -z "$as_dir" && as_dir=.
10685     for ac_exec_ext in '' $ac_executable_extensions; do
10686   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10687     ac_cv_prog_BDEPS_FTP="$ac_prog"
10688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10689     break 2
10690   fi
10691 done
10692   done
10693 IFS=$as_save_IFS
10694 
10695 fi
10696 fi
10697 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10698 if test -n "$BDEPS_FTP"; then
10699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10700 $as_echo "$BDEPS_FTP" >&6; }
10701 else
10702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703 $as_echo "no" >&6; }
10704 fi
10705 
10706 
10707   test -n "$BDEPS_FTP" && break
10708 done
10709 
10710 
10711 
10712 ###############################################################################
10713 #
10714 # Determine OpenJDK variants, options and version numbers.
10715 #
10716 ###############################################################################
10717 
10718 # We need build & target for this.
10719 
10720 
10721 ###############################################################################
10722 #
10723 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10724 # We always build headless support.
10725 #
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10727 $as_echo_n "checking headful support... " >&6; }
10728 # Check whether --enable-headful was given.
10729 if test "${enable_headful+set}" = set; then :
10730   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10731 else
10732   SUPPORT_HEADFUL=yes
10733 fi
10734 
10735 
10736 SUPPORT_HEADLESS=yes
10737 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10738 
10739 if test "x$SUPPORT_HEADFUL" = xyes; then
10740     # We are building both headful and headless.
10741     headful_msg="inlude support for both headful and headless"
10742 fi
10743 
10744 if test "x$SUPPORT_HEADFUL" = xno; then
10745     # Thus we are building headless only.
10746     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10747     headful_msg="headless only"
10748 fi
10749 
10750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10751 $as_echo "$headful_msg" >&6; }
10752 
10753 
10754 
10755 
10756 
10757 # Control wether Hotspot runs Queens test after build.
10758 # Check whether --enable-hotspot-test-in-build was given.
10759 if test "${enable_hotspot_test_in_build+set}" = set; then :
10760   enableval=$enable_hotspot_test_in_build;
10761 else
10762   enable_hotspot_test_in_build=no
10763 fi
10764 
10765 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10766     TEST_IN_BUILD=true
10767 else
10768     TEST_IN_BUILD=false
10769 fi
10770 
10771 
10772 ###############################################################################
10773 #
10774 # Choose cacerts source file
10775 #
10776 
10777 # Check whether --with-cacerts-file was given.
10778 if test "${with_cacerts_file+set}" = set; then :
10779   withval=$with_cacerts_file;
10780 fi
10781 
10782 if test "x$with_cacerts_file" != x; then
10783     CACERTS_FILE=$with_cacerts_file
10784 else
10785     if test "x$OPENJDK" = "xtrue"; then
10786         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10787     else
10788         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10789     fi
10790 fi
10791 
10792 
10793 ###############################################################################
10794 #
10795 # Enable or disable unlimited crypto
10796 #
10797 # Check whether --enable-unlimited-crypto was given.
10798 if test "${enable_unlimited_crypto+set}" = set; then :
10799   enableval=$enable_unlimited_crypto;
10800 else
10801   enable_unlimited_crypto=no
10802 fi
10803 
10804 if test "x$enable_unlimited_crypto" = "xyes"; then
10805     UNLIMITED_CRYPTO=true
10806 else
10807     UNLIMITED_CRYPTO=false
10808 fi
10809 
10810 
10811 ###############################################################################
10812 #
10813 # Enable or disable the elliptic curve crypto implementation
10814 #
10815 
10816 
10817 ###############################################################################
10818 #
10819 # Compress jars
10820 #
10821 COMPRESS_JARS=false
10822 
10823 
10824 
10825 
10826 # Source the version numbers
10827 . $AUTOCONF_DIR/version-numbers
10828 
10829 # Get the settings from parameters
10830 
10831 # Check whether --with-milestone was given.
10832 if test "${with_milestone+set}" = set; then :
10833   withval=$with_milestone;
10834 fi
10835 
10836 if test "x$with_milestone" = xyes; then
10837   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10838 elif test "x$with_milestone" != x; then
10839     MILESTONE="$with_milestone"
10840 fi
10841 if test "x$MILESTONE" = x; then
10842   MILESTONE=internal
10843 fi
10844 
10845 
10846 # Check whether --with-update-version was given.
10847 if test "${with_update_version+set}" = set; then :
10848   withval=$with_update_version;
10849 fi
10850 
10851 if test "x$with_update_version" = xyes; then
10852   as_fn_error $? "Update version must have a value" "$LINENO" 5
10853 elif test "x$with_update_version" != x; then
10854   JDK_UPDATE_VERSION="$with_update_version"
10855 fi
10856 
10857 
10858 # Check whether --with-build-number was given.
10859 if test "${with_build_number+set}" = set; then :
10860   withval=$with_build_number;
10861 fi
10862 
10863 if test "x$with_build_number" = xyes; then
10864   as_fn_error $? "Build number must have a value" "$LINENO" 5
10865 elif test "x$with_build_number" != x; then
10866   JDK_BUILD_NUMBER="$with_build_number"
10867 fi
10868 if test "x$JDK_BUILD_NUMBER" = x; then
10869   JDK_BUILD_NUMBER=b00
10870 fi
10871 
10872 
10873 # Check whether --with-user-release-suffix was given.
10874 if test "${with_user_release_suffix+set}" = set; then :
10875   withval=$with_user_release_suffix;
10876 fi
10877 
10878 if test "x$with_user_release_suffix" = xyes; then
10879   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10880 elif test "x$with_user_release_suffix" != x; then
10881   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10882 else
10883   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10884   # Avoid [:alnum:] since it depends on the locale.
10885   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10886   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10887 fi
10888 
10889 
10890 # Now set the JDK version, milestone, build number etc.
10891 
10892 
10893 
10894 
10895 
10896 
10897 
10898 
10899 
10900 
10901 
10902 
10903 
10904 
10905 COPYRIGHT_YEAR=`date +'%Y'`
10906 
10907 
10908 if test "x$JDK_UPDATE_VERSION" != x; then
10909   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10910 else
10911   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10912 fi
10913 
10914 
10915 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10916 
10917 
10918 
10919 ###############################################################################
10920 #
10921 # Setup BootJDK, used to bootstrap the build.
10922 #
10923 ###############################################################################
10924 
10925 
10926 BOOT_JDK_FOUND=no
10927 
10928 # Check whether --with-boot-jdk was given.
10929 if test "${with_boot_jdk+set}" = set; then :
10930   withval=$with_boot_jdk;
10931 fi
10932 
10933 
10934 # We look for the Boot JDK through various means, going from more certain to
10935 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10936 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10937 # must check if this is indeed valid; otherwise we'll continue looking.
10938 
10939 # Test: Is bootjdk explicitely set by command line arguments?
10940 
10941   if test "x$BOOT_JDK_FOUND" = xno; then
10942     # Now execute the test
10943 
10944 if test "x$with_boot_jdk" != x; then
10945     BOOT_JDK=$with_boot_jdk
10946     BOOT_JDK_FOUND=maybe
10947     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10948 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10949 fi
10950 
10951 
10952     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10953     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10954       # Do we have a bin/java?
10955       if test ! -x "$BOOT_JDK/bin/java"; then
10956         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10957 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10958         BOOT_JDK_FOUND=no
10959       else
10960         # Do we have a bin/javac?
10961         if test ! -x "$BOOT_JDK/bin/javac"; then
10962           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10964           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10965 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10966           BOOT_JDK_FOUND=no
10967         else
10968           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10969           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10970             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10972             BOOT_JDK_FOUND=no
10973           else
10974             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10975             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10976 
10977             # Extra M4 quote needed to protect [] in grep expression.
10978             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10979             if test "x$FOUND_VERSION_78" = x; then
10980               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10982               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10983 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10984               BOOT_JDK_FOUND=no
10985             else
10986               # We're done! :-)
10987               BOOT_JDK_FOUND=yes
10988 
10989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10990 
10991   # Input might be given as Windows format, start by converting to
10992   # unix format.
10993   path="$BOOT_JDK"
10994   new_path=`$CYGPATH -u "$path"`
10995 
10996   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10997   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10998   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10999   # "foo.exe" is OK but "foo" is an error.
11000   #
11001   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11002   # It is also a way to make sure we got the proper file name for the real test later on.
11003   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11004   if test "x$test_shortpath" = x; then
11005     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11006 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11007     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11008   fi
11009 
11010   # Call helper function which possibly converts this using DOS-style short mode.
11011   # If so, the updated path is stored in $new_path.
11012 
11013   input_path="$new_path"
11014   # Check if we need to convert this using DOS-style short mode. If the path
11015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11016   # take no chances and rewrite it.
11017   # Note: m4 eats our [], so we need to use [ and ] instead.
11018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11019   if test "x$has_forbidden_chars" != x; then
11020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11021     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11022     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11023     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11024       # Going to short mode and back again did indeed matter. Since short mode is
11025       # case insensitive, let's make it lowercase to improve readability.
11026       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11027       # Now convert it back to Unix-stile (cygpath)
11028       input_path=`$CYGPATH -u "$shortmode_path"`
11029       new_path="$input_path"
11030     fi
11031   fi
11032 
11033   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11034   if test "x$test_cygdrive_prefix" = x; then
11035     # As a simple fix, exclude /usr/bin since it's not a real path.
11036     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11037       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11038       # a path prefixed by /cygdrive for fixpath to work.
11039       new_path="$CYGWIN_ROOT_PATH$input_path"
11040     fi
11041   fi
11042 
11043 
11044   if test "x$path" != "x$new_path"; then
11045     BOOT_JDK="$new_path"
11046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11048   fi
11049 
11050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11051 
11052   path="$BOOT_JDK"
11053   has_colon=`$ECHO $path | $GREP ^.:`
11054   new_path="$path"
11055   if test "x$has_colon" = x; then
11056     # Not in mixed or Windows style, start by that.
11057     new_path=`cmd //c echo $path`
11058   fi
11059 
11060 
11061   input_path="$new_path"
11062   # Check if we need to convert this using DOS-style short mode. If the path
11063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11064   # take no chances and rewrite it.
11065   # Note: m4 eats our [], so we need to use [ and ] instead.
11066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11067   if test "x$has_forbidden_chars" != x; then
11068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11070   fi
11071 
11072 
11073   windows_path="$new_path"
11074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11075     unix_path=`$CYGPATH -u "$windows_path"`
11076     new_path="$unix_path"
11077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11079     new_path="$unix_path"
11080   fi
11081 
11082   if test "x$path" != "x$new_path"; then
11083     BOOT_JDK="$new_path"
11084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11085 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11086   fi
11087 
11088   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11089   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11090 
11091   else
11092     # We're on a posix platform. Hooray! :)
11093     path="$BOOT_JDK"
11094     has_space=`$ECHO "$path" | $GREP " "`
11095     if test "x$has_space" != x; then
11096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11098       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11099     fi
11100 
11101     # Use eval to expand a potential ~
11102     eval path="$path"
11103     if test ! -f "$path" && test ! -d "$path"; then
11104       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11105     fi
11106 
11107     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11108   fi
11109 
11110               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11111 $as_echo_n "checking for Boot JDK... " >&6; }
11112               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11113 $as_echo "$BOOT_JDK" >&6; }
11114               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11115 $as_echo_n "checking Boot JDK version... " >&6; }
11116               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11117               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11118 $as_echo "$BOOT_JDK_VERSION" >&6; }
11119             fi # end check jdk version
11120           fi # end check rt.jar
11121         fi # end check javac
11122       fi # end check java
11123     fi # end check boot jdk found
11124   fi
11125 
11126 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11127   # Having specified an argument which is incorrect will produce an instant failure;
11128   # we should not go on looking
11129   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11130 fi
11131 
11132 # Test: Is bootjdk available from builddeps?
11133 
11134   if test "x$BOOT_JDK_FOUND" = xno; then
11135     # Now execute the test
11136 
11137 
11138 
11139     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11140         # Source the builddeps file again, to make sure it uses the latest variables!
11141         . $builddepsfile
11142         # Look for a target and build machine specific resource!
11143         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11144         if test "x$resource" = x; then
11145             # Ok, lets instead look for a target specific resource
11146             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11147         fi
11148         if test "x$resource" = x; then
11149             # Ok, lets instead look for a build specific resource
11150             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11151         fi
11152         if test "x$resource" = x; then
11153             # Ok, lets instead look for a generic resource
11154             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11155             resource=${builddep_bootjdk}
11156         fi
11157         if test "x$resource" != x; then
11158             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11159 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11160             # If the resource in the builddeps.conf file is an existing directory,
11161             # for example /java/linux/cups
11162             if test -d ${resource}; then
11163                depdir=${resource}
11164             else
11165 
11166 # bootjdk is for example mymodule
11167 # $resource is for example libs/general/libmymod_1_2_3.zip
11168 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11169 # $with_builddeps_dir is for example /localhome/builddeps
11170 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11171 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11172 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11173     filename=`basename $resource`
11174     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11175     filebase=${filename%%.*}
11176     extension=${filename#*.}
11177     installdir=$with_builddeps_dir/$filebase
11178     if test ! -f $installdir/$filename.unpacked; then
11179         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11180 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11181         if test ! -d $installdir; then
11182             mkdir -p $installdir
11183         fi
11184         if test ! -d $installdir; then
11185             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11186         fi
11187         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11188         touch $tmpfile
11189         if test ! -f $tmpfile; then
11190             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11191         fi
11192 
11193     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11194     # $tmpfile is the local file name for the downloaded file.
11195     VALID_TOOL=no
11196     if test "x$BDEPS_FTP" = xwget; then
11197        VALID_TOOL=yes
11198        wget -O $tmpfile $with_builddeps_server/$resource
11199     fi
11200     if test "x$BDEPS_FTP" = xlftp; then
11201        VALID_TOOL=yes
11202        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11203     fi
11204     if test "x$BDEPS_FTP" = xftp; then
11205         VALID_TOOL=yes
11206         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11207         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11208         FTPUSERPWD=${FTPSERVER%%@*}
11209         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11210             FTPUSER=${userpwd%%:*}
11211             FTPPWD=${userpwd#*@}
11212             FTPSERVER=${FTPSERVER#*@}
11213         else
11214             FTPUSER=ftp
11215             FTPPWD=ftp
11216         fi
11217         # the "pass" command does not work on some
11218         # ftp clients (read ftp.exe) but if it works,
11219         # passive mode is better!
11220         (\
11221             echo "user $FTPUSER $FTPPWD"        ;\
11222             echo "pass"                         ;\
11223             echo "bin"                          ;\
11224             echo "get $FTPPATH $tmpfile"              ;\
11225         ) | ftp -in $FTPSERVER
11226     fi
11227     if test "x$VALID_TOOL" != xyes; then
11228        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11229     fi
11230 
11231         mv $tmpfile $installdir/$filename
11232         if test ! -s $installdir/$filename; then
11233             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11234         fi
11235         case "$extension" in
11236             zip)  echo "Unzipping $installdir/$filename..."
11237                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11238             ;;
11239             tar.gz) echo "Untaring $installdir/$filename..."
11240                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11241             ;;
11242             tgz) echo "Untaring $installdir/$filename..."
11243                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11244             ;;
11245             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11246             ;;
11247         esac
11248     fi
11249     if test -f $installdir/$filename.unpacked; then
11250         depdir=$installdir
11251     fi
11252 
11253             fi
11254             # Source the builddeps file again, because in the previous command, the depdir
11255             # was updated to point at the current build dependency install directory.
11256             . $builddepsfile
11257             # Now extract variables from the builddeps.conf files.
11258             theroot=${builddep_bootjdk_ROOT}
11259             thecflags=${builddep_bootjdk_CFLAGS}
11260             thelibs=${builddep_bootjdk_LIBS}
11261             if test "x$depdir" = x; then
11262                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11263             fi
11264             BOOT_JDK=$depdir
11265             if test "x$theroot" != x; then
11266                BOOT_JDK="$theroot"
11267             fi
11268             if test "x$thecflags" != x; then
11269                BOOT_JDK_CFLAGS="$thecflags"
11270             fi
11271             if test "x$thelibs" != x; then
11272                BOOT_JDK_LIBS="$thelibs"
11273             fi
11274             BOOT_JDK_FOUND=maybe
11275             else BOOT_JDK_FOUND=no
11276 
11277         fi
11278         else BOOT_JDK_FOUND=no
11279 
11280     fi
11281 
11282 
11283 
11284     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11285     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11286       # Do we have a bin/java?
11287       if test ! -x "$BOOT_JDK/bin/java"; then
11288         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11289 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11290         BOOT_JDK_FOUND=no
11291       else
11292         # Do we have a bin/javac?
11293         if test ! -x "$BOOT_JDK/bin/javac"; then
11294           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11296           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11297 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11298           BOOT_JDK_FOUND=no
11299         else
11300           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11301           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11302             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11303 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11304             BOOT_JDK_FOUND=no
11305           else
11306             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11307             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11308 
11309             # Extra M4 quote needed to protect [] in grep expression.
11310             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11311             if test "x$FOUND_VERSION_78" = x; then
11312               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11314               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11315 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11316               BOOT_JDK_FOUND=no
11317             else
11318               # We're done! :-)
11319               BOOT_JDK_FOUND=yes
11320 
11321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11322 
11323   # Input might be given as Windows format, start by converting to
11324   # unix format.
11325   path="$BOOT_JDK"
11326   new_path=`$CYGPATH -u "$path"`
11327 
11328   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11329   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11330   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11331   # "foo.exe" is OK but "foo" is an error.
11332   #
11333   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11334   # It is also a way to make sure we got the proper file name for the real test later on.
11335   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11336   if test "x$test_shortpath" = x; then
11337     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11338 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11339     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11340   fi
11341 
11342   # Call helper function which possibly converts this using DOS-style short mode.
11343   # If so, the updated path is stored in $new_path.
11344 
11345   input_path="$new_path"
11346   # Check if we need to convert this using DOS-style short mode. If the path
11347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11348   # take no chances and rewrite it.
11349   # Note: m4 eats our [], so we need to use [ and ] instead.
11350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11351   if test "x$has_forbidden_chars" != x; then
11352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11353     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11354     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11355     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11356       # Going to short mode and back again did indeed matter. Since short mode is
11357       # case insensitive, let's make it lowercase to improve readability.
11358       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11359       # Now convert it back to Unix-stile (cygpath)
11360       input_path=`$CYGPATH -u "$shortmode_path"`
11361       new_path="$input_path"
11362     fi
11363   fi
11364 
11365   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11366   if test "x$test_cygdrive_prefix" = x; then
11367     # As a simple fix, exclude /usr/bin since it's not a real path.
11368     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11369       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11370       # a path prefixed by /cygdrive for fixpath to work.
11371       new_path="$CYGWIN_ROOT_PATH$input_path"
11372     fi
11373   fi
11374 
11375 
11376   if test "x$path" != "x$new_path"; then
11377     BOOT_JDK="$new_path"
11378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11380   fi
11381 
11382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11383 
11384   path="$BOOT_JDK"
11385   has_colon=`$ECHO $path | $GREP ^.:`
11386   new_path="$path"
11387   if test "x$has_colon" = x; then
11388     # Not in mixed or Windows style, start by that.
11389     new_path=`cmd //c echo $path`
11390   fi
11391 
11392 
11393   input_path="$new_path"
11394   # Check if we need to convert this using DOS-style short mode. If the path
11395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11396   # take no chances and rewrite it.
11397   # Note: m4 eats our [], so we need to use [ and ] instead.
11398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11399   if test "x$has_forbidden_chars" != x; then
11400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11401     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11402   fi
11403 
11404 
11405   windows_path="$new_path"
11406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11407     unix_path=`$CYGPATH -u "$windows_path"`
11408     new_path="$unix_path"
11409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11411     new_path="$unix_path"
11412   fi
11413 
11414   if test "x$path" != "x$new_path"; then
11415     BOOT_JDK="$new_path"
11416     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11417 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11418   fi
11419 
11420   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11421   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11422 
11423   else
11424     # We're on a posix platform. Hooray! :)
11425     path="$BOOT_JDK"
11426     has_space=`$ECHO "$path" | $GREP " "`
11427     if test "x$has_space" != x; then
11428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11429 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11430       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11431     fi
11432 
11433     # Use eval to expand a potential ~
11434     eval path="$path"
11435     if test ! -f "$path" && test ! -d "$path"; then
11436       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11437     fi
11438 
11439     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11440   fi
11441 
11442               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11443 $as_echo_n "checking for Boot JDK... " >&6; }
11444               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11445 $as_echo "$BOOT_JDK" >&6; }
11446               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11447 $as_echo_n "checking Boot JDK version... " >&6; }
11448               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11449               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11450 $as_echo "$BOOT_JDK_VERSION" >&6; }
11451             fi # end check jdk version
11452           fi # end check rt.jar
11453         fi # end check javac
11454       fi # end check java
11455     fi # end check boot jdk found
11456   fi
11457 
11458 
11459 # Test: Is $JAVA_HOME set?
11460 
11461   if test "x$BOOT_JDK_FOUND" = xno; then
11462     # Now execute the test
11463 
11464     if test "x$JAVA_HOME" != x; then
11465         JAVA_HOME_PROCESSED="$JAVA_HOME"
11466 
11467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11468 
11469   # Input might be given as Windows format, start by converting to
11470   # unix format.
11471   path="$JAVA_HOME_PROCESSED"
11472   new_path=`$CYGPATH -u "$path"`
11473 
11474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11477   # "foo.exe" is OK but "foo" is an error.
11478   #
11479   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11480   # It is also a way to make sure we got the proper file name for the real test later on.
11481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11482   if test "x$test_shortpath" = x; then
11483     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11484 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11485     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11486   fi
11487 
11488   # Call helper function which possibly converts this using DOS-style short mode.
11489   # If so, the updated path is stored in $new_path.
11490 
11491   input_path="$new_path"
11492   # Check if we need to convert this using DOS-style short mode. If the path
11493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11494   # take no chances and rewrite it.
11495   # Note: m4 eats our [], so we need to use [ and ] instead.
11496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11497   if test "x$has_forbidden_chars" != x; then
11498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11502       # Going to short mode and back again did indeed matter. Since short mode is
11503       # case insensitive, let's make it lowercase to improve readability.
11504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11505       # Now convert it back to Unix-stile (cygpath)
11506       input_path=`$CYGPATH -u "$shortmode_path"`
11507       new_path="$input_path"
11508     fi
11509   fi
11510 
11511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11512   if test "x$test_cygdrive_prefix" = x; then
11513     # As a simple fix, exclude /usr/bin since it's not a real path.
11514     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11516       # a path prefixed by /cygdrive for fixpath to work.
11517       new_path="$CYGWIN_ROOT_PATH$input_path"
11518     fi
11519   fi
11520 
11521 
11522   if test "x$path" != "x$new_path"; then
11523     JAVA_HOME_PROCESSED="$new_path"
11524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11525 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11526   fi
11527 
11528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11529 
11530   path="$JAVA_HOME_PROCESSED"
11531   has_colon=`$ECHO $path | $GREP ^.:`
11532   new_path="$path"
11533   if test "x$has_colon" = x; then
11534     # Not in mixed or Windows style, start by that.
11535     new_path=`cmd //c echo $path`
11536   fi
11537 
11538 
11539   input_path="$new_path"
11540   # Check if we need to convert this using DOS-style short mode. If the path
11541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11542   # take no chances and rewrite it.
11543   # Note: m4 eats our [], so we need to use [ and ] instead.
11544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11545   if test "x$has_forbidden_chars" != x; then
11546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11547     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11548   fi
11549 
11550 
11551   windows_path="$new_path"
11552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11553     unix_path=`$CYGPATH -u "$windows_path"`
11554     new_path="$unix_path"
11555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11557     new_path="$unix_path"
11558   fi
11559 
11560   if test "x$path" != "x$new_path"; then
11561     JAVA_HOME_PROCESSED="$new_path"
11562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11563 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11564   fi
11565 
11566   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11567   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11568 
11569   else
11570     # We're on a posix platform. Hooray! :)
11571     path="$JAVA_HOME_PROCESSED"
11572     has_space=`$ECHO "$path" | $GREP " "`
11573     if test "x$has_space" != x; then
11574       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11575 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11576       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11577     fi
11578 
11579     # Use eval to expand a potential ~
11580     eval path="$path"
11581     if test ! -f "$path" && test ! -d "$path"; then
11582       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11583     fi
11584 
11585     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11586   fi
11587 
11588         if test ! -d "$JAVA_HOME_PROCESSED"; then
11589             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11590 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11591         else
11592           # Aha, the user has set a JAVA_HOME
11593           # let us use that as the Boot JDK.
11594           BOOT_JDK="$JAVA_HOME_PROCESSED"
11595           BOOT_JDK_FOUND=maybe
11596           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11597 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11598         fi
11599     fi
11600 
11601 
11602     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11603     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11604       # Do we have a bin/java?
11605       if test ! -x "$BOOT_JDK/bin/java"; then
11606         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11608         BOOT_JDK_FOUND=no
11609       else
11610         # Do we have a bin/javac?
11611         if test ! -x "$BOOT_JDK/bin/javac"; then
11612           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11613 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11614           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11615 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11616           BOOT_JDK_FOUND=no
11617         else
11618           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11619           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11620             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11621 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11622             BOOT_JDK_FOUND=no
11623           else
11624             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11625             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11626 
11627             # Extra M4 quote needed to protect [] in grep expression.
11628             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11629             if test "x$FOUND_VERSION_78" = x; then
11630               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11631 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11632               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11633 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11634               BOOT_JDK_FOUND=no
11635             else
11636               # We're done! :-)
11637               BOOT_JDK_FOUND=yes
11638 
11639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11640 
11641   # Input might be given as Windows format, start by converting to
11642   # unix format.
11643   path="$BOOT_JDK"
11644   new_path=`$CYGPATH -u "$path"`
11645 
11646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11649   # "foo.exe" is OK but "foo" is an error.
11650   #
11651   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11652   # It is also a way to make sure we got the proper file name for the real test later on.
11653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11654   if test "x$test_shortpath" = x; then
11655     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11656 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11657     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11658   fi
11659 
11660   # Call helper function which possibly converts this using DOS-style short mode.
11661   # If so, the updated path is stored in $new_path.
11662 
11663   input_path="$new_path"
11664   # Check if we need to convert this using DOS-style short mode. If the path
11665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11666   # take no chances and rewrite it.
11667   # Note: m4 eats our [], so we need to use [ and ] instead.
11668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11669   if test "x$has_forbidden_chars" != x; then
11670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11671     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11672     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11673     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11674       # Going to short mode and back again did indeed matter. Since short mode is
11675       # case insensitive, let's make it lowercase to improve readability.
11676       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11677       # Now convert it back to Unix-stile (cygpath)
11678       input_path=`$CYGPATH -u "$shortmode_path"`
11679       new_path="$input_path"
11680     fi
11681   fi
11682 
11683   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11684   if test "x$test_cygdrive_prefix" = x; then
11685     # As a simple fix, exclude /usr/bin since it's not a real path.
11686     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11687       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11688       # a path prefixed by /cygdrive for fixpath to work.
11689       new_path="$CYGWIN_ROOT_PATH$input_path"
11690     fi
11691   fi
11692 
11693 
11694   if test "x$path" != "x$new_path"; then
11695     BOOT_JDK="$new_path"
11696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11697 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11698   fi
11699 
11700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11701 
11702   path="$BOOT_JDK"
11703   has_colon=`$ECHO $path | $GREP ^.:`
11704   new_path="$path"
11705   if test "x$has_colon" = x; then
11706     # Not in mixed or Windows style, start by that.
11707     new_path=`cmd //c echo $path`
11708   fi
11709 
11710 
11711   input_path="$new_path"
11712   # Check if we need to convert this using DOS-style short mode. If the path
11713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11714   # take no chances and rewrite it.
11715   # Note: m4 eats our [], so we need to use [ and ] instead.
11716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11717   if test "x$has_forbidden_chars" != x; then
11718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11720   fi
11721 
11722 
11723   windows_path="$new_path"
11724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11725     unix_path=`$CYGPATH -u "$windows_path"`
11726     new_path="$unix_path"
11727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11729     new_path="$unix_path"
11730   fi
11731 
11732   if test "x$path" != "x$new_path"; then
11733     BOOT_JDK="$new_path"
11734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11736   fi
11737 
11738   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11739   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11740 
11741   else
11742     # We're on a posix platform. Hooray! :)
11743     path="$BOOT_JDK"
11744     has_space=`$ECHO "$path" | $GREP " "`
11745     if test "x$has_space" != x; then
11746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11747 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11748       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11749     fi
11750 
11751     # Use eval to expand a potential ~
11752     eval path="$path"
11753     if test ! -f "$path" && test ! -d "$path"; then
11754       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11755     fi
11756 
11757     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11758   fi
11759 
11760               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11761 $as_echo_n "checking for Boot JDK... " >&6; }
11762               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11763 $as_echo "$BOOT_JDK" >&6; }
11764               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11765 $as_echo_n "checking Boot JDK version... " >&6; }
11766               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11767               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11768 $as_echo "$BOOT_JDK_VERSION" >&6; }
11769             fi # end check jdk version
11770           fi # end check rt.jar
11771         fi # end check javac
11772       fi # end check java
11773     fi # end check boot jdk found
11774   fi
11775 
11776 
11777 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11778 
11779   if test "x$BOOT_JDK_FOUND" = xno; then
11780     # Now execute the test
11781 
11782     if test -x /usr/libexec/java_home; then
11783         BOOT_JDK=`/usr/libexec/java_home`
11784         BOOT_JDK_FOUND=maybe
11785         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11786 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11787     fi
11788 
11789 
11790     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11791     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11792       # Do we have a bin/java?
11793       if test ! -x "$BOOT_JDK/bin/java"; then
11794         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11795 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11796         BOOT_JDK_FOUND=no
11797       else
11798         # Do we have a bin/javac?
11799         if test ! -x "$BOOT_JDK/bin/javac"; then
11800           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11802           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11803 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11804           BOOT_JDK_FOUND=no
11805         else
11806           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11807           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11808             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11809 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11810             BOOT_JDK_FOUND=no
11811           else
11812             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11813             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11814 
11815             # Extra M4 quote needed to protect [] in grep expression.
11816             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11817             if test "x$FOUND_VERSION_78" = x; then
11818               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11820               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11821 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11822               BOOT_JDK_FOUND=no
11823             else
11824               # We're done! :-)
11825               BOOT_JDK_FOUND=yes
11826 
11827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11828 
11829   # Input might be given as Windows format, start by converting to
11830   # unix format.
11831   path="$BOOT_JDK"
11832   new_path=`$CYGPATH -u "$path"`
11833 
11834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11837   # "foo.exe" is OK but "foo" is an error.
11838   #
11839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11840   # It is also a way to make sure we got the proper file name for the real test later on.
11841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11842   if test "x$test_shortpath" = x; then
11843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11844 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11845     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11846   fi
11847 
11848   # Call helper function which possibly converts this using DOS-style short mode.
11849   # If so, the updated path is stored in $new_path.
11850 
11851   input_path="$new_path"
11852   # Check if we need to convert this using DOS-style short mode. If the path
11853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11854   # take no chances and rewrite it.
11855   # Note: m4 eats our [], so we need to use [ and ] instead.
11856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11857   if test "x$has_forbidden_chars" != x; then
11858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11862       # Going to short mode and back again did indeed matter. Since short mode is
11863       # case insensitive, let's make it lowercase to improve readability.
11864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11865       # Now convert it back to Unix-stile (cygpath)
11866       input_path=`$CYGPATH -u "$shortmode_path"`
11867       new_path="$input_path"
11868     fi
11869   fi
11870 
11871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11872   if test "x$test_cygdrive_prefix" = x; then
11873     # As a simple fix, exclude /usr/bin since it's not a real path.
11874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11876       # a path prefixed by /cygdrive for fixpath to work.
11877       new_path="$CYGWIN_ROOT_PATH$input_path"
11878     fi
11879   fi
11880 
11881 
11882   if test "x$path" != "x$new_path"; then
11883     BOOT_JDK="$new_path"
11884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11885 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11886   fi
11887 
11888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11889 
11890   path="$BOOT_JDK"
11891   has_colon=`$ECHO $path | $GREP ^.:`
11892   new_path="$path"
11893   if test "x$has_colon" = x; then
11894     # Not in mixed or Windows style, start by that.
11895     new_path=`cmd //c echo $path`
11896   fi
11897 
11898 
11899   input_path="$new_path"
11900   # Check if we need to convert this using DOS-style short mode. If the path
11901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11902   # take no chances and rewrite it.
11903   # Note: m4 eats our [], so we need to use [ and ] instead.
11904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11905   if test "x$has_forbidden_chars" != x; then
11906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11908   fi
11909 
11910 
11911   windows_path="$new_path"
11912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11913     unix_path=`$CYGPATH -u "$windows_path"`
11914     new_path="$unix_path"
11915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11917     new_path="$unix_path"
11918   fi
11919 
11920   if test "x$path" != "x$new_path"; then
11921     BOOT_JDK="$new_path"
11922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11923 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11924   fi
11925 
11926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11928 
11929   else
11930     # We're on a posix platform. Hooray! :)
11931     path="$BOOT_JDK"
11932     has_space=`$ECHO "$path" | $GREP " "`
11933     if test "x$has_space" != x; then
11934       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11935 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11936       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11937     fi
11938 
11939     # Use eval to expand a potential ~
11940     eval path="$path"
11941     if test ! -f "$path" && test ! -d "$path"; then
11942       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11943     fi
11944 
11945     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11946   fi
11947 
11948               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11949 $as_echo_n "checking for Boot JDK... " >&6; }
11950               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11951 $as_echo "$BOOT_JDK" >&6; }
11952               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11953 $as_echo_n "checking Boot JDK version... " >&6; }
11954               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11955               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11956 $as_echo "$BOOT_JDK_VERSION" >&6; }
11957             fi # end check jdk version
11958           fi # end check rt.jar
11959         fi # end check javac
11960       fi # end check java
11961     fi # end check boot jdk found
11962   fi
11963 
11964 
11965 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11966 
11967   if test "x$BOOT_JDK_FOUND" = xno; then
11968     # Now execute the test
11969 
11970     # Extract the first word of "javac", so it can be a program name with args.
11971 set dummy javac; ac_word=$2
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11973 $as_echo_n "checking for $ac_word... " >&6; }
11974 if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11975   $as_echo_n "(cached) " >&6
11976 else
11977   case $JAVAC_CHECK in
11978   [\\/]* | ?:[\\/]*)
11979   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11980   ;;
11981   *)
11982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11983 for as_dir in $PATH
11984 do
11985   IFS=$as_save_IFS
11986   test -z "$as_dir" && as_dir=.
11987     for ac_exec_ext in '' $ac_executable_extensions; do
11988   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11989     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11991     break 2
11992   fi
11993 done
11994   done
11995 IFS=$as_save_IFS
11996 
11997   ;;
11998 esac
11999 fi
12000 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12001 if test -n "$JAVAC_CHECK"; then
12002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12003 $as_echo "$JAVAC_CHECK" >&6; }
12004 else
12005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006 $as_echo "no" >&6; }
12007 fi
12008 
12009 
12010     # Extract the first word of "java", so it can be a program name with args.
12011 set dummy java; ac_word=$2
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013 $as_echo_n "checking for $ac_word... " >&6; }
12014 if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12015   $as_echo_n "(cached) " >&6
12016 else
12017   case $JAVA_CHECK in
12018   [\\/]* | ?:[\\/]*)
12019   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12020   ;;
12021   *)
12022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12023 for as_dir in $PATH
12024 do
12025   IFS=$as_save_IFS
12026   test -z "$as_dir" && as_dir=.
12027     for ac_exec_ext in '' $ac_executable_extensions; do
12028   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12029     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12031     break 2
12032   fi
12033 done
12034   done
12035 IFS=$as_save_IFS
12036 
12037   ;;
12038 esac
12039 fi
12040 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12041 if test -n "$JAVA_CHECK"; then
12042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12043 $as_echo "$JAVA_CHECK" >&6; }
12044 else
12045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046 $as_echo "no" >&6; }
12047 fi
12048 
12049 
12050     BINARY="$JAVAC_CHECK"
12051     if test "x$JAVAC_CHECK" = x; then
12052         BINARY="$JAVA_CHECK"
12053     fi
12054     if test "x$BINARY" != x; then
12055         # So there is a java(c) binary, it might be part of a JDK.
12056         # Lets find the JDK/JRE directory by following symbolic links.
12057         # Linux/GNU systems often have links from /usr/bin/java to
12058         # /etc/alternatives/java to the real JDK binary.
12059 
12060     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12061         # Follow a chain of symbolic links. Use readlink
12062         # where it exists, else fall back to horribly
12063         # complicated shell code.
12064         if test "x$READLINK_TESTED" != yes; then
12065             # On MacOSX there is a readlink tool with a different
12066             # purpose than the GNU readlink tool. Check the found readlink.
12067             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12068             if test "x$ISGNU" = x; then
12069                  # A readlink that we do not know how to use.
12070                  # Are there other non-GNU readlinks out there?
12071                  READLINK_TESTED=yes
12072                  READLINK=
12073             fi
12074         fi
12075 
12076         if test "x$READLINK" != x; then
12077             BINARY=`$READLINK -f $BINARY`
12078         else
12079             # Save the current directory for restoring afterwards
12080             STARTDIR=$PWD
12081             COUNTER=0
12082             sym_link_dir=`$DIRNAME $BINARY`
12083             sym_link_file=`$BASENAME $BINARY`
12084             cd $sym_link_dir
12085             # Use -P flag to resolve symlinks in directories.
12086             cd `$THEPWDCMD -P`
12087             sym_link_dir=`$THEPWDCMD -P`
12088             # Resolve file symlinks
12089             while test $COUNTER -lt 20; do
12090                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12091                 if test "x$ISLINK" == x; then
12092                     # This is not a symbolic link! We are done!
12093                     break
12094                 fi
12095                 # Again resolve directory symlinks since the target of the just found
12096                 # link could be in a different directory
12097                 cd `$DIRNAME $ISLINK`
12098                 sym_link_dir=`$THEPWDCMD -P`
12099                 sym_link_file=`$BASENAME $ISLINK`
12100                 let COUNTER=COUNTER+1
12101             done
12102             cd $STARTDIR
12103             BINARY=$sym_link_dir/$sym_link_file
12104         fi
12105     fi
12106 
12107         BOOT_JDK=`dirname "$BINARY"`
12108         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12109         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12110             # Looks like we found ourselves an JDK
12111             BOOT_JDK_FOUND=maybe
12112             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12113 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12114         fi
12115     fi
12116 
12117 
12118     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12119     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12120       # Do we have a bin/java?
12121       if test ! -x "$BOOT_JDK/bin/java"; then
12122         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12123 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12124         BOOT_JDK_FOUND=no
12125       else
12126         # Do we have a bin/javac?
12127         if test ! -x "$BOOT_JDK/bin/javac"; then
12128           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12130           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12131 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12132           BOOT_JDK_FOUND=no
12133         else
12134           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12135           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12136             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12137 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12138             BOOT_JDK_FOUND=no
12139           else
12140             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12141             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12142 
12143             # Extra M4 quote needed to protect [] in grep expression.
12144             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12145             if test "x$FOUND_VERSION_78" = x; then
12146               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12147 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12148               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12149 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12150               BOOT_JDK_FOUND=no
12151             else
12152               # We're done! :-)
12153               BOOT_JDK_FOUND=yes
12154 
12155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12156 
12157   # Input might be given as Windows format, start by converting to
12158   # unix format.
12159   path="$BOOT_JDK"
12160   new_path=`$CYGPATH -u "$path"`
12161 
12162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12165   # "foo.exe" is OK but "foo" is an error.
12166   #
12167   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12168   # It is also a way to make sure we got the proper file name for the real test later on.
12169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12170   if test "x$test_shortpath" = x; then
12171     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12173     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12174   fi
12175 
12176   # Call helper function which possibly converts this using DOS-style short mode.
12177   # If so, the updated path is stored in $new_path.
12178 
12179   input_path="$new_path"
12180   # Check if we need to convert this using DOS-style short mode. If the path
12181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12182   # take no chances and rewrite it.
12183   # Note: m4 eats our [], so we need to use [ and ] instead.
12184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12185   if test "x$has_forbidden_chars" != x; then
12186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12187     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12188     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12189     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12190       # Going to short mode and back again did indeed matter. Since short mode is
12191       # case insensitive, let's make it lowercase to improve readability.
12192       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12193       # Now convert it back to Unix-stile (cygpath)
12194       input_path=`$CYGPATH -u "$shortmode_path"`
12195       new_path="$input_path"
12196     fi
12197   fi
12198 
12199   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12200   if test "x$test_cygdrive_prefix" = x; then
12201     # As a simple fix, exclude /usr/bin since it's not a real path.
12202     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12203       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12204       # a path prefixed by /cygdrive for fixpath to work.
12205       new_path="$CYGWIN_ROOT_PATH$input_path"
12206     fi
12207   fi
12208 
12209 
12210   if test "x$path" != "x$new_path"; then
12211     BOOT_JDK="$new_path"
12212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12213 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12214   fi
12215 
12216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12217 
12218   path="$BOOT_JDK"
12219   has_colon=`$ECHO $path | $GREP ^.:`
12220   new_path="$path"
12221   if test "x$has_colon" = x; then
12222     # Not in mixed or Windows style, start by that.
12223     new_path=`cmd //c echo $path`
12224   fi
12225 
12226 
12227   input_path="$new_path"
12228   # Check if we need to convert this using DOS-style short mode. If the path
12229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12230   # take no chances and rewrite it.
12231   # Note: m4 eats our [], so we need to use [ and ] instead.
12232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12233   if test "x$has_forbidden_chars" != x; then
12234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12235     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12236   fi
12237 
12238 
12239   windows_path="$new_path"
12240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12241     unix_path=`$CYGPATH -u "$windows_path"`
12242     new_path="$unix_path"
12243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12245     new_path="$unix_path"
12246   fi
12247 
12248   if test "x$path" != "x$new_path"; then
12249     BOOT_JDK="$new_path"
12250     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12251 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12252   fi
12253 
12254   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12255   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12256 
12257   else
12258     # We're on a posix platform. Hooray! :)
12259     path="$BOOT_JDK"
12260     has_space=`$ECHO "$path" | $GREP " "`
12261     if test "x$has_space" != x; then
12262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12263 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12264       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12265     fi
12266 
12267     # Use eval to expand a potential ~
12268     eval path="$path"
12269     if test ! -f "$path" && test ! -d "$path"; then
12270       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12271     fi
12272 
12273     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12274   fi
12275 
12276               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12277 $as_echo_n "checking for Boot JDK... " >&6; }
12278               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12279 $as_echo "$BOOT_JDK" >&6; }
12280               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12281 $as_echo_n "checking Boot JDK version... " >&6; }
12282               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12283               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12284 $as_echo "$BOOT_JDK_VERSION" >&6; }
12285             fi # end check jdk version
12286           fi # end check rt.jar
12287         fi # end check javac
12288       fi # end check java
12289     fi # end check boot jdk found
12290   fi
12291 
12292 
12293 # Test: Is there a JDK installed in default, well-known locations?
12294 
12295   if test "x$BOOT_JDK_FOUND" = xno; then
12296     # Now execute the test
12297 
12298   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12299 
12300   if test "x$BOOT_JDK_FOUND" = xno; then
12301     # Now execute the test
12302 
12303   if test "x$ProgramW6432" != x; then
12304     VIRTUAL_DIR="$ProgramW6432/Java"
12305 
12306   windows_path="$VIRTUAL_DIR"
12307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12308     unix_path=`$CYGPATH -u "$windows_path"`
12309     VIRTUAL_DIR="$unix_path"
12310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12312     VIRTUAL_DIR="$unix_path"
12313   fi
12314 
12315 
12316   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12317   BOOT_JDK_SUFFIX=""
12318   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12319   if test "x$ALL_JDKS_FOUND" != x; then
12320     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12321 
12322   if test "x$BOOT_JDK_FOUND" = xno; then
12323     # Now execute the test
12324 
12325         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12326         if test -d "$BOOT_JDK"; then
12327           BOOT_JDK_FOUND=maybe
12328           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12329 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12330         fi
12331 
12332 
12333     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12334     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12335       # Do we have a bin/java?
12336       if test ! -x "$BOOT_JDK/bin/java"; then
12337         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12338 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12339         BOOT_JDK_FOUND=no
12340       else
12341         # Do we have a bin/javac?
12342         if test ! -x "$BOOT_JDK/bin/javac"; then
12343           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12344 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12345           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12346 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12347           BOOT_JDK_FOUND=no
12348         else
12349           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12350           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12351             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12352 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12353             BOOT_JDK_FOUND=no
12354           else
12355             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12356             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12357 
12358             # Extra M4 quote needed to protect [] in grep expression.
12359             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12360             if test "x$FOUND_VERSION_78" = x; then
12361               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12363               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12364 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12365               BOOT_JDK_FOUND=no
12366             else
12367               # We're done! :-)
12368               BOOT_JDK_FOUND=yes
12369 
12370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12371 
12372   # Input might be given as Windows format, start by converting to
12373   # unix format.
12374   path="$BOOT_JDK"
12375   new_path=`$CYGPATH -u "$path"`
12376 
12377   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12378   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12379   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12380   # "foo.exe" is OK but "foo" is an error.
12381   #
12382   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12383   # It is also a way to make sure we got the proper file name for the real test later on.
12384   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12385   if test "x$test_shortpath" = x; then
12386     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12387 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12388     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12389   fi
12390 
12391   # Call helper function which possibly converts this using DOS-style short mode.
12392   # If so, the updated path is stored in $new_path.
12393 
12394   input_path="$new_path"
12395   # Check if we need to convert this using DOS-style short mode. If the path
12396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12397   # take no chances and rewrite it.
12398   # Note: m4 eats our [], so we need to use [ and ] instead.
12399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12400   if test "x$has_forbidden_chars" != x; then
12401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12402     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12403     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12404     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12405       # Going to short mode and back again did indeed matter. Since short mode is
12406       # case insensitive, let's make it lowercase to improve readability.
12407       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12408       # Now convert it back to Unix-stile (cygpath)
12409       input_path=`$CYGPATH -u "$shortmode_path"`
12410       new_path="$input_path"
12411     fi
12412   fi
12413 
12414   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12415   if test "x$test_cygdrive_prefix" = x; then
12416     # As a simple fix, exclude /usr/bin since it's not a real path.
12417     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12418       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12419       # a path prefixed by /cygdrive for fixpath to work.
12420       new_path="$CYGWIN_ROOT_PATH$input_path"
12421     fi
12422   fi
12423 
12424 
12425   if test "x$path" != "x$new_path"; then
12426     BOOT_JDK="$new_path"
12427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12428 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12429   fi
12430 
12431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12432 
12433   path="$BOOT_JDK"
12434   has_colon=`$ECHO $path | $GREP ^.:`
12435   new_path="$path"
12436   if test "x$has_colon" = x; then
12437     # Not in mixed or Windows style, start by that.
12438     new_path=`cmd //c echo $path`
12439   fi
12440 
12441 
12442   input_path="$new_path"
12443   # Check if we need to convert this using DOS-style short mode. If the path
12444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12445   # take no chances and rewrite it.
12446   # Note: m4 eats our [], so we need to use [ and ] instead.
12447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12448   if test "x$has_forbidden_chars" != x; then
12449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12450     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12451   fi
12452 
12453 
12454   windows_path="$new_path"
12455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12456     unix_path=`$CYGPATH -u "$windows_path"`
12457     new_path="$unix_path"
12458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12459     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12460     new_path="$unix_path"
12461   fi
12462 
12463   if test "x$path" != "x$new_path"; then
12464     BOOT_JDK="$new_path"
12465     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12466 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12467   fi
12468 
12469   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12470   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12471 
12472   else
12473     # We're on a posix platform. Hooray! :)
12474     path="$BOOT_JDK"
12475     has_space=`$ECHO "$path" | $GREP " "`
12476     if test "x$has_space" != x; then
12477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12478 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12479       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12480     fi
12481 
12482     # Use eval to expand a potential ~
12483     eval path="$path"
12484     if test ! -f "$path" && test ! -d "$path"; then
12485       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12486     fi
12487 
12488     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12489   fi
12490 
12491               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12492 $as_echo_n "checking for Boot JDK... " >&6; }
12493               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12494 $as_echo "$BOOT_JDK" >&6; }
12495               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12496 $as_echo_n "checking Boot JDK version... " >&6; }
12497               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12498               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12499 $as_echo "$BOOT_JDK_VERSION" >&6; }
12500             fi # end check jdk version
12501           fi # end check rt.jar
12502         fi # end check javac
12503       fi # end check java
12504     fi # end check boot jdk found
12505   fi
12506 
12507     done
12508   fi
12509 
12510   fi
12511 
12512 
12513     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12514     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12515       # Do we have a bin/java?
12516       if test ! -x "$BOOT_JDK/bin/java"; then
12517         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12518 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12519         BOOT_JDK_FOUND=no
12520       else
12521         # Do we have a bin/javac?
12522         if test ! -x "$BOOT_JDK/bin/javac"; then
12523           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12524 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12525           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12526 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12527           BOOT_JDK_FOUND=no
12528         else
12529           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12530           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12531             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12532 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12533             BOOT_JDK_FOUND=no
12534           else
12535             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12536             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12537 
12538             # Extra M4 quote needed to protect [] in grep expression.
12539             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12540             if test "x$FOUND_VERSION_78" = x; then
12541               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12543               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12544 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12545               BOOT_JDK_FOUND=no
12546             else
12547               # We're done! :-)
12548               BOOT_JDK_FOUND=yes
12549 
12550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12551 
12552   # Input might be given as Windows format, start by converting to
12553   # unix format.
12554   path="$BOOT_JDK"
12555   new_path=`$CYGPATH -u "$path"`
12556 
12557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12560   # "foo.exe" is OK but "foo" is an error.
12561   #
12562   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12563   # It is also a way to make sure we got the proper file name for the real test later on.
12564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12565   if test "x$test_shortpath" = x; then
12566     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12567 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12568     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12569   fi
12570 
12571   # Call helper function which possibly converts this using DOS-style short mode.
12572   # If so, the updated path is stored in $new_path.
12573 
12574   input_path="$new_path"
12575   # Check if we need to convert this using DOS-style short mode. If the path
12576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12577   # take no chances and rewrite it.
12578   # Note: m4 eats our [], so we need to use [ and ] instead.
12579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12580   if test "x$has_forbidden_chars" != x; then
12581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12585       # Going to short mode and back again did indeed matter. Since short mode is
12586       # case insensitive, let's make it lowercase to improve readability.
12587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12588       # Now convert it back to Unix-stile (cygpath)
12589       input_path=`$CYGPATH -u "$shortmode_path"`
12590       new_path="$input_path"
12591     fi
12592   fi
12593 
12594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12595   if test "x$test_cygdrive_prefix" = x; then
12596     # As a simple fix, exclude /usr/bin since it's not a real path.
12597     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12599       # a path prefixed by /cygdrive for fixpath to work.
12600       new_path="$CYGWIN_ROOT_PATH$input_path"
12601     fi
12602   fi
12603 
12604 
12605   if test "x$path" != "x$new_path"; then
12606     BOOT_JDK="$new_path"
12607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12608 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12609   fi
12610 
12611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12612 
12613   path="$BOOT_JDK"
12614   has_colon=`$ECHO $path | $GREP ^.:`
12615   new_path="$path"
12616   if test "x$has_colon" = x; then
12617     # Not in mixed or Windows style, start by that.
12618     new_path=`cmd //c echo $path`
12619   fi
12620 
12621 
12622   input_path="$new_path"
12623   # Check if we need to convert this using DOS-style short mode. If the path
12624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12625   # take no chances and rewrite it.
12626   # Note: m4 eats our [], so we need to use [ and ] instead.
12627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12628   if test "x$has_forbidden_chars" != x; then
12629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12631   fi
12632 
12633 
12634   windows_path="$new_path"
12635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12636     unix_path=`$CYGPATH -u "$windows_path"`
12637     new_path="$unix_path"
12638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12640     new_path="$unix_path"
12641   fi
12642 
12643   if test "x$path" != "x$new_path"; then
12644     BOOT_JDK="$new_path"
12645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12646 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12647   fi
12648 
12649   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12650   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12651 
12652   else
12653     # We're on a posix platform. Hooray! :)
12654     path="$BOOT_JDK"
12655     has_space=`$ECHO "$path" | $GREP " "`
12656     if test "x$has_space" != x; then
12657       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12658 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12659       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12660     fi
12661 
12662     # Use eval to expand a potential ~
12663     eval path="$path"
12664     if test ! -f "$path" && test ! -d "$path"; then
12665       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12666     fi
12667 
12668     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12669   fi
12670 
12671               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12672 $as_echo_n "checking for Boot JDK... " >&6; }
12673               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12674 $as_echo "$BOOT_JDK" >&6; }
12675               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12676 $as_echo_n "checking Boot JDK version... " >&6; }
12677               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12678               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12679 $as_echo "$BOOT_JDK_VERSION" >&6; }
12680             fi # end check jdk version
12681           fi # end check rt.jar
12682         fi # end check javac
12683       fi # end check java
12684     fi # end check boot jdk found
12685   fi
12686 
12687 
12688   if test "x$BOOT_JDK_FOUND" = xno; then
12689     # Now execute the test
12690 
12691   if test "x$PROGRAMW6432" != x; then
12692     VIRTUAL_DIR="$PROGRAMW6432/Java"
12693 
12694   windows_path="$VIRTUAL_DIR"
12695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12696     unix_path=`$CYGPATH -u "$windows_path"`
12697     VIRTUAL_DIR="$unix_path"
12698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12700     VIRTUAL_DIR="$unix_path"
12701   fi
12702 
12703 
12704   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12705   BOOT_JDK_SUFFIX=""
12706   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12707   if test "x$ALL_JDKS_FOUND" != x; then
12708     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12709 
12710   if test "x$BOOT_JDK_FOUND" = xno; then
12711     # Now execute the test
12712 
12713         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12714         if test -d "$BOOT_JDK"; then
12715           BOOT_JDK_FOUND=maybe
12716           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12717 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12718         fi
12719 
12720 
12721     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12722     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12723       # Do we have a bin/java?
12724       if test ! -x "$BOOT_JDK/bin/java"; then
12725         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12727         BOOT_JDK_FOUND=no
12728       else
12729         # Do we have a bin/javac?
12730         if test ! -x "$BOOT_JDK/bin/javac"; then
12731           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12733           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12734 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12735           BOOT_JDK_FOUND=no
12736         else
12737           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12738           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12739             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12740 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12741             BOOT_JDK_FOUND=no
12742           else
12743             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12744             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12745 
12746             # Extra M4 quote needed to protect [] in grep expression.
12747             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12748             if test "x$FOUND_VERSION_78" = x; then
12749               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12750 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12751               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12752 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12753               BOOT_JDK_FOUND=no
12754             else
12755               # We're done! :-)
12756               BOOT_JDK_FOUND=yes
12757 
12758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12759 
12760   # Input might be given as Windows format, start by converting to
12761   # unix format.
12762   path="$BOOT_JDK"
12763   new_path=`$CYGPATH -u "$path"`
12764 
12765   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12766   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12767   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12768   # "foo.exe" is OK but "foo" is an error.
12769   #
12770   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12771   # It is also a way to make sure we got the proper file name for the real test later on.
12772   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12773   if test "x$test_shortpath" = x; then
12774     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12775 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12776     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12777   fi
12778 
12779   # Call helper function which possibly converts this using DOS-style short mode.
12780   # If so, the updated path is stored in $new_path.
12781 
12782   input_path="$new_path"
12783   # Check if we need to convert this using DOS-style short mode. If the path
12784   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12785   # take no chances and rewrite it.
12786   # Note: m4 eats our [], so we need to use [ and ] instead.
12787   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12788   if test "x$has_forbidden_chars" != x; then
12789     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12790     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12791     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12792     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12793       # Going to short mode and back again did indeed matter. Since short mode is
12794       # case insensitive, let's make it lowercase to improve readability.
12795       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12796       # Now convert it back to Unix-stile (cygpath)
12797       input_path=`$CYGPATH -u "$shortmode_path"`
12798       new_path="$input_path"
12799     fi
12800   fi
12801 
12802   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12803   if test "x$test_cygdrive_prefix" = x; then
12804     # As a simple fix, exclude /usr/bin since it's not a real path.
12805     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12806       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12807       # a path prefixed by /cygdrive for fixpath to work.
12808       new_path="$CYGWIN_ROOT_PATH$input_path"
12809     fi
12810   fi
12811 
12812 
12813   if test "x$path" != "x$new_path"; then
12814     BOOT_JDK="$new_path"
12815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12816 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12817   fi
12818 
12819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12820 
12821   path="$BOOT_JDK"
12822   has_colon=`$ECHO $path | $GREP ^.:`
12823   new_path="$path"
12824   if test "x$has_colon" = x; then
12825     # Not in mixed or Windows style, start by that.
12826     new_path=`cmd //c echo $path`
12827   fi
12828 
12829 
12830   input_path="$new_path"
12831   # Check if we need to convert this using DOS-style short mode. If the path
12832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12833   # take no chances and rewrite it.
12834   # Note: m4 eats our [], so we need to use [ and ] instead.
12835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12836   if test "x$has_forbidden_chars" != x; then
12837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12838     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12839   fi
12840 
12841 
12842   windows_path="$new_path"
12843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12844     unix_path=`$CYGPATH -u "$windows_path"`
12845     new_path="$unix_path"
12846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12848     new_path="$unix_path"
12849   fi
12850 
12851   if test "x$path" != "x$new_path"; then
12852     BOOT_JDK="$new_path"
12853     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12854 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12855   fi
12856 
12857   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12858   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12859 
12860   else
12861     # We're on a posix platform. Hooray! :)
12862     path="$BOOT_JDK"
12863     has_space=`$ECHO "$path" | $GREP " "`
12864     if test "x$has_space" != x; then
12865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12866 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12867       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12868     fi
12869 
12870     # Use eval to expand a potential ~
12871     eval path="$path"
12872     if test ! -f "$path" && test ! -d "$path"; then
12873       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12874     fi
12875 
12876     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12877   fi
12878 
12879               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12880 $as_echo_n "checking for Boot JDK... " >&6; }
12881               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12882 $as_echo "$BOOT_JDK" >&6; }
12883               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12884 $as_echo_n "checking Boot JDK version... " >&6; }
12885               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12886               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12887 $as_echo "$BOOT_JDK_VERSION" >&6; }
12888             fi # end check jdk version
12889           fi # end check rt.jar
12890         fi # end check javac
12891       fi # end check java
12892     fi # end check boot jdk found
12893   fi
12894 
12895     done
12896   fi
12897 
12898   fi
12899 
12900 
12901     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12902     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12903       # Do we have a bin/java?
12904       if test ! -x "$BOOT_JDK/bin/java"; then
12905         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12906 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12907         BOOT_JDK_FOUND=no
12908       else
12909         # Do we have a bin/javac?
12910         if test ! -x "$BOOT_JDK/bin/javac"; then
12911           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12912 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12913           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12914 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12915           BOOT_JDK_FOUND=no
12916         else
12917           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12918           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12919             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12920 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12921             BOOT_JDK_FOUND=no
12922           else
12923             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12924             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12925 
12926             # Extra M4 quote needed to protect [] in grep expression.
12927             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12928             if test "x$FOUND_VERSION_78" = x; then
12929               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12930 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12931               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12932 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12933               BOOT_JDK_FOUND=no
12934             else
12935               # We're done! :-)
12936               BOOT_JDK_FOUND=yes
12937 
12938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12939 
12940   # Input might be given as Windows format, start by converting to
12941   # unix format.
12942   path="$BOOT_JDK"
12943   new_path=`$CYGPATH -u "$path"`
12944 
12945   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12946   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12947   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12948   # "foo.exe" is OK but "foo" is an error.
12949   #
12950   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12951   # It is also a way to make sure we got the proper file name for the real test later on.
12952   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12953   if test "x$test_shortpath" = x; then
12954     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12955 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12956     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12957   fi
12958 
12959   # Call helper function which possibly converts this using DOS-style short mode.
12960   # If so, the updated path is stored in $new_path.
12961 
12962   input_path="$new_path"
12963   # Check if we need to convert this using DOS-style short mode. If the path
12964   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12965   # take no chances and rewrite it.
12966   # Note: m4 eats our [], so we need to use [ and ] instead.
12967   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12968   if test "x$has_forbidden_chars" != x; then
12969     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12970     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12971     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12972     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12973       # Going to short mode and back again did indeed matter. Since short mode is
12974       # case insensitive, let's make it lowercase to improve readability.
12975       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12976       # Now convert it back to Unix-stile (cygpath)
12977       input_path=`$CYGPATH -u "$shortmode_path"`
12978       new_path="$input_path"
12979     fi
12980   fi
12981 
12982   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12983   if test "x$test_cygdrive_prefix" = x; then
12984     # As a simple fix, exclude /usr/bin since it's not a real path.
12985     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12986       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12987       # a path prefixed by /cygdrive for fixpath to work.
12988       new_path="$CYGWIN_ROOT_PATH$input_path"
12989     fi
12990   fi
12991 
12992 
12993   if test "x$path" != "x$new_path"; then
12994     BOOT_JDK="$new_path"
12995     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12996 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12997   fi
12998 
12999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13000 
13001   path="$BOOT_JDK"
13002   has_colon=`$ECHO $path | $GREP ^.:`
13003   new_path="$path"
13004   if test "x$has_colon" = x; then
13005     # Not in mixed or Windows style, start by that.
13006     new_path=`cmd //c echo $path`
13007   fi
13008 
13009 
13010   input_path="$new_path"
13011   # Check if we need to convert this using DOS-style short mode. If the path
13012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13013   # take no chances and rewrite it.
13014   # Note: m4 eats our [], so we need to use [ and ] instead.
13015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13016   if test "x$has_forbidden_chars" != x; then
13017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13018     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13019   fi
13020 
13021 
13022   windows_path="$new_path"
13023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13024     unix_path=`$CYGPATH -u "$windows_path"`
13025     new_path="$unix_path"
13026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13028     new_path="$unix_path"
13029   fi
13030 
13031   if test "x$path" != "x$new_path"; then
13032     BOOT_JDK="$new_path"
13033     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13034 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13035   fi
13036 
13037   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13038   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13039 
13040   else
13041     # We're on a posix platform. Hooray! :)
13042     path="$BOOT_JDK"
13043     has_space=`$ECHO "$path" | $GREP " "`
13044     if test "x$has_space" != x; then
13045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13046 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13047       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13048     fi
13049 
13050     # Use eval to expand a potential ~
13051     eval path="$path"
13052     if test ! -f "$path" && test ! -d "$path"; then
13053       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13054     fi
13055 
13056     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13057   fi
13058 
13059               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13060 $as_echo_n "checking for Boot JDK... " >&6; }
13061               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13062 $as_echo "$BOOT_JDK" >&6; }
13063               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13064 $as_echo_n "checking Boot JDK version... " >&6; }
13065               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13066               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13067 $as_echo "$BOOT_JDK_VERSION" >&6; }
13068             fi # end check jdk version
13069           fi # end check rt.jar
13070         fi # end check javac
13071       fi # end check java
13072     fi # end check boot jdk found
13073   fi
13074 
13075 
13076   if test "x$BOOT_JDK_FOUND" = xno; then
13077     # Now execute the test
13078 
13079   if test "x$PROGRAMFILES" != x; then
13080     VIRTUAL_DIR="$PROGRAMFILES/Java"
13081 
13082   windows_path="$VIRTUAL_DIR"
13083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13084     unix_path=`$CYGPATH -u "$windows_path"`
13085     VIRTUAL_DIR="$unix_path"
13086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13088     VIRTUAL_DIR="$unix_path"
13089   fi
13090 
13091 
13092   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13093   BOOT_JDK_SUFFIX=""
13094   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13095   if test "x$ALL_JDKS_FOUND" != x; then
13096     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13097 
13098   if test "x$BOOT_JDK_FOUND" = xno; then
13099     # Now execute the test
13100 
13101         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13102         if test -d "$BOOT_JDK"; then
13103           BOOT_JDK_FOUND=maybe
13104           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13105 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13106         fi
13107 
13108 
13109     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13110     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13111       # Do we have a bin/java?
13112       if test ! -x "$BOOT_JDK/bin/java"; then
13113         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13114 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13115         BOOT_JDK_FOUND=no
13116       else
13117         # Do we have a bin/javac?
13118         if test ! -x "$BOOT_JDK/bin/javac"; then
13119           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13120 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13121           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13122 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13123           BOOT_JDK_FOUND=no
13124         else
13125           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13126           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13127             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13128 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13129             BOOT_JDK_FOUND=no
13130           else
13131             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13132             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13133 
13134             # Extra M4 quote needed to protect [] in grep expression.
13135             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13136             if test "x$FOUND_VERSION_78" = x; then
13137               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13138 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13139               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13140 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13141               BOOT_JDK_FOUND=no
13142             else
13143               # We're done! :-)
13144               BOOT_JDK_FOUND=yes
13145 
13146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13147 
13148   # Input might be given as Windows format, start by converting to
13149   # unix format.
13150   path="$BOOT_JDK"
13151   new_path=`$CYGPATH -u "$path"`
13152 
13153   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13154   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13155   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13156   # "foo.exe" is OK but "foo" is an error.
13157   #
13158   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13159   # It is also a way to make sure we got the proper file name for the real test later on.
13160   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13161   if test "x$test_shortpath" = x; then
13162     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13163 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13164     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13165   fi
13166 
13167   # Call helper function which possibly converts this using DOS-style short mode.
13168   # If so, the updated path is stored in $new_path.
13169 
13170   input_path="$new_path"
13171   # Check if we need to convert this using DOS-style short mode. If the path
13172   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13173   # take no chances and rewrite it.
13174   # Note: m4 eats our [], so we need to use [ and ] instead.
13175   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13176   if test "x$has_forbidden_chars" != x; then
13177     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13178     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13179     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13180     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13181       # Going to short mode and back again did indeed matter. Since short mode is
13182       # case insensitive, let's make it lowercase to improve readability.
13183       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13184       # Now convert it back to Unix-stile (cygpath)
13185       input_path=`$CYGPATH -u "$shortmode_path"`
13186       new_path="$input_path"
13187     fi
13188   fi
13189 
13190   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13191   if test "x$test_cygdrive_prefix" = x; then
13192     # As a simple fix, exclude /usr/bin since it's not a real path.
13193     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13194       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13195       # a path prefixed by /cygdrive for fixpath to work.
13196       new_path="$CYGWIN_ROOT_PATH$input_path"
13197     fi
13198   fi
13199 
13200 
13201   if test "x$path" != "x$new_path"; then
13202     BOOT_JDK="$new_path"
13203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13205   fi
13206 
13207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13208 
13209   path="$BOOT_JDK"
13210   has_colon=`$ECHO $path | $GREP ^.:`
13211   new_path="$path"
13212   if test "x$has_colon" = x; then
13213     # Not in mixed or Windows style, start by that.
13214     new_path=`cmd //c echo $path`
13215   fi
13216 
13217 
13218   input_path="$new_path"
13219   # Check if we need to convert this using DOS-style short mode. If the path
13220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13221   # take no chances and rewrite it.
13222   # Note: m4 eats our [], so we need to use [ and ] instead.
13223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13224   if test "x$has_forbidden_chars" != x; then
13225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13226     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13227   fi
13228 
13229 
13230   windows_path="$new_path"
13231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13232     unix_path=`$CYGPATH -u "$windows_path"`
13233     new_path="$unix_path"
13234   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13235     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13236     new_path="$unix_path"
13237   fi
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   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13246   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13247 
13248   else
13249     # We're on a posix platform. Hooray! :)
13250     path="$BOOT_JDK"
13251     has_space=`$ECHO "$path" | $GREP " "`
13252     if test "x$has_space" != x; then
13253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13254 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13255       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13256     fi
13257 
13258     # Use eval to expand a potential ~
13259     eval path="$path"
13260     if test ! -f "$path" && test ! -d "$path"; then
13261       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13262     fi
13263 
13264     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13265   fi
13266 
13267               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13268 $as_echo_n "checking for Boot JDK... " >&6; }
13269               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13270 $as_echo "$BOOT_JDK" >&6; }
13271               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13272 $as_echo_n "checking Boot JDK version... " >&6; }
13273               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13274               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13275 $as_echo "$BOOT_JDK_VERSION" >&6; }
13276             fi # end check jdk version
13277           fi # end check rt.jar
13278         fi # end check javac
13279       fi # end check java
13280     fi # end check boot jdk found
13281   fi
13282 
13283     done
13284   fi
13285 
13286   fi
13287 
13288 
13289     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13290     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13291       # Do we have a bin/java?
13292       if test ! -x "$BOOT_JDK/bin/java"; then
13293         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13294 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13295         BOOT_JDK_FOUND=no
13296       else
13297         # Do we have a bin/javac?
13298         if test ! -x "$BOOT_JDK/bin/javac"; then
13299           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13300 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13301           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13302 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13303           BOOT_JDK_FOUND=no
13304         else
13305           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13306           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13307             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13308 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13309             BOOT_JDK_FOUND=no
13310           else
13311             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13312             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13313 
13314             # Extra M4 quote needed to protect [] in grep expression.
13315             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13316             if test "x$FOUND_VERSION_78" = x; then
13317               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13318 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13319               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13320 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13321               BOOT_JDK_FOUND=no
13322             else
13323               # We're done! :-)
13324               BOOT_JDK_FOUND=yes
13325 
13326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13327 
13328   # Input might be given as Windows format, start by converting to
13329   # unix format.
13330   path="$BOOT_JDK"
13331   new_path=`$CYGPATH -u "$path"`
13332 
13333   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13334   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13335   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13336   # "foo.exe" is OK but "foo" is an error.
13337   #
13338   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13339   # It is also a way to make sure we got the proper file name for the real test later on.
13340   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13341   if test "x$test_shortpath" = x; then
13342     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13343 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13344     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13345   fi
13346 
13347   # Call helper function which possibly converts this using DOS-style short mode.
13348   # If so, the updated path is stored in $new_path.
13349 
13350   input_path="$new_path"
13351   # Check if we need to convert this using DOS-style short mode. If the path
13352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13353   # take no chances and rewrite it.
13354   # Note: m4 eats our [], so we need to use [ and ] instead.
13355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13356   if test "x$has_forbidden_chars" != x; then
13357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13361       # Going to short mode and back again did indeed matter. Since short mode is
13362       # case insensitive, let's make it lowercase to improve readability.
13363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13364       # Now convert it back to Unix-stile (cygpath)
13365       input_path=`$CYGPATH -u "$shortmode_path"`
13366       new_path="$input_path"
13367     fi
13368   fi
13369 
13370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13371   if test "x$test_cygdrive_prefix" = x; then
13372     # As a simple fix, exclude /usr/bin since it's not a real path.
13373     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13375       # a path prefixed by /cygdrive for fixpath to work.
13376       new_path="$CYGWIN_ROOT_PATH$input_path"
13377     fi
13378   fi
13379 
13380 
13381   if test "x$path" != "x$new_path"; then
13382     BOOT_JDK="$new_path"
13383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13384 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13385   fi
13386 
13387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13388 
13389   path="$BOOT_JDK"
13390   has_colon=`$ECHO $path | $GREP ^.:`
13391   new_path="$path"
13392   if test "x$has_colon" = x; then
13393     # Not in mixed or Windows style, start by that.
13394     new_path=`cmd //c echo $path`
13395   fi
13396 
13397 
13398   input_path="$new_path"
13399   # Check if we need to convert this using DOS-style short mode. If the path
13400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13401   # take no chances and rewrite it.
13402   # Note: m4 eats our [], so we need to use [ and ] instead.
13403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13404   if test "x$has_forbidden_chars" != x; then
13405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13407   fi
13408 
13409 
13410   windows_path="$new_path"
13411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13412     unix_path=`$CYGPATH -u "$windows_path"`
13413     new_path="$unix_path"
13414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13416     new_path="$unix_path"
13417   fi
13418 
13419   if test "x$path" != "x$new_path"; then
13420     BOOT_JDK="$new_path"
13421     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13422 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13423   fi
13424 
13425   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13426   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13427 
13428   else
13429     # We're on a posix platform. Hooray! :)
13430     path="$BOOT_JDK"
13431     has_space=`$ECHO "$path" | $GREP " "`
13432     if test "x$has_space" != x; then
13433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13434 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13435       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13436     fi
13437 
13438     # Use eval to expand a potential ~
13439     eval path="$path"
13440     if test ! -f "$path" && test ! -d "$path"; then
13441       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13442     fi
13443 
13444     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13445   fi
13446 
13447               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13448 $as_echo_n "checking for Boot JDK... " >&6; }
13449               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13450 $as_echo "$BOOT_JDK" >&6; }
13451               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13452 $as_echo_n "checking Boot JDK version... " >&6; }
13453               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13454               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13455 $as_echo "$BOOT_JDK_VERSION" >&6; }
13456             fi # end check jdk version
13457           fi # end check rt.jar
13458         fi # end check javac
13459       fi # end check java
13460     fi # end check boot jdk found
13461   fi
13462 
13463 
13464   if test "x$BOOT_JDK_FOUND" = xno; then
13465     # Now execute the test
13466 
13467   if test "x$ProgramFiles" != x; then
13468     VIRTUAL_DIR="$ProgramFiles/Java"
13469 
13470   windows_path="$VIRTUAL_DIR"
13471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13472     unix_path=`$CYGPATH -u "$windows_path"`
13473     VIRTUAL_DIR="$unix_path"
13474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13476     VIRTUAL_DIR="$unix_path"
13477   fi
13478 
13479 
13480   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13481   BOOT_JDK_SUFFIX=""
13482   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13483   if test "x$ALL_JDKS_FOUND" != x; then
13484     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13485 
13486   if test "x$BOOT_JDK_FOUND" = xno; then
13487     # Now execute the test
13488 
13489         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13490         if test -d "$BOOT_JDK"; then
13491           BOOT_JDK_FOUND=maybe
13492           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13493 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13494         fi
13495 
13496 
13497     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13498     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13499       # Do we have a bin/java?
13500       if test ! -x "$BOOT_JDK/bin/java"; then
13501         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13502 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13503         BOOT_JDK_FOUND=no
13504       else
13505         # Do we have a bin/javac?
13506         if test ! -x "$BOOT_JDK/bin/javac"; then
13507           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13508 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13509           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13510 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13511           BOOT_JDK_FOUND=no
13512         else
13513           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13514           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13515             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13516 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13517             BOOT_JDK_FOUND=no
13518           else
13519             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13520             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13521 
13522             # Extra M4 quote needed to protect [] in grep expression.
13523             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13524             if test "x$FOUND_VERSION_78" = x; then
13525               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13526 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13527               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13528 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13529               BOOT_JDK_FOUND=no
13530             else
13531               # We're done! :-)
13532               BOOT_JDK_FOUND=yes
13533 
13534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13535 
13536   # Input might be given as Windows format, start by converting to
13537   # unix format.
13538   path="$BOOT_JDK"
13539   new_path=`$CYGPATH -u "$path"`
13540 
13541   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13542   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13543   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13544   # "foo.exe" is OK but "foo" is an error.
13545   #
13546   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13547   # It is also a way to make sure we got the proper file name for the real test later on.
13548   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13549   if test "x$test_shortpath" = x; then
13550     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13551 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13552     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13553   fi
13554 
13555   # Call helper function which possibly converts this using DOS-style short mode.
13556   # If so, the updated path is stored in $new_path.
13557 
13558   input_path="$new_path"
13559   # Check if we need to convert this using DOS-style short mode. If the path
13560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13561   # take no chances and rewrite it.
13562   # Note: m4 eats our [], so we need to use [ and ] instead.
13563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13564   if test "x$has_forbidden_chars" != x; then
13565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13569       # Going to short mode and back again did indeed matter. Since short mode is
13570       # case insensitive, let's make it lowercase to improve readability.
13571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13572       # Now convert it back to Unix-stile (cygpath)
13573       input_path=`$CYGPATH -u "$shortmode_path"`
13574       new_path="$input_path"
13575     fi
13576   fi
13577 
13578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13579   if test "x$test_cygdrive_prefix" = x; then
13580     # As a simple fix, exclude /usr/bin since it's not a real path.
13581     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13583       # a path prefixed by /cygdrive for fixpath to work.
13584       new_path="$CYGWIN_ROOT_PATH$input_path"
13585     fi
13586   fi
13587 
13588 
13589   if test "x$path" != "x$new_path"; then
13590     BOOT_JDK="$new_path"
13591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13592 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13593   fi
13594 
13595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13596 
13597   path="$BOOT_JDK"
13598   has_colon=`$ECHO $path | $GREP ^.:`
13599   new_path="$path"
13600   if test "x$has_colon" = x; then
13601     # Not in mixed or Windows style, start by that.
13602     new_path=`cmd //c echo $path`
13603   fi
13604 
13605 
13606   input_path="$new_path"
13607   # Check if we need to convert this using DOS-style short mode. If the path
13608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13609   # take no chances and rewrite it.
13610   # Note: m4 eats our [], so we need to use [ and ] instead.
13611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13612   if test "x$has_forbidden_chars" != x; then
13613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13615   fi
13616 
13617 
13618   windows_path="$new_path"
13619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13620     unix_path=`$CYGPATH -u "$windows_path"`
13621     new_path="$unix_path"
13622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13624     new_path="$unix_path"
13625   fi
13626 
13627   if test "x$path" != "x$new_path"; then
13628     BOOT_JDK="$new_path"
13629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13630 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13631   fi
13632 
13633   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13634   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13635 
13636   else
13637     # We're on a posix platform. Hooray! :)
13638     path="$BOOT_JDK"
13639     has_space=`$ECHO "$path" | $GREP " "`
13640     if test "x$has_space" != x; then
13641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13642 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13643       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13644     fi
13645 
13646     # Use eval to expand a potential ~
13647     eval path="$path"
13648     if test ! -f "$path" && test ! -d "$path"; then
13649       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13650     fi
13651 
13652     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13653   fi
13654 
13655               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13656 $as_echo_n "checking for Boot JDK... " >&6; }
13657               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13658 $as_echo "$BOOT_JDK" >&6; }
13659               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13660 $as_echo_n "checking Boot JDK version... " >&6; }
13661               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13662               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13663 $as_echo "$BOOT_JDK_VERSION" >&6; }
13664             fi # end check jdk version
13665           fi # end check rt.jar
13666         fi # end check javac
13667       fi # end check java
13668     fi # end check boot jdk found
13669   fi
13670 
13671     done
13672   fi
13673 
13674   fi
13675 
13676 
13677     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13678     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13679       # Do we have a bin/java?
13680       if test ! -x "$BOOT_JDK/bin/java"; then
13681         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13682 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13683         BOOT_JDK_FOUND=no
13684       else
13685         # Do we have a bin/javac?
13686         if test ! -x "$BOOT_JDK/bin/javac"; then
13687           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13688 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13689           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13690 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13691           BOOT_JDK_FOUND=no
13692         else
13693           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13694           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13695             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13696 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13697             BOOT_JDK_FOUND=no
13698           else
13699             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13700             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13701 
13702             # Extra M4 quote needed to protect [] in grep expression.
13703             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13704             if test "x$FOUND_VERSION_78" = x; then
13705               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13707               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13708 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13709               BOOT_JDK_FOUND=no
13710             else
13711               # We're done! :-)
13712               BOOT_JDK_FOUND=yes
13713 
13714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13715 
13716   # Input might be given as Windows format, start by converting to
13717   # unix format.
13718   path="$BOOT_JDK"
13719   new_path=`$CYGPATH -u "$path"`
13720 
13721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13724   # "foo.exe" is OK but "foo" is an error.
13725   #
13726   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13727   # It is also a way to make sure we got the proper file name for the real test later on.
13728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13729   if test "x$test_shortpath" = x; then
13730     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13731 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13732     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13733   fi
13734 
13735   # Call helper function which possibly converts this using DOS-style short mode.
13736   # If so, the updated path is stored in $new_path.
13737 
13738   input_path="$new_path"
13739   # Check if we need to convert this using DOS-style short mode. If the path
13740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13741   # take no chances and rewrite it.
13742   # Note: m4 eats our [], so we need to use [ and ] instead.
13743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13744   if test "x$has_forbidden_chars" != x; then
13745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13749       # Going to short mode and back again did indeed matter. Since short mode is
13750       # case insensitive, let's make it lowercase to improve readability.
13751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13752       # Now convert it back to Unix-stile (cygpath)
13753       input_path=`$CYGPATH -u "$shortmode_path"`
13754       new_path="$input_path"
13755     fi
13756   fi
13757 
13758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13759   if test "x$test_cygdrive_prefix" = x; then
13760     # As a simple fix, exclude /usr/bin since it's not a real path.
13761     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13763       # a path prefixed by /cygdrive for fixpath to work.
13764       new_path="$CYGWIN_ROOT_PATH$input_path"
13765     fi
13766   fi
13767 
13768 
13769   if test "x$path" != "x$new_path"; then
13770     BOOT_JDK="$new_path"
13771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13772 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13773   fi
13774 
13775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13776 
13777   path="$BOOT_JDK"
13778   has_colon=`$ECHO $path | $GREP ^.:`
13779   new_path="$path"
13780   if test "x$has_colon" = x; then
13781     # Not in mixed or Windows style, start by that.
13782     new_path=`cmd //c echo $path`
13783   fi
13784 
13785 
13786   input_path="$new_path"
13787   # Check if we need to convert this using DOS-style short mode. If the path
13788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13789   # take no chances and rewrite it.
13790   # Note: m4 eats our [], so we need to use [ and ] instead.
13791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13792   if test "x$has_forbidden_chars" != x; then
13793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13794     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13795   fi
13796 
13797 
13798   windows_path="$new_path"
13799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13800     unix_path=`$CYGPATH -u "$windows_path"`
13801     new_path="$unix_path"
13802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13804     new_path="$unix_path"
13805   fi
13806 
13807   if test "x$path" != "x$new_path"; then
13808     BOOT_JDK="$new_path"
13809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13810 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13811   fi
13812 
13813   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13814   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13815 
13816   else
13817     # We're on a posix platform. Hooray! :)
13818     path="$BOOT_JDK"
13819     has_space=`$ECHO "$path" | $GREP " "`
13820     if test "x$has_space" != x; then
13821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13822 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13823       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13824     fi
13825 
13826     # Use eval to expand a potential ~
13827     eval path="$path"
13828     if test ! -f "$path" && test ! -d "$path"; then
13829       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13830     fi
13831 
13832     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13833   fi
13834 
13835               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13836 $as_echo_n "checking for Boot JDK... " >&6; }
13837               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13838 $as_echo "$BOOT_JDK" >&6; }
13839               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13840 $as_echo_n "checking Boot JDK version... " >&6; }
13841               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13842               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13843 $as_echo "$BOOT_JDK_VERSION" >&6; }
13844             fi # end check jdk version
13845           fi # end check rt.jar
13846         fi # end check javac
13847       fi # end check java
13848     fi # end check boot jdk found
13849   fi
13850 
13851 
13852   if test "x$BOOT_JDK_FOUND" = xno; then
13853     # Now execute the test
13854 
13855   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13856   BOOT_JDK_SUFFIX=""
13857   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13858   if test "x$ALL_JDKS_FOUND" != x; then
13859     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13860 
13861   if test "x$BOOT_JDK_FOUND" = xno; then
13862     # Now execute the test
13863 
13864         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13865         if test -d "$BOOT_JDK"; then
13866           BOOT_JDK_FOUND=maybe
13867           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13868 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13869         fi
13870 
13871 
13872     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13873     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13874       # Do we have a bin/java?
13875       if test ! -x "$BOOT_JDK/bin/java"; then
13876         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13878         BOOT_JDK_FOUND=no
13879       else
13880         # Do we have a bin/javac?
13881         if test ! -x "$BOOT_JDK/bin/javac"; then
13882           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13883 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13884           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13885 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13886           BOOT_JDK_FOUND=no
13887         else
13888           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13889           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13890             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13892             BOOT_JDK_FOUND=no
13893           else
13894             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13895             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13896 
13897             # Extra M4 quote needed to protect [] in grep expression.
13898             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13899             if test "x$FOUND_VERSION_78" = x; then
13900               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13901 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13902               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13903 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13904               BOOT_JDK_FOUND=no
13905             else
13906               # We're done! :-)
13907               BOOT_JDK_FOUND=yes
13908 
13909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910 
13911   # Input might be given as Windows format, start by converting to
13912   # unix format.
13913   path="$BOOT_JDK"
13914   new_path=`$CYGPATH -u "$path"`
13915 
13916   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13917   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13918   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13919   # "foo.exe" is OK but "foo" is an error.
13920   #
13921   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13922   # It is also a way to make sure we got the proper file name for the real test later on.
13923   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13924   if test "x$test_shortpath" = x; then
13925     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13926 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13927     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13928   fi
13929 
13930   # Call helper function which possibly converts this using DOS-style short mode.
13931   # If so, the updated path is stored in $new_path.
13932 
13933   input_path="$new_path"
13934   # Check if we need to convert this using DOS-style short mode. If the path
13935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13936   # take no chances and rewrite it.
13937   # Note: m4 eats our [], so we need to use [ and ] instead.
13938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13939   if test "x$has_forbidden_chars" != x; then
13940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13944       # Going to short mode and back again did indeed matter. Since short mode is
13945       # case insensitive, let's make it lowercase to improve readability.
13946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13947       # Now convert it back to Unix-stile (cygpath)
13948       input_path=`$CYGPATH -u "$shortmode_path"`
13949       new_path="$input_path"
13950     fi
13951   fi
13952 
13953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13954   if test "x$test_cygdrive_prefix" = x; then
13955     # As a simple fix, exclude /usr/bin since it's not a real path.
13956     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13958       # a path prefixed by /cygdrive for fixpath to work.
13959       new_path="$CYGWIN_ROOT_PATH$input_path"
13960     fi
13961   fi
13962 
13963 
13964   if test "x$path" != "x$new_path"; then
13965     BOOT_JDK="$new_path"
13966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13967 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13968   fi
13969 
13970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13971 
13972   path="$BOOT_JDK"
13973   has_colon=`$ECHO $path | $GREP ^.:`
13974   new_path="$path"
13975   if test "x$has_colon" = x; then
13976     # Not in mixed or Windows style, start by that.
13977     new_path=`cmd //c echo $path`
13978   fi
13979 
13980 
13981   input_path="$new_path"
13982   # Check if we need to convert this using DOS-style short mode. If the path
13983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13984   # take no chances and rewrite it.
13985   # Note: m4 eats our [], so we need to use [ and ] instead.
13986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13987   if test "x$has_forbidden_chars" != x; then
13988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13989     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13990   fi
13991 
13992 
13993   windows_path="$new_path"
13994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995     unix_path=`$CYGPATH -u "$windows_path"`
13996     new_path="$unix_path"
13997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13999     new_path="$unix_path"
14000   fi
14001 
14002   if test "x$path" != "x$new_path"; then
14003     BOOT_JDK="$new_path"
14004     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14005 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14006   fi
14007 
14008   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14009   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14010 
14011   else
14012     # We're on a posix platform. Hooray! :)
14013     path="$BOOT_JDK"
14014     has_space=`$ECHO "$path" | $GREP " "`
14015     if test "x$has_space" != x; then
14016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14017 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14018       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14019     fi
14020 
14021     # Use eval to expand a potential ~
14022     eval path="$path"
14023     if test ! -f "$path" && test ! -d "$path"; then
14024       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14025     fi
14026 
14027     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14028   fi
14029 
14030               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14031 $as_echo_n "checking for Boot JDK... " >&6; }
14032               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14033 $as_echo "$BOOT_JDK" >&6; }
14034               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14035 $as_echo_n "checking Boot JDK version... " >&6; }
14036               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14037               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14038 $as_echo "$BOOT_JDK_VERSION" >&6; }
14039             fi # end check jdk version
14040           fi # end check rt.jar
14041         fi # end check javac
14042       fi # end check java
14043     fi # end check boot jdk found
14044   fi
14045 
14046     done
14047   fi
14048 
14049 
14050     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14051     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14052       # Do we have a bin/java?
14053       if test ! -x "$BOOT_JDK/bin/java"; then
14054         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14056         BOOT_JDK_FOUND=no
14057       else
14058         # Do we have a bin/javac?
14059         if test ! -x "$BOOT_JDK/bin/javac"; then
14060           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14061 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14062           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14063 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14064           BOOT_JDK_FOUND=no
14065         else
14066           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14067           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14068             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14069 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14070             BOOT_JDK_FOUND=no
14071           else
14072             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14073             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14074 
14075             # Extra M4 quote needed to protect [] in grep expression.
14076             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14077             if test "x$FOUND_VERSION_78" = x; then
14078               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14079 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14080               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14081 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14082               BOOT_JDK_FOUND=no
14083             else
14084               # We're done! :-)
14085               BOOT_JDK_FOUND=yes
14086 
14087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14088 
14089   # Input might be given as Windows format, start by converting to
14090   # unix format.
14091   path="$BOOT_JDK"
14092   new_path=`$CYGPATH -u "$path"`
14093 
14094   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14095   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14096   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14097   # "foo.exe" is OK but "foo" is an error.
14098   #
14099   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14100   # It is also a way to make sure we got the proper file name for the real test later on.
14101   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14102   if test "x$test_shortpath" = x; then
14103     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14104 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14105     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14106   fi
14107 
14108   # Call helper function which possibly converts this using DOS-style short mode.
14109   # If so, the updated path is stored in $new_path.
14110 
14111   input_path="$new_path"
14112   # Check if we need to convert this using DOS-style short mode. If the path
14113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14114   # take no chances and rewrite it.
14115   # Note: m4 eats our [], so we need to use [ and ] instead.
14116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14117   if test "x$has_forbidden_chars" != x; then
14118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14119     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14120     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14121     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14122       # Going to short mode and back again did indeed matter. Since short mode is
14123       # case insensitive, let's make it lowercase to improve readability.
14124       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14125       # Now convert it back to Unix-stile (cygpath)
14126       input_path=`$CYGPATH -u "$shortmode_path"`
14127       new_path="$input_path"
14128     fi
14129   fi
14130 
14131   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14132   if test "x$test_cygdrive_prefix" = x; then
14133     # As a simple fix, exclude /usr/bin since it's not a real path.
14134     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14135       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14136       # a path prefixed by /cygdrive for fixpath to work.
14137       new_path="$CYGWIN_ROOT_PATH$input_path"
14138     fi
14139   fi
14140 
14141 
14142   if test "x$path" != "x$new_path"; then
14143     BOOT_JDK="$new_path"
14144     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14145 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14146   fi
14147 
14148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14149 
14150   path="$BOOT_JDK"
14151   has_colon=`$ECHO $path | $GREP ^.:`
14152   new_path="$path"
14153   if test "x$has_colon" = x; then
14154     # Not in mixed or Windows style, start by that.
14155     new_path=`cmd //c echo $path`
14156   fi
14157 
14158 
14159   input_path="$new_path"
14160   # Check if we need to convert this using DOS-style short mode. If the path
14161   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14162   # take no chances and rewrite it.
14163   # Note: m4 eats our [], so we need to use [ and ] instead.
14164   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14165   if test "x$has_forbidden_chars" != x; then
14166     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14167     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14168   fi
14169 
14170 
14171   windows_path="$new_path"
14172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14173     unix_path=`$CYGPATH -u "$windows_path"`
14174     new_path="$unix_path"
14175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14177     new_path="$unix_path"
14178   fi
14179 
14180   if test "x$path" != "x$new_path"; then
14181     BOOT_JDK="$new_path"
14182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14183 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14184   fi
14185 
14186   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14187   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14188 
14189   else
14190     # We're on a posix platform. Hooray! :)
14191     path="$BOOT_JDK"
14192     has_space=`$ECHO "$path" | $GREP " "`
14193     if test "x$has_space" != x; then
14194       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14195 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14196       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14197     fi
14198 
14199     # Use eval to expand a potential ~
14200     eval path="$path"
14201     if test ! -f "$path" && test ! -d "$path"; then
14202       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14203     fi
14204 
14205     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14206   fi
14207 
14208               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14209 $as_echo_n "checking for Boot JDK... " >&6; }
14210               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14211 $as_echo "$BOOT_JDK" >&6; }
14212               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14213 $as_echo_n "checking Boot JDK version... " >&6; }
14214               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14215               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14216 $as_echo "$BOOT_JDK_VERSION" >&6; }
14217             fi # end check jdk version
14218           fi # end check rt.jar
14219         fi # end check javac
14220       fi # end check java
14221     fi # end check boot jdk found
14222   fi
14223 
14224   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14225 
14226   if test "x$BOOT_JDK_FOUND" = xno; then
14227     # Now execute the test
14228 
14229   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14230   BOOT_JDK_SUFFIX="/Contents/Home"
14231   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14232   if test "x$ALL_JDKS_FOUND" != x; then
14233     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14234 
14235   if test "x$BOOT_JDK_FOUND" = xno; then
14236     # Now execute the test
14237 
14238         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14239         if test -d "$BOOT_JDK"; then
14240           BOOT_JDK_FOUND=maybe
14241           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14242 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14243         fi
14244 
14245 
14246     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14247     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14248       # Do we have a bin/java?
14249       if test ! -x "$BOOT_JDK/bin/java"; then
14250         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14252         BOOT_JDK_FOUND=no
14253       else
14254         # Do we have a bin/javac?
14255         if test ! -x "$BOOT_JDK/bin/javac"; then
14256           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14258           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14259 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14260           BOOT_JDK_FOUND=no
14261         else
14262           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14263           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14264             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14266             BOOT_JDK_FOUND=no
14267           else
14268             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14269             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14270 
14271             # Extra M4 quote needed to protect [] in grep expression.
14272             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14273             if test "x$FOUND_VERSION_78" = x; then
14274               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14276               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14277 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14278               BOOT_JDK_FOUND=no
14279             else
14280               # We're done! :-)
14281               BOOT_JDK_FOUND=yes
14282 
14283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14284 
14285   # Input might be given as Windows format, start by converting to
14286   # unix format.
14287   path="$BOOT_JDK"
14288   new_path=`$CYGPATH -u "$path"`
14289 
14290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14293   # "foo.exe" is OK but "foo" is an error.
14294   #
14295   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14296   # It is also a way to make sure we got the proper file name for the real test later on.
14297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14298   if test "x$test_shortpath" = x; then
14299     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14301     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14302   fi
14303 
14304   # Call helper function which possibly converts this using DOS-style short mode.
14305   # If so, the updated path is stored in $new_path.
14306 
14307   input_path="$new_path"
14308   # Check if we need to convert this using DOS-style short mode. If the path
14309   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14310   # take no chances and rewrite it.
14311   # Note: m4 eats our [], so we need to use [ and ] instead.
14312   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14313   if test "x$has_forbidden_chars" != x; then
14314     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14315     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14316     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14317     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14318       # Going to short mode and back again did indeed matter. Since short mode is
14319       # case insensitive, let's make it lowercase to improve readability.
14320       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14321       # Now convert it back to Unix-stile (cygpath)
14322       input_path=`$CYGPATH -u "$shortmode_path"`
14323       new_path="$input_path"
14324     fi
14325   fi
14326 
14327   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14328   if test "x$test_cygdrive_prefix" = x; then
14329     # As a simple fix, exclude /usr/bin since it's not a real path.
14330     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14331       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14332       # a path prefixed by /cygdrive for fixpath to work.
14333       new_path="$CYGWIN_ROOT_PATH$input_path"
14334     fi
14335   fi
14336 
14337 
14338   if test "x$path" != "x$new_path"; then
14339     BOOT_JDK="$new_path"
14340     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14341 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14342   fi
14343 
14344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14345 
14346   path="$BOOT_JDK"
14347   has_colon=`$ECHO $path | $GREP ^.:`
14348   new_path="$path"
14349   if test "x$has_colon" = x; then
14350     # Not in mixed or Windows style, start by that.
14351     new_path=`cmd //c echo $path`
14352   fi
14353 
14354 
14355   input_path="$new_path"
14356   # Check if we need to convert this using DOS-style short mode. If the path
14357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14358   # take no chances and rewrite it.
14359   # Note: m4 eats our [], so we need to use [ and ] instead.
14360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14361   if test "x$has_forbidden_chars" != x; then
14362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14363     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14364   fi
14365 
14366 
14367   windows_path="$new_path"
14368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14369     unix_path=`$CYGPATH -u "$windows_path"`
14370     new_path="$unix_path"
14371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14373     new_path="$unix_path"
14374   fi
14375 
14376   if test "x$path" != "x$new_path"; then
14377     BOOT_JDK="$new_path"
14378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14380   fi
14381 
14382   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14383   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14384 
14385   else
14386     # We're on a posix platform. Hooray! :)
14387     path="$BOOT_JDK"
14388     has_space=`$ECHO "$path" | $GREP " "`
14389     if test "x$has_space" != x; then
14390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14391 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14392       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14393     fi
14394 
14395     # Use eval to expand a potential ~
14396     eval path="$path"
14397     if test ! -f "$path" && test ! -d "$path"; then
14398       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14399     fi
14400 
14401     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14402   fi
14403 
14404               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14405 $as_echo_n "checking for Boot JDK... " >&6; }
14406               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14407 $as_echo "$BOOT_JDK" >&6; }
14408               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14409 $as_echo_n "checking Boot JDK version... " >&6; }
14410               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14411               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14412 $as_echo "$BOOT_JDK_VERSION" >&6; }
14413             fi # end check jdk version
14414           fi # end check rt.jar
14415         fi # end check javac
14416       fi # end check java
14417     fi # end check boot jdk found
14418   fi
14419 
14420     done
14421   fi
14422 
14423 
14424     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14425     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14426       # Do we have a bin/java?
14427       if test ! -x "$BOOT_JDK/bin/java"; then
14428         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14430         BOOT_JDK_FOUND=no
14431       else
14432         # Do we have a bin/javac?
14433         if test ! -x "$BOOT_JDK/bin/javac"; then
14434           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14436           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14437 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14438           BOOT_JDK_FOUND=no
14439         else
14440           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14441           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14442             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14443 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14444             BOOT_JDK_FOUND=no
14445           else
14446             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14447             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14448 
14449             # Extra M4 quote needed to protect [] in grep expression.
14450             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14451             if test "x$FOUND_VERSION_78" = x; then
14452               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14453 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14454               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14455 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14456               BOOT_JDK_FOUND=no
14457             else
14458               # We're done! :-)
14459               BOOT_JDK_FOUND=yes
14460 
14461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14462 
14463   # Input might be given as Windows format, start by converting to
14464   # unix format.
14465   path="$BOOT_JDK"
14466   new_path=`$CYGPATH -u "$path"`
14467 
14468   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14469   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14470   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14471   # "foo.exe" is OK but "foo" is an error.
14472   #
14473   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14474   # It is also a way to make sure we got the proper file name for the real test later on.
14475   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14476   if test "x$test_shortpath" = x; then
14477     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14478 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14479     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14480   fi
14481 
14482   # Call helper function which possibly converts this using DOS-style short mode.
14483   # If so, the updated path is stored in $new_path.
14484 
14485   input_path="$new_path"
14486   # Check if we need to convert this using DOS-style short mode. If the path
14487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14488   # take no chances and rewrite it.
14489   # Note: m4 eats our [], so we need to use [ and ] instead.
14490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14491   if test "x$has_forbidden_chars" != x; then
14492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14493     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14494     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14495     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14496       # Going to short mode and back again did indeed matter. Since short mode is
14497       # case insensitive, let's make it lowercase to improve readability.
14498       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14499       # Now convert it back to Unix-stile (cygpath)
14500       input_path=`$CYGPATH -u "$shortmode_path"`
14501       new_path="$input_path"
14502     fi
14503   fi
14504 
14505   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14506   if test "x$test_cygdrive_prefix" = x; then
14507     # As a simple fix, exclude /usr/bin since it's not a real path.
14508     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14509       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14510       # a path prefixed by /cygdrive for fixpath to work.
14511       new_path="$CYGWIN_ROOT_PATH$input_path"
14512     fi
14513   fi
14514 
14515 
14516   if test "x$path" != "x$new_path"; then
14517     BOOT_JDK="$new_path"
14518     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14519 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14520   fi
14521 
14522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14523 
14524   path="$BOOT_JDK"
14525   has_colon=`$ECHO $path | $GREP ^.:`
14526   new_path="$path"
14527   if test "x$has_colon" = x; then
14528     # Not in mixed or Windows style, start by that.
14529     new_path=`cmd //c echo $path`
14530   fi
14531 
14532 
14533   input_path="$new_path"
14534   # Check if we need to convert this using DOS-style short mode. If the path
14535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14536   # take no chances and rewrite it.
14537   # Note: m4 eats our [], so we need to use [ and ] instead.
14538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14539   if test "x$has_forbidden_chars" != x; then
14540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14541     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14542   fi
14543 
14544 
14545   windows_path="$new_path"
14546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14547     unix_path=`$CYGPATH -u "$windows_path"`
14548     new_path="$unix_path"
14549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14551     new_path="$unix_path"
14552   fi
14553 
14554   if test "x$path" != "x$new_path"; then
14555     BOOT_JDK="$new_path"
14556     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14557 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14558   fi
14559 
14560   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14561   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14562 
14563   else
14564     # We're on a posix platform. Hooray! :)
14565     path="$BOOT_JDK"
14566     has_space=`$ECHO "$path" | $GREP " "`
14567     if test "x$has_space" != x; then
14568       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14569 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14570       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14571     fi
14572 
14573     # Use eval to expand a potential ~
14574     eval path="$path"
14575     if test ! -f "$path" && test ! -d "$path"; then
14576       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14577     fi
14578 
14579     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14580   fi
14581 
14582               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14583 $as_echo_n "checking for Boot JDK... " >&6; }
14584               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14585 $as_echo "$BOOT_JDK" >&6; }
14586               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14587 $as_echo_n "checking Boot JDK version... " >&6; }
14588               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14589               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14590 $as_echo "$BOOT_JDK_VERSION" >&6; }
14591             fi # end check jdk version
14592           fi # end check rt.jar
14593         fi # end check javac
14594       fi # end check java
14595     fi # end check boot jdk found
14596   fi
14597 
14598 
14599   if test "x$BOOT_JDK_FOUND" = xno; then
14600     # Now execute the test
14601 
14602   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14603   BOOT_JDK_SUFFIX="/Contents/Home"
14604   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14605   if test "x$ALL_JDKS_FOUND" != x; then
14606     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14607 
14608   if test "x$BOOT_JDK_FOUND" = xno; then
14609     # Now execute the test
14610 
14611         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14612         if test -d "$BOOT_JDK"; then
14613           BOOT_JDK_FOUND=maybe
14614           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14615 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14616         fi
14617 
14618 
14619     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14620     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14621       # Do we have a bin/java?
14622       if test ! -x "$BOOT_JDK/bin/java"; then
14623         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14625         BOOT_JDK_FOUND=no
14626       else
14627         # Do we have a bin/javac?
14628         if test ! -x "$BOOT_JDK/bin/javac"; then
14629           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14631           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14632 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14633           BOOT_JDK_FOUND=no
14634         else
14635           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14636           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14637             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14638 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14639             BOOT_JDK_FOUND=no
14640           else
14641             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14642             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14643 
14644             # Extra M4 quote needed to protect [] in grep expression.
14645             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14646             if test "x$FOUND_VERSION_78" = x; then
14647               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14649               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14650 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14651               BOOT_JDK_FOUND=no
14652             else
14653               # We're done! :-)
14654               BOOT_JDK_FOUND=yes
14655 
14656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14657 
14658   # Input might be given as Windows format, start by converting to
14659   # unix format.
14660   path="$BOOT_JDK"
14661   new_path=`$CYGPATH -u "$path"`
14662 
14663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14666   # "foo.exe" is OK but "foo" is an error.
14667   #
14668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14669   # It is also a way to make sure we got the proper file name for the real test later on.
14670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14671   if test "x$test_shortpath" = x; then
14672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14673 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14674     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14675   fi
14676 
14677   # Call helper function which possibly converts this using DOS-style short mode.
14678   # If so, the updated path is stored in $new_path.
14679 
14680   input_path="$new_path"
14681   # Check if we need to convert this using DOS-style short mode. If the path
14682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14683   # take no chances and rewrite it.
14684   # Note: m4 eats our [], so we need to use [ and ] instead.
14685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14686   if test "x$has_forbidden_chars" != x; then
14687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14691       # Going to short mode and back again did indeed matter. Since short mode is
14692       # case insensitive, let's make it lowercase to improve readability.
14693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14694       # Now convert it back to Unix-stile (cygpath)
14695       input_path=`$CYGPATH -u "$shortmode_path"`
14696       new_path="$input_path"
14697     fi
14698   fi
14699 
14700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14701   if test "x$test_cygdrive_prefix" = x; then
14702     # As a simple fix, exclude /usr/bin since it's not a real path.
14703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14705       # a path prefixed by /cygdrive for fixpath to work.
14706       new_path="$CYGWIN_ROOT_PATH$input_path"
14707     fi
14708   fi
14709 
14710 
14711   if test "x$path" != "x$new_path"; then
14712     BOOT_JDK="$new_path"
14713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14714 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14715   fi
14716 
14717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14718 
14719   path="$BOOT_JDK"
14720   has_colon=`$ECHO $path | $GREP ^.:`
14721   new_path="$path"
14722   if test "x$has_colon" = x; then
14723     # Not in mixed or Windows style, start by that.
14724     new_path=`cmd //c echo $path`
14725   fi
14726 
14727 
14728   input_path="$new_path"
14729   # Check if we need to convert this using DOS-style short mode. If the path
14730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14731   # take no chances and rewrite it.
14732   # Note: m4 eats our [], so we need to use [ and ] instead.
14733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14734   if test "x$has_forbidden_chars" != x; then
14735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14737   fi
14738 
14739 
14740   windows_path="$new_path"
14741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742     unix_path=`$CYGPATH -u "$windows_path"`
14743     new_path="$unix_path"
14744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14746     new_path="$unix_path"
14747   fi
14748 
14749   if test "x$path" != "x$new_path"; then
14750     BOOT_JDK="$new_path"
14751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14752 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14753   fi
14754 
14755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14757 
14758   else
14759     # We're on a posix platform. Hooray! :)
14760     path="$BOOT_JDK"
14761     has_space=`$ECHO "$path" | $GREP " "`
14762     if test "x$has_space" != x; then
14763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14764 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14765       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14766     fi
14767 
14768     # Use eval to expand a potential ~
14769     eval path="$path"
14770     if test ! -f "$path" && test ! -d "$path"; then
14771       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14772     fi
14773 
14774     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14775   fi
14776 
14777               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14778 $as_echo_n "checking for Boot JDK... " >&6; }
14779               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14780 $as_echo "$BOOT_JDK" >&6; }
14781               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14782 $as_echo_n "checking Boot JDK version... " >&6; }
14783               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14784               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14785 $as_echo "$BOOT_JDK_VERSION" >&6; }
14786             fi # end check jdk version
14787           fi # end check rt.jar
14788         fi # end check javac
14789       fi # end check java
14790     fi # end check boot jdk found
14791   fi
14792 
14793     done
14794   fi
14795 
14796 
14797     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14798     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14799       # Do we have a bin/java?
14800       if test ! -x "$BOOT_JDK/bin/java"; then
14801         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14802 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14803         BOOT_JDK_FOUND=no
14804       else
14805         # Do we have a bin/javac?
14806         if test ! -x "$BOOT_JDK/bin/javac"; then
14807           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14809           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14810 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14811           BOOT_JDK_FOUND=no
14812         else
14813           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14814           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14815             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14817             BOOT_JDK_FOUND=no
14818           else
14819             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14820             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14821 
14822             # Extra M4 quote needed to protect [] in grep expression.
14823             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14824             if test "x$FOUND_VERSION_78" = x; then
14825               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14826 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14827               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14828 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14829               BOOT_JDK_FOUND=no
14830             else
14831               # We're done! :-)
14832               BOOT_JDK_FOUND=yes
14833 
14834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14835 
14836   # Input might be given as Windows format, start by converting to
14837   # unix format.
14838   path="$BOOT_JDK"
14839   new_path=`$CYGPATH -u "$path"`
14840 
14841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14844   # "foo.exe" is OK but "foo" is an error.
14845   #
14846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14847   # It is also a way to make sure we got the proper file name for the real test later on.
14848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14849   if test "x$test_shortpath" = x; then
14850     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14851 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14852     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14853   fi
14854 
14855   # Call helper function which possibly converts this using DOS-style short mode.
14856   # If so, the updated path is stored in $new_path.
14857 
14858   input_path="$new_path"
14859   # Check if we need to convert this using DOS-style short mode. If the path
14860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14861   # take no chances and rewrite it.
14862   # Note: m4 eats our [], so we need to use [ and ] instead.
14863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14864   if test "x$has_forbidden_chars" != x; then
14865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14869       # Going to short mode and back again did indeed matter. Since short mode is
14870       # case insensitive, let's make it lowercase to improve readability.
14871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14872       # Now convert it back to Unix-stile (cygpath)
14873       input_path=`$CYGPATH -u "$shortmode_path"`
14874       new_path="$input_path"
14875     fi
14876   fi
14877 
14878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14879   if test "x$test_cygdrive_prefix" = x; then
14880     # As a simple fix, exclude /usr/bin since it's not a real path.
14881     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14883       # a path prefixed by /cygdrive for fixpath to work.
14884       new_path="$CYGWIN_ROOT_PATH$input_path"
14885     fi
14886   fi
14887 
14888 
14889   if test "x$path" != "x$new_path"; then
14890     BOOT_JDK="$new_path"
14891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14892 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14893   fi
14894 
14895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14896 
14897   path="$BOOT_JDK"
14898   has_colon=`$ECHO $path | $GREP ^.:`
14899   new_path="$path"
14900   if test "x$has_colon" = x; then
14901     # Not in mixed or Windows style, start by that.
14902     new_path=`cmd //c echo $path`
14903   fi
14904 
14905 
14906   input_path="$new_path"
14907   # Check if we need to convert this using DOS-style short mode. If the path
14908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14909   # take no chances and rewrite it.
14910   # Note: m4 eats our [], so we need to use [ and ] instead.
14911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14912   if test "x$has_forbidden_chars" != x; then
14913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14915   fi
14916 
14917 
14918   windows_path="$new_path"
14919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14920     unix_path=`$CYGPATH -u "$windows_path"`
14921     new_path="$unix_path"
14922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14924     new_path="$unix_path"
14925   fi
14926 
14927   if test "x$path" != "x$new_path"; then
14928     BOOT_JDK="$new_path"
14929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14930 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14931   fi
14932 
14933   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14934   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14935 
14936   else
14937     # We're on a posix platform. Hooray! :)
14938     path="$BOOT_JDK"
14939     has_space=`$ECHO "$path" | $GREP " "`
14940     if test "x$has_space" != x; then
14941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14942 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14943       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14944     fi
14945 
14946     # Use eval to expand a potential ~
14947     eval path="$path"
14948     if test ! -f "$path" && test ! -d "$path"; then
14949       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14950     fi
14951 
14952     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14953   fi
14954 
14955               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14956 $as_echo_n "checking for Boot JDK... " >&6; }
14957               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14958 $as_echo "$BOOT_JDK" >&6; }
14959               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14960 $as_echo_n "checking Boot JDK version... " >&6; }
14961               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14962               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14963 $as_echo "$BOOT_JDK_VERSION" >&6; }
14964             fi # end check jdk version
14965           fi # end check rt.jar
14966         fi # end check javac
14967       fi # end check java
14968     fi # end check boot jdk found
14969   fi
14970 
14971   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14972 
14973   if test "x$BOOT_JDK_FOUND" = xno; then
14974     # Now execute the test
14975 
14976   BOOT_JDK_PREFIX="/usr/lib/jvm"
14977   BOOT_JDK_SUFFIX=""
14978   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14979   if test "x$ALL_JDKS_FOUND" != x; then
14980     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14981 
14982   if test "x$BOOT_JDK_FOUND" = xno; then
14983     # Now execute the test
14984 
14985         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14986         if test -d "$BOOT_JDK"; then
14987           BOOT_JDK_FOUND=maybe
14988           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14989 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14990         fi
14991 
14992 
14993     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14994     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14995       # Do we have a bin/java?
14996       if test ! -x "$BOOT_JDK/bin/java"; then
14997         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14999         BOOT_JDK_FOUND=no
15000       else
15001         # Do we have a bin/javac?
15002         if test ! -x "$BOOT_JDK/bin/javac"; then
15003           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15004 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15005           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15006 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15007           BOOT_JDK_FOUND=no
15008         else
15009           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15010           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15011             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15013             BOOT_JDK_FOUND=no
15014           else
15015             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15016             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15017 
15018             # Extra M4 quote needed to protect [] in grep expression.
15019             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15020             if test "x$FOUND_VERSION_78" = x; then
15021               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15023               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15024 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15025               BOOT_JDK_FOUND=no
15026             else
15027               # We're done! :-)
15028               BOOT_JDK_FOUND=yes
15029 
15030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15031 
15032   # Input might be given as Windows format, start by converting to
15033   # unix format.
15034   path="$BOOT_JDK"
15035   new_path=`$CYGPATH -u "$path"`
15036 
15037   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15038   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15039   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15040   # "foo.exe" is OK but "foo" is an error.
15041   #
15042   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15043   # It is also a way to make sure we got the proper file name for the real test later on.
15044   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15045   if test "x$test_shortpath" = x; then
15046     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15047 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15048     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15049   fi
15050 
15051   # Call helper function which possibly converts this using DOS-style short mode.
15052   # If so, the updated path is stored in $new_path.
15053 
15054   input_path="$new_path"
15055   # Check if we need to convert this using DOS-style short mode. If the path
15056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15057   # take no chances and rewrite it.
15058   # Note: m4 eats our [], so we need to use [ and ] instead.
15059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15060   if test "x$has_forbidden_chars" != x; then
15061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15062     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15063     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15064     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15065       # Going to short mode and back again did indeed matter. Since short mode is
15066       # case insensitive, let's make it lowercase to improve readability.
15067       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15068       # Now convert it back to Unix-stile (cygpath)
15069       input_path=`$CYGPATH -u "$shortmode_path"`
15070       new_path="$input_path"
15071     fi
15072   fi
15073 
15074   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15075   if test "x$test_cygdrive_prefix" = x; then
15076     # As a simple fix, exclude /usr/bin since it's not a real path.
15077     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15078       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15079       # a path prefixed by /cygdrive for fixpath to work.
15080       new_path="$CYGWIN_ROOT_PATH$input_path"
15081     fi
15082   fi
15083 
15084 
15085   if test "x$path" != "x$new_path"; then
15086     BOOT_JDK="$new_path"
15087     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15088 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15089   fi
15090 
15091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15092 
15093   path="$BOOT_JDK"
15094   has_colon=`$ECHO $path | $GREP ^.:`
15095   new_path="$path"
15096   if test "x$has_colon" = x; then
15097     # Not in mixed or Windows style, start by that.
15098     new_path=`cmd //c echo $path`
15099   fi
15100 
15101 
15102   input_path="$new_path"
15103   # Check if we need to convert this using DOS-style short mode. If the path
15104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15105   # take no chances and rewrite it.
15106   # Note: m4 eats our [], so we need to use [ and ] instead.
15107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15108   if test "x$has_forbidden_chars" != x; then
15109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15110     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15111   fi
15112 
15113 
15114   windows_path="$new_path"
15115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15116     unix_path=`$CYGPATH -u "$windows_path"`
15117     new_path="$unix_path"
15118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15120     new_path="$unix_path"
15121   fi
15122 
15123   if test "x$path" != "x$new_path"; then
15124     BOOT_JDK="$new_path"
15125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15126 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15127   fi
15128 
15129   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15130   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15131 
15132   else
15133     # We're on a posix platform. Hooray! :)
15134     path="$BOOT_JDK"
15135     has_space=`$ECHO "$path" | $GREP " "`
15136     if test "x$has_space" != x; then
15137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15138 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15139       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15140     fi
15141 
15142     # Use eval to expand a potential ~
15143     eval path="$path"
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     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15149   fi
15150 
15151               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15152 $as_echo_n "checking for Boot JDK... " >&6; }
15153               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15154 $as_echo "$BOOT_JDK" >&6; }
15155               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15156 $as_echo_n "checking Boot JDK version... " >&6; }
15157               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15158               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15159 $as_echo "$BOOT_JDK_VERSION" >&6; }
15160             fi # end check jdk version
15161           fi # end check rt.jar
15162         fi # end check javac
15163       fi # end check java
15164     fi # end check boot jdk found
15165   fi
15166 
15167     done
15168   fi
15169 
15170 
15171     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15172     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15173       # Do we have a bin/java?
15174       if test ! -x "$BOOT_JDK/bin/java"; then
15175         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15177         BOOT_JDK_FOUND=no
15178       else
15179         # Do we have a bin/javac?
15180         if test ! -x "$BOOT_JDK/bin/javac"; then
15181           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15183           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15184 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15185           BOOT_JDK_FOUND=no
15186         else
15187           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15188           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15189             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15191             BOOT_JDK_FOUND=no
15192           else
15193             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15194             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15195 
15196             # Extra M4 quote needed to protect [] in grep expression.
15197             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15198             if test "x$FOUND_VERSION_78" = x; then
15199               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15201               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15202 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15203               BOOT_JDK_FOUND=no
15204             else
15205               # We're done! :-)
15206               BOOT_JDK_FOUND=yes
15207 
15208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15209 
15210   # Input might be given as Windows format, start by converting to
15211   # unix format.
15212   path="$BOOT_JDK"
15213   new_path=`$CYGPATH -u "$path"`
15214 
15215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15218   # "foo.exe" is OK but "foo" is an error.
15219   #
15220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15221   # It is also a way to make sure we got the proper file name for the real test later on.
15222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15223   if test "x$test_shortpath" = x; then
15224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15226     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15227   fi
15228 
15229   # Call helper function which possibly converts this using DOS-style short mode.
15230   # If so, the updated path is stored in $new_path.
15231 
15232   input_path="$new_path"
15233   # Check if we need to convert this using DOS-style short mode. If the path
15234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15235   # take no chances and rewrite it.
15236   # Note: m4 eats our [], so we need to use [ and ] instead.
15237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15238   if test "x$has_forbidden_chars" != x; then
15239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15243       # Going to short mode and back again did indeed matter. Since short mode is
15244       # case insensitive, let's make it lowercase to improve readability.
15245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15246       # Now convert it back to Unix-stile (cygpath)
15247       input_path=`$CYGPATH -u "$shortmode_path"`
15248       new_path="$input_path"
15249     fi
15250   fi
15251 
15252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15253   if test "x$test_cygdrive_prefix" = x; then
15254     # As a simple fix, exclude /usr/bin since it's not a real path.
15255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15257       # a path prefixed by /cygdrive for fixpath to work.
15258       new_path="$CYGWIN_ROOT_PATH$input_path"
15259     fi
15260   fi
15261 
15262 
15263   if test "x$path" != "x$new_path"; then
15264     BOOT_JDK="$new_path"
15265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15267   fi
15268 
15269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15270 
15271   path="$BOOT_JDK"
15272   has_colon=`$ECHO $path | $GREP ^.:`
15273   new_path="$path"
15274   if test "x$has_colon" = x; then
15275     # Not in mixed or Windows style, start by that.
15276     new_path=`cmd //c echo $path`
15277   fi
15278 
15279 
15280   input_path="$new_path"
15281   # Check if we need to convert this using DOS-style short mode. If the path
15282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283   # take no chances and rewrite it.
15284   # Note: m4 eats our [], so we need to use [ and ] instead.
15285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15286   if test "x$has_forbidden_chars" != x; then
15287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15289   fi
15290 
15291 
15292   windows_path="$new_path"
15293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15294     unix_path=`$CYGPATH -u "$windows_path"`
15295     new_path="$unix_path"
15296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15298     new_path="$unix_path"
15299   fi
15300 
15301   if test "x$path" != "x$new_path"; then
15302     BOOT_JDK="$new_path"
15303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15305   fi
15306 
15307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15309 
15310   else
15311     # We're on a posix platform. Hooray! :)
15312     path="$BOOT_JDK"
15313     has_space=`$ECHO "$path" | $GREP " "`
15314     if test "x$has_space" != x; then
15315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15317       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15318     fi
15319 
15320     # Use eval to expand a potential ~
15321     eval path="$path"
15322     if test ! -f "$path" && test ! -d "$path"; then
15323       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15324     fi
15325 
15326     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15327   fi
15328 
15329               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15330 $as_echo_n "checking for Boot JDK... " >&6; }
15331               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15332 $as_echo "$BOOT_JDK" >&6; }
15333               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15334 $as_echo_n "checking Boot JDK version... " >&6; }
15335               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15336               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15337 $as_echo "$BOOT_JDK_VERSION" >&6; }
15338             fi # end check jdk version
15339           fi # end check rt.jar
15340         fi # end check javac
15341       fi # end check java
15342     fi # end check boot jdk found
15343   fi
15344 
15345   fi
15346 
15347 
15348     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15349     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15350       # Do we have a bin/java?
15351       if test ! -x "$BOOT_JDK/bin/java"; then
15352         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15354         BOOT_JDK_FOUND=no
15355       else
15356         # Do we have a bin/javac?
15357         if test ! -x "$BOOT_JDK/bin/javac"; then
15358           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15360           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15361 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15362           BOOT_JDK_FOUND=no
15363         else
15364           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15365           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15366             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15367 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15368             BOOT_JDK_FOUND=no
15369           else
15370             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15371             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15372 
15373             # Extra M4 quote needed to protect [] in grep expression.
15374             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15375             if test "x$FOUND_VERSION_78" = x; then
15376               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15377 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15378               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15379 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15380               BOOT_JDK_FOUND=no
15381             else
15382               # We're done! :-)
15383               BOOT_JDK_FOUND=yes
15384 
15385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15386 
15387   # Input might be given as Windows format, start by converting to
15388   # unix format.
15389   path="$BOOT_JDK"
15390   new_path=`$CYGPATH -u "$path"`
15391 
15392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15395   # "foo.exe" is OK but "foo" is an error.
15396   #
15397   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15398   # It is also a way to make sure we got the proper file name for the real test later on.
15399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15400   if test "x$test_shortpath" = x; then
15401     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15402 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15403     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15404   fi
15405 
15406   # Call helper function which possibly converts this using DOS-style short mode.
15407   # If so, the updated path is stored in $new_path.
15408 
15409   input_path="$new_path"
15410   # Check if we need to convert this using DOS-style short mode. If the path
15411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15412   # take no chances and rewrite it.
15413   # Note: m4 eats our [], so we need to use [ and ] instead.
15414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15415   if test "x$has_forbidden_chars" != x; then
15416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15417     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15418     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15419     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15420       # Going to short mode and back again did indeed matter. Since short mode is
15421       # case insensitive, let's make it lowercase to improve readability.
15422       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15423       # Now convert it back to Unix-stile (cygpath)
15424       input_path=`$CYGPATH -u "$shortmode_path"`
15425       new_path="$input_path"
15426     fi
15427   fi
15428 
15429   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15430   if test "x$test_cygdrive_prefix" = x; then
15431     # As a simple fix, exclude /usr/bin since it's not a real path.
15432     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15433       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15434       # a path prefixed by /cygdrive for fixpath to work.
15435       new_path="$CYGWIN_ROOT_PATH$input_path"
15436     fi
15437   fi
15438 
15439 
15440   if test "x$path" != "x$new_path"; then
15441     BOOT_JDK="$new_path"
15442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15443 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15444   fi
15445 
15446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15447 
15448   path="$BOOT_JDK"
15449   has_colon=`$ECHO $path | $GREP ^.:`
15450   new_path="$path"
15451   if test "x$has_colon" = x; then
15452     # Not in mixed or Windows style, start by that.
15453     new_path=`cmd //c echo $path`
15454   fi
15455 
15456 
15457   input_path="$new_path"
15458   # Check if we need to convert this using DOS-style short mode. If the path
15459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15460   # take no chances and rewrite it.
15461   # Note: m4 eats our [], so we need to use [ and ] instead.
15462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15463   if test "x$has_forbidden_chars" != x; then
15464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15466   fi
15467 
15468 
15469   windows_path="$new_path"
15470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15471     unix_path=`$CYGPATH -u "$windows_path"`
15472     new_path="$unix_path"
15473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15475     new_path="$unix_path"
15476   fi
15477 
15478   if test "x$path" != "x$new_path"; then
15479     BOOT_JDK="$new_path"
15480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15481 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15482   fi
15483 
15484   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15485   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15486 
15487   else
15488     # We're on a posix platform. Hooray! :)
15489     path="$BOOT_JDK"
15490     has_space=`$ECHO "$path" | $GREP " "`
15491     if test "x$has_space" != x; then
15492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15493 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15494       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15495     fi
15496 
15497     # Use eval to expand a potential ~
15498     eval path="$path"
15499     if test ! -f "$path" && test ! -d "$path"; then
15500       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15501     fi
15502 
15503     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15504   fi
15505 
15506               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15507 $as_echo_n "checking for Boot JDK... " >&6; }
15508               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15509 $as_echo "$BOOT_JDK" >&6; }
15510               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15511 $as_echo_n "checking Boot JDK version... " >&6; }
15512               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15513               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15514 $as_echo "$BOOT_JDK_VERSION" >&6; }
15515             fi # end check jdk version
15516           fi # end check rt.jar
15517         fi # end check javac
15518       fi # end check java
15519     fi # end check boot jdk found
15520   fi
15521 
15522 
15523 # If we haven't found anything yet, we've truly lost. Give up.
15524 if test "x$BOOT_JDK_FOUND" = xno; then
15525 
15526     # Print a helpful message on how to acquire the necessary build dependency.
15527     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15528     MISSING_DEPENDENCY=openjdk
15529     PKGHANDLER_COMMAND=
15530 
15531     case $PKGHANDLER in
15532         apt-get)
15533                 apt_help     $MISSING_DEPENDENCY ;;
15534     yum)
15535                 yum_help     $MISSING_DEPENDENCY ;;
15536         port)
15537                 port_help    $MISSING_DEPENDENCY ;;
15538         pkgutil)
15539                 pkgutil_help $MISSING_DEPENDENCY ;;
15540         pkgadd)
15541                 pkgadd_help  $MISSING_DEPENDENCY ;;
15542     * )
15543       break ;;
15544     esac
15545 
15546     if test "x$PKGHANDLER_COMMAND" != x; then
15547         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15548     fi
15549 
15550   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15551 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15552   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15553 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15554   as_fn_error $? "Cannot continue" "$LINENO" 5
15555 fi
15556 
15557 # Setup proper paths for what we found
15558 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15559 if test ! -f "$BOOT_RTJAR"; then
15560     # On MacOSX it is called classes.jar
15561     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15562     if test -f "$BOOT_RTJAR"; then
15563       # Remove the ..
15564       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15565     fi
15566 fi
15567 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15568 BOOT_JDK="$BOOT_JDK"
15569 
15570 
15571 
15572 
15573 # Setup tools from the Boot JDK.
15574 
15575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15576 $as_echo_n "checking for java in Boot JDK... " >&6; }
15577   JAVA=$BOOT_JDK/bin/java
15578   if test ! -x $JAVA; then
15579       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15580 $as_echo "not found" >&6; }
15581       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15582 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15583       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15584   fi
15585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15586 $as_echo "ok" >&6; }
15587 
15588 
15589   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15590 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15591   JAVAC=$BOOT_JDK/bin/javac
15592   if test ! -x $JAVAC; then
15593       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15594 $as_echo "not found" >&6; }
15595       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15596 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15597       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15598   fi
15599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15600 $as_echo "ok" >&6; }
15601 
15602 
15603   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15604 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15605   JAVAH=$BOOT_JDK/bin/javah
15606   if test ! -x $JAVAH; then
15607       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15608 $as_echo "not found" >&6; }
15609       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15610 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15611       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15612   fi
15613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15614 $as_echo "ok" >&6; }
15615 
15616 
15617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15618 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15619   JAVAP=$BOOT_JDK/bin/javap
15620   if test ! -x $JAVAP; then
15621       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15622 $as_echo "not found" >&6; }
15623       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15624 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15625       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15626   fi
15627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15628 $as_echo "ok" >&6; }
15629 
15630 
15631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15632 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15633   JAR=$BOOT_JDK/bin/jar
15634   if test ! -x $JAR; then
15635       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15636 $as_echo "not found" >&6; }
15637       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15638 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15639       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15640   fi
15641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15642 $as_echo "ok" >&6; }
15643 
15644 
15645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15646 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15647   RMIC=$BOOT_JDK/bin/rmic
15648   if test ! -x $RMIC; then
15649       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15650 $as_echo "not found" >&6; }
15651       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15652 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15653       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15654   fi
15655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15656 $as_echo "ok" >&6; }
15657 
15658 
15659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15660 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15661   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15662   if test ! -x $NATIVE2ASCII; then
15663       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15664 $as_echo "not found" >&6; }
15665       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15666 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15667       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15668   fi
15669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15670 $as_echo "ok" >&6; }
15671 
15672 
15673 # Finally, set some other options...
15674 
15675 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15676 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15677 
15678 
15679 
15680 
15681 ##############################################################################
15682 #
15683 # Specify options for anything that is run with the Boot JDK.
15684 #
15685 
15686 # Check whether --with-boot-jdk-jvmargs was given.
15687 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15688   withval=$with_boot_jdk_jvmargs;
15689 fi
15690 
15691 
15692 if test "x$with_boot_jdk_jvmargs" = x; then
15693     # Not all JVM:s accept the same arguments on the command line.
15694     # OpenJDK specific increase in thread stack for JDK build,
15695     # well more specifically, when running javac.
15696     if test "x$BUILD_NUM_BITS" = x32; then
15697        STACK_SIZE=768
15698     else
15699        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15700        # since 64-bit pointers are pushed on the stach. Apparently, we need
15701        # to increase the stack space when javacing the JDK....
15702        STACK_SIZE=1536
15703     fi
15704 
15705     # Minimum amount of heap memory.
15706 
15707     $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15708     $ECHO "Command: $JAVA -Xms64M -version" >&5
15709     OUTPUT=`$JAVA -Xms64M -version 2>&1`
15710     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15711     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15712     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15713         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15714         JVM_ARG_OK=true
15715     else
15716         $ECHO "Arg failed:" >&5
15717         $ECHO "$OUTPUT" >&5
15718         JVM_ARG_OK=false
15719     fi
15720 
15721     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15722         # Why does macosx need more heap? Its the huge JDK batch.
15723 
15724     $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15725     $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15726     OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15727     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15728     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15729     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15730         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15731         JVM_ARG_OK=true
15732     else
15733         $ECHO "Arg failed:" >&5
15734         $ECHO "$OUTPUT" >&5
15735         JVM_ARG_OK=false
15736     fi
15737 
15738     else
15739 
15740     $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15741     $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15742     OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15743     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15744     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15745     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15746         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15747         JVM_ARG_OK=true
15748     else
15749         $ECHO "Arg failed:" >&5
15750         $ECHO "$OUTPUT" >&5
15751         JVM_ARG_OK=false
15752     fi
15753 
15754     fi
15755     # When is adding -client something that speeds up the JVM?
15756     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15757 
15758     $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15759     $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15760     OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15761     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15762     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15763     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15764         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15765         JVM_ARG_OK=true
15766     else
15767         $ECHO "Arg failed:" >&5
15768         $ECHO "$OUTPUT" >&5
15769         JVM_ARG_OK=false
15770     fi
15771 
15772 
15773     $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15774     $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15775     OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15776     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15777     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15778     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15779         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15780         JVM_ARG_OK=true
15781     else
15782         $ECHO "Arg failed:" >&5
15783         $ECHO "$OUTPUT" >&5
15784         JVM_ARG_OK=false
15785     fi
15786 
15787 
15788     $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15789     $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15790     OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15791     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15792     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15793     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15794         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15795         JVM_ARG_OK=true
15796     else
15797         $ECHO "Arg failed:" >&5
15798         $ECHO "$OUTPUT" >&5
15799         JVM_ARG_OK=false
15800     fi
15801 
15802     # Disable special log output when a debug build is used as Boot JDK...
15803 
15804     $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15805     $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15806     OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15807     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15808     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15809     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15810         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15811         JVM_ARG_OK=true
15812     else
15813         $ECHO "Arg failed:" >&5
15814         $ECHO "$OUTPUT" >&5
15815         JVM_ARG_OK=false
15816     fi
15817 
15818 fi
15819 
15820 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15821 
15822 
15823 
15824 ###############################################################################
15825 #
15826 # Configure the sources to use. We can add or override individual directories.
15827 #
15828 ###############################################################################
15829 
15830 
15831 
15832 # Where are the sources. Any of these can be overridden
15833 # using --with-override-corba and the likes.
15834 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15835 CORBA_TOPDIR="$SRC_ROOT/corba"
15836 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15837 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15838 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15839 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15840 JDK_TOPDIR="$SRC_ROOT/jdk"
15841 
15842 
15843 
15844 
15845 
15846 
15847 
15848 
15849 
15850 
15851 ###############################################################################
15852 #
15853 # Pickup additional source for a component from outside of the source root
15854 # or override source for a component.
15855 #
15856 
15857 # Check whether --with-add-source-root was given.
15858 if test "${with_add_source_root+set}" = set; then :
15859   withval=$with_add_source_root;
15860 fi
15861 
15862 
15863 
15864 # Check whether --with-override-source-root was given.
15865 if test "${with_override_source_root+set}" = set; then :
15866   withval=$with_override_source_root;
15867 fi
15868 
15869 
15870 
15871 # Check whether --with-adds-and-overrides was given.
15872 if test "${with_adds_and_overrides+set}" = set; then :
15873   withval=$with_adds_and_overrides;
15874 fi
15875 
15876 
15877 if test "x$with_adds_and_overrides" != x; then
15878     with_add_source_root="$with_adds_and_overrides/adds"
15879     with_override_source_root="$with_adds_and_overrides/overrides"
15880 fi
15881 
15882 if test "x$with_add_source_root" != x; then
15883     if ! test -d $with_add_source_root; then
15884        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15885     fi
15886     CURDIR="$PWD"
15887     cd "$with_add_source_root"
15888     ADD_SRC_ROOT="`pwd`"
15889     cd "$CURDIR"
15890     # Verify that the addon source root does not have any root makefiles.
15891     # If it does, then it is usually an error, prevent this.
15892     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15893        test -f $with_add_source_root/langtools/make/Makefile; then
15894         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
15895     fi
15896     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15897        test -f $with_add_source_root/corba/make/Makefile; then
15898         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
15899     fi
15900     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15901        test -f $with_add_source_root/jaxp/make/Makefile; then
15902         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
15903     fi
15904     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15905        test -f $with_add_source_root/jaxws/make/Makefile; then
15906         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
15907     fi
15908     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15909        test -f $with_add_source_root/hotspot/make/Makefile; then
15910         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
15911     fi
15912     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15913        test -f $with_add_source_root/jdk/make/Makefile; then
15914         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
15915     fi
15916 fi
15917 
15918 
15919 if test "x$with_override_source_root" != x; then
15920     if ! test -d $with_override_source_root; then
15921        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15922     fi
15923     CURDIR="$PWD"
15924     cd "$with_override_source_root"
15925     OVERRIDE_SRC_ROOT="`pwd`"
15926     cd "$CURDIR"
15927     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15928        test -f $with_override_source_root/langtools/make/Makefile; then
15929         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
15930     fi
15931     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15932        test -f $with_override_source_root/corba/make/Makefile; then
15933         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
15934     fi
15935     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15936        test -f $with_override_source_root/jaxp/make/Makefile; then
15937         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
15938     fi
15939     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15940        test -f $with_override_source_root/jaxws/make/Makefile; then
15941         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
15942     fi
15943     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15944        test -f $with_override_source_root/hotspot/make/Makefile; then
15945         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
15946     fi
15947     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15948        test -f $with_override_source_root/jdk/make/Makefile; then
15949         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
15950     fi
15951 fi
15952 
15953 
15954 ###############################################################################
15955 #
15956 # Override a repo completely, this is used for example when you have 3 small
15957 # development sandboxes of the langtools sources and want to avoid having 3 full
15958 # OpenJDK sources checked out on disk.
15959 #
15960 # Assuming that the 3 langtools sandboxes are located here:
15961 # /home/fredrik/sandbox1/langtools
15962 # /home/fredrik/sandbox2/langtools
15963 # /home/fredrik/sandbox3/langtools
15964 #
15965 # From the source root you create build subdirs manually:
15966 #     mkdir -p build1 build2 build3
15967 # in each build directory run:
15968 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15969 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15970 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15971 #
15972 
15973 
15974 # Check whether --with-override-langtools was given.
15975 if test "${with_override_langtools+set}" = set; then :
15976   withval=$with_override_langtools;
15977 fi
15978 
15979 
15980 
15981 # Check whether --with-override-corba was given.
15982 if test "${with_override_corba+set}" = set; then :
15983   withval=$with_override_corba;
15984 fi
15985 
15986 
15987 
15988 # Check whether --with-override-jaxp was given.
15989 if test "${with_override_jaxp+set}" = set; then :
15990   withval=$with_override_jaxp;
15991 fi
15992 
15993 
15994 
15995 # Check whether --with-override-jaxws was given.
15996 if test "${with_override_jaxws+set}" = set; then :
15997   withval=$with_override_jaxws;
15998 fi
15999 
16000 
16001 
16002 # Check whether --with-override-hotspot was given.
16003 if test "${with_override_hotspot+set}" = set; then :
16004   withval=$with_override_hotspot;
16005 fi
16006 
16007 
16008 
16009 # Check whether --with-override-jdk was given.
16010 if test "${with_override_jdk+set}" = set; then :
16011   withval=$with_override_jdk;
16012 fi
16013 
16014 
16015 if test "x$with_override_langtools" != x; then
16016     CURDIR="$PWD"
16017     cd "$with_override_langtools"
16018     LANGTOOLS_TOPDIR="`pwd`"
16019     cd "$CURDIR"
16020     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16021         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16022     fi
16023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16024 $as_echo_n "checking if langtools should be overridden... " >&6; }
16025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16026 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16027 fi
16028 if test "x$with_override_corba" != x; then
16029     CURDIR="$PWD"
16030     cd "$with_override_corba"
16031     CORBA_TOPDIR="`pwd`"
16032     cd "$CURDIR"
16033     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16034         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16035     fi
16036     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16037 $as_echo_n "checking if corba should be overridden... " >&6; }
16038     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16039 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16040 fi
16041 if test "x$with_override_jaxp" != x; then
16042     CURDIR="$PWD"
16043     cd "$with_override_jaxp"
16044     JAXP_TOPDIR="`pwd`"
16045     cd "$CURDIR"
16046     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16047         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16048     fi
16049     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16050 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16051     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16052 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16053 fi
16054 if test "x$with_override_jaxws" != x; then
16055     CURDIR="$PWD"
16056     cd "$with_override_jaxws"
16057     JAXWS_TOPDIR="`pwd`"
16058     cd "$CURDIR"
16059     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16060         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16061     fi
16062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16063 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16065 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16066 fi
16067 if test "x$with_override_hotspot" != x; then
16068     CURDIR="$PWD"
16069     cd "$with_override_hotspot"
16070     HOTSPOT_TOPDIR="`pwd`"
16071     cd "$CURDIR"
16072     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16073        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16074         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16075     fi
16076     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16077 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16079 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16080 fi
16081 if test "x$with_override_nashorn" != x; then
16082     CURDIR="$PWD"
16083     cd "$with_override_nashorn"
16084     NASHORN_TOPDIR="`pwd`"
16085     cd "$CURDIR"
16086     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16087         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16088     fi
16089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16090 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16092 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16093 fi
16094 if test "x$with_override_jdk" != x; then
16095     CURDIR="$PWD"
16096     cd "$with_override_jdk"
16097     JDK_TOPDIR="`pwd`"
16098     cd "$CURDIR"
16099     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16100         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16101     fi
16102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16103 $as_echo_n "checking if JDK should be overridden... " >&6; }
16104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16105 $as_echo "yes with $JDK_TOPDIR" >&6; }
16106 fi
16107 
16108 
16109 
16110 BUILD_OUTPUT="$OUTPUT_ROOT"
16111 
16112 
16113 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16114 BUILD_HOTSPOT=true
16115 
16116 
16117 
16118 # Check whether --with-import-hotspot was given.
16119 if test "${with_import_hotspot+set}" = set; then :
16120   withval=$with_import_hotspot;
16121 fi
16122 
16123 if test "x$with_import_hotspot" != x; then
16124     CURDIR="$PWD"
16125     cd "$with_import_hotspot"
16126     HOTSPOT_DIST="`pwd`"
16127     cd "$CURDIR"
16128     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16129         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16130     fi
16131     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16132 $as_echo_n "checking if hotspot should be imported... " >&6; }
16133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16134 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16135     BUILD_HOTSPOT=false
16136 fi
16137 
16138 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16139 
16140 
16141 ###############################################################################
16142 #
16143 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16144 # cross-compilation aware.
16145 #
16146 ###############################################################################
16147 
16148 
16149 ###############################################################################
16150 #
16151 # Configure the development tool paths and potential sysroot.
16152 #
16153 ac_ext=cpp
16154 ac_cpp='$CXXCPP $CPPFLAGS'
16155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16156 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16158 
16159 
16160 # The option used to specify the target .o,.a or .so file.
16161 # When compiling, how to specify the to be created object file.
16162 CC_OUT_OPTION='-o$(SPACE)'
16163 # When linking, how to specify the to be created executable.
16164 EXE_OUT_OPTION='-o$(SPACE)'
16165 # When linking, how to specify the to be created dynamically linkable library.
16166 LD_OUT_OPTION='-o$(SPACE)'
16167 # When archiving, how to specify the to be create static archive for object files.
16168 AR_OUT_OPTION='rcs$(SPACE)'
16169 
16170 
16171 
16172 
16173 
16174 # Locate the actual tools
16175 
16176 
16177 # Check whether --with-jtreg was given.
16178 if test "${with_jtreg+set}" = set; then :
16179   withval=$with_jtreg;
16180 else
16181   with_jtreg=no
16182 fi
16183 
16184 
16185   if test "x$with_jtreg" = xno; then
16186     # jtreg disabled
16187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16188 $as_echo_n "checking for jtreg... " >&6; }
16189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16190 $as_echo "no" >&6; }
16191   else
16192     if test "x$with_jtreg" != xyes; then
16193       # with path specified.
16194       JT_HOME="$with_jtreg"
16195     fi
16196 
16197     if test "x$JT_HOME" != x; then
16198       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16199 $as_echo_n "checking for jtreg... " >&6; }
16200 
16201       # use JT_HOME enviroment var.
16202 
16203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204 
16205   # Input might be given as Windows format, start by converting to
16206   # unix format.
16207   path="$JT_HOME"
16208   new_path=`$CYGPATH -u "$path"`
16209 
16210   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16211   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16212   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16213   # "foo.exe" is OK but "foo" is an error.
16214   #
16215   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16216   # It is also a way to make sure we got the proper file name for the real test later on.
16217   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16218   if test "x$test_shortpath" = x; then
16219     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16220 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16221     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16222   fi
16223 
16224   # Call helper function which possibly converts this using DOS-style short mode.
16225   # If so, the updated path is stored in $new_path.
16226 
16227   input_path="$new_path"
16228   # Check if we need to convert this using DOS-style short mode. If the path
16229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16230   # take no chances and rewrite it.
16231   # Note: m4 eats our [], so we need to use [ and ] instead.
16232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16233   if test "x$has_forbidden_chars" != x; then
16234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16238       # Going to short mode and back again did indeed matter. Since short mode is
16239       # case insensitive, let's make it lowercase to improve readability.
16240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16241       # Now convert it back to Unix-stile (cygpath)
16242       input_path=`$CYGPATH -u "$shortmode_path"`
16243       new_path="$input_path"
16244     fi
16245   fi
16246 
16247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16248   if test "x$test_cygdrive_prefix" = x; then
16249     # As a simple fix, exclude /usr/bin since it's not a real path.
16250     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16252       # a path prefixed by /cygdrive for fixpath to work.
16253       new_path="$CYGWIN_ROOT_PATH$input_path"
16254     fi
16255   fi
16256 
16257 
16258   if test "x$path" != "x$new_path"; then
16259     JT_HOME="$new_path"
16260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16261 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16262   fi
16263 
16264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16265 
16266   path="$JT_HOME"
16267   has_colon=`$ECHO $path | $GREP ^.:`
16268   new_path="$path"
16269   if test "x$has_colon" = x; then
16270     # Not in mixed or Windows style, start by that.
16271     new_path=`cmd //c echo $path`
16272   fi
16273 
16274 
16275   input_path="$new_path"
16276   # Check if we need to convert this using DOS-style short mode. If the path
16277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16278   # take no chances and rewrite it.
16279   # Note: m4 eats our [], so we need to use [ and ] instead.
16280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16281   if test "x$has_forbidden_chars" != x; then
16282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16283     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16284   fi
16285 
16286 
16287   windows_path="$new_path"
16288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289     unix_path=`$CYGPATH -u "$windows_path"`
16290     new_path="$unix_path"
16291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16293     new_path="$unix_path"
16294   fi
16295 
16296   if test "x$path" != "x$new_path"; then
16297     JT_HOME="$new_path"
16298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16299 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16300   fi
16301 
16302   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16303   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16304 
16305   else
16306     # We're on a posix platform. Hooray! :)
16307     path="$JT_HOME"
16308     has_space=`$ECHO "$path" | $GREP " "`
16309     if test "x$has_space" != x; then
16310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16311 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16312       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16313     fi
16314 
16315     # Use eval to expand a potential ~
16316     eval path="$path"
16317     if test ! -f "$path" && test ! -d "$path"; then
16318       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16319     fi
16320 
16321     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16322   fi
16323 
16324 
16325       # jtreg win32 script works for everybody
16326       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16327 
16328       if test ! -f "$JTREGEXE"; then
16329         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16330       fi
16331 
16332       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16333 $as_echo "$JTREGEXE" >&6; }
16334     else
16335       # try to find jtreg on path
16336 
16337     for ac_prog in jtreg
16338 do
16339   # Extract the first word of "$ac_prog", so it can be a program name with args.
16340 set dummy $ac_prog; ac_word=$2
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16342 $as_echo_n "checking for $ac_word... " >&6; }
16343 if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16344   $as_echo_n "(cached) " >&6
16345 else
16346   case $JTREGEXE in
16347   [\\/]* | ?:[\\/]*)
16348   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16349   ;;
16350   *)
16351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16352 for as_dir in $PATH
16353 do
16354   IFS=$as_save_IFS
16355   test -z "$as_dir" && as_dir=.
16356     for ac_exec_ext in '' $ac_executable_extensions; do
16357   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16358     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16360     break 2
16361   fi
16362 done
16363   done
16364 IFS=$as_save_IFS
16365 
16366   ;;
16367 esac
16368 fi
16369 JTREGEXE=$ac_cv_path_JTREGEXE
16370 if test -n "$JTREGEXE"; then
16371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16372 $as_echo "$JTREGEXE" >&6; }
16373 else
16374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16375 $as_echo "no" >&6; }
16376 fi
16377 
16378 
16379   test -n "$JTREGEXE" && break
16380 done
16381 
16382 
16383     if test "x$JTREGEXE" = x; then
16384         if test "xjtreg" = x; then
16385           PROG_NAME=jtregexe
16386         else
16387           PROG_NAME=jtreg
16388         fi
16389         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16390 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16391         as_fn_error $? "Cannot continue" "$LINENO" 5
16392     fi
16393 
16394 
16395       JT_HOME="`$DIRNAME $JTREGEXE`"
16396     fi
16397   fi
16398 
16399 
16400 
16401 
16402 
16403 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16404 
16405   # Store path to cygwin link.exe to help excluding it when searching for
16406   # VS linker. This must be done before changing the PATH when looking for VS.
16407   # Extract the first word of "link", so it can be a program name with args.
16408 set dummy link; ac_word=$2
16409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16410 $as_echo_n "checking for $ac_word... " >&6; }
16411 if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16412   $as_echo_n "(cached) " >&6
16413 else
16414   case $CYGWIN_LINK in
16415   [\\/]* | ?:[\\/]*)
16416   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16417   ;;
16418   *)
16419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16420 for as_dir in $PATH
16421 do
16422   IFS=$as_save_IFS
16423   test -z "$as_dir" && as_dir=.
16424     for ac_exec_ext in '' $ac_executable_extensions; do
16425   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16426     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16428     break 2
16429   fi
16430 done
16431   done
16432 IFS=$as_save_IFS
16433 
16434   ;;
16435 esac
16436 fi
16437 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16438 if test -n "$CYGWIN_LINK"; then
16439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16440 $as_echo "$CYGWIN_LINK" >&6; }
16441 else
16442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16443 $as_echo "no" >&6; }
16444 fi
16445 
16446 
16447   if test "x$CYGWIN_LINK" != x; then
16448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16449 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16450     "$CYGWIN_LINK" --version > /dev/null
16451     if test $? -eq 0 ; then
16452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16453 $as_echo "yes" >&6; }
16454     else
16455       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16456 $as_echo "no" >&6; }
16457       # This might be the VS linker. Don't exclude it later on.
16458       CYGWIN_LINK=""
16459     fi
16460   fi
16461 
16462   # First-hand choice is to locate and run the vsvars bat file.
16463 
16464   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16465     VCVARSFILE="vc/bin/vcvars32.bat"
16466   else
16467     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16468   fi
16469 
16470   VS_ENV_CMD=""
16471   VS_ENV_ARGS=""
16472   if test "x$with_toolsdir" != x; then
16473 
16474   if test "x$VS_ENV_CMD" = x; then
16475     VS100BASE="$with_toolsdir/../.."
16476     METHOD="--with-tools-dir"
16477 
16478   windows_path="$VS100BASE"
16479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16480     unix_path=`$CYGPATH -u "$windows_path"`
16481     VS100BASE="$unix_path"
16482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16484     VS100BASE="$unix_path"
16485   fi
16486 
16487     if test -d "$VS100BASE"; then
16488       if test -f "$VS100BASE/$VCVARSFILE"; then
16489         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16490 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16491         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16492       else
16493         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16494 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16495         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16496 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16497       fi
16498     fi
16499   fi
16500 
16501   fi
16502 
16503   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16504     # Having specified an argument which is incorrect will produce an instant failure;
16505     # we should not go on looking
16506     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16507 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16508     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16509 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16510     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16511   fi
16512 
16513   if test "x$ProgramW6432" != x; then
16514 
16515   if test "x$VS_ENV_CMD" = x; then
16516     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16517     METHOD="well-known name"
16518 
16519   windows_path="$WIN_SDK_BASE"
16520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16521     unix_path=`$CYGPATH -u "$windows_path"`
16522     WIN_SDK_BASE="$unix_path"
16523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16525     WIN_SDK_BASE="$unix_path"
16526   fi
16527 
16528     if test -d "$WIN_SDK_BASE"; then
16529       # There have been cases of partial or broken SDK installations. A missing
16530       # lib dir is not going to work.
16531       if test ! -d "$WIN_SDK_BASE/../lib"; then
16532         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16533 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16534         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16535 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16536       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16537         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16538 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16539         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16540         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16541           VS_ENV_ARGS="/x86"
16542         else
16543           VS_ENV_ARGS="/x64"
16544         fi
16545       else
16546         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16547 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16548         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16549 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16550       fi
16551     fi
16552   fi
16553 
16554   fi
16555   if test "x$PROGRAMW6432" != x; then
16556 
16557   if test "x$VS_ENV_CMD" = x; then
16558     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16559     METHOD="well-known name"
16560 
16561   windows_path="$WIN_SDK_BASE"
16562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16563     unix_path=`$CYGPATH -u "$windows_path"`
16564     WIN_SDK_BASE="$unix_path"
16565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16567     WIN_SDK_BASE="$unix_path"
16568   fi
16569 
16570     if test -d "$WIN_SDK_BASE"; then
16571       # There have been cases of partial or broken SDK installations. A missing
16572       # lib dir is not going to work.
16573       if test ! -d "$WIN_SDK_BASE/../lib"; then
16574         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16575 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16576         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16577 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16578       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16579         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16580 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16581         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16582         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16583           VS_ENV_ARGS="/x86"
16584         else
16585           VS_ENV_ARGS="/x64"
16586         fi
16587       else
16588         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16589 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16590         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16591 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16592       fi
16593     fi
16594   fi
16595 
16596   fi
16597   if test "x$PROGRAMFILES" != x; then
16598 
16599   if test "x$VS_ENV_CMD" = x; then
16600     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16601     METHOD="well-known name"
16602 
16603   windows_path="$WIN_SDK_BASE"
16604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16605     unix_path=`$CYGPATH -u "$windows_path"`
16606     WIN_SDK_BASE="$unix_path"
16607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16609     WIN_SDK_BASE="$unix_path"
16610   fi
16611 
16612     if test -d "$WIN_SDK_BASE"; then
16613       # There have been cases of partial or broken SDK installations. A missing
16614       # lib dir is not going to work.
16615       if test ! -d "$WIN_SDK_BASE/../lib"; then
16616         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16617 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16618         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16619 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16620       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16621         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16622 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16623         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16624         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16625           VS_ENV_ARGS="/x86"
16626         else
16627           VS_ENV_ARGS="/x64"
16628         fi
16629       else
16630         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16631 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16632         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16633 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16634       fi
16635     fi
16636   fi
16637 
16638   fi
16639 
16640   if test "x$VS_ENV_CMD" = x; then
16641     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16642     METHOD="well-known name"
16643 
16644   windows_path="$WIN_SDK_BASE"
16645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16646     unix_path=`$CYGPATH -u "$windows_path"`
16647     WIN_SDK_BASE="$unix_path"
16648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16650     WIN_SDK_BASE="$unix_path"
16651   fi
16652 
16653     if test -d "$WIN_SDK_BASE"; then
16654       # There have been cases of partial or broken SDK installations. A missing
16655       # lib dir is not going to work.
16656       if test ! -d "$WIN_SDK_BASE/../lib"; then
16657         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16658 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16659         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16660 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16661       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16662         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16663 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16664         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16665         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16666           VS_ENV_ARGS="/x86"
16667         else
16668           VS_ENV_ARGS="/x64"
16669         fi
16670       else
16671         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16672 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16673         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16674 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16675       fi
16676     fi
16677   fi
16678 
16679 
16680   if test "x$VS_ENV_CMD" = x; then
16681     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16682     METHOD="well-known name"
16683 
16684   windows_path="$WIN_SDK_BASE"
16685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16686     unix_path=`$CYGPATH -u "$windows_path"`
16687     WIN_SDK_BASE="$unix_path"
16688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16690     WIN_SDK_BASE="$unix_path"
16691   fi
16692 
16693     if test -d "$WIN_SDK_BASE"; then
16694       # There have been cases of partial or broken SDK installations. A missing
16695       # lib dir is not going to work.
16696       if test ! -d "$WIN_SDK_BASE/../lib"; then
16697         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16698 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16699         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16700 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16701       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16702         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16703 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16704         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16705         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16706           VS_ENV_ARGS="/x86"
16707         else
16708           VS_ENV_ARGS="/x64"
16709         fi
16710       else
16711         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16712 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16713         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16714 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16715       fi
16716     fi
16717   fi
16718 
16719 
16720   if test "x$VS100COMNTOOLS" != x; then
16721 
16722   if test "x$VS_ENV_CMD" = x; then
16723     VS100BASE="$VS100COMNTOOLS/../.."
16724     METHOD="VS100COMNTOOLS variable"
16725 
16726   windows_path="$VS100BASE"
16727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16728     unix_path=`$CYGPATH -u "$windows_path"`
16729     VS100BASE="$unix_path"
16730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16732     VS100BASE="$unix_path"
16733   fi
16734 
16735     if test -d "$VS100BASE"; then
16736       if test -f "$VS100BASE/$VCVARSFILE"; then
16737         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16738 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16739         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16740       else
16741         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16742 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16743         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16744 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16745       fi
16746     fi
16747   fi
16748 
16749   fi
16750   if test "x$PROGRAMFILES" != x; then
16751 
16752   if test "x$VS_ENV_CMD" = x; then
16753     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16754     METHOD="well-known name"
16755 
16756   windows_path="$VS100BASE"
16757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16758     unix_path=`$CYGPATH -u "$windows_path"`
16759     VS100BASE="$unix_path"
16760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16762     VS100BASE="$unix_path"
16763   fi
16764 
16765     if test -d "$VS100BASE"; then
16766       if test -f "$VS100BASE/$VCVARSFILE"; then
16767         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16768 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16769         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16770       else
16771         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16772 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16773         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16774 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16775       fi
16776     fi
16777   fi
16778 
16779   fi
16780 
16781   if test "x$VS_ENV_CMD" = x; then
16782     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16783     METHOD="well-known name"
16784 
16785   windows_path="$VS100BASE"
16786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16787     unix_path=`$CYGPATH -u "$windows_path"`
16788     VS100BASE="$unix_path"
16789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16791     VS100BASE="$unix_path"
16792   fi
16793 
16794     if test -d "$VS100BASE"; then
16795       if test -f "$VS100BASE/$VCVARSFILE"; then
16796         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16797 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16798         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16799       else
16800         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16801 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16802         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16803 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16804       fi
16805     fi
16806   fi
16807 
16808 
16809   if test "x$VS_ENV_CMD" = x; then
16810     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16811     METHOD="well-known name"
16812 
16813   windows_path="$VS100BASE"
16814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16815     unix_path=`$CYGPATH -u "$windows_path"`
16816     VS100BASE="$unix_path"
16817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16819     VS100BASE="$unix_path"
16820   fi
16821 
16822     if test -d "$VS100BASE"; then
16823       if test -f "$VS100BASE/$VCVARSFILE"; then
16824         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16825 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16826         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16827       else
16828         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16829 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16830         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16831 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16832       fi
16833     fi
16834   fi
16835 
16836 
16837   if test "x$VS_ENV_CMD" != x; then
16838     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16839 
16840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16841 
16842   # First separate the path from the arguments. This will split at the first
16843   # space.
16844   complete="$VS_ENV_CMD"
16845   path="${complete%% *}"
16846   tmp="$complete EOL"
16847   arguments="${tmp#* }"
16848 
16849   # Input might be given as Windows format, start by converting to
16850   # unix format.
16851   new_path=`$CYGPATH -u "$path"`
16852 
16853   # Now try to locate executable using which
16854   new_path=`$WHICH "$new_path" 2> /dev/null`
16855   # bat and cmd files are not always considered executable in cygwin causing which
16856   # to not find them
16857   if test "x$new_path" = x \
16858            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16859            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16860     new_path=`$CYGPATH -u "$path"`
16861   fi
16862   if test "x$new_path" = x; then
16863     # Oops. Which didn't find the executable.
16864     # The splitting of arguments from the executable at a space might have been incorrect,
16865     # since paths with space are more likely in Windows. Give it another try with the whole
16866     # argument.
16867     path="$complete"
16868     arguments="EOL"
16869     new_path=`$CYGPATH -u "$path"`
16870     new_path=`$WHICH "$new_path" 2> /dev/null`
16871     # bat and cmd files are not always considered executable in cygwin causing which
16872     # to not find them
16873     if test "x$new_path" = x \
16874              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16875              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16876       new_path=`$CYGPATH -u "$path"`
16877     fi
16878     if test "x$new_path" = x; then
16879       # It's still not found. Now this is an unrecoverable error.
16880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16881 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16882       has_space=`$ECHO "$complete" | $GREP " "`
16883       if test "x$has_space" != x; then
16884         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16885 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16886       fi
16887       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16888     fi
16889   fi
16890 
16891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16894   # "foo.exe" is OK but "foo" is an error.
16895   #
16896   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16897   # It is also a way to make sure we got the proper file name for the real test later on.
16898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16899   if test "x$test_shortpath" = x; then
16900     # Short path failed, file does not exist as specified.
16901     # Try adding .exe or .cmd
16902     if test -f "${new_path}.exe"; then
16903        input_to_shortpath="${new_path}.exe"
16904     elif test -f "${new_path}.cmd"; then
16905        input_to_shortpath="${new_path}.cmd"
16906     else
16907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16908 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16909       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16910 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16911       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16912     fi
16913   else
16914     input_to_shortpath="$new_path"
16915   fi
16916 
16917   # Call helper function which possibly converts this using DOS-style short mode.
16918   # If so, the updated path is stored in $new_path.
16919   new_path="$input_to_shortpath"
16920 
16921   input_path="$input_to_shortpath"
16922   # Check if we need to convert this using DOS-style short mode. If the path
16923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16924   # take no chances and rewrite it.
16925   # Note: m4 eats our [], so we need to use [ and ] instead.
16926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16927   if test "x$has_forbidden_chars" != x; then
16928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16929     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16930     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16931     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16932       # Going to short mode and back again did indeed matter. Since short mode is
16933       # case insensitive, let's make it lowercase to improve readability.
16934       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16935       # Now convert it back to Unix-stile (cygpath)
16936       input_path=`$CYGPATH -u "$shortmode_path"`
16937       new_path="$input_path"
16938     fi
16939   fi
16940 
16941   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16942   if test "x$test_cygdrive_prefix" = x; then
16943     # As a simple fix, exclude /usr/bin since it's not a real path.
16944     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16945       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16946       # a path prefixed by /cygdrive for fixpath to work.
16947       new_path="$CYGWIN_ROOT_PATH$input_path"
16948     fi
16949   fi
16950 
16951   # remove trailing .exe if any
16952   new_path="${new_path/%.exe/}"
16953 
16954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16955 
16956   # First separate the path from the arguments. This will split at the first
16957   # space.
16958   complete="$VS_ENV_CMD"
16959   path="${complete%% *}"
16960   tmp="$complete EOL"
16961   arguments="${tmp#* }"
16962 
16963   # Input might be given as Windows format, start by converting to
16964   # unix format.
16965   new_path="$path"
16966 
16967   windows_path="$new_path"
16968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16969     unix_path=`$CYGPATH -u "$windows_path"`
16970     new_path="$unix_path"
16971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16973     new_path="$unix_path"
16974   fi
16975 
16976 
16977   # Now try to locate executable using which
16978   new_path=`$WHICH "$new_path" 2> /dev/null`
16979 
16980   if test "x$new_path" = x; then
16981     # Oops. Which didn't find the executable.
16982     # The splitting of arguments from the executable at a space might have been incorrect,
16983     # since paths with space are more likely in Windows. Give it another try with the whole
16984     # argument.
16985     path="$complete"
16986     arguments="EOL"
16987     new_path="$path"
16988 
16989   windows_path="$new_path"
16990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991     unix_path=`$CYGPATH -u "$windows_path"`
16992     new_path="$unix_path"
16993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16995     new_path="$unix_path"
16996   fi
16997 
16998 
16999     new_path=`$WHICH "$new_path" 2> /dev/null`
17000 
17001     if test "x$new_path" = x; then
17002       # It's still not found. Now this is an unrecoverable error.
17003       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17004 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17005       has_space=`$ECHO "$complete" | $GREP " "`
17006       if test "x$has_space" != x; then
17007         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17008 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17009       fi
17010       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17011     fi
17012   fi
17013 
17014   # Now new_path has a complete unix path to the binary
17015   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17016     # Keep paths in /bin as-is, but remove trailing .exe if any
17017     new_path="${new_path/%.exe/}"
17018     # Do not save /bin paths to all_fixpath_prefixes!
17019   else
17020     # Not in mixed or Windows style, start by that.
17021     new_path=`cmd //c echo $new_path`
17022 
17023   input_path="$new_path"
17024   # Check if we need to convert this using DOS-style short mode. If the path
17025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17026   # take no chances and rewrite it.
17027   # Note: m4 eats our [], so we need to use [ and ] instead.
17028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17029   if test "x$has_forbidden_chars" != x; then
17030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17031     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17032   fi
17033 
17034     # Output is in $new_path
17035 
17036   windows_path="$new_path"
17037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17038     unix_path=`$CYGPATH -u "$windows_path"`
17039     new_path="$unix_path"
17040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17042     new_path="$unix_path"
17043   fi
17044 
17045     # remove trailing .exe if any
17046     new_path="${new_path/%.exe/}"
17047 
17048     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17049     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17050   fi
17051 
17052   else
17053     # We're on a posix platform. Hooray! :)
17054     # First separate the path from the arguments. This will split at the first
17055     # space.
17056     complete="$VS_ENV_CMD"
17057     path="${complete%% *}"
17058     tmp="$complete EOL"
17059     arguments="${tmp#* }"
17060 
17061     # Cannot rely on the command "which" here since it doesn't always work.
17062     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17063     if test -z "$is_absolute_path"; then
17064       # Path to executable is not absolute. Find it.
17065       IFS_save="$IFS"
17066       IFS=:
17067       for p in $PATH; do
17068         if test -f "$p/$path" && test -x "$p/$path"; then
17069           new_path="$p/$path"
17070           break
17071         fi
17072       done
17073       IFS="$IFS_save"
17074     else
17075       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17076 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17077       new_path="$path"
17078     fi
17079 
17080     if test "x$new_path" = x; then
17081         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17082 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17083         has_space=`$ECHO "$complete" | $GREP " "`
17084         if test "x$has_space" != x; then
17085           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17086 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17087         fi
17088         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17089       fi
17090   fi
17091 
17092       # Now join together the path and the arguments once again
17093       if test "x$arguments" != xEOL; then
17094         new_complete="$new_path ${arguments% *}"
17095       else
17096         new_complete="$new_path"
17097       fi
17098 
17099   if test "x$complete" != "x$new_complete"; then
17100       VS_ENV_CMD="$new_complete"
17101       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17102 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17103     fi
17104 
17105 
17106     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17107     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17108 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17109     cd $OUTPUT_ROOT
17110     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17111     # to autoconf standards.
17112 
17113     #----
17114 
17115     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17116     # but calculate the difference in Cygwin environment before/after running it and then
17117     # apply the diff.
17118 
17119     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17120       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17121       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17122       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17123     else
17124       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17125       _dosbash=`cmd //c echo \`which bash\``
17126     fi
17127 
17128     # generate the set of exported vars before/after the vs10 setup
17129     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17130     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17131     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17132     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17133 
17134     # Now execute the newly created bat file.
17135     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17136     cmd /c localdevenvtmp.bat | cat
17137 
17138     # apply the diff (less some non-vs10 vars named by "!")
17139     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17140     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17141     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17142 
17143     # cleanup
17144     $RM localdevenvtmp*
17145     #----
17146     cd $CURDIR
17147     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17148       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17149 $as_echo "no" >&6; }
17150       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17151 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17152       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17153 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17154       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17155 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17156       as_fn_error $? "Cannot continue" "$LINENO" 5
17157     fi
17158 
17159     # Now set all paths and other env variables. This will allow the rest of
17160     # the configure script to find and run the compiler in the proper way.
17161     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17162 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17163     . $OUTPUT_ROOT/localdevenv.sh
17164   else
17165     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17166     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17167 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17168   fi
17169 
17170   # At this point, we should have corrent variables in the environment, or we can't continue.
17171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17172 $as_echo_n "checking for Visual Studio variables... " >&6; }
17173 
17174   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17175     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17176       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17177 $as_echo "present but broken" >&6; }
17178       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17179     else
17180       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17181 $as_echo "ok" >&6; }
17182       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17183       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17184       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17185       VS_PATH="$PATH"
17186 
17187 
17188 
17189     fi
17190   else
17191     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17192 $as_echo "not found" >&6; }
17193 
17194     if test "x$VS_ENV_CMD" = x; then
17195       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17196 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17197       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17198 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17199     else
17200       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17201 $as_echo "$as_me: Running the extraction script failed." >&6;}
17202     fi
17203     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17204 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17205     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17206 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17207     as_fn_error $? "Cannot continue" "$LINENO" 5
17208   fi
17209 
17210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17211 $as_echo_n "checking for msvcr100.dll... " >&6; }
17212 
17213 # Check whether --with-msvcr-dll was given.
17214 if test "${with_msvcr_dll+set}" = set; then :
17215   withval=$with_msvcr_dll;
17216 fi
17217 
17218   if test "x$with_msvcr_dll" != x; then
17219     MSVCR_DLL="$with_msvcr_dll"
17220   else
17221     if test "x$VCINSTALLDIR" != x; then
17222       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17223         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17224       else
17225         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17226         if test "x$MSVCR_DLL" = x; then
17227           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17228         fi
17229       fi
17230       if test "x$MSVCR_DLL" != x; then
17231         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17232 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17233       else
17234         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17235 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17236       fi
17237     fi
17238     if test "x$MSVCR_DLL" = x; then
17239       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17240         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17241 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17242         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17243       fi
17244     fi
17245   fi
17246   if test "x$MSVCR_DLL" = x; then
17247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17248 $as_echo "no" >&6; }
17249     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17250   fi
17251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17252 $as_echo "$MSVCR_DLL" >&6; }
17253 
17254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17255 
17256   # Input might be given as Windows format, start by converting to
17257   # unix format.
17258   path="$MSVCR_DLL"
17259   new_path=`$CYGPATH -u "$path"`
17260 
17261   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17262   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17263   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17264   # "foo.exe" is OK but "foo" is an error.
17265   #
17266   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17267   # It is also a way to make sure we got the proper file name for the real test later on.
17268   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17269   if test "x$test_shortpath" = x; then
17270     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17271 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17272     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17273   fi
17274 
17275   # Call helper function which possibly converts this using DOS-style short mode.
17276   # If so, the updated path is stored in $new_path.
17277 
17278   input_path="$new_path"
17279   # Check if we need to convert this using DOS-style short mode. If the path
17280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17281   # take no chances and rewrite it.
17282   # Note: m4 eats our [], so we need to use [ and ] instead.
17283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17284   if test "x$has_forbidden_chars" != x; then
17285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17286     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17287     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17288     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17289       # Going to short mode and back again did indeed matter. Since short mode is
17290       # case insensitive, let's make it lowercase to improve readability.
17291       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17292       # Now convert it back to Unix-stile (cygpath)
17293       input_path=`$CYGPATH -u "$shortmode_path"`
17294       new_path="$input_path"
17295     fi
17296   fi
17297 
17298   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17299   if test "x$test_cygdrive_prefix" = x; then
17300     # As a simple fix, exclude /usr/bin since it's not a real path.
17301     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17302       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17303       # a path prefixed by /cygdrive for fixpath to work.
17304       new_path="$CYGWIN_ROOT_PATH$input_path"
17305     fi
17306   fi
17307 
17308 
17309   if test "x$path" != "x$new_path"; then
17310     MSVCR_DLL="$new_path"
17311     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17312 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17313   fi
17314 
17315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17316 
17317   path="$MSVCR_DLL"
17318   has_colon=`$ECHO $path | $GREP ^.:`
17319   new_path="$path"
17320   if test "x$has_colon" = x; then
17321     # Not in mixed or Windows style, start by that.
17322     new_path=`cmd //c echo $path`
17323   fi
17324 
17325 
17326   input_path="$new_path"
17327   # Check if we need to convert this using DOS-style short mode. If the path
17328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17329   # take no chances and rewrite it.
17330   # Note: m4 eats our [], so we need to use [ and ] instead.
17331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17332   if test "x$has_forbidden_chars" != x; then
17333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17334     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17335   fi
17336 
17337 
17338   windows_path="$new_path"
17339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17340     unix_path=`$CYGPATH -u "$windows_path"`
17341     new_path="$unix_path"
17342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17344     new_path="$unix_path"
17345   fi
17346 
17347   if test "x$path" != "x$new_path"; then
17348     MSVCR_DLL="$new_path"
17349     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17350 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17351   fi
17352 
17353   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17354   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17355 
17356   else
17357     # We're on a posix platform. Hooray! :)
17358     path="$MSVCR_DLL"
17359     has_space=`$ECHO "$path" | $GREP " "`
17360     if test "x$has_space" != x; then
17361       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17362 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17363       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17364     fi
17365 
17366     # Use eval to expand a potential ~
17367     eval path="$path"
17368     if test ! -f "$path" && test ! -d "$path"; then
17369       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17370     fi
17371 
17372     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17373   fi
17374 
17375 
17376 
17377 
17378 # Check whether --with-dxsdk was given.
17379 if test "${with_dxsdk+set}" = set; then :
17380   withval=$with_dxsdk;
17381 fi
17382 
17383 
17384 # Check whether --with-dxsdk-lib was given.
17385 if test "${with_dxsdk_lib+set}" = set; then :
17386   withval=$with_dxsdk_lib;
17387 fi
17388 
17389 
17390 # Check whether --with-dxsdk-include was given.
17391 if test "${with_dxsdk_include+set}" = set; then :
17392   withval=$with_dxsdk_include;
17393 fi
17394 
17395 
17396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17397 $as_echo_n "checking for DirectX SDK... " >&6; }
17398 
17399   if test "x$with_dxsdk" != x; then
17400     dxsdk_path="$with_dxsdk"
17401   elif test "x$DXSDK_DIR" != x; then
17402     dxsdk_path="$DXSDK_DIR"
17403   elif test -d "C:/DXSDK"; then
17404     dxsdk_path="C:/DXSDK"
17405   else
17406     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17407   fi
17408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17409 $as_echo "$dxsdk_path" >&6; }
17410 
17411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17412 
17413   # Input might be given as Windows format, start by converting to
17414   # unix format.
17415   path="$dxsdk_path"
17416   new_path=`$CYGPATH -u "$path"`
17417 
17418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17421   # "foo.exe" is OK but "foo" is an error.
17422   #
17423   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17424   # It is also a way to make sure we got the proper file name for the real test later on.
17425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17426   if test "x$test_shortpath" = x; then
17427     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17428 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17429     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17430   fi
17431 
17432   # Call helper function which possibly converts this using DOS-style short mode.
17433   # If so, the updated path is stored in $new_path.
17434 
17435   input_path="$new_path"
17436   # Check if we need to convert this using DOS-style short mode. If the path
17437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17438   # take no chances and rewrite it.
17439   # Note: m4 eats our [], so we need to use [ and ] instead.
17440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17441   if test "x$has_forbidden_chars" != x; then
17442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17446       # Going to short mode and back again did indeed matter. Since short mode is
17447       # case insensitive, let's make it lowercase to improve readability.
17448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17449       # Now convert it back to Unix-stile (cygpath)
17450       input_path=`$CYGPATH -u "$shortmode_path"`
17451       new_path="$input_path"
17452     fi
17453   fi
17454 
17455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17456   if test "x$test_cygdrive_prefix" = x; then
17457     # As a simple fix, exclude /usr/bin since it's not a real path.
17458     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17460       # a path prefixed by /cygdrive for fixpath to work.
17461       new_path="$CYGWIN_ROOT_PATH$input_path"
17462     fi
17463   fi
17464 
17465 
17466   if test "x$path" != "x$new_path"; then
17467     dxsdk_path="$new_path"
17468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17469 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17470   fi
17471 
17472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17473 
17474   path="$dxsdk_path"
17475   has_colon=`$ECHO $path | $GREP ^.:`
17476   new_path="$path"
17477   if test "x$has_colon" = x; then
17478     # Not in mixed or Windows style, start by that.
17479     new_path=`cmd //c echo $path`
17480   fi
17481 
17482 
17483   input_path="$new_path"
17484   # Check if we need to convert this using DOS-style short mode. If the path
17485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17486   # take no chances and rewrite it.
17487   # Note: m4 eats our [], so we need to use [ and ] instead.
17488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17489   if test "x$has_forbidden_chars" != x; then
17490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17492   fi
17493 
17494 
17495   windows_path="$new_path"
17496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17497     unix_path=`$CYGPATH -u "$windows_path"`
17498     new_path="$unix_path"
17499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17501     new_path="$unix_path"
17502   fi
17503 
17504   if test "x$path" != "x$new_path"; then
17505     dxsdk_path="$new_path"
17506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17507 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17508   fi
17509 
17510   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17511   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17512 
17513   else
17514     # We're on a posix platform. Hooray! :)
17515     path="$dxsdk_path"
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_path, which resolves as \"$path\", is invalid." >&5
17519 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17520       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17521     fi
17522 
17523     # Use eval to expand a potential ~
17524     eval path="$path"
17525     if test ! -f "$path" && test ! -d "$path"; then
17526       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17527     fi
17528 
17529     dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17530   fi
17531 
17532 
17533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17534 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17535   if test "x$with_dxsdk_lib" != x; then
17536     DXSDK_LIB_PATH="$with_dxsdk_lib"
17537   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17538     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17539   else
17540     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17541   fi
17542   # dsound.lib is linked to in jsoundds
17543   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17544     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17545   fi
17546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17547 $as_echo "$DXSDK_LIB_PATH" >&6; }
17548 
17549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17550 
17551   # Input might be given as Windows format, start by converting to
17552   # unix format.
17553   path="$DXSDK_LIB_PATH"
17554   new_path=`$CYGPATH -u "$path"`
17555 
17556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17559   # "foo.exe" is OK but "foo" is an error.
17560   #
17561   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17562   # It is also a way to make sure we got the proper file name for the real test later on.
17563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17564   if test "x$test_shortpath" = x; then
17565     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17566 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17567     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17568   fi
17569 
17570   # Call helper function which possibly converts this using DOS-style short mode.
17571   # If so, the updated path is stored in $new_path.
17572 
17573   input_path="$new_path"
17574   # Check if we need to convert this using DOS-style short mode. If the path
17575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17576   # take no chances and rewrite it.
17577   # Note: m4 eats our [], so we need to use [ and ] instead.
17578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17579   if test "x$has_forbidden_chars" != x; then
17580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17581     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17582     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17583     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17584       # Going to short mode and back again did indeed matter. Since short mode is
17585       # case insensitive, let's make it lowercase to improve readability.
17586       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17587       # Now convert it back to Unix-stile (cygpath)
17588       input_path=`$CYGPATH -u "$shortmode_path"`
17589       new_path="$input_path"
17590     fi
17591   fi
17592 
17593   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17594   if test "x$test_cygdrive_prefix" = x; then
17595     # As a simple fix, exclude /usr/bin since it's not a real path.
17596     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17597       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17598       # a path prefixed by /cygdrive for fixpath to work.
17599       new_path="$CYGWIN_ROOT_PATH$input_path"
17600     fi
17601   fi
17602 
17603 
17604   if test "x$path" != "x$new_path"; then
17605     DXSDK_LIB_PATH="$new_path"
17606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17607 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17608   fi
17609 
17610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17611 
17612   path="$DXSDK_LIB_PATH"
17613   has_colon=`$ECHO $path | $GREP ^.:`
17614   new_path="$path"
17615   if test "x$has_colon" = x; then
17616     # Not in mixed or Windows style, start by that.
17617     new_path=`cmd //c echo $path`
17618   fi
17619 
17620 
17621   input_path="$new_path"
17622   # Check if we need to convert this using DOS-style short mode. If the path
17623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17624   # take no chances and rewrite it.
17625   # Note: m4 eats our [], so we need to use [ and ] instead.
17626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17627   if test "x$has_forbidden_chars" != x; then
17628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17629     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17630   fi
17631 
17632 
17633   windows_path="$new_path"
17634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17635     unix_path=`$CYGPATH -u "$windows_path"`
17636     new_path="$unix_path"
17637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17639     new_path="$unix_path"
17640   fi
17641 
17642   if test "x$path" != "x$new_path"; then
17643     DXSDK_LIB_PATH="$new_path"
17644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17645 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17646   fi
17647 
17648   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17649   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17650 
17651   else
17652     # We're on a posix platform. Hooray! :)
17653     path="$DXSDK_LIB_PATH"
17654     has_space=`$ECHO "$path" | $GREP " "`
17655     if test "x$has_space" != x; then
17656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17657 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17658       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17659     fi
17660 
17661     # Use eval to expand a potential ~
17662     eval path="$path"
17663     if test ! -f "$path" && test ! -d "$path"; then
17664       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17665     fi
17666 
17667     DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17668   fi
17669 
17670 
17671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17672 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17673   if test "x$with_dxsdk_include" != x; then
17674     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17675   else
17676     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17677   fi
17678   # dsound.h is included in jsoundds
17679   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17680     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17681   fi
17682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17683 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17684 
17685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17686 
17687   # Input might be given as Windows format, start by converting to
17688   # unix format.
17689   path="$DXSDK_INCLUDE_PATH"
17690   new_path=`$CYGPATH -u "$path"`
17691 
17692   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17693   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17694   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17695   # "foo.exe" is OK but "foo" is an error.
17696   #
17697   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17698   # It is also a way to make sure we got the proper file name for the real test later on.
17699   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17700   if test "x$test_shortpath" = x; then
17701     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17702 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17703     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17704   fi
17705 
17706   # Call helper function which possibly converts this using DOS-style short mode.
17707   # If so, the updated path is stored in $new_path.
17708 
17709   input_path="$new_path"
17710   # Check if we need to convert this using DOS-style short mode. If the path
17711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17712   # take no chances and rewrite it.
17713   # Note: m4 eats our [], so we need to use [ and ] instead.
17714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17715   if test "x$has_forbidden_chars" != x; then
17716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17717     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17718     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17719     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17720       # Going to short mode and back again did indeed matter. Since short mode is
17721       # case insensitive, let's make it lowercase to improve readability.
17722       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17723       # Now convert it back to Unix-stile (cygpath)
17724       input_path=`$CYGPATH -u "$shortmode_path"`
17725       new_path="$input_path"
17726     fi
17727   fi
17728 
17729   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17730   if test "x$test_cygdrive_prefix" = x; then
17731     # As a simple fix, exclude /usr/bin since it's not a real path.
17732     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17733       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17734       # a path prefixed by /cygdrive for fixpath to work.
17735       new_path="$CYGWIN_ROOT_PATH$input_path"
17736     fi
17737   fi
17738 
17739 
17740   if test "x$path" != "x$new_path"; then
17741     DXSDK_INCLUDE_PATH="$new_path"
17742     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17743 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17744   fi
17745 
17746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17747 
17748   path="$DXSDK_INCLUDE_PATH"
17749   has_colon=`$ECHO $path | $GREP ^.:`
17750   new_path="$path"
17751   if test "x$has_colon" = x; then
17752     # Not in mixed or Windows style, start by that.
17753     new_path=`cmd //c echo $path`
17754   fi
17755 
17756 
17757   input_path="$new_path"
17758   # Check if we need to convert this using DOS-style short mode. If the path
17759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17760   # take no chances and rewrite it.
17761   # Note: m4 eats our [], so we need to use [ and ] instead.
17762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17763   if test "x$has_forbidden_chars" != x; then
17764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17765     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17766   fi
17767 
17768 
17769   windows_path="$new_path"
17770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17771     unix_path=`$CYGPATH -u "$windows_path"`
17772     new_path="$unix_path"
17773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17775     new_path="$unix_path"
17776   fi
17777 
17778   if test "x$path" != "x$new_path"; then
17779     DXSDK_INCLUDE_PATH="$new_path"
17780     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17781 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17782   fi
17783 
17784   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17785   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17786 
17787   else
17788     # We're on a posix platform. Hooray! :)
17789     path="$DXSDK_INCLUDE_PATH"
17790     has_space=`$ECHO "$path" | $GREP " "`
17791     if test "x$has_space" != x; then
17792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17793 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17794       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17795     fi
17796 
17797     # Use eval to expand a potential ~
17798     eval path="$path"
17799     if test ! -f "$path" && test ! -d "$path"; then
17800       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17801     fi
17802 
17803     DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17804   fi
17805 
17806 
17807 
17808 
17809   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17810 
17811 fi
17812 
17813 
17814 
17815 # If --build AND --host is set, then the configure script will find any
17816 # cross compilation tools in the PATH. Cross compilation tools
17817 # follows the cross compilation standard where they are prefixed with ${host}.
17818 # For example the binary i686-sun-solaris2.10-gcc
17819 # will cross compile for i686-sun-solaris2.10
17820 # If neither of build and host is not set, then build=host and the
17821 # default compiler found in the path will be used.
17822 # Setting only --host, does not seem to be really supported.
17823 # Please set both --build and --host if you want to cross compile.
17824 
17825 if test "x$COMPILE_TYPE" = "xcross"; then
17826     # Now we to find a C/C++ compiler that can build executables for the build
17827     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17828     # once. Also, we need to do this before adding a tools dir to the path,
17829     # otherwise we might pick up cross-compilers which don't use standard naming.
17830     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17831     # to wait until they are properly discovered.
17832     for ac_prog in cl cc gcc
17833 do
17834   # Extract the first word of "$ac_prog", so it can be a program name with args.
17835 set dummy $ac_prog; ac_word=$2
17836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17837 $as_echo_n "checking for $ac_word... " >&6; }
17838 if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17839   $as_echo_n "(cached) " >&6
17840 else
17841   case $BUILD_CC in
17842   [\\/]* | ?:[\\/]*)
17843   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17844   ;;
17845   *)
17846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17847 for as_dir in $PATH
17848 do
17849   IFS=$as_save_IFS
17850   test -z "$as_dir" && as_dir=.
17851     for ac_exec_ext in '' $ac_executable_extensions; do
17852   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17853     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17855     break 2
17856   fi
17857 done
17858   done
17859 IFS=$as_save_IFS
17860 
17861   ;;
17862 esac
17863 fi
17864 BUILD_CC=$ac_cv_path_BUILD_CC
17865 if test -n "$BUILD_CC"; then
17866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17867 $as_echo "$BUILD_CC" >&6; }
17868 else
17869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17870 $as_echo "no" >&6; }
17871 fi
17872 
17873 
17874   test -n "$BUILD_CC" && break
17875 done
17876 
17877 
17878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17879 
17880   # First separate the path from the arguments. This will split at the first
17881   # space.
17882   complete="$BUILD_CC"
17883   path="${complete%% *}"
17884   tmp="$complete EOL"
17885   arguments="${tmp#* }"
17886 
17887   # Input might be given as Windows format, start by converting to
17888   # unix format.
17889   new_path=`$CYGPATH -u "$path"`
17890 
17891   # Now try to locate executable using which
17892   new_path=`$WHICH "$new_path" 2> /dev/null`
17893   # bat and cmd files are not always considered executable in cygwin causing which
17894   # to not find them
17895   if test "x$new_path" = x \
17896            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17897            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17898     new_path=`$CYGPATH -u "$path"`
17899   fi
17900   if test "x$new_path" = x; then
17901     # Oops. Which didn't find the executable.
17902     # The splitting of arguments from the executable at a space might have been incorrect,
17903     # since paths with space are more likely in Windows. Give it another try with the whole
17904     # argument.
17905     path="$complete"
17906     arguments="EOL"
17907     new_path=`$CYGPATH -u "$path"`
17908     new_path=`$WHICH "$new_path" 2> /dev/null`
17909     # bat and cmd files are not always considered executable in cygwin causing which
17910     # to not find them
17911     if test "x$new_path" = x \
17912              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17913              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17914       new_path=`$CYGPATH -u "$path"`
17915     fi
17916     if test "x$new_path" = x; then
17917       # It's still not found. Now this is an unrecoverable error.
17918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17919 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17920       has_space=`$ECHO "$complete" | $GREP " "`
17921       if test "x$has_space" != x; then
17922         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17923 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17924       fi
17925       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17926     fi
17927   fi
17928 
17929   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17930   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17931   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17932   # "foo.exe" is OK but "foo" is an error.
17933   #
17934   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17935   # It is also a way to make sure we got the proper file name for the real test later on.
17936   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17937   if test "x$test_shortpath" = x; then
17938     # Short path failed, file does not exist as specified.
17939     # Try adding .exe or .cmd
17940     if test -f "${new_path}.exe"; then
17941        input_to_shortpath="${new_path}.exe"
17942     elif test -f "${new_path}.cmd"; then
17943        input_to_shortpath="${new_path}.cmd"
17944     else
17945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17946 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17947       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17948 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17949       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17950     fi
17951   else
17952     input_to_shortpath="$new_path"
17953   fi
17954 
17955   # Call helper function which possibly converts this using DOS-style short mode.
17956   # If so, the updated path is stored in $new_path.
17957   new_path="$input_to_shortpath"
17958 
17959   input_path="$input_to_shortpath"
17960   # Check if we need to convert this using DOS-style short mode. If the path
17961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17962   # take no chances and rewrite it.
17963   # Note: m4 eats our [], so we need to use [ and ] instead.
17964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17965   if test "x$has_forbidden_chars" != x; then
17966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17967     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17968     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17969     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17970       # Going to short mode and back again did indeed matter. Since short mode is
17971       # case insensitive, let's make it lowercase to improve readability.
17972       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17973       # Now convert it back to Unix-stile (cygpath)
17974       input_path=`$CYGPATH -u "$shortmode_path"`
17975       new_path="$input_path"
17976     fi
17977   fi
17978 
17979   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17980   if test "x$test_cygdrive_prefix" = x; then
17981     # As a simple fix, exclude /usr/bin since it's not a real path.
17982     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17983       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17984       # a path prefixed by /cygdrive for fixpath to work.
17985       new_path="$CYGWIN_ROOT_PATH$input_path"
17986     fi
17987   fi
17988 
17989   # remove trailing .exe if any
17990   new_path="${new_path/%.exe/}"
17991 
17992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17993 
17994   # First separate the path from the arguments. This will split at the first
17995   # space.
17996   complete="$BUILD_CC"
17997   path="${complete%% *}"
17998   tmp="$complete EOL"
17999   arguments="${tmp#* }"
18000 
18001   # Input might be given as Windows format, start by converting to
18002   # unix format.
18003   new_path="$path"
18004 
18005   windows_path="$new_path"
18006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18007     unix_path=`$CYGPATH -u "$windows_path"`
18008     new_path="$unix_path"
18009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18011     new_path="$unix_path"
18012   fi
18013 
18014 
18015   # Now try to locate executable using which
18016   new_path=`$WHICH "$new_path" 2> /dev/null`
18017 
18018   if test "x$new_path" = x; then
18019     # Oops. Which didn't find the executable.
18020     # The splitting of arguments from the executable at a space might have been incorrect,
18021     # since paths with space are more likely in Windows. Give it another try with the whole
18022     # argument.
18023     path="$complete"
18024     arguments="EOL"
18025     new_path="$path"
18026 
18027   windows_path="$new_path"
18028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18029     unix_path=`$CYGPATH -u "$windows_path"`
18030     new_path="$unix_path"
18031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18033     new_path="$unix_path"
18034   fi
18035 
18036 
18037     new_path=`$WHICH "$new_path" 2> /dev/null`
18038 
18039     if test "x$new_path" = x; then
18040       # It's still not found. Now this is an unrecoverable error.
18041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18042 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18043       has_space=`$ECHO "$complete" | $GREP " "`
18044       if test "x$has_space" != x; then
18045         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18046 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18047       fi
18048       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18049     fi
18050   fi
18051 
18052   # Now new_path has a complete unix path to the binary
18053   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18054     # Keep paths in /bin as-is, but remove trailing .exe if any
18055     new_path="${new_path/%.exe/}"
18056     # Do not save /bin paths to all_fixpath_prefixes!
18057   else
18058     # Not in mixed or Windows style, start by that.
18059     new_path=`cmd //c echo $new_path`
18060 
18061   input_path="$new_path"
18062   # Check if we need to convert this using DOS-style short mode. If the path
18063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18064   # take no chances and rewrite it.
18065   # Note: m4 eats our [], so we need to use [ and ] instead.
18066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18067   if test "x$has_forbidden_chars" != x; then
18068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18070   fi
18071 
18072     # Output is in $new_path
18073 
18074   windows_path="$new_path"
18075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18076     unix_path=`$CYGPATH -u "$windows_path"`
18077     new_path="$unix_path"
18078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18080     new_path="$unix_path"
18081   fi
18082 
18083     # remove trailing .exe if any
18084     new_path="${new_path/%.exe/}"
18085 
18086     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18087     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18088   fi
18089 
18090   else
18091     # We're on a posix platform. Hooray! :)
18092     # First separate the path from the arguments. This will split at the first
18093     # space.
18094     complete="$BUILD_CC"
18095     path="${complete%% *}"
18096     tmp="$complete EOL"
18097     arguments="${tmp#* }"
18098 
18099     # Cannot rely on the command "which" here since it doesn't always work.
18100     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18101     if test -z "$is_absolute_path"; then
18102       # Path to executable is not absolute. Find it.
18103       IFS_save="$IFS"
18104       IFS=:
18105       for p in $PATH; do
18106         if test -f "$p/$path" && test -x "$p/$path"; then
18107           new_path="$p/$path"
18108           break
18109         fi
18110       done
18111       IFS="$IFS_save"
18112     else
18113       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18114 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18115       new_path="$path"
18116     fi
18117 
18118     if test "x$new_path" = x; then
18119         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18120 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18121         has_space=`$ECHO "$complete" | $GREP " "`
18122         if test "x$has_space" != x; then
18123           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18124 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18125         fi
18126         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18127       fi
18128   fi
18129 
18130       # Now join together the path and the arguments once again
18131       if test "x$arguments" != xEOL; then
18132         new_complete="$new_path ${arguments% *}"
18133       else
18134         new_complete="$new_path"
18135       fi
18136 
18137   if test "x$complete" != "x$new_complete"; then
18138       BUILD_CC="$new_complete"
18139       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18140 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18141     fi
18142 
18143     for ac_prog in cl CC g++
18144 do
18145   # Extract the first word of "$ac_prog", so it can be a program name with args.
18146 set dummy $ac_prog; ac_word=$2
18147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18148 $as_echo_n "checking for $ac_word... " >&6; }
18149 if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18150   $as_echo_n "(cached) " >&6
18151 else
18152   case $BUILD_CXX in
18153   [\\/]* | ?:[\\/]*)
18154   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18155   ;;
18156   *)
18157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18158 for as_dir in $PATH
18159 do
18160   IFS=$as_save_IFS
18161   test -z "$as_dir" && as_dir=.
18162     for ac_exec_ext in '' $ac_executable_extensions; do
18163   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18164     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18166     break 2
18167   fi
18168 done
18169   done
18170 IFS=$as_save_IFS
18171 
18172   ;;
18173 esac
18174 fi
18175 BUILD_CXX=$ac_cv_path_BUILD_CXX
18176 if test -n "$BUILD_CXX"; then
18177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18178 $as_echo "$BUILD_CXX" >&6; }
18179 else
18180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18181 $as_echo "no" >&6; }
18182 fi
18183 
18184 
18185   test -n "$BUILD_CXX" && break
18186 done
18187 
18188 
18189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18190 
18191   # First separate the path from the arguments. This will split at the first
18192   # space.
18193   complete="$BUILD_CXX"
18194   path="${complete%% *}"
18195   tmp="$complete EOL"
18196   arguments="${tmp#* }"
18197 
18198   # Input might be given as Windows format, start by converting to
18199   # unix format.
18200   new_path=`$CYGPATH -u "$path"`
18201 
18202   # Now try to locate executable using which
18203   new_path=`$WHICH "$new_path" 2> /dev/null`
18204   # bat and cmd files are not always considered executable in cygwin causing which
18205   # to not find them
18206   if test "x$new_path" = x \
18207            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18208            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18209     new_path=`$CYGPATH -u "$path"`
18210   fi
18211   if test "x$new_path" = x; then
18212     # Oops. Which didn't find the executable.
18213     # The splitting of arguments from the executable at a space might have been incorrect,
18214     # since paths with space are more likely in Windows. Give it another try with the whole
18215     # argument.
18216     path="$complete"
18217     arguments="EOL"
18218     new_path=`$CYGPATH -u "$path"`
18219     new_path=`$WHICH "$new_path" 2> /dev/null`
18220     # bat and cmd files are not always considered executable in cygwin causing which
18221     # to not find them
18222     if test "x$new_path" = x \
18223              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18224              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18225       new_path=`$CYGPATH -u "$path"`
18226     fi
18227     if test "x$new_path" = x; then
18228       # It's still not found. Now this is an unrecoverable error.
18229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18230 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18231       has_space=`$ECHO "$complete" | $GREP " "`
18232       if test "x$has_space" != x; then
18233         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18234 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18235       fi
18236       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18237     fi
18238   fi
18239 
18240   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18241   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18242   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18243   # "foo.exe" is OK but "foo" is an error.
18244   #
18245   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18246   # It is also a way to make sure we got the proper file name for the real test later on.
18247   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18248   if test "x$test_shortpath" = x; then
18249     # Short path failed, file does not exist as specified.
18250     # Try adding .exe or .cmd
18251     if test -f "${new_path}.exe"; then
18252        input_to_shortpath="${new_path}.exe"
18253     elif test -f "${new_path}.cmd"; then
18254        input_to_shortpath="${new_path}.cmd"
18255     else
18256       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18257 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18258       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18259 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18260       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18261     fi
18262   else
18263     input_to_shortpath="$new_path"
18264   fi
18265 
18266   # Call helper function which possibly converts this using DOS-style short mode.
18267   # If so, the updated path is stored in $new_path.
18268   new_path="$input_to_shortpath"
18269 
18270   input_path="$input_to_shortpath"
18271   # Check if we need to convert this using DOS-style short mode. If the path
18272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18273   # take no chances and rewrite it.
18274   # Note: m4 eats our [], so we need to use [ and ] instead.
18275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18276   if test "x$has_forbidden_chars" != x; then
18277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18278     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18279     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18280     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18281       # Going to short mode and back again did indeed matter. Since short mode is
18282       # case insensitive, let's make it lowercase to improve readability.
18283       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18284       # Now convert it back to Unix-stile (cygpath)
18285       input_path=`$CYGPATH -u "$shortmode_path"`
18286       new_path="$input_path"
18287     fi
18288   fi
18289 
18290   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18291   if test "x$test_cygdrive_prefix" = x; then
18292     # As a simple fix, exclude /usr/bin since it's not a real path.
18293     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18294       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18295       # a path prefixed by /cygdrive for fixpath to work.
18296       new_path="$CYGWIN_ROOT_PATH$input_path"
18297     fi
18298   fi
18299 
18300   # remove trailing .exe if any
18301   new_path="${new_path/%.exe/}"
18302 
18303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18304 
18305   # First separate the path from the arguments. This will split at the first
18306   # space.
18307   complete="$BUILD_CXX"
18308   path="${complete%% *}"
18309   tmp="$complete EOL"
18310   arguments="${tmp#* }"
18311 
18312   # Input might be given as Windows format, start by converting to
18313   # unix format.
18314   new_path="$path"
18315 
18316   windows_path="$new_path"
18317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18318     unix_path=`$CYGPATH -u "$windows_path"`
18319     new_path="$unix_path"
18320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18322     new_path="$unix_path"
18323   fi
18324 
18325 
18326   # Now try to locate executable using which
18327   new_path=`$WHICH "$new_path" 2> /dev/null`
18328 
18329   if test "x$new_path" = x; then
18330     # Oops. Which didn't find the executable.
18331     # The splitting of arguments from the executable at a space might have been incorrect,
18332     # since paths with space are more likely in Windows. Give it another try with the whole
18333     # argument.
18334     path="$complete"
18335     arguments="EOL"
18336     new_path="$path"
18337 
18338   windows_path="$new_path"
18339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18340     unix_path=`$CYGPATH -u "$windows_path"`
18341     new_path="$unix_path"
18342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18344     new_path="$unix_path"
18345   fi
18346 
18347 
18348     new_path=`$WHICH "$new_path" 2> /dev/null`
18349 
18350     if test "x$new_path" = x; then
18351       # It's still not found. Now this is an unrecoverable error.
18352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18353 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18354       has_space=`$ECHO "$complete" | $GREP " "`
18355       if test "x$has_space" != x; then
18356         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18357 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18358       fi
18359       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18360     fi
18361   fi
18362 
18363   # Now new_path has a complete unix path to the binary
18364   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18365     # Keep paths in /bin as-is, but remove trailing .exe if any
18366     new_path="${new_path/%.exe/}"
18367     # Do not save /bin paths to all_fixpath_prefixes!
18368   else
18369     # Not in mixed or Windows style, start by that.
18370     new_path=`cmd //c echo $new_path`
18371 
18372   input_path="$new_path"
18373   # Check if we need to convert this using DOS-style short mode. If the path
18374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18375   # take no chances and rewrite it.
18376   # Note: m4 eats our [], so we need to use [ and ] instead.
18377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18378   if test "x$has_forbidden_chars" != x; then
18379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18380     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18381   fi
18382 
18383     # Output is in $new_path
18384 
18385   windows_path="$new_path"
18386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18387     unix_path=`$CYGPATH -u "$windows_path"`
18388     new_path="$unix_path"
18389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18391     new_path="$unix_path"
18392   fi
18393 
18394     # remove trailing .exe if any
18395     new_path="${new_path/%.exe/}"
18396 
18397     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18398     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18399   fi
18400 
18401   else
18402     # We're on a posix platform. Hooray! :)
18403     # First separate the path from the arguments. This will split at the first
18404     # space.
18405     complete="$BUILD_CXX"
18406     path="${complete%% *}"
18407     tmp="$complete EOL"
18408     arguments="${tmp#* }"
18409 
18410     # Cannot rely on the command "which" here since it doesn't always work.
18411     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18412     if test -z "$is_absolute_path"; then
18413       # Path to executable is not absolute. Find it.
18414       IFS_save="$IFS"
18415       IFS=:
18416       for p in $PATH; do
18417         if test -f "$p/$path" && test -x "$p/$path"; then
18418           new_path="$p/$path"
18419           break
18420         fi
18421       done
18422       IFS="$IFS_save"
18423     else
18424       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18425 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18426       new_path="$path"
18427     fi
18428 
18429     if test "x$new_path" = x; then
18430         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18431 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18432         has_space=`$ECHO "$complete" | $GREP " "`
18433         if test "x$has_space" != x; then
18434           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18435 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18436         fi
18437         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18438       fi
18439   fi
18440 
18441       # Now join together the path and the arguments once again
18442       if test "x$arguments" != xEOL; then
18443         new_complete="$new_path ${arguments% *}"
18444       else
18445         new_complete="$new_path"
18446       fi
18447 
18448   if test "x$complete" != "x$new_complete"; then
18449       BUILD_CXX="$new_complete"
18450       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18451 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18452     fi
18453 
18454     # Extract the first word of "ld", so it can be a program name with args.
18455 set dummy ld; ac_word=$2
18456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18457 $as_echo_n "checking for $ac_word... " >&6; }
18458 if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18459   $as_echo_n "(cached) " >&6
18460 else
18461   case $BUILD_LD in
18462   [\\/]* | ?:[\\/]*)
18463   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18464   ;;
18465   *)
18466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18467 for as_dir in $PATH
18468 do
18469   IFS=$as_save_IFS
18470   test -z "$as_dir" && as_dir=.
18471     for ac_exec_ext in '' $ac_executable_extensions; do
18472   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18473     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18475     break 2
18476   fi
18477 done
18478   done
18479 IFS=$as_save_IFS
18480 
18481   ;;
18482 esac
18483 fi
18484 BUILD_LD=$ac_cv_path_BUILD_LD
18485 if test -n "$BUILD_LD"; then
18486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18487 $as_echo "$BUILD_LD" >&6; }
18488 else
18489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18490 $as_echo "no" >&6; }
18491 fi
18492 
18493 
18494 
18495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18496 
18497   # First separate the path from the arguments. This will split at the first
18498   # space.
18499   complete="$BUILD_LD"
18500   path="${complete%% *}"
18501   tmp="$complete EOL"
18502   arguments="${tmp#* }"
18503 
18504   # Input might be given as Windows format, start by converting to
18505   # unix format.
18506   new_path=`$CYGPATH -u "$path"`
18507 
18508   # Now try to locate executable using which
18509   new_path=`$WHICH "$new_path" 2> /dev/null`
18510   # bat and cmd files are not always considered executable in cygwin causing which
18511   # to not find them
18512   if test "x$new_path" = x \
18513            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18514            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18515     new_path=`$CYGPATH -u "$path"`
18516   fi
18517   if test "x$new_path" = x; then
18518     # Oops. Which didn't find the executable.
18519     # The splitting of arguments from the executable at a space might have been incorrect,
18520     # since paths with space are more likely in Windows. Give it another try with the whole
18521     # argument.
18522     path="$complete"
18523     arguments="EOL"
18524     new_path=`$CYGPATH -u "$path"`
18525     new_path=`$WHICH "$new_path" 2> /dev/null`
18526     # bat and cmd files are not always considered executable in cygwin causing which
18527     # to not find them
18528     if test "x$new_path" = x \
18529              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18530              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18531       new_path=`$CYGPATH -u "$path"`
18532     fi
18533     if test "x$new_path" = x; then
18534       # It's still not found. Now this is an unrecoverable error.
18535       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18536 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18537       has_space=`$ECHO "$complete" | $GREP " "`
18538       if test "x$has_space" != x; then
18539         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18540 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18541       fi
18542       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18543     fi
18544   fi
18545 
18546   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18547   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18548   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18549   # "foo.exe" is OK but "foo" is an error.
18550   #
18551   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18552   # It is also a way to make sure we got the proper file name for the real test later on.
18553   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18554   if test "x$test_shortpath" = x; then
18555     # Short path failed, file does not exist as specified.
18556     # Try adding .exe or .cmd
18557     if test -f "${new_path}.exe"; then
18558        input_to_shortpath="${new_path}.exe"
18559     elif test -f "${new_path}.cmd"; then
18560        input_to_shortpath="${new_path}.cmd"
18561     else
18562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18563 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18564       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18565 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18566       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18567     fi
18568   else
18569     input_to_shortpath="$new_path"
18570   fi
18571 
18572   # Call helper function which possibly converts this using DOS-style short mode.
18573   # If so, the updated path is stored in $new_path.
18574   new_path="$input_to_shortpath"
18575 
18576   input_path="$input_to_shortpath"
18577   # Check if we need to convert this using DOS-style short mode. If the path
18578   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18579   # take no chances and rewrite it.
18580   # Note: m4 eats our [], so we need to use [ and ] instead.
18581   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18582   if test "x$has_forbidden_chars" != x; then
18583     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18584     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18585     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18586     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18587       # Going to short mode and back again did indeed matter. Since short mode is
18588       # case insensitive, let's make it lowercase to improve readability.
18589       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18590       # Now convert it back to Unix-stile (cygpath)
18591       input_path=`$CYGPATH -u "$shortmode_path"`
18592       new_path="$input_path"
18593     fi
18594   fi
18595 
18596   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18597   if test "x$test_cygdrive_prefix" = x; then
18598     # As a simple fix, exclude /usr/bin since it's not a real path.
18599     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18600       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18601       # a path prefixed by /cygdrive for fixpath to work.
18602       new_path="$CYGWIN_ROOT_PATH$input_path"
18603     fi
18604   fi
18605 
18606   # remove trailing .exe if any
18607   new_path="${new_path/%.exe/}"
18608 
18609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18610 
18611   # First separate the path from the arguments. This will split at the first
18612   # space.
18613   complete="$BUILD_LD"
18614   path="${complete%% *}"
18615   tmp="$complete EOL"
18616   arguments="${tmp#* }"
18617 
18618   # Input might be given as Windows format, start by converting to
18619   # unix format.
18620   new_path="$path"
18621 
18622   windows_path="$new_path"
18623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18624     unix_path=`$CYGPATH -u "$windows_path"`
18625     new_path="$unix_path"
18626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18627     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18628     new_path="$unix_path"
18629   fi
18630 
18631 
18632   # Now try to locate executable using which
18633   new_path=`$WHICH "$new_path" 2> /dev/null`
18634 
18635   if test "x$new_path" = x; then
18636     # Oops. Which didn't find the executable.
18637     # The splitting of arguments from the executable at a space might have been incorrect,
18638     # since paths with space are more likely in Windows. Give it another try with the whole
18639     # argument.
18640     path="$complete"
18641     arguments="EOL"
18642     new_path="$path"
18643 
18644   windows_path="$new_path"
18645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18646     unix_path=`$CYGPATH -u "$windows_path"`
18647     new_path="$unix_path"
18648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18650     new_path="$unix_path"
18651   fi
18652 
18653 
18654     new_path=`$WHICH "$new_path" 2> /dev/null`
18655 
18656     if test "x$new_path" = x; then
18657       # It's still not found. Now this is an unrecoverable error.
18658       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18659 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18660       has_space=`$ECHO "$complete" | $GREP " "`
18661       if test "x$has_space" != x; then
18662         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18663 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18664       fi
18665       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18666     fi
18667   fi
18668 
18669   # Now new_path has a complete unix path to the binary
18670   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18671     # Keep paths in /bin as-is, but remove trailing .exe if any
18672     new_path="${new_path/%.exe/}"
18673     # Do not save /bin paths to all_fixpath_prefixes!
18674   else
18675     # Not in mixed or Windows style, start by that.
18676     new_path=`cmd //c echo $new_path`
18677 
18678   input_path="$new_path"
18679   # Check if we need to convert this using DOS-style short mode. If the path
18680   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18681   # take no chances and rewrite it.
18682   # Note: m4 eats our [], so we need to use [ and ] instead.
18683   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18684   if test "x$has_forbidden_chars" != x; then
18685     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18686     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18687   fi
18688 
18689     # Output is in $new_path
18690 
18691   windows_path="$new_path"
18692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18693     unix_path=`$CYGPATH -u "$windows_path"`
18694     new_path="$unix_path"
18695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18696     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18697     new_path="$unix_path"
18698   fi
18699 
18700     # remove trailing .exe if any
18701     new_path="${new_path/%.exe/}"
18702 
18703     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18704     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18705   fi
18706 
18707   else
18708     # We're on a posix platform. Hooray! :)
18709     # First separate the path from the arguments. This will split at the first
18710     # space.
18711     complete="$BUILD_LD"
18712     path="${complete%% *}"
18713     tmp="$complete EOL"
18714     arguments="${tmp#* }"
18715 
18716     # Cannot rely on the command "which" here since it doesn't always work.
18717     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18718     if test -z "$is_absolute_path"; then
18719       # Path to executable is not absolute. Find it.
18720       IFS_save="$IFS"
18721       IFS=:
18722       for p in $PATH; do
18723         if test -f "$p/$path" && test -x "$p/$path"; then
18724           new_path="$p/$path"
18725           break
18726         fi
18727       done
18728       IFS="$IFS_save"
18729     else
18730       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18731 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18732       new_path="$path"
18733     fi
18734 
18735     if test "x$new_path" = x; then
18736         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18737 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18738         has_space=`$ECHO "$complete" | $GREP " "`
18739         if test "x$has_space" != x; then
18740           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18741 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18742         fi
18743         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18744       fi
18745   fi
18746 
18747       # Now join together the path and the arguments once again
18748       if test "x$arguments" != xEOL; then
18749         new_complete="$new_path ${arguments% *}"
18750       else
18751         new_complete="$new_path"
18752       fi
18753 
18754   if test "x$complete" != "x$new_complete"; then
18755       BUILD_LD="$new_complete"
18756       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18757 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18758     fi
18759 
18760 fi
18761 
18762 
18763 
18764 
18765 # If a devkit is found on the builddeps server, then prepend its path to the
18766 # PATH variable. If there are cross compilers available in the devkit, these
18767 # will be found by AC_PROG_CC et al.
18768 DEVKIT=
18769 
18770 
18771     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18772         # Source the builddeps file again, to make sure it uses the latest variables!
18773         . $builddepsfile
18774         # Look for a target and build machine specific resource!
18775         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18776         if test "x$resource" = x; then
18777             # Ok, lets instead look for a target specific resource
18778             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18779         fi
18780         if test "x$resource" = x; then
18781             # Ok, lets instead look for a build specific resource
18782             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18783         fi
18784         if test "x$resource" = x; then
18785             # Ok, lets instead look for a generic resource
18786             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18787             resource=${builddep_devkit}
18788         fi
18789         if test "x$resource" != x; then
18790             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18791 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18792             # If the resource in the builddeps.conf file is an existing directory,
18793             # for example /java/linux/cups
18794             if test -d ${resource}; then
18795                depdir=${resource}
18796             else
18797 
18798 # devkit is for example mymodule
18799 # $resource is for example libs/general/libmymod_1_2_3.zip
18800 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18801 # $with_builddeps_dir is for example /localhome/builddeps
18802 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18803 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18804 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18805     filename=`basename $resource`
18806     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18807     filebase=${filename%%.*}
18808     extension=${filename#*.}
18809     installdir=$with_builddeps_dir/$filebase
18810     if test ! -f $installdir/$filename.unpacked; then
18811         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18812 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18813         if test ! -d $installdir; then
18814             mkdir -p $installdir
18815         fi
18816         if test ! -d $installdir; then
18817             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18818         fi
18819         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18820         touch $tmpfile
18821         if test ! -f $tmpfile; then
18822             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18823         fi
18824 
18825     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18826     # $tmpfile is the local file name for the downloaded file.
18827     VALID_TOOL=no
18828     if test "x$BDEPS_FTP" = xwget; then
18829        VALID_TOOL=yes
18830        wget -O $tmpfile $with_builddeps_server/$resource
18831     fi
18832     if test "x$BDEPS_FTP" = xlftp; then
18833        VALID_TOOL=yes
18834        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18835     fi
18836     if test "x$BDEPS_FTP" = xftp; then
18837         VALID_TOOL=yes
18838         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18839         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18840         FTPUSERPWD=${FTPSERVER%%@*}
18841         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18842             FTPUSER=${userpwd%%:*}
18843             FTPPWD=${userpwd#*@}
18844             FTPSERVER=${FTPSERVER#*@}
18845         else
18846             FTPUSER=ftp
18847             FTPPWD=ftp
18848         fi
18849         # the "pass" command does not work on some
18850         # ftp clients (read ftp.exe) but if it works,
18851         # passive mode is better!
18852         (\
18853             echo "user $FTPUSER $FTPPWD"        ;\
18854             echo "pass"                         ;\
18855             echo "bin"                          ;\
18856             echo "get $FTPPATH $tmpfile"              ;\
18857         ) | ftp -in $FTPSERVER
18858     fi
18859     if test "x$VALID_TOOL" != xyes; then
18860        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18861     fi
18862 
18863         mv $tmpfile $installdir/$filename
18864         if test ! -s $installdir/$filename; then
18865             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18866         fi
18867         case "$extension" in
18868             zip)  echo "Unzipping $installdir/$filename..."
18869                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18870             ;;
18871             tar.gz) echo "Untaring $installdir/$filename..."
18872                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18873             ;;
18874             tgz) echo "Untaring $installdir/$filename..."
18875                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18876             ;;
18877             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18878             ;;
18879         esac
18880     fi
18881     if test -f $installdir/$filename.unpacked; then
18882         depdir=$installdir
18883     fi
18884 
18885             fi
18886             # Source the builddeps file again, because in the previous command, the depdir
18887             # was updated to point at the current build dependency install directory.
18888             . $builddepsfile
18889             # Now extract variables from the builddeps.conf files.
18890             theroot=${builddep_devkit_ROOT}
18891             thecflags=${builddep_devkit_CFLAGS}
18892             thelibs=${builddep_devkit_LIBS}
18893             if test "x$depdir" = x; then
18894                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18895             fi
18896             DEVKIT=$depdir
18897             if test "x$theroot" != x; then
18898                DEVKIT="$theroot"
18899             fi
18900             if test "x$thecflags" != x; then
18901                DEVKIT_CFLAGS="$thecflags"
18902             fi
18903             if test "x$thelibs" != x; then
18904                DEVKIT_LIBS="$thelibs"
18905             fi
18906             # Found devkit
18907                      PATH="$DEVKIT/bin:$PATH"
18908                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18909                      if test "x$x_includes" = "xNONE"; then
18910                          x_includes="$SYS_ROOT/usr/include/X11"
18911                      fi
18912                      if test "x$x_libraries" = "xNONE"; then
18913                          x_libraries="$SYS_ROOT/usr/lib"
18914                      fi
18915 
18916 
18917         fi
18918 
18919     fi
18920 
18921 
18922 if test "x$SYS_ROOT" != "x/" ; then
18923     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18924     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18925     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18926     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18927     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18928     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18929 fi
18930 
18931 # Store the CFLAGS etal passed to the configure script.
18932 ORG_CFLAGS="$CFLAGS"
18933 ORG_CXXFLAGS="$CXXFLAGS"
18934 ORG_OBJCFLAGS="$OBJCFLAGS"
18935 
18936 # autoconf magic only relies on PATH, so update it if tools dir is specified
18937 OLD_PATH="$PATH"
18938 if test "x$TOOLS_DIR" != x; then
18939   PATH=$TOOLS_DIR:$PATH
18940 fi
18941 
18942 
18943 ### Locate C compiler (CC)
18944 
18945 # On windows, only cl.exe is supported.
18946 # On Solaris, cc is preferred to gcc.
18947 # Elsewhere, gcc is preferred to cc.
18948 
18949 if test "x$CC" != x; then
18950   COMPILER_CHECK_LIST="$CC"
18951 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18952   COMPILER_CHECK_LIST="cl"
18953 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18954   COMPILER_CHECK_LIST="cc gcc"
18955 else
18956   COMPILER_CHECK_LIST="gcc cc"
18957 fi
18958 
18959 
18960   COMPILER_NAME=C
18961 
18962   CC=
18963   # If TOOLS_DIR is set, check for all compiler names in there first
18964   # before checking the rest of the PATH.
18965   if test -n "$TOOLS_DIR"; then
18966     PATH_save="$PATH"
18967     PATH="$TOOLS_DIR"
18968     for ac_prog in $COMPILER_CHECK_LIST
18969 do
18970   # Extract the first word of "$ac_prog", so it can be a program name with args.
18971 set dummy $ac_prog; ac_word=$2
18972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18973 $as_echo_n "checking for $ac_word... " >&6; }
18974 if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18975   $as_echo_n "(cached) " >&6
18976 else
18977   case $TOOLS_DIR_CC in
18978   [\\/]* | ?:[\\/]*)
18979   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18980   ;;
18981   *)
18982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18983 for as_dir in $PATH
18984 do
18985   IFS=$as_save_IFS
18986   test -z "$as_dir" && as_dir=.
18987     for ac_exec_ext in '' $ac_executable_extensions; do
18988   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18989     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18991     break 2
18992   fi
18993 done
18994   done
18995 IFS=$as_save_IFS
18996 
18997   ;;
18998 esac
18999 fi
19000 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19001 if test -n "$TOOLS_DIR_CC"; then
19002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19003 $as_echo "$TOOLS_DIR_CC" >&6; }
19004 else
19005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19006 $as_echo "no" >&6; }
19007 fi
19008 
19009 
19010   test -n "$TOOLS_DIR_CC" && break
19011 done
19012 
19013     CC=$TOOLS_DIR_CC
19014     PATH="$PATH_save"
19015   fi
19016 
19017   # AC_PATH_PROGS can't be run multiple times with the same variable,
19018   # so create a new name for this run.
19019   if test "x$CC" = x; then
19020     for ac_prog in $COMPILER_CHECK_LIST
19021 do
19022   # Extract the first word of "$ac_prog", so it can be a program name with args.
19023 set dummy $ac_prog; ac_word=$2
19024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19025 $as_echo_n "checking for $ac_word... " >&6; }
19026 if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19027   $as_echo_n "(cached) " >&6
19028 else
19029   case $POTENTIAL_CC in
19030   [\\/]* | ?:[\\/]*)
19031   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19032   ;;
19033   *)
19034   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19035 for as_dir in $PATH
19036 do
19037   IFS=$as_save_IFS
19038   test -z "$as_dir" && as_dir=.
19039     for ac_exec_ext in '' $ac_executable_extensions; do
19040   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19041     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19043     break 2
19044   fi
19045 done
19046   done
19047 IFS=$as_save_IFS
19048 
19049   ;;
19050 esac
19051 fi
19052 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19053 if test -n "$POTENTIAL_CC"; then
19054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19055 $as_echo "$POTENTIAL_CC" >&6; }
19056 else
19057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19058 $as_echo "no" >&6; }
19059 fi
19060 
19061 
19062   test -n "$POTENTIAL_CC" && break
19063 done
19064 
19065     CC=$POTENTIAL_CC
19066   fi
19067 
19068   if test "x$CC" = x; then
19069 
19070     # Print a helpful message on how to acquire the necessary build dependency.
19071     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19072     MISSING_DEPENDENCY=devkit
19073     PKGHANDLER_COMMAND=
19074 
19075     case $PKGHANDLER in
19076         apt-get)
19077                 apt_help     $MISSING_DEPENDENCY ;;
19078     yum)
19079                 yum_help     $MISSING_DEPENDENCY ;;
19080         port)
19081                 port_help    $MISSING_DEPENDENCY ;;
19082         pkgutil)
19083                 pkgutil_help $MISSING_DEPENDENCY ;;
19084         pkgadd)
19085                 pkgadd_help  $MISSING_DEPENDENCY ;;
19086     * )
19087       break ;;
19088     esac
19089 
19090     if test "x$PKGHANDLER_COMMAND" != x; then
19091         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19092     fi
19093 
19094       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19095   fi
19096 
19097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19098 
19099   # First separate the path from the arguments. This will split at the first
19100   # space.
19101   complete="$CC"
19102   path="${complete%% *}"
19103   tmp="$complete EOL"
19104   arguments="${tmp#* }"
19105 
19106   # Input might be given as Windows format, start by converting to
19107   # unix format.
19108   new_path=`$CYGPATH -u "$path"`
19109 
19110   # Now try to locate executable using which
19111   new_path=`$WHICH "$new_path" 2> /dev/null`
19112   # bat and cmd files are not always considered executable in cygwin causing which
19113   # to not find them
19114   if test "x$new_path" = x \
19115            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19116            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19117     new_path=`$CYGPATH -u "$path"`
19118   fi
19119   if test "x$new_path" = x; then
19120     # Oops. Which didn't find the executable.
19121     # The splitting of arguments from the executable at a space might have been incorrect,
19122     # since paths with space are more likely in Windows. Give it another try with the whole
19123     # argument.
19124     path="$complete"
19125     arguments="EOL"
19126     new_path=`$CYGPATH -u "$path"`
19127     new_path=`$WHICH "$new_path" 2> /dev/null`
19128     # bat and cmd files are not always considered executable in cygwin causing which
19129     # to not find them
19130     if test "x$new_path" = x \
19131              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19132              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19133       new_path=`$CYGPATH -u "$path"`
19134     fi
19135     if test "x$new_path" = x; then
19136       # It's still not found. Now this is an unrecoverable error.
19137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19138 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19139       has_space=`$ECHO "$complete" | $GREP " "`
19140       if test "x$has_space" != x; then
19141         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19142 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19143       fi
19144       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19145     fi
19146   fi
19147 
19148   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19149   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19150   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19151   # "foo.exe" is OK but "foo" is an error.
19152   #
19153   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19154   # It is also a way to make sure we got the proper file name for the real test later on.
19155   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19156   if test "x$test_shortpath" = x; then
19157     # Short path failed, file does not exist as specified.
19158     # Try adding .exe or .cmd
19159     if test -f "${new_path}.exe"; then
19160        input_to_shortpath="${new_path}.exe"
19161     elif test -f "${new_path}.cmd"; then
19162        input_to_shortpath="${new_path}.cmd"
19163     else
19164       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19165 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19166       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19167 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19168       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19169     fi
19170   else
19171     input_to_shortpath="$new_path"
19172   fi
19173 
19174   # Call helper function which possibly converts this using DOS-style short mode.
19175   # If so, the updated path is stored in $new_path.
19176   new_path="$input_to_shortpath"
19177 
19178   input_path="$input_to_shortpath"
19179   # Check if we need to convert this using DOS-style short mode. If the path
19180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19181   # take no chances and rewrite it.
19182   # Note: m4 eats our [], so we need to use [ and ] instead.
19183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19184   if test "x$has_forbidden_chars" != x; then
19185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19186     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19187     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19188     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19189       # Going to short mode and back again did indeed matter. Since short mode is
19190       # case insensitive, let's make it lowercase to improve readability.
19191       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19192       # Now convert it back to Unix-stile (cygpath)
19193       input_path=`$CYGPATH -u "$shortmode_path"`
19194       new_path="$input_path"
19195     fi
19196   fi
19197 
19198   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19199   if test "x$test_cygdrive_prefix" = x; then
19200     # As a simple fix, exclude /usr/bin since it's not a real path.
19201     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19202       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19203       # a path prefixed by /cygdrive for fixpath to work.
19204       new_path="$CYGWIN_ROOT_PATH$input_path"
19205     fi
19206   fi
19207 
19208   # remove trailing .exe if any
19209   new_path="${new_path/%.exe/}"
19210 
19211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19212 
19213   # First separate the path from the arguments. This will split at the first
19214   # space.
19215   complete="$CC"
19216   path="${complete%% *}"
19217   tmp="$complete EOL"
19218   arguments="${tmp#* }"
19219 
19220   # Input might be given as Windows format, start by converting to
19221   # unix format.
19222   new_path="$path"
19223 
19224   windows_path="$new_path"
19225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19226     unix_path=`$CYGPATH -u "$windows_path"`
19227     new_path="$unix_path"
19228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19230     new_path="$unix_path"
19231   fi
19232 
19233 
19234   # Now try to locate executable using which
19235   new_path=`$WHICH "$new_path" 2> /dev/null`
19236 
19237   if test "x$new_path" = x; then
19238     # Oops. Which didn't find the executable.
19239     # The splitting of arguments from the executable at a space might have been incorrect,
19240     # since paths with space are more likely in Windows. Give it another try with the whole
19241     # argument.
19242     path="$complete"
19243     arguments="EOL"
19244     new_path="$path"
19245 
19246   windows_path="$new_path"
19247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19248     unix_path=`$CYGPATH -u "$windows_path"`
19249     new_path="$unix_path"
19250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19252     new_path="$unix_path"
19253   fi
19254 
19255 
19256     new_path=`$WHICH "$new_path" 2> /dev/null`
19257 
19258     if test "x$new_path" = x; then
19259       # It's still not found. Now this is an unrecoverable error.
19260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19261 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19262       has_space=`$ECHO "$complete" | $GREP " "`
19263       if test "x$has_space" != x; then
19264         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19265 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19266       fi
19267       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19268     fi
19269   fi
19270 
19271   # Now new_path has a complete unix path to the binary
19272   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19273     # Keep paths in /bin as-is, but remove trailing .exe if any
19274     new_path="${new_path/%.exe/}"
19275     # Do not save /bin paths to all_fixpath_prefixes!
19276   else
19277     # Not in mixed or Windows style, start by that.
19278     new_path=`cmd //c echo $new_path`
19279 
19280   input_path="$new_path"
19281   # Check if we need to convert this using DOS-style short mode. If the path
19282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19283   # take no chances and rewrite it.
19284   # Note: m4 eats our [], so we need to use [ and ] instead.
19285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19286   if test "x$has_forbidden_chars" != x; then
19287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19289   fi
19290 
19291     # Output is in $new_path
19292 
19293   windows_path="$new_path"
19294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19295     unix_path=`$CYGPATH -u "$windows_path"`
19296     new_path="$unix_path"
19297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19299     new_path="$unix_path"
19300   fi
19301 
19302     # remove trailing .exe if any
19303     new_path="${new_path/%.exe/}"
19304 
19305     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19306     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19307   fi
19308 
19309   else
19310     # We're on a posix platform. Hooray! :)
19311     # First separate the path from the arguments. This will split at the first
19312     # space.
19313     complete="$CC"
19314     path="${complete%% *}"
19315     tmp="$complete EOL"
19316     arguments="${tmp#* }"
19317 
19318     # Cannot rely on the command "which" here since it doesn't always work.
19319     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19320     if test -z "$is_absolute_path"; then
19321       # Path to executable is not absolute. Find it.
19322       IFS_save="$IFS"
19323       IFS=:
19324       for p in $PATH; do
19325         if test -f "$p/$path" && test -x "$p/$path"; then
19326           new_path="$p/$path"
19327           break
19328         fi
19329       done
19330       IFS="$IFS_save"
19331     else
19332       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19333 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19334       new_path="$path"
19335     fi
19336 
19337     if test "x$new_path" = x; then
19338         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19339 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19340         has_space=`$ECHO "$complete" | $GREP " "`
19341         if test "x$has_space" != x; then
19342           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19343 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19344         fi
19345         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19346       fi
19347   fi
19348 
19349       # Now join together the path and the arguments once again
19350       if test "x$arguments" != xEOL; then
19351         new_complete="$new_path ${arguments% *}"
19352       else
19353         new_complete="$new_path"
19354       fi
19355 
19356   if test "x$complete" != "x$new_complete"; then
19357       CC="$new_complete"
19358       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19359 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19360     fi
19361 
19362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19363 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19364   TEST_COMPILER="$CC"
19365 
19366     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19367         # Follow a chain of symbolic links. Use readlink
19368         # where it exists, else fall back to horribly
19369         # complicated shell code.
19370         if test "x$READLINK_TESTED" != yes; then
19371             # On MacOSX there is a readlink tool with a different
19372             # purpose than the GNU readlink tool. Check the found readlink.
19373             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19374             if test "x$ISGNU" = x; then
19375                  # A readlink that we do not know how to use.
19376                  # Are there other non-GNU readlinks out there?
19377                  READLINK_TESTED=yes
19378                  READLINK=
19379             fi
19380         fi
19381 
19382         if test "x$READLINK" != x; then
19383             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19384         else
19385             # Save the current directory for restoring afterwards
19386             STARTDIR=$PWD
19387             COUNTER=0
19388             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19389             sym_link_file=`$BASENAME $TEST_COMPILER`
19390             cd $sym_link_dir
19391             # Use -P flag to resolve symlinks in directories.
19392             cd `$THEPWDCMD -P`
19393             sym_link_dir=`$THEPWDCMD -P`
19394             # Resolve file symlinks
19395             while test $COUNTER -lt 20; do
19396                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19397                 if test "x$ISLINK" == x; then
19398                     # This is not a symbolic link! We are done!
19399                     break
19400                 fi
19401                 # Again resolve directory symlinks since the target of the just found
19402                 # link could be in a different directory
19403                 cd `$DIRNAME $ISLINK`
19404                 sym_link_dir=`$THEPWDCMD -P`
19405                 sym_link_file=`$BASENAME $ISLINK`
19406                 let COUNTER=COUNTER+1
19407             done
19408             cd $STARTDIR
19409             TEST_COMPILER=$sym_link_dir/$sym_link_file
19410         fi
19411     fi
19412 
19413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19414 $as_echo "$TEST_COMPILER" >&6; }
19415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19416 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19417 
19418   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19419   if test "x$COMPILER_BASENAME" = "xccache"; then
19420     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19421 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19422     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19423     # We want to control ccache invocation ourselves, so ignore this cc and try
19424     # searching again.
19425 
19426     # Remove the path to the fake ccache cc from the PATH
19427     RETRY_COMPILER_SAVED_PATH="$PATH"
19428     COMPILER_DIRNAME=`$DIRNAME $CC`
19429     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19430 
19431     # Try again looking for our compiler
19432     if test -n "$ac_tool_prefix"; then
19433   for ac_prog in $COMPILER_CHECK_LIST
19434   do
19435     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19436 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19438 $as_echo_n "checking for $ac_word... " >&6; }
19439 if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19440   $as_echo_n "(cached) " >&6
19441 else
19442   if test -n "$PROPER_COMPILER_CC"; then
19443   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19444 else
19445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19446 for as_dir in $PATH
19447 do
19448   IFS=$as_save_IFS
19449   test -z "$as_dir" && as_dir=.
19450     for ac_exec_ext in '' $ac_executable_extensions; do
19451   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19452     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19454     break 2
19455   fi
19456 done
19457   done
19458 IFS=$as_save_IFS
19459 
19460 fi
19461 fi
19462 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19463 if test -n "$PROPER_COMPILER_CC"; then
19464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19465 $as_echo "$PROPER_COMPILER_CC" >&6; }
19466 else
19467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19468 $as_echo "no" >&6; }
19469 fi
19470 
19471 
19472     test -n "$PROPER_COMPILER_CC" && break
19473   done
19474 fi
19475 if test -z "$PROPER_COMPILER_CC"; then
19476   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19477   for ac_prog in $COMPILER_CHECK_LIST
19478 do
19479   # Extract the first word of "$ac_prog", so it can be a program name with args.
19480 set dummy $ac_prog; ac_word=$2
19481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482 $as_echo_n "checking for $ac_word... " >&6; }
19483 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19484   $as_echo_n "(cached) " >&6
19485 else
19486   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19487   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19488 else
19489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19490 for as_dir in $PATH
19491 do
19492   IFS=$as_save_IFS
19493   test -z "$as_dir" && as_dir=.
19494     for ac_exec_ext in '' $ac_executable_extensions; do
19495   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19496     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19498     break 2
19499   fi
19500 done
19501   done
19502 IFS=$as_save_IFS
19503 
19504 fi
19505 fi
19506 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19507 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19509 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19510 else
19511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19512 $as_echo "no" >&6; }
19513 fi
19514 
19515 
19516   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19517 done
19518 
19519   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19520     PROPER_COMPILER_CC=""
19521   else
19522     case $cross_compiling:$ac_tool_warned in
19523 yes:)
19524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19525 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19526 ac_tool_warned=yes ;;
19527 esac
19528     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19529   fi
19530 fi
19531 
19532 
19533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19534 
19535   # First separate the path from the arguments. This will split at the first
19536   # space.
19537   complete="$PROPER_COMPILER_CC"
19538   path="${complete%% *}"
19539   tmp="$complete EOL"
19540   arguments="${tmp#* }"
19541 
19542   # Input might be given as Windows format, start by converting to
19543   # unix format.
19544   new_path=`$CYGPATH -u "$path"`
19545 
19546   # Now try to locate executable using which
19547   new_path=`$WHICH "$new_path" 2> /dev/null`
19548   # bat and cmd files are not always considered executable in cygwin causing which
19549   # to not find them
19550   if test "x$new_path" = x \
19551            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19552            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19553     new_path=`$CYGPATH -u "$path"`
19554   fi
19555   if test "x$new_path" = x; then
19556     # Oops. Which didn't find the executable.
19557     # The splitting of arguments from the executable at a space might have been incorrect,
19558     # since paths with space are more likely in Windows. Give it another try with the whole
19559     # argument.
19560     path="$complete"
19561     arguments="EOL"
19562     new_path=`$CYGPATH -u "$path"`
19563     new_path=`$WHICH "$new_path" 2> /dev/null`
19564     # bat and cmd files are not always considered executable in cygwin causing which
19565     # to not find them
19566     if test "x$new_path" = x \
19567              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19568              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19569       new_path=`$CYGPATH -u "$path"`
19570     fi
19571     if test "x$new_path" = x; then
19572       # It's still not found. Now this is an unrecoverable error.
19573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19574 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19575       has_space=`$ECHO "$complete" | $GREP " "`
19576       if test "x$has_space" != x; then
19577         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19578 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19579       fi
19580       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19581     fi
19582   fi
19583 
19584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19587   # "foo.exe" is OK but "foo" is an error.
19588   #
19589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19590   # It is also a way to make sure we got the proper file name for the real test later on.
19591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19592   if test "x$test_shortpath" = x; then
19593     # Short path failed, file does not exist as specified.
19594     # Try adding .exe or .cmd
19595     if test -f "${new_path}.exe"; then
19596        input_to_shortpath="${new_path}.exe"
19597     elif test -f "${new_path}.cmd"; then
19598        input_to_shortpath="${new_path}.cmd"
19599     else
19600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19601 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19602       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19603 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19604       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19605     fi
19606   else
19607     input_to_shortpath="$new_path"
19608   fi
19609 
19610   # Call helper function which possibly converts this using DOS-style short mode.
19611   # If so, the updated path is stored in $new_path.
19612   new_path="$input_to_shortpath"
19613 
19614   input_path="$input_to_shortpath"
19615   # Check if we need to convert this using DOS-style short mode. If the path
19616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19617   # take no chances and rewrite it.
19618   # Note: m4 eats our [], so we need to use [ and ] instead.
19619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19620   if test "x$has_forbidden_chars" != x; then
19621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19625       # Going to short mode and back again did indeed matter. Since short mode is
19626       # case insensitive, let's make it lowercase to improve readability.
19627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19628       # Now convert it back to Unix-stile (cygpath)
19629       input_path=`$CYGPATH -u "$shortmode_path"`
19630       new_path="$input_path"
19631     fi
19632   fi
19633 
19634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19635   if test "x$test_cygdrive_prefix" = x; then
19636     # As a simple fix, exclude /usr/bin since it's not a real path.
19637     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19639       # a path prefixed by /cygdrive for fixpath to work.
19640       new_path="$CYGWIN_ROOT_PATH$input_path"
19641     fi
19642   fi
19643 
19644   # remove trailing .exe if any
19645   new_path="${new_path/%.exe/}"
19646 
19647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19648 
19649   # First separate the path from the arguments. This will split at the first
19650   # space.
19651   complete="$PROPER_COMPILER_CC"
19652   path="${complete%% *}"
19653   tmp="$complete EOL"
19654   arguments="${tmp#* }"
19655 
19656   # Input might be given as Windows format, start by converting to
19657   # unix format.
19658   new_path="$path"
19659 
19660   windows_path="$new_path"
19661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19662     unix_path=`$CYGPATH -u "$windows_path"`
19663     new_path="$unix_path"
19664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19666     new_path="$unix_path"
19667   fi
19668 
19669 
19670   # Now try to locate executable using which
19671   new_path=`$WHICH "$new_path" 2> /dev/null`
19672 
19673   if test "x$new_path" = x; then
19674     # Oops. Which didn't find the executable.
19675     # The splitting of arguments from the executable at a space might have been incorrect,
19676     # since paths with space are more likely in Windows. Give it another try with the whole
19677     # argument.
19678     path="$complete"
19679     arguments="EOL"
19680     new_path="$path"
19681 
19682   windows_path="$new_path"
19683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19684     unix_path=`$CYGPATH -u "$windows_path"`
19685     new_path="$unix_path"
19686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19688     new_path="$unix_path"
19689   fi
19690 
19691 
19692     new_path=`$WHICH "$new_path" 2> /dev/null`
19693 
19694     if test "x$new_path" = x; then
19695       # It's still not found. Now this is an unrecoverable error.
19696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19697 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19698       has_space=`$ECHO "$complete" | $GREP " "`
19699       if test "x$has_space" != x; then
19700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19702       fi
19703       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19704     fi
19705   fi
19706 
19707   # Now new_path has a complete unix path to the binary
19708   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19709     # Keep paths in /bin as-is, but remove trailing .exe if any
19710     new_path="${new_path/%.exe/}"
19711     # Do not save /bin paths to all_fixpath_prefixes!
19712   else
19713     # Not in mixed or Windows style, start by that.
19714     new_path=`cmd //c echo $new_path`
19715 
19716   input_path="$new_path"
19717   # Check if we need to convert this using DOS-style short mode. If the path
19718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19719   # take no chances and rewrite it.
19720   # Note: m4 eats our [], so we need to use [ and ] instead.
19721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19722   if test "x$has_forbidden_chars" != x; then
19723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19725   fi
19726 
19727     # Output is in $new_path
19728 
19729   windows_path="$new_path"
19730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19731     unix_path=`$CYGPATH -u "$windows_path"`
19732     new_path="$unix_path"
19733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19735     new_path="$unix_path"
19736   fi
19737 
19738     # remove trailing .exe if any
19739     new_path="${new_path/%.exe/}"
19740 
19741     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19742     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19743   fi
19744 
19745   else
19746     # We're on a posix platform. Hooray! :)
19747     # First separate the path from the arguments. This will split at the first
19748     # space.
19749     complete="$PROPER_COMPILER_CC"
19750     path="${complete%% *}"
19751     tmp="$complete EOL"
19752     arguments="${tmp#* }"
19753 
19754     # Cannot rely on the command "which" here since it doesn't always work.
19755     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19756     if test -z "$is_absolute_path"; then
19757       # Path to executable is not absolute. Find it.
19758       IFS_save="$IFS"
19759       IFS=:
19760       for p in $PATH; do
19761         if test -f "$p/$path" && test -x "$p/$path"; then
19762           new_path="$p/$path"
19763           break
19764         fi
19765       done
19766       IFS="$IFS_save"
19767     else
19768       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19769 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19770       new_path="$path"
19771     fi
19772 
19773     if test "x$new_path" = x; then
19774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19775 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19776         has_space=`$ECHO "$complete" | $GREP " "`
19777         if test "x$has_space" != x; then
19778           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19779 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19780         fi
19781         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19782       fi
19783   fi
19784 
19785       # Now join together the path and the arguments once again
19786       if test "x$arguments" != xEOL; then
19787         new_complete="$new_path ${arguments% *}"
19788       else
19789         new_complete="$new_path"
19790       fi
19791 
19792   if test "x$complete" != "x$new_complete"; then
19793       PROPER_COMPILER_CC="$new_complete"
19794       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19795 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19796     fi
19797 
19798     PATH="$RETRY_COMPILER_SAVED_PATH"
19799 
19800     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19801 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19802 
19803     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19804         # Follow a chain of symbolic links. Use readlink
19805         # where it exists, else fall back to horribly
19806         # complicated shell code.
19807         if test "x$READLINK_TESTED" != yes; then
19808             # On MacOSX there is a readlink tool with a different
19809             # purpose than the GNU readlink tool. Check the found readlink.
19810             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19811             if test "x$ISGNU" = x; then
19812                  # A readlink that we do not know how to use.
19813                  # Are there other non-GNU readlinks out there?
19814                  READLINK_TESTED=yes
19815                  READLINK=
19816             fi
19817         fi
19818 
19819         if test "x$READLINK" != x; then
19820             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19821         else
19822             # Save the current directory for restoring afterwards
19823             STARTDIR=$PWD
19824             COUNTER=0
19825             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19826             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19827             cd $sym_link_dir
19828             # Use -P flag to resolve symlinks in directories.
19829             cd `$THEPWDCMD -P`
19830             sym_link_dir=`$THEPWDCMD -P`
19831             # Resolve file symlinks
19832             while test $COUNTER -lt 20; do
19833                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19834                 if test "x$ISLINK" == x; then
19835                     # This is not a symbolic link! We are done!
19836                     break
19837                 fi
19838                 # Again resolve directory symlinks since the target of the just found
19839                 # link could be in a different directory
19840                 cd `$DIRNAME $ISLINK`
19841                 sym_link_dir=`$THEPWDCMD -P`
19842                 sym_link_file=`$BASENAME $ISLINK`
19843                 let COUNTER=COUNTER+1
19844             done
19845             cd $STARTDIR
19846             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19847         fi
19848     fi
19849 
19850     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19851 $as_echo "$PROPER_COMPILER_CC" >&6; }
19852     CC="$PROPER_COMPILER_CC"
19853   else
19854     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19855 $as_echo "no, keeping CC" >&6; }
19856     CC="$TEST_COMPILER"
19857   fi
19858 
19859   COMPILER=$CC
19860   COMPILER_NAME=$COMPILER_NAME
19861 
19862   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19863     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19864     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19865     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19866     if test $? -ne 0; then
19867       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19868 
19869       { $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
19870 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19871       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19872 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19873       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19874     else
19875       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19876       COMPILER_VENDOR="Sun Studio"
19877     fi
19878   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19879     # First line typically looks something like:
19880     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19881     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19882     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19883     COMPILER_VENDOR="Microsoft CL.EXE"
19884     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19885     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19886       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19887         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19888       fi
19889     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19890       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19891         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19892       fi
19893     fi
19894   else
19895     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19896     # Check that this is likely to be GCC.
19897     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19898     if test $? -ne 0; then
19899       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19900 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19901       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19902 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19903       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19904     fi
19905 
19906     # First line typically looks something like:
19907     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19908     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19909     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19910   fi
19911   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19912   CC_VERSION="$COMPILER_VERSION"
19913   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19914   CC_VENDOR="$COMPILER_VENDOR"
19915 
19916   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19917 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19918 
19919 
19920 # Now that we have resolved CC ourself, let autoconf have its go at it
19921 ac_ext=c
19922 ac_cpp='$CPP $CPPFLAGS'
19923 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19924 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19925 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19926 if test -n "$ac_tool_prefix"; then
19927   for ac_prog in $CC
19928   do
19929     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19930 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19932 $as_echo_n "checking for $ac_word... " >&6; }
19933 if test "${ac_cv_prog_CC+set}" = set; then :
19934   $as_echo_n "(cached) " >&6
19935 else
19936   if test -n "$CC"; then
19937   ac_cv_prog_CC="$CC" # Let the user override the test.
19938 else
19939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19940 for as_dir in $PATH
19941 do
19942   IFS=$as_save_IFS
19943   test -z "$as_dir" && as_dir=.
19944     for ac_exec_ext in '' $ac_executable_extensions; do
19945   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19946     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19948     break 2
19949   fi
19950 done
19951   done
19952 IFS=$as_save_IFS
19953 
19954 fi
19955 fi
19956 CC=$ac_cv_prog_CC
19957 if test -n "$CC"; then
19958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19959 $as_echo "$CC" >&6; }
19960 else
19961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19962 $as_echo "no" >&6; }
19963 fi
19964 
19965 
19966     test -n "$CC" && break
19967   done
19968 fi
19969 if test -z "$CC"; then
19970   ac_ct_CC=$CC
19971   for ac_prog in $CC
19972 do
19973   # Extract the first word of "$ac_prog", so it can be a program name with args.
19974 set dummy $ac_prog; ac_word=$2
19975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19976 $as_echo_n "checking for $ac_word... " >&6; }
19977 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19978   $as_echo_n "(cached) " >&6
19979 else
19980   if test -n "$ac_ct_CC"; then
19981   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19982 else
19983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19984 for as_dir in $PATH
19985 do
19986   IFS=$as_save_IFS
19987   test -z "$as_dir" && as_dir=.
19988     for ac_exec_ext in '' $ac_executable_extensions; do
19989   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19990     ac_cv_prog_ac_ct_CC="$ac_prog"
19991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19992     break 2
19993   fi
19994 done
19995   done
19996 IFS=$as_save_IFS
19997 
19998 fi
19999 fi
20000 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20001 if test -n "$ac_ct_CC"; then
20002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20003 $as_echo "$ac_ct_CC" >&6; }
20004 else
20005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20006 $as_echo "no" >&6; }
20007 fi
20008 
20009 
20010   test -n "$ac_ct_CC" && break
20011 done
20012 
20013   if test "x$ac_ct_CC" = x; then
20014     CC=""
20015   else
20016     case $cross_compiling:$ac_tool_warned in
20017 yes:)
20018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20019 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20020 ac_tool_warned=yes ;;
20021 esac
20022     CC=$ac_ct_CC
20023   fi
20024 fi
20025 
20026 
20027 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20029 as_fn_error $? "no acceptable C compiler found in \$PATH
20030 See \`config.log' for more details" "$LINENO" 5 ; }
20031 
20032 # Provide some information about the compiler.
20033 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20034 set X $ac_compile
20035 ac_compiler=$2
20036 for ac_option in --version -v -V -qversion; do
20037   { { ac_try="$ac_compiler $ac_option >&5"
20038 case "(($ac_try" in
20039   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20040   *) ac_try_echo=$ac_try;;
20041 esac
20042 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20043 $as_echo "$ac_try_echo"; } >&5
20044   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20045   ac_status=$?
20046   if test -s conftest.err; then
20047     sed '10a\
20048 ... rest of stderr output deleted ...
20049          10q' conftest.err >conftest.er1
20050     cat conftest.er1 >&5
20051   fi
20052   rm -f conftest.er1 conftest.err
20053   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20054   test $ac_status = 0; }
20055 done
20056 
20057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20058 /* end confdefs.h.  */
20059 
20060 int
20061 main ()
20062 {
20063 
20064   ;
20065   return 0;
20066 }
20067 _ACEOF
20068 ac_clean_files_save=$ac_clean_files
20069 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20070 # Try to create an executable without -o first, disregard a.out.
20071 # It will help us diagnose broken compilers, and finding out an intuition
20072 # of exeext.
20073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20074 $as_echo_n "checking whether the C compiler works... " >&6; }
20075 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20076 
20077 # The possible output files:
20078 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20079 
20080 ac_rmfiles=
20081 for ac_file in $ac_files
20082 do
20083   case $ac_file in
20084     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20085     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20086   esac
20087 done
20088 rm -f $ac_rmfiles
20089 
20090 if { { ac_try="$ac_link_default"
20091 case "(($ac_try" in
20092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20093   *) ac_try_echo=$ac_try;;
20094 esac
20095 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20096 $as_echo "$ac_try_echo"; } >&5
20097   (eval "$ac_link_default") 2>&5
20098   ac_status=$?
20099   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20100   test $ac_status = 0; }; then :
20101   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20102 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20103 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20104 # so that the user can short-circuit this test for compilers unknown to
20105 # Autoconf.
20106 for ac_file in $ac_files ''
20107 do
20108   test -f "$ac_file" || continue
20109   case $ac_file in
20110     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20111         ;;
20112     [ab].out )
20113         # We found the default executable, but exeext='' is most
20114         # certainly right.
20115         break;;
20116     *.* )
20117         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20118         then :; else
20119            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20120         fi
20121         # We set ac_cv_exeext here because the later test for it is not
20122         # safe: cross compilers may not add the suffix if given an `-o'
20123         # argument, so we may need to know it at that point already.
20124         # Even if this section looks crufty: it has the advantage of
20125         # actually working.
20126         break;;
20127     * )
20128         break;;
20129   esac
20130 done
20131 test "$ac_cv_exeext" = no && ac_cv_exeext=
20132 
20133 else
20134   ac_file=''
20135 fi
20136 if test -z "$ac_file"; then :
20137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20138 $as_echo "no" >&6; }
20139 $as_echo "$as_me: failed program was:" >&5
20140 sed 's/^/| /' conftest.$ac_ext >&5
20141 
20142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20143 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20144 as_fn_error 77 "C compiler cannot create executables
20145 See \`config.log' for more details" "$LINENO" 5 ; }
20146 else
20147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20148 $as_echo "yes" >&6; }
20149 fi
20150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20151 $as_echo_n "checking for C compiler default output file name... " >&6; }
20152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20153 $as_echo "$ac_file" >&6; }
20154 ac_exeext=$ac_cv_exeext
20155 
20156 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20157 ac_clean_files=$ac_clean_files_save
20158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20159 $as_echo_n "checking for suffix of executables... " >&6; }
20160 if { { ac_try="$ac_link"
20161 case "(($ac_try" in
20162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20163   *) ac_try_echo=$ac_try;;
20164 esac
20165 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20166 $as_echo "$ac_try_echo"; } >&5
20167   (eval "$ac_link") 2>&5
20168   ac_status=$?
20169   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20170   test $ac_status = 0; }; then :
20171   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20172 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20173 # work properly (i.e., refer to `conftest.exe'), while it won't with
20174 # `rm'.
20175 for ac_file in conftest.exe conftest conftest.*; do
20176   test -f "$ac_file" || continue
20177   case $ac_file in
20178     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20179     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20180           break;;
20181     * ) break;;
20182   esac
20183 done
20184 else
20185   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20187 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20188 See \`config.log' for more details" "$LINENO" 5 ; }
20189 fi
20190 rm -f conftest conftest$ac_cv_exeext
20191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20192 $as_echo "$ac_cv_exeext" >&6; }
20193 
20194 rm -f conftest.$ac_ext
20195 EXEEXT=$ac_cv_exeext
20196 ac_exeext=$EXEEXT
20197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20198 /* end confdefs.h.  */
20199 #include <stdio.h>
20200 int
20201 main ()
20202 {
20203 FILE *f = fopen ("conftest.out", "w");
20204  return ferror (f) || fclose (f) != 0;
20205 
20206   ;
20207   return 0;
20208 }
20209 _ACEOF
20210 ac_clean_files="$ac_clean_files conftest.out"
20211 # Check that the compiler produces executables we can run.  If not, either
20212 # the compiler is broken, or we cross compile.
20213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20214 $as_echo_n "checking whether we are cross compiling... " >&6; }
20215 if test "$cross_compiling" != yes; then
20216   { { ac_try="$ac_link"
20217 case "(($ac_try" in
20218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20219   *) ac_try_echo=$ac_try;;
20220 esac
20221 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20222 $as_echo "$ac_try_echo"; } >&5
20223   (eval "$ac_link") 2>&5
20224   ac_status=$?
20225   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20226   test $ac_status = 0; }
20227   if { ac_try='./conftest$ac_cv_exeext'
20228   { { case "(($ac_try" in
20229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20230   *) ac_try_echo=$ac_try;;
20231 esac
20232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20233 $as_echo "$ac_try_echo"; } >&5
20234   (eval "$ac_try") 2>&5
20235   ac_status=$?
20236   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20237   test $ac_status = 0; }; }; then
20238     cross_compiling=no
20239   else
20240     if test "$cross_compiling" = maybe; then
20241         cross_compiling=yes
20242     else
20243         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20244 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20245 as_fn_error $? "cannot run C compiled programs.
20246 If you meant to cross compile, use \`--host'.
20247 See \`config.log' for more details" "$LINENO" 5 ; }
20248     fi
20249   fi
20250 fi
20251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20252 $as_echo "$cross_compiling" >&6; }
20253 
20254 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20255 ac_clean_files=$ac_clean_files_save
20256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20257 $as_echo_n "checking for suffix of object files... " >&6; }
20258 if test "${ac_cv_objext+set}" = set; then :
20259   $as_echo_n "(cached) " >&6
20260 else
20261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20262 /* end confdefs.h.  */
20263 
20264 int
20265 main ()
20266 {
20267 
20268   ;
20269   return 0;
20270 }
20271 _ACEOF
20272 rm -f conftest.o conftest.obj
20273 if { { ac_try="$ac_compile"
20274 case "(($ac_try" in
20275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20276   *) ac_try_echo=$ac_try;;
20277 esac
20278 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20279 $as_echo "$ac_try_echo"; } >&5
20280   (eval "$ac_compile") 2>&5
20281   ac_status=$?
20282   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20283   test $ac_status = 0; }; then :
20284   for ac_file in conftest.o conftest.obj conftest.*; do
20285   test -f "$ac_file" || continue;
20286   case $ac_file in
20287     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20288     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20289        break;;
20290   esac
20291 done
20292 else
20293   $as_echo "$as_me: failed program was:" >&5
20294 sed 's/^/| /' conftest.$ac_ext >&5
20295 
20296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20297 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20298 as_fn_error $? "cannot compute suffix of object files: cannot compile
20299 See \`config.log' for more details" "$LINENO" 5 ; }
20300 fi
20301 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20302 fi
20303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20304 $as_echo "$ac_cv_objext" >&6; }
20305 OBJEXT=$ac_cv_objext
20306 ac_objext=$OBJEXT
20307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20308 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20309 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20310   $as_echo_n "(cached) " >&6
20311 else
20312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20313 /* end confdefs.h.  */
20314 
20315 int
20316 main ()
20317 {
20318 #ifndef __GNUC__
20319        choke me
20320 #endif
20321 
20322   ;
20323   return 0;
20324 }
20325 _ACEOF
20326 if ac_fn_c_try_compile "$LINENO"; then :
20327   ac_compiler_gnu=yes
20328 else
20329   ac_compiler_gnu=no
20330 fi
20331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20332 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20333 
20334 fi
20335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20336 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20337 if test $ac_compiler_gnu = yes; then
20338   GCC=yes
20339 else
20340   GCC=
20341 fi
20342 ac_test_CFLAGS=${CFLAGS+set}
20343 ac_save_CFLAGS=$CFLAGS
20344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20345 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20346 if test "${ac_cv_prog_cc_g+set}" = set; then :
20347   $as_echo_n "(cached) " >&6
20348 else
20349   ac_save_c_werror_flag=$ac_c_werror_flag
20350    ac_c_werror_flag=yes
20351    ac_cv_prog_cc_g=no
20352    CFLAGS="-g"
20353    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354 /* end confdefs.h.  */
20355 
20356 int
20357 main ()
20358 {
20359 
20360   ;
20361   return 0;
20362 }
20363 _ACEOF
20364 if ac_fn_c_try_compile "$LINENO"; then :
20365   ac_cv_prog_cc_g=yes
20366 else
20367   CFLAGS=""
20368       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20369 /* end confdefs.h.  */
20370 
20371 int
20372 main ()
20373 {
20374 
20375   ;
20376   return 0;
20377 }
20378 _ACEOF
20379 if ac_fn_c_try_compile "$LINENO"; then :
20380 
20381 else
20382   ac_c_werror_flag=$ac_save_c_werror_flag
20383          CFLAGS="-g"
20384          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20385 /* end confdefs.h.  */
20386 
20387 int
20388 main ()
20389 {
20390 
20391   ;
20392   return 0;
20393 }
20394 _ACEOF
20395 if ac_fn_c_try_compile "$LINENO"; then :
20396   ac_cv_prog_cc_g=yes
20397 fi
20398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20399 fi
20400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20401 fi
20402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20403    ac_c_werror_flag=$ac_save_c_werror_flag
20404 fi
20405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20406 $as_echo "$ac_cv_prog_cc_g" >&6; }
20407 if test "$ac_test_CFLAGS" = set; then
20408   CFLAGS=$ac_save_CFLAGS
20409 elif test $ac_cv_prog_cc_g = yes; then
20410   if test "$GCC" = yes; then
20411     CFLAGS="-g -O2"
20412   else
20413     CFLAGS="-g"
20414   fi
20415 else
20416   if test "$GCC" = yes; then
20417     CFLAGS="-O2"
20418   else
20419     CFLAGS=
20420   fi
20421 fi
20422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20423 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20424 if test "${ac_cv_prog_cc_c89+set}" = set; then :
20425   $as_echo_n "(cached) " >&6
20426 else
20427   ac_cv_prog_cc_c89=no
20428 ac_save_CC=$CC
20429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20430 /* end confdefs.h.  */
20431 #include <stdarg.h>
20432 #include <stdio.h>
20433 #include <sys/types.h>
20434 #include <sys/stat.h>
20435 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20436 struct buf { int x; };
20437 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20438 static char *e (p, i)
20439      char **p;
20440      int i;
20441 {
20442   return p[i];
20443 }
20444 static char *f (char * (*g) (char **, int), char **p, ...)
20445 {
20446   char *s;
20447   va_list v;
20448   va_start (v,p);
20449   s = g (p, va_arg (v,int));
20450   va_end (v);
20451   return s;
20452 }
20453 
20454 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20455    function prototypes and stuff, but not '\xHH' hex character constants.
20456    These don't provoke an error unfortunately, instead are silently treated
20457    as 'x'.  The following induces an error, until -std is added to get
20458    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20459    array size at least.  It's necessary to write '\x00'==0 to get something
20460    that's true only with -std.  */
20461 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20462 
20463 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20464    inside strings and character constants.  */
20465 #define FOO(x) 'x'
20466 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20467 
20468 int test (int i, double x);
20469 struct s1 {int (*f) (int a);};
20470 struct s2 {int (*f) (double a);};
20471 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20472 int argc;
20473 char **argv;
20474 int
20475 main ()
20476 {
20477 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20478   ;
20479   return 0;
20480 }
20481 _ACEOF
20482 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20483         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20484 do
20485   CC="$ac_save_CC $ac_arg"
20486   if ac_fn_c_try_compile "$LINENO"; then :
20487   ac_cv_prog_cc_c89=$ac_arg
20488 fi
20489 rm -f core conftest.err conftest.$ac_objext
20490   test "x$ac_cv_prog_cc_c89" != "xno" && break
20491 done
20492 rm -f conftest.$ac_ext
20493 CC=$ac_save_CC
20494 
20495 fi
20496 # AC_CACHE_VAL
20497 case "x$ac_cv_prog_cc_c89" in
20498   x)
20499     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20500 $as_echo "none needed" >&6; } ;;
20501   xno)
20502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20503 $as_echo "unsupported" >&6; } ;;
20504   *)
20505     CC="$CC $ac_cv_prog_cc_c89"
20506     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20507 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20508 esac
20509 if test "x$ac_cv_prog_cc_c89" != xno; then :
20510 
20511 fi
20512 
20513 ac_ext=cpp
20514 ac_cpp='$CXXCPP $CPPFLAGS'
20515 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20516 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20517 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20518 
20519 
20520 ### Locate C++ compiler (CXX)
20521 
20522 if test "x$CXX" != x; then
20523   COMPILER_CHECK_LIST="$CXX"
20524 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20525   COMPILER_CHECK_LIST="cl"
20526 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20527   COMPILER_CHECK_LIST="CC g++"
20528 else
20529   COMPILER_CHECK_LIST="g++ CC"
20530 fi
20531 
20532 
20533   COMPILER_NAME=C++
20534 
20535   CXX=
20536   # If TOOLS_DIR is set, check for all compiler names in there first
20537   # before checking the rest of the PATH.
20538   if test -n "$TOOLS_DIR"; then
20539     PATH_save="$PATH"
20540     PATH="$TOOLS_DIR"
20541     for ac_prog in $COMPILER_CHECK_LIST
20542 do
20543   # Extract the first word of "$ac_prog", so it can be a program name with args.
20544 set dummy $ac_prog; ac_word=$2
20545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20546 $as_echo_n "checking for $ac_word... " >&6; }
20547 if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20548   $as_echo_n "(cached) " >&6
20549 else
20550   case $TOOLS_DIR_CXX in
20551   [\\/]* | ?:[\\/]*)
20552   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20553   ;;
20554   *)
20555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20556 for as_dir in $PATH
20557 do
20558   IFS=$as_save_IFS
20559   test -z "$as_dir" && as_dir=.
20560     for ac_exec_ext in '' $ac_executable_extensions; do
20561   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20562     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20564     break 2
20565   fi
20566 done
20567   done
20568 IFS=$as_save_IFS
20569 
20570   ;;
20571 esac
20572 fi
20573 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20574 if test -n "$TOOLS_DIR_CXX"; then
20575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20576 $as_echo "$TOOLS_DIR_CXX" >&6; }
20577 else
20578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20579 $as_echo "no" >&6; }
20580 fi
20581 
20582 
20583   test -n "$TOOLS_DIR_CXX" && break
20584 done
20585 
20586     CXX=$TOOLS_DIR_CXX
20587     PATH="$PATH_save"
20588   fi
20589 
20590   # AC_PATH_PROGS can't be run multiple times with the same variable,
20591   # so create a new name for this run.
20592   if test "x$CXX" = x; then
20593     for ac_prog in $COMPILER_CHECK_LIST
20594 do
20595   # Extract the first word of "$ac_prog", so it can be a program name with args.
20596 set dummy $ac_prog; ac_word=$2
20597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20598 $as_echo_n "checking for $ac_word... " >&6; }
20599 if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20600   $as_echo_n "(cached) " >&6
20601 else
20602   case $POTENTIAL_CXX in
20603   [\\/]* | ?:[\\/]*)
20604   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20605   ;;
20606   *)
20607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20608 for as_dir in $PATH
20609 do
20610   IFS=$as_save_IFS
20611   test -z "$as_dir" && as_dir=.
20612     for ac_exec_ext in '' $ac_executable_extensions; do
20613   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20614     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20616     break 2
20617   fi
20618 done
20619   done
20620 IFS=$as_save_IFS
20621 
20622   ;;
20623 esac
20624 fi
20625 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20626 if test -n "$POTENTIAL_CXX"; then
20627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20628 $as_echo "$POTENTIAL_CXX" >&6; }
20629 else
20630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20631 $as_echo "no" >&6; }
20632 fi
20633 
20634 
20635   test -n "$POTENTIAL_CXX" && break
20636 done
20637 
20638     CXX=$POTENTIAL_CXX
20639   fi
20640 
20641   if test "x$CXX" = x; then
20642 
20643     # Print a helpful message on how to acquire the necessary build dependency.
20644     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20645     MISSING_DEPENDENCY=devkit
20646     PKGHANDLER_COMMAND=
20647 
20648     case $PKGHANDLER in
20649         apt-get)
20650                 apt_help     $MISSING_DEPENDENCY ;;
20651     yum)
20652                 yum_help     $MISSING_DEPENDENCY ;;
20653         port)
20654                 port_help    $MISSING_DEPENDENCY ;;
20655         pkgutil)
20656                 pkgutil_help $MISSING_DEPENDENCY ;;
20657         pkgadd)
20658                 pkgadd_help  $MISSING_DEPENDENCY ;;
20659     * )
20660       break ;;
20661     esac
20662 
20663     if test "x$PKGHANDLER_COMMAND" != x; then
20664         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20665     fi
20666 
20667       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20668   fi
20669 
20670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20671 
20672   # First separate the path from the arguments. This will split at the first
20673   # space.
20674   complete="$CXX"
20675   path="${complete%% *}"
20676   tmp="$complete EOL"
20677   arguments="${tmp#* }"
20678 
20679   # Input might be given as Windows format, start by converting to
20680   # unix format.
20681   new_path=`$CYGPATH -u "$path"`
20682 
20683   # Now try to locate executable using which
20684   new_path=`$WHICH "$new_path" 2> /dev/null`
20685   # bat and cmd files are not always considered executable in cygwin causing which
20686   # to not find them
20687   if test "x$new_path" = x \
20688            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20689            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20690     new_path=`$CYGPATH -u "$path"`
20691   fi
20692   if test "x$new_path" = x; then
20693     # Oops. Which didn't find the executable.
20694     # The splitting of arguments from the executable at a space might have been incorrect,
20695     # since paths with space are more likely in Windows. Give it another try with the whole
20696     # argument.
20697     path="$complete"
20698     arguments="EOL"
20699     new_path=`$CYGPATH -u "$path"`
20700     new_path=`$WHICH "$new_path" 2> /dev/null`
20701     # bat and cmd files are not always considered executable in cygwin causing which
20702     # to not find them
20703     if test "x$new_path" = x \
20704              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20705              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20706       new_path=`$CYGPATH -u "$path"`
20707     fi
20708     if test "x$new_path" = x; then
20709       # It's still not found. Now this is an unrecoverable error.
20710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20711 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20712       has_space=`$ECHO "$complete" | $GREP " "`
20713       if test "x$has_space" != x; then
20714         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20715 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20716       fi
20717       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20718     fi
20719   fi
20720 
20721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20724   # "foo.exe" is OK but "foo" is an error.
20725   #
20726   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20727   # It is also a way to make sure we got the proper file name for the real test later on.
20728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20729   if test "x$test_shortpath" = x; then
20730     # Short path failed, file does not exist as specified.
20731     # Try adding .exe or .cmd
20732     if test -f "${new_path}.exe"; then
20733        input_to_shortpath="${new_path}.exe"
20734     elif test -f "${new_path}.cmd"; then
20735        input_to_shortpath="${new_path}.cmd"
20736     else
20737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20738 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20739       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20740 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20741       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20742     fi
20743   else
20744     input_to_shortpath="$new_path"
20745   fi
20746 
20747   # Call helper function which possibly converts this using DOS-style short mode.
20748   # If so, the updated path is stored in $new_path.
20749   new_path="$input_to_shortpath"
20750 
20751   input_path="$input_to_shortpath"
20752   # Check if we need to convert this using DOS-style short mode. If the path
20753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20754   # take no chances and rewrite it.
20755   # Note: m4 eats our [], so we need to use [ and ] instead.
20756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20757   if test "x$has_forbidden_chars" != x; then
20758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20759     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20760     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20761     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20762       # Going to short mode and back again did indeed matter. Since short mode is
20763       # case insensitive, let's make it lowercase to improve readability.
20764       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20765       # Now convert it back to Unix-stile (cygpath)
20766       input_path=`$CYGPATH -u "$shortmode_path"`
20767       new_path="$input_path"
20768     fi
20769   fi
20770 
20771   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20772   if test "x$test_cygdrive_prefix" = x; then
20773     # As a simple fix, exclude /usr/bin since it's not a real path.
20774     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20775       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20776       # a path prefixed by /cygdrive for fixpath to work.
20777       new_path="$CYGWIN_ROOT_PATH$input_path"
20778     fi
20779   fi
20780 
20781   # remove trailing .exe if any
20782   new_path="${new_path/%.exe/}"
20783 
20784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20785 
20786   # First separate the path from the arguments. This will split at the first
20787   # space.
20788   complete="$CXX"
20789   path="${complete%% *}"
20790   tmp="$complete EOL"
20791   arguments="${tmp#* }"
20792 
20793   # Input might be given as Windows format, start by converting to
20794   # unix format.
20795   new_path="$path"
20796 
20797   windows_path="$new_path"
20798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20799     unix_path=`$CYGPATH -u "$windows_path"`
20800     new_path="$unix_path"
20801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20803     new_path="$unix_path"
20804   fi
20805 
20806 
20807   # Now try to locate executable using which
20808   new_path=`$WHICH "$new_path" 2> /dev/null`
20809 
20810   if test "x$new_path" = x; then
20811     # Oops. Which didn't find the executable.
20812     # The splitting of arguments from the executable at a space might have been incorrect,
20813     # since paths with space are more likely in Windows. Give it another try with the whole
20814     # argument.
20815     path="$complete"
20816     arguments="EOL"
20817     new_path="$path"
20818 
20819   windows_path="$new_path"
20820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20821     unix_path=`$CYGPATH -u "$windows_path"`
20822     new_path="$unix_path"
20823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20825     new_path="$unix_path"
20826   fi
20827 
20828 
20829     new_path=`$WHICH "$new_path" 2> /dev/null`
20830 
20831     if test "x$new_path" = x; then
20832       # It's still not found. Now this is an unrecoverable error.
20833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20834 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20835       has_space=`$ECHO "$complete" | $GREP " "`
20836       if test "x$has_space" != x; then
20837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20839       fi
20840       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20841     fi
20842   fi
20843 
20844   # Now new_path has a complete unix path to the binary
20845   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20846     # Keep paths in /bin as-is, but remove trailing .exe if any
20847     new_path="${new_path/%.exe/}"
20848     # Do not save /bin paths to all_fixpath_prefixes!
20849   else
20850     # Not in mixed or Windows style, start by that.
20851     new_path=`cmd //c echo $new_path`
20852 
20853   input_path="$new_path"
20854   # Check if we need to convert this using DOS-style short mode. If the path
20855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20856   # take no chances and rewrite it.
20857   # Note: m4 eats our [], so we need to use [ and ] instead.
20858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20859   if test "x$has_forbidden_chars" != x; then
20860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20861     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20862   fi
20863 
20864     # Output is in $new_path
20865 
20866   windows_path="$new_path"
20867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20868     unix_path=`$CYGPATH -u "$windows_path"`
20869     new_path="$unix_path"
20870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20872     new_path="$unix_path"
20873   fi
20874 
20875     # remove trailing .exe if any
20876     new_path="${new_path/%.exe/}"
20877 
20878     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20879     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20880   fi
20881 
20882   else
20883     # We're on a posix platform. Hooray! :)
20884     # First separate the path from the arguments. This will split at the first
20885     # space.
20886     complete="$CXX"
20887     path="${complete%% *}"
20888     tmp="$complete EOL"
20889     arguments="${tmp#* }"
20890 
20891     # Cannot rely on the command "which" here since it doesn't always work.
20892     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20893     if test -z "$is_absolute_path"; then
20894       # Path to executable is not absolute. Find it.
20895       IFS_save="$IFS"
20896       IFS=:
20897       for p in $PATH; do
20898         if test -f "$p/$path" && test -x "$p/$path"; then
20899           new_path="$p/$path"
20900           break
20901         fi
20902       done
20903       IFS="$IFS_save"
20904     else
20905       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20906 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20907       new_path="$path"
20908     fi
20909 
20910     if test "x$new_path" = x; then
20911         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20912 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20913         has_space=`$ECHO "$complete" | $GREP " "`
20914         if test "x$has_space" != x; then
20915           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20916 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20917         fi
20918         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20919       fi
20920   fi
20921 
20922       # Now join together the path and the arguments once again
20923       if test "x$arguments" != xEOL; then
20924         new_complete="$new_path ${arguments% *}"
20925       else
20926         new_complete="$new_path"
20927       fi
20928 
20929   if test "x$complete" != "x$new_complete"; then
20930       CXX="$new_complete"
20931       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20932 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20933     fi
20934 
20935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20936 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20937   TEST_COMPILER="$CXX"
20938 
20939     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20940         # Follow a chain of symbolic links. Use readlink
20941         # where it exists, else fall back to horribly
20942         # complicated shell code.
20943         if test "x$READLINK_TESTED" != yes; then
20944             # On MacOSX there is a readlink tool with a different
20945             # purpose than the GNU readlink tool. Check the found readlink.
20946             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20947             if test "x$ISGNU" = x; then
20948                  # A readlink that we do not know how to use.
20949                  # Are there other non-GNU readlinks out there?
20950                  READLINK_TESTED=yes
20951                  READLINK=
20952             fi
20953         fi
20954 
20955         if test "x$READLINK" != x; then
20956             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20957         else
20958             # Save the current directory for restoring afterwards
20959             STARTDIR=$PWD
20960             COUNTER=0
20961             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20962             sym_link_file=`$BASENAME $TEST_COMPILER`
20963             cd $sym_link_dir
20964             # Use -P flag to resolve symlinks in directories.
20965             cd `$THEPWDCMD -P`
20966             sym_link_dir=`$THEPWDCMD -P`
20967             # Resolve file symlinks
20968             while test $COUNTER -lt 20; do
20969                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20970                 if test "x$ISLINK" == x; then
20971                     # This is not a symbolic link! We are done!
20972                     break
20973                 fi
20974                 # Again resolve directory symlinks since the target of the just found
20975                 # link could be in a different directory
20976                 cd `$DIRNAME $ISLINK`
20977                 sym_link_dir=`$THEPWDCMD -P`
20978                 sym_link_file=`$BASENAME $ISLINK`
20979                 let COUNTER=COUNTER+1
20980             done
20981             cd $STARTDIR
20982             TEST_COMPILER=$sym_link_dir/$sym_link_file
20983         fi
20984     fi
20985 
20986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20987 $as_echo "$TEST_COMPILER" >&6; }
20988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20989 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20990 
20991   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20992   if test "x$COMPILER_BASENAME" = "xccache"; then
20993     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20994 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20995     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20996     # We want to control ccache invocation ourselves, so ignore this cc and try
20997     # searching again.
20998 
20999     # Remove the path to the fake ccache cc from the PATH
21000     RETRY_COMPILER_SAVED_PATH="$PATH"
21001     COMPILER_DIRNAME=`$DIRNAME $CXX`
21002     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21003 
21004     # Try again looking for our compiler
21005     if test -n "$ac_tool_prefix"; then
21006   for ac_prog in $COMPILER_CHECK_LIST
21007   do
21008     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21009 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21011 $as_echo_n "checking for $ac_word... " >&6; }
21012 if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21013   $as_echo_n "(cached) " >&6
21014 else
21015   if test -n "$PROPER_COMPILER_CXX"; then
21016   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21017 else
21018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21019 for as_dir in $PATH
21020 do
21021   IFS=$as_save_IFS
21022   test -z "$as_dir" && as_dir=.
21023     for ac_exec_ext in '' $ac_executable_extensions; do
21024   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21025     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21027     break 2
21028   fi
21029 done
21030   done
21031 IFS=$as_save_IFS
21032 
21033 fi
21034 fi
21035 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21036 if test -n "$PROPER_COMPILER_CXX"; then
21037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21038 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21039 else
21040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21041 $as_echo "no" >&6; }
21042 fi
21043 
21044 
21045     test -n "$PROPER_COMPILER_CXX" && break
21046   done
21047 fi
21048 if test -z "$PROPER_COMPILER_CXX"; then
21049   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21050   for ac_prog in $COMPILER_CHECK_LIST
21051 do
21052   # Extract the first word of "$ac_prog", so it can be a program name with args.
21053 set dummy $ac_prog; ac_word=$2
21054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21055 $as_echo_n "checking for $ac_word... " >&6; }
21056 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21057   $as_echo_n "(cached) " >&6
21058 else
21059   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21060   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21061 else
21062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21063 for as_dir in $PATH
21064 do
21065   IFS=$as_save_IFS
21066   test -z "$as_dir" && as_dir=.
21067     for ac_exec_ext in '' $ac_executable_extensions; do
21068   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21069     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21071     break 2
21072   fi
21073 done
21074   done
21075 IFS=$as_save_IFS
21076 
21077 fi
21078 fi
21079 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21080 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21082 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21083 else
21084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21085 $as_echo "no" >&6; }
21086 fi
21087 
21088 
21089   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21090 done
21091 
21092   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21093     PROPER_COMPILER_CXX=""
21094   else
21095     case $cross_compiling:$ac_tool_warned in
21096 yes:)
21097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21098 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21099 ac_tool_warned=yes ;;
21100 esac
21101     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21102   fi
21103 fi
21104 
21105 
21106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21107 
21108   # First separate the path from the arguments. This will split at the first
21109   # space.
21110   complete="$PROPER_COMPILER_CXX"
21111   path="${complete%% *}"
21112   tmp="$complete EOL"
21113   arguments="${tmp#* }"
21114 
21115   # Input might be given as Windows format, start by converting to
21116   # unix format.
21117   new_path=`$CYGPATH -u "$path"`
21118 
21119   # Now try to locate executable using which
21120   new_path=`$WHICH "$new_path" 2> /dev/null`
21121   # bat and cmd files are not always considered executable in cygwin causing which
21122   # to not find them
21123   if test "x$new_path" = x \
21124            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21125            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21126     new_path=`$CYGPATH -u "$path"`
21127   fi
21128   if test "x$new_path" = x; then
21129     # Oops. Which didn't find the executable.
21130     # The splitting of arguments from the executable at a space might have been incorrect,
21131     # since paths with space are more likely in Windows. Give it another try with the whole
21132     # argument.
21133     path="$complete"
21134     arguments="EOL"
21135     new_path=`$CYGPATH -u "$path"`
21136     new_path=`$WHICH "$new_path" 2> /dev/null`
21137     # bat and cmd files are not always considered executable in cygwin causing which
21138     # to not find them
21139     if test "x$new_path" = x \
21140              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21141              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21142       new_path=`$CYGPATH -u "$path"`
21143     fi
21144     if test "x$new_path" = x; then
21145       # It's still not found. Now this is an unrecoverable error.
21146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21147 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21148       has_space=`$ECHO "$complete" | $GREP " "`
21149       if test "x$has_space" != x; then
21150         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21151 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21152       fi
21153       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21154     fi
21155   fi
21156 
21157   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21158   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21159   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21160   # "foo.exe" is OK but "foo" is an error.
21161   #
21162   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21163   # It is also a way to make sure we got the proper file name for the real test later on.
21164   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21165   if test "x$test_shortpath" = x; then
21166     # Short path failed, file does not exist as specified.
21167     # Try adding .exe or .cmd
21168     if test -f "${new_path}.exe"; then
21169        input_to_shortpath="${new_path}.exe"
21170     elif test -f "${new_path}.cmd"; then
21171        input_to_shortpath="${new_path}.cmd"
21172     else
21173       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21174 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21175       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21176 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21177       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21178     fi
21179   else
21180     input_to_shortpath="$new_path"
21181   fi
21182 
21183   # Call helper function which possibly converts this using DOS-style short mode.
21184   # If so, the updated path is stored in $new_path.
21185   new_path="$input_to_shortpath"
21186 
21187   input_path="$input_to_shortpath"
21188   # Check if we need to convert this using DOS-style short mode. If the path
21189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21190   # take no chances and rewrite it.
21191   # Note: m4 eats our [], so we need to use [ and ] instead.
21192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21193   if test "x$has_forbidden_chars" != x; then
21194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21198       # Going to short mode and back again did indeed matter. Since short mode is
21199       # case insensitive, let's make it lowercase to improve readability.
21200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21201       # Now convert it back to Unix-stile (cygpath)
21202       input_path=`$CYGPATH -u "$shortmode_path"`
21203       new_path="$input_path"
21204     fi
21205   fi
21206 
21207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21208   if test "x$test_cygdrive_prefix" = x; then
21209     # As a simple fix, exclude /usr/bin since it's not a real path.
21210     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21212       # a path prefixed by /cygdrive for fixpath to work.
21213       new_path="$CYGWIN_ROOT_PATH$input_path"
21214     fi
21215   fi
21216 
21217   # remove trailing .exe if any
21218   new_path="${new_path/%.exe/}"
21219 
21220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21221 
21222   # First separate the path from the arguments. This will split at the first
21223   # space.
21224   complete="$PROPER_COMPILER_CXX"
21225   path="${complete%% *}"
21226   tmp="$complete EOL"
21227   arguments="${tmp#* }"
21228 
21229   # Input might be given as Windows format, start by converting to
21230   # unix format.
21231   new_path="$path"
21232 
21233   windows_path="$new_path"
21234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21235     unix_path=`$CYGPATH -u "$windows_path"`
21236     new_path="$unix_path"
21237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21239     new_path="$unix_path"
21240   fi
21241 
21242 
21243   # Now try to locate executable using which
21244   new_path=`$WHICH "$new_path" 2> /dev/null`
21245 
21246   if test "x$new_path" = x; then
21247     # Oops. Which didn't find the executable.
21248     # The splitting of arguments from the executable at a space might have been incorrect,
21249     # since paths with space are more likely in Windows. Give it another try with the whole
21250     # argument.
21251     path="$complete"
21252     arguments="EOL"
21253     new_path="$path"
21254 
21255   windows_path="$new_path"
21256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21257     unix_path=`$CYGPATH -u "$windows_path"`
21258     new_path="$unix_path"
21259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21261     new_path="$unix_path"
21262   fi
21263 
21264 
21265     new_path=`$WHICH "$new_path" 2> /dev/null`
21266 
21267     if test "x$new_path" = x; then
21268       # It's still not found. Now this is an unrecoverable error.
21269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21270 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21271       has_space=`$ECHO "$complete" | $GREP " "`
21272       if test "x$has_space" != x; then
21273         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21274 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21275       fi
21276       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21277     fi
21278   fi
21279 
21280   # Now new_path has a complete unix path to the binary
21281   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21282     # Keep paths in /bin as-is, but remove trailing .exe if any
21283     new_path="${new_path/%.exe/}"
21284     # Do not save /bin paths to all_fixpath_prefixes!
21285   else
21286     # Not in mixed or Windows style, start by that.
21287     new_path=`cmd //c echo $new_path`
21288 
21289   input_path="$new_path"
21290   # Check if we need to convert this using DOS-style short mode. If the path
21291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21292   # take no chances and rewrite it.
21293   # Note: m4 eats our [], so we need to use [ and ] instead.
21294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21295   if test "x$has_forbidden_chars" != x; then
21296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21297     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21298   fi
21299 
21300     # Output is in $new_path
21301 
21302   windows_path="$new_path"
21303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21304     unix_path=`$CYGPATH -u "$windows_path"`
21305     new_path="$unix_path"
21306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21308     new_path="$unix_path"
21309   fi
21310 
21311     # remove trailing .exe if any
21312     new_path="${new_path/%.exe/}"
21313 
21314     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21315     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21316   fi
21317 
21318   else
21319     # We're on a posix platform. Hooray! :)
21320     # First separate the path from the arguments. This will split at the first
21321     # space.
21322     complete="$PROPER_COMPILER_CXX"
21323     path="${complete%% *}"
21324     tmp="$complete EOL"
21325     arguments="${tmp#* }"
21326 
21327     # Cannot rely on the command "which" here since it doesn't always work.
21328     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21329     if test -z "$is_absolute_path"; then
21330       # Path to executable is not absolute. Find it.
21331       IFS_save="$IFS"
21332       IFS=:
21333       for p in $PATH; do
21334         if test -f "$p/$path" && test -x "$p/$path"; then
21335           new_path="$p/$path"
21336           break
21337         fi
21338       done
21339       IFS="$IFS_save"
21340     else
21341       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21342 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21343       new_path="$path"
21344     fi
21345 
21346     if test "x$new_path" = x; then
21347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21348 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21349         has_space=`$ECHO "$complete" | $GREP " "`
21350         if test "x$has_space" != x; then
21351           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21352 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21353         fi
21354         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21355       fi
21356   fi
21357 
21358       # Now join together the path and the arguments once again
21359       if test "x$arguments" != xEOL; then
21360         new_complete="$new_path ${arguments% *}"
21361       else
21362         new_complete="$new_path"
21363       fi
21364 
21365   if test "x$complete" != "x$new_complete"; then
21366       PROPER_COMPILER_CXX="$new_complete"
21367       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21368 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21369     fi
21370 
21371     PATH="$RETRY_COMPILER_SAVED_PATH"
21372 
21373     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21374 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21375 
21376     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21377         # Follow a chain of symbolic links. Use readlink
21378         # where it exists, else fall back to horribly
21379         # complicated shell code.
21380         if test "x$READLINK_TESTED" != yes; then
21381             # On MacOSX there is a readlink tool with a different
21382             # purpose than the GNU readlink tool. Check the found readlink.
21383             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21384             if test "x$ISGNU" = x; then
21385                  # A readlink that we do not know how to use.
21386                  # Are there other non-GNU readlinks out there?
21387                  READLINK_TESTED=yes
21388                  READLINK=
21389             fi
21390         fi
21391 
21392         if test "x$READLINK" != x; then
21393             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21394         else
21395             # Save the current directory for restoring afterwards
21396             STARTDIR=$PWD
21397             COUNTER=0
21398             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21399             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21400             cd $sym_link_dir
21401             # Use -P flag to resolve symlinks in directories.
21402             cd `$THEPWDCMD -P`
21403             sym_link_dir=`$THEPWDCMD -P`
21404             # Resolve file symlinks
21405             while test $COUNTER -lt 20; do
21406                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21407                 if test "x$ISLINK" == x; then
21408                     # This is not a symbolic link! We are done!
21409                     break
21410                 fi
21411                 # Again resolve directory symlinks since the target of the just found
21412                 # link could be in a different directory
21413                 cd `$DIRNAME $ISLINK`
21414                 sym_link_dir=`$THEPWDCMD -P`
21415                 sym_link_file=`$BASENAME $ISLINK`
21416                 let COUNTER=COUNTER+1
21417             done
21418             cd $STARTDIR
21419             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21420         fi
21421     fi
21422 
21423     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21424 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21425     CXX="$PROPER_COMPILER_CXX"
21426   else
21427     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21428 $as_echo "no, keeping CXX" >&6; }
21429     CXX="$TEST_COMPILER"
21430   fi
21431 
21432   COMPILER=$CXX
21433   COMPILER_NAME=$COMPILER_NAME
21434 
21435   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21436     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21437     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21438     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21439     if test $? -ne 0; then
21440       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21441 
21442       { $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
21443 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21444       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21445 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21446       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21447     else
21448       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21449       COMPILER_VENDOR="Sun Studio"
21450     fi
21451   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21452     # First line typically looks something like:
21453     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21454     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21455     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21456     COMPILER_VENDOR="Microsoft CL.EXE"
21457     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21458     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21459       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21460         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21461       fi
21462     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21463       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21464         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21465       fi
21466     fi
21467   else
21468     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21469     # Check that this is likely to be GCC.
21470     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21471     if test $? -ne 0; then
21472       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21473 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21474       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21475 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21476       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21477     fi
21478 
21479     # First line typically looks something like:
21480     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21481     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21482     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21483   fi
21484   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21485   CXX_VERSION="$COMPILER_VERSION"
21486   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21487   CXX_VENDOR="$COMPILER_VENDOR"
21488 
21489   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21490 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21491 
21492 
21493 # Now that we have resolved CXX ourself, let autoconf have its go at it
21494 ac_ext=cpp
21495 ac_cpp='$CXXCPP $CPPFLAGS'
21496 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21497 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21498 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21499 if test -z "$CXX"; then
21500   if test -n "$CCC"; then
21501     CXX=$CCC
21502   else
21503     if test -n "$ac_tool_prefix"; then
21504   for ac_prog in $CXX
21505   do
21506     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21509 $as_echo_n "checking for $ac_word... " >&6; }
21510 if test "${ac_cv_prog_CXX+set}" = set; then :
21511   $as_echo_n "(cached) " >&6
21512 else
21513   if test -n "$CXX"; then
21514   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21515 else
21516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21517 for as_dir in $PATH
21518 do
21519   IFS=$as_save_IFS
21520   test -z "$as_dir" && as_dir=.
21521     for ac_exec_ext in '' $ac_executable_extensions; do
21522   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21523     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21525     break 2
21526   fi
21527 done
21528   done
21529 IFS=$as_save_IFS
21530 
21531 fi
21532 fi
21533 CXX=$ac_cv_prog_CXX
21534 if test -n "$CXX"; then
21535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21536 $as_echo "$CXX" >&6; }
21537 else
21538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21539 $as_echo "no" >&6; }
21540 fi
21541 
21542 
21543     test -n "$CXX" && break
21544   done
21545 fi
21546 if test -z "$CXX"; then
21547   ac_ct_CXX=$CXX
21548   for ac_prog in $CXX
21549 do
21550   # Extract the first word of "$ac_prog", so it can be a program name with args.
21551 set dummy $ac_prog; ac_word=$2
21552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21553 $as_echo_n "checking for $ac_word... " >&6; }
21554 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21555   $as_echo_n "(cached) " >&6
21556 else
21557   if test -n "$ac_ct_CXX"; then
21558   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21559 else
21560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21561 for as_dir in $PATH
21562 do
21563   IFS=$as_save_IFS
21564   test -z "$as_dir" && as_dir=.
21565     for ac_exec_ext in '' $ac_executable_extensions; do
21566   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21567     ac_cv_prog_ac_ct_CXX="$ac_prog"
21568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21569     break 2
21570   fi
21571 done
21572   done
21573 IFS=$as_save_IFS
21574 
21575 fi
21576 fi
21577 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21578 if test -n "$ac_ct_CXX"; then
21579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21580 $as_echo "$ac_ct_CXX" >&6; }
21581 else
21582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21583 $as_echo "no" >&6; }
21584 fi
21585 
21586 
21587   test -n "$ac_ct_CXX" && break
21588 done
21589 
21590   if test "x$ac_ct_CXX" = x; then
21591     CXX="g++"
21592   else
21593     case $cross_compiling:$ac_tool_warned in
21594 yes:)
21595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21596 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21597 ac_tool_warned=yes ;;
21598 esac
21599     CXX=$ac_ct_CXX
21600   fi
21601 fi
21602 
21603   fi
21604 fi
21605 # Provide some information about the compiler.
21606 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21607 set X $ac_compile
21608 ac_compiler=$2
21609 for ac_option in --version -v -V -qversion; do
21610   { { ac_try="$ac_compiler $ac_option >&5"
21611 case "(($ac_try" in
21612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21613   *) ac_try_echo=$ac_try;;
21614 esac
21615 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21616 $as_echo "$ac_try_echo"; } >&5
21617   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21618   ac_status=$?
21619   if test -s conftest.err; then
21620     sed '10a\
21621 ... rest of stderr output deleted ...
21622          10q' conftest.err >conftest.er1
21623     cat conftest.er1 >&5
21624   fi
21625   rm -f conftest.er1 conftest.err
21626   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21627   test $ac_status = 0; }
21628 done
21629 
21630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21631 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21632 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21633   $as_echo_n "(cached) " >&6
21634 else
21635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21636 /* end confdefs.h.  */
21637 
21638 int
21639 main ()
21640 {
21641 #ifndef __GNUC__
21642        choke me
21643 #endif
21644 
21645   ;
21646   return 0;
21647 }
21648 _ACEOF
21649 if ac_fn_cxx_try_compile "$LINENO"; then :
21650   ac_compiler_gnu=yes
21651 else
21652   ac_compiler_gnu=no
21653 fi
21654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21655 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21656 
21657 fi
21658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21659 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21660 if test $ac_compiler_gnu = yes; then
21661   GXX=yes
21662 else
21663   GXX=
21664 fi
21665 ac_test_CXXFLAGS=${CXXFLAGS+set}
21666 ac_save_CXXFLAGS=$CXXFLAGS
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21668 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21669 if test "${ac_cv_prog_cxx_g+set}" = set; then :
21670   $as_echo_n "(cached) " >&6
21671 else
21672   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21673    ac_cxx_werror_flag=yes
21674    ac_cv_prog_cxx_g=no
21675    CXXFLAGS="-g"
21676    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21677 /* end confdefs.h.  */
21678 
21679 int
21680 main ()
21681 {
21682 
21683   ;
21684   return 0;
21685 }
21686 _ACEOF
21687 if ac_fn_cxx_try_compile "$LINENO"; then :
21688   ac_cv_prog_cxx_g=yes
21689 else
21690   CXXFLAGS=""
21691       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21692 /* end confdefs.h.  */
21693 
21694 int
21695 main ()
21696 {
21697 
21698   ;
21699   return 0;
21700 }
21701 _ACEOF
21702 if ac_fn_cxx_try_compile "$LINENO"; then :
21703 
21704 else
21705   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21706          CXXFLAGS="-g"
21707          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21708 /* end confdefs.h.  */
21709 
21710 int
21711 main ()
21712 {
21713 
21714   ;
21715   return 0;
21716 }
21717 _ACEOF
21718 if ac_fn_cxx_try_compile "$LINENO"; then :
21719   ac_cv_prog_cxx_g=yes
21720 fi
21721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21722 fi
21723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21724 fi
21725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21726    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21727 fi
21728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21729 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21730 if test "$ac_test_CXXFLAGS" = set; then
21731   CXXFLAGS=$ac_save_CXXFLAGS
21732 elif test $ac_cv_prog_cxx_g = yes; then
21733   if test "$GXX" = yes; then
21734     CXXFLAGS="-g -O2"
21735   else
21736     CXXFLAGS="-g"
21737   fi
21738 else
21739   if test "$GXX" = yes; then
21740     CXXFLAGS="-O2"
21741   else
21742     CXXFLAGS=
21743   fi
21744 fi
21745 ac_ext=cpp
21746 ac_cpp='$CXXCPP $CPPFLAGS'
21747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21750 
21751 
21752 ### Locate other tools
21753 
21754 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21755     ac_ext=m
21756 ac_cpp='$OBJCPP $CPPFLAGS'
21757 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21758 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21759 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21760 if test -n "$ac_tool_prefix"; then
21761   for ac_prog in gcc objcc objc cc CC
21762   do
21763     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21764 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21766 $as_echo_n "checking for $ac_word... " >&6; }
21767 if test "${ac_cv_prog_OBJC+set}" = set; then :
21768   $as_echo_n "(cached) " >&6
21769 else
21770   if test -n "$OBJC"; then
21771   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21772 else
21773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21774 for as_dir in $PATH
21775 do
21776   IFS=$as_save_IFS
21777   test -z "$as_dir" && as_dir=.
21778     for ac_exec_ext in '' $ac_executable_extensions; do
21779   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21780     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21782     break 2
21783   fi
21784 done
21785   done
21786 IFS=$as_save_IFS
21787 
21788 fi
21789 fi
21790 OBJC=$ac_cv_prog_OBJC
21791 if test -n "$OBJC"; then
21792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21793 $as_echo "$OBJC" >&6; }
21794 else
21795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21796 $as_echo "no" >&6; }
21797 fi
21798 
21799 
21800     test -n "$OBJC" && break
21801   done
21802 fi
21803 if test -z "$OBJC"; then
21804   ac_ct_OBJC=$OBJC
21805   for ac_prog in gcc objcc objc cc CC
21806 do
21807   # Extract the first word of "$ac_prog", so it can be a program name with args.
21808 set dummy $ac_prog; ac_word=$2
21809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21810 $as_echo_n "checking for $ac_word... " >&6; }
21811 if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21812   $as_echo_n "(cached) " >&6
21813 else
21814   if test -n "$ac_ct_OBJC"; then
21815   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21816 else
21817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21818 for as_dir in $PATH
21819 do
21820   IFS=$as_save_IFS
21821   test -z "$as_dir" && as_dir=.
21822     for ac_exec_ext in '' $ac_executable_extensions; do
21823   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21824     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21826     break 2
21827   fi
21828 done
21829   done
21830 IFS=$as_save_IFS
21831 
21832 fi
21833 fi
21834 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21835 if test -n "$ac_ct_OBJC"; then
21836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21837 $as_echo "$ac_ct_OBJC" >&6; }
21838 else
21839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21840 $as_echo "no" >&6; }
21841 fi
21842 
21843 
21844   test -n "$ac_ct_OBJC" && break
21845 done
21846 
21847   if test "x$ac_ct_OBJC" = x; then
21848     OBJC="gcc"
21849   else
21850     case $cross_compiling:$ac_tool_warned in
21851 yes:)
21852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21853 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21854 ac_tool_warned=yes ;;
21855 esac
21856     OBJC=$ac_ct_OBJC
21857   fi
21858 fi
21859 
21860 # Provide some information about the compiler.
21861 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21862 set X $ac_compile
21863 ac_compiler=$2
21864 for ac_option in --version -v -V -qversion; do
21865   { { ac_try="$ac_compiler $ac_option >&5"
21866 case "(($ac_try" in
21867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21868   *) ac_try_echo=$ac_try;;
21869 esac
21870 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21871 $as_echo "$ac_try_echo"; } >&5
21872   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21873   ac_status=$?
21874   if test -s conftest.err; then
21875     sed '10a\
21876 ... rest of stderr output deleted ...
21877          10q' conftest.err >conftest.er1
21878     cat conftest.er1 >&5
21879   fi
21880   rm -f conftest.er1 conftest.err
21881   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21882   test $ac_status = 0; }
21883 done
21884 
21885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21886 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21887 if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21888   $as_echo_n "(cached) " >&6
21889 else
21890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21891 /* end confdefs.h.  */
21892 
21893 int
21894 main ()
21895 {
21896 #ifndef __GNUC__
21897        choke me
21898 #endif
21899 
21900   ;
21901   return 0;
21902 }
21903 _ACEOF
21904 if ac_fn_objc_try_compile "$LINENO"; then :
21905   ac_compiler_gnu=yes
21906 else
21907   ac_compiler_gnu=no
21908 fi
21909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21910 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21911 
21912 fi
21913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21914 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21915 if test $ac_compiler_gnu = yes; then
21916   GOBJC=yes
21917 else
21918   GOBJC=
21919 fi
21920 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21921 ac_save_OBJCFLAGS=$OBJCFLAGS
21922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21923 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21924 if test "${ac_cv_prog_objc_g+set}" = set; then :
21925   $as_echo_n "(cached) " >&6
21926 else
21927   ac_save_objc_werror_flag=$ac_objc_werror_flag
21928    ac_objc_werror_flag=yes
21929    ac_cv_prog_objc_g=no
21930    OBJCFLAGS="-g"
21931    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21932 /* end confdefs.h.  */
21933 
21934 int
21935 main ()
21936 {
21937 
21938   ;
21939   return 0;
21940 }
21941 _ACEOF
21942 if ac_fn_objc_try_compile "$LINENO"; then :
21943   ac_cv_prog_objc_g=yes
21944 else
21945   OBJCFLAGS=""
21946       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21947 /* end confdefs.h.  */
21948 
21949 int
21950 main ()
21951 {
21952 
21953   ;
21954   return 0;
21955 }
21956 _ACEOF
21957 if ac_fn_objc_try_compile "$LINENO"; then :
21958 
21959 else
21960   ac_objc_werror_flag=$ac_save_objc_werror_flag
21961          OBJCFLAGS="-g"
21962          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963 /* end confdefs.h.  */
21964 
21965 int
21966 main ()
21967 {
21968 
21969   ;
21970   return 0;
21971 }
21972 _ACEOF
21973 if ac_fn_objc_try_compile "$LINENO"; then :
21974   ac_cv_prog_objc_g=yes
21975 fi
21976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21977 fi
21978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21979 fi
21980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21981    ac_objc_werror_flag=$ac_save_objc_werror_flag
21982 fi
21983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21984 $as_echo "$ac_cv_prog_objc_g" >&6; }
21985 if test "$ac_test_OBJCFLAGS" = set; then
21986   OBJCFLAGS=$ac_save_OBJCFLAGS
21987 elif test $ac_cv_prog_objc_g = yes; then
21988   if test "$GOBJC" = yes; then
21989     OBJCFLAGS="-g -O2"
21990   else
21991     OBJCFLAGS="-g"
21992   fi
21993 else
21994   if test "$GOBJC" = yes; then
21995     OBJCFLAGS="-O2"
21996   else
21997     OBJCFLAGS=
21998   fi
21999 fi
22000 ac_ext=cpp
22001 ac_cpp='$CXXCPP $CPPFLAGS'
22002 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22003 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22004 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22005 
22006 
22007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22008 
22009   # First separate the path from the arguments. This will split at the first
22010   # space.
22011   complete="$OBJC"
22012   path="${complete%% *}"
22013   tmp="$complete EOL"
22014   arguments="${tmp#* }"
22015 
22016   # Input might be given as Windows format, start by converting to
22017   # unix format.
22018   new_path=`$CYGPATH -u "$path"`
22019 
22020   # Now try to locate executable using which
22021   new_path=`$WHICH "$new_path" 2> /dev/null`
22022   # bat and cmd files are not always considered executable in cygwin causing which
22023   # to not find them
22024   if test "x$new_path" = x \
22025            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22026            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22027     new_path=`$CYGPATH -u "$path"`
22028   fi
22029   if test "x$new_path" = x; then
22030     # Oops. Which didn't find the executable.
22031     # The splitting of arguments from the executable at a space might have been incorrect,
22032     # since paths with space are more likely in Windows. Give it another try with the whole
22033     # argument.
22034     path="$complete"
22035     arguments="EOL"
22036     new_path=`$CYGPATH -u "$path"`
22037     new_path=`$WHICH "$new_path" 2> /dev/null`
22038     # bat and cmd files are not always considered executable in cygwin causing which
22039     # to not find them
22040     if test "x$new_path" = x \
22041              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22042              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22043       new_path=`$CYGPATH -u "$path"`
22044     fi
22045     if test "x$new_path" = x; then
22046       # It's still not found. Now this is an unrecoverable error.
22047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22048 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22049       has_space=`$ECHO "$complete" | $GREP " "`
22050       if test "x$has_space" != x; then
22051         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22053       fi
22054       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22055     fi
22056   fi
22057 
22058   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22059   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22060   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22061   # "foo.exe" is OK but "foo" is an error.
22062   #
22063   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22064   # It is also a way to make sure we got the proper file name for the real test later on.
22065   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22066   if test "x$test_shortpath" = x; then
22067     # Short path failed, file does not exist as specified.
22068     # Try adding .exe or .cmd
22069     if test -f "${new_path}.exe"; then
22070        input_to_shortpath="${new_path}.exe"
22071     elif test -f "${new_path}.cmd"; then
22072        input_to_shortpath="${new_path}.cmd"
22073     else
22074       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22075 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22076       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22077 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22078       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22079     fi
22080   else
22081     input_to_shortpath="$new_path"
22082   fi
22083 
22084   # Call helper function which possibly converts this using DOS-style short mode.
22085   # If so, the updated path is stored in $new_path.
22086   new_path="$input_to_shortpath"
22087 
22088   input_path="$input_to_shortpath"
22089   # Check if we need to convert this using DOS-style short mode. If the path
22090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22091   # take no chances and rewrite it.
22092   # Note: m4 eats our [], so we need to use [ and ] instead.
22093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22094   if test "x$has_forbidden_chars" != x; then
22095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22099       # Going to short mode and back again did indeed matter. Since short mode is
22100       # case insensitive, let's make it lowercase to improve readability.
22101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22102       # Now convert it back to Unix-stile (cygpath)
22103       input_path=`$CYGPATH -u "$shortmode_path"`
22104       new_path="$input_path"
22105     fi
22106   fi
22107 
22108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22109   if test "x$test_cygdrive_prefix" = x; then
22110     # As a simple fix, exclude /usr/bin since it's not a real path.
22111     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22113       # a path prefixed by /cygdrive for fixpath to work.
22114       new_path="$CYGWIN_ROOT_PATH$input_path"
22115     fi
22116   fi
22117 
22118   # remove trailing .exe if any
22119   new_path="${new_path/%.exe/}"
22120 
22121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22122 
22123   # First separate the path from the arguments. This will split at the first
22124   # space.
22125   complete="$OBJC"
22126   path="${complete%% *}"
22127   tmp="$complete EOL"
22128   arguments="${tmp#* }"
22129 
22130   # Input might be given as Windows format, start by converting to
22131   # unix format.
22132   new_path="$path"
22133 
22134   windows_path="$new_path"
22135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22136     unix_path=`$CYGPATH -u "$windows_path"`
22137     new_path="$unix_path"
22138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22140     new_path="$unix_path"
22141   fi
22142 
22143 
22144   # Now try to locate executable using which
22145   new_path=`$WHICH "$new_path" 2> /dev/null`
22146 
22147   if test "x$new_path" = x; then
22148     # Oops. Which didn't find the executable.
22149     # The splitting of arguments from the executable at a space might have been incorrect,
22150     # since paths with space are more likely in Windows. Give it another try with the whole
22151     # argument.
22152     path="$complete"
22153     arguments="EOL"
22154     new_path="$path"
22155 
22156   windows_path="$new_path"
22157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22158     unix_path=`$CYGPATH -u "$windows_path"`
22159     new_path="$unix_path"
22160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22162     new_path="$unix_path"
22163   fi
22164 
22165 
22166     new_path=`$WHICH "$new_path" 2> /dev/null`
22167 
22168     if test "x$new_path" = x; then
22169       # It's still not found. Now this is an unrecoverable error.
22170       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22171 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22172       has_space=`$ECHO "$complete" | $GREP " "`
22173       if test "x$has_space" != x; then
22174         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22175 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22176       fi
22177       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22178     fi
22179   fi
22180 
22181   # Now new_path has a complete unix path to the binary
22182   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22183     # Keep paths in /bin as-is, but remove trailing .exe if any
22184     new_path="${new_path/%.exe/}"
22185     # Do not save /bin paths to all_fixpath_prefixes!
22186   else
22187     # Not in mixed or Windows style, start by that.
22188     new_path=`cmd //c echo $new_path`
22189 
22190   input_path="$new_path"
22191   # Check if we need to convert this using DOS-style short mode. If the path
22192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22193   # take no chances and rewrite it.
22194   # Note: m4 eats our [], so we need to use [ and ] instead.
22195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22196   if test "x$has_forbidden_chars" != x; then
22197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22199   fi
22200 
22201     # Output is in $new_path
22202 
22203   windows_path="$new_path"
22204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22205     unix_path=`$CYGPATH -u "$windows_path"`
22206     new_path="$unix_path"
22207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22209     new_path="$unix_path"
22210   fi
22211 
22212     # remove trailing .exe if any
22213     new_path="${new_path/%.exe/}"
22214 
22215     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22216     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22217   fi
22218 
22219   else
22220     # We're on a posix platform. Hooray! :)
22221     # First separate the path from the arguments. This will split at the first
22222     # space.
22223     complete="$OBJC"
22224     path="${complete%% *}"
22225     tmp="$complete EOL"
22226     arguments="${tmp#* }"
22227 
22228     # Cannot rely on the command "which" here since it doesn't always work.
22229     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22230     if test -z "$is_absolute_path"; then
22231       # Path to executable is not absolute. Find it.
22232       IFS_save="$IFS"
22233       IFS=:
22234       for p in $PATH; do
22235         if test -f "$p/$path" && test -x "$p/$path"; then
22236           new_path="$p/$path"
22237           break
22238         fi
22239       done
22240       IFS="$IFS_save"
22241     else
22242       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22243 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22244       new_path="$path"
22245     fi
22246 
22247     if test "x$new_path" = x; then
22248         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22249 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22250         has_space=`$ECHO "$complete" | $GREP " "`
22251         if test "x$has_space" != x; then
22252           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22253 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22254         fi
22255         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22256       fi
22257   fi
22258 
22259       # Now join together the path and the arguments once again
22260       if test "x$arguments" != xEOL; then
22261         new_complete="$new_path ${arguments% *}"
22262       else
22263         new_complete="$new_path"
22264       fi
22265 
22266   if test "x$complete" != "x$new_complete"; then
22267       OBJC="$new_complete"
22268       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22269 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22270     fi
22271 
22272 else
22273     OBJC=
22274 fi
22275 
22276 # Restore the flags to the user specified values.
22277 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22278 CFLAGS="$ORG_CFLAGS"
22279 CXXFLAGS="$ORG_CXXFLAGS"
22280 OBJCFLAGS="$ORG_OBJCFLAGS"
22281 
22282 LD="$CC"
22283 LDEXE="$CC"
22284 LDCXX="$CXX"
22285 LDEXECXX="$CXX"
22286 
22287 # LDEXE is the linker to use, when creating executables.
22288 
22289 # Linking C++ libraries.
22290 
22291 # Linking C++ executables.
22292 
22293 
22294 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22295     if test -n "$ac_tool_prefix"; then
22296   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22297 set dummy ${ac_tool_prefix}ar; ac_word=$2
22298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22299 $as_echo_n "checking for $ac_word... " >&6; }
22300 if test "${ac_cv_prog_AR+set}" = set; then :
22301   $as_echo_n "(cached) " >&6
22302 else
22303   if test -n "$AR"; then
22304   ac_cv_prog_AR="$AR" # Let the user override the test.
22305 else
22306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22307 for as_dir in $PATH
22308 do
22309   IFS=$as_save_IFS
22310   test -z "$as_dir" && as_dir=.
22311     for ac_exec_ext in '' $ac_executable_extensions; do
22312   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22313     ac_cv_prog_AR="${ac_tool_prefix}ar"
22314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22315     break 2
22316   fi
22317 done
22318   done
22319 IFS=$as_save_IFS
22320 
22321 fi
22322 fi
22323 AR=$ac_cv_prog_AR
22324 if test -n "$AR"; then
22325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22326 $as_echo "$AR" >&6; }
22327 else
22328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22329 $as_echo "no" >&6; }
22330 fi
22331 
22332 
22333 fi
22334 if test -z "$ac_cv_prog_AR"; then
22335   ac_ct_AR=$AR
22336   # Extract the first word of "ar", so it can be a program name with args.
22337 set dummy ar; ac_word=$2
22338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22339 $as_echo_n "checking for $ac_word... " >&6; }
22340 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22341   $as_echo_n "(cached) " >&6
22342 else
22343   if test -n "$ac_ct_AR"; then
22344   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22345 else
22346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22347 for as_dir in $PATH
22348 do
22349   IFS=$as_save_IFS
22350   test -z "$as_dir" && as_dir=.
22351     for ac_exec_ext in '' $ac_executable_extensions; do
22352   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22353     ac_cv_prog_ac_ct_AR="ar"
22354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22355     break 2
22356   fi
22357 done
22358   done
22359 IFS=$as_save_IFS
22360 
22361 fi
22362 fi
22363 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22364 if test -n "$ac_ct_AR"; then
22365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22366 $as_echo "$ac_ct_AR" >&6; }
22367 else
22368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22369 $as_echo "no" >&6; }
22370 fi
22371 
22372   if test "x$ac_ct_AR" = x; then
22373     AR=""
22374   else
22375     case $cross_compiling:$ac_tool_warned in
22376 yes:)
22377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22378 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22379 ac_tool_warned=yes ;;
22380 esac
22381     AR=$ac_ct_AR
22382   fi
22383 else
22384   AR="$ac_cv_prog_AR"
22385 fi
22386 
22387 
22388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22389 
22390   # First separate the path from the arguments. This will split at the first
22391   # space.
22392   complete="$AR"
22393   path="${complete%% *}"
22394   tmp="$complete EOL"
22395   arguments="${tmp#* }"
22396 
22397   # Input might be given as Windows format, start by converting to
22398   # unix format.
22399   new_path=`$CYGPATH -u "$path"`
22400 
22401   # Now try to locate executable using which
22402   new_path=`$WHICH "$new_path" 2> /dev/null`
22403   # bat and cmd files are not always considered executable in cygwin causing which
22404   # to not find them
22405   if test "x$new_path" = x \
22406            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22407            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22408     new_path=`$CYGPATH -u "$path"`
22409   fi
22410   if test "x$new_path" = x; then
22411     # Oops. Which didn't find the executable.
22412     # The splitting of arguments from the executable at a space might have been incorrect,
22413     # since paths with space are more likely in Windows. Give it another try with the whole
22414     # argument.
22415     path="$complete"
22416     arguments="EOL"
22417     new_path=`$CYGPATH -u "$path"`
22418     new_path=`$WHICH "$new_path" 2> /dev/null`
22419     # bat and cmd files are not always considered executable in cygwin causing which
22420     # to not find them
22421     if test "x$new_path" = x \
22422              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22423              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22424       new_path=`$CYGPATH -u "$path"`
22425     fi
22426     if test "x$new_path" = x; then
22427       # It's still not found. Now this is an unrecoverable error.
22428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22429 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22430       has_space=`$ECHO "$complete" | $GREP " "`
22431       if test "x$has_space" != x; then
22432         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22434       fi
22435       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22436     fi
22437   fi
22438 
22439   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22440   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22441   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22442   # "foo.exe" is OK but "foo" is an error.
22443   #
22444   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22445   # It is also a way to make sure we got the proper file name for the real test later on.
22446   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22447   if test "x$test_shortpath" = x; then
22448     # Short path failed, file does not exist as specified.
22449     # Try adding .exe or .cmd
22450     if test -f "${new_path}.exe"; then
22451        input_to_shortpath="${new_path}.exe"
22452     elif test -f "${new_path}.cmd"; then
22453        input_to_shortpath="${new_path}.cmd"
22454     else
22455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22456 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22457       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22458 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22459       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22460     fi
22461   else
22462     input_to_shortpath="$new_path"
22463   fi
22464 
22465   # Call helper function which possibly converts this using DOS-style short mode.
22466   # If so, the updated path is stored in $new_path.
22467   new_path="$input_to_shortpath"
22468 
22469   input_path="$input_to_shortpath"
22470   # Check if we need to convert this using DOS-style short mode. If the path
22471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22472   # take no chances and rewrite it.
22473   # Note: m4 eats our [], so we need to use [ and ] instead.
22474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22475   if test "x$has_forbidden_chars" != x; then
22476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22477     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22478     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22479     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22480       # Going to short mode and back again did indeed matter. Since short mode is
22481       # case insensitive, let's make it lowercase to improve readability.
22482       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22483       # Now convert it back to Unix-stile (cygpath)
22484       input_path=`$CYGPATH -u "$shortmode_path"`
22485       new_path="$input_path"
22486     fi
22487   fi
22488 
22489   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22490   if test "x$test_cygdrive_prefix" = x; then
22491     # As a simple fix, exclude /usr/bin since it's not a real path.
22492     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22493       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22494       # a path prefixed by /cygdrive for fixpath to work.
22495       new_path="$CYGWIN_ROOT_PATH$input_path"
22496     fi
22497   fi
22498 
22499   # remove trailing .exe if any
22500   new_path="${new_path/%.exe/}"
22501 
22502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22503 
22504   # First separate the path from the arguments. This will split at the first
22505   # space.
22506   complete="$AR"
22507   path="${complete%% *}"
22508   tmp="$complete EOL"
22509   arguments="${tmp#* }"
22510 
22511   # Input might be given as Windows format, start by converting to
22512   # unix format.
22513   new_path="$path"
22514 
22515   windows_path="$new_path"
22516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22517     unix_path=`$CYGPATH -u "$windows_path"`
22518     new_path="$unix_path"
22519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22521     new_path="$unix_path"
22522   fi
22523 
22524 
22525   # Now try to locate executable using which
22526   new_path=`$WHICH "$new_path" 2> /dev/null`
22527 
22528   if test "x$new_path" = x; then
22529     # Oops. Which didn't find the executable.
22530     # The splitting of arguments from the executable at a space might have been incorrect,
22531     # since paths with space are more likely in Windows. Give it another try with the whole
22532     # argument.
22533     path="$complete"
22534     arguments="EOL"
22535     new_path="$path"
22536 
22537   windows_path="$new_path"
22538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22539     unix_path=`$CYGPATH -u "$windows_path"`
22540     new_path="$unix_path"
22541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22543     new_path="$unix_path"
22544   fi
22545 
22546 
22547     new_path=`$WHICH "$new_path" 2> /dev/null`
22548 
22549     if test "x$new_path" = x; then
22550       # It's still not found. Now this is an unrecoverable error.
22551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22552 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22553       has_space=`$ECHO "$complete" | $GREP " "`
22554       if test "x$has_space" != x; then
22555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22557       fi
22558       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22559     fi
22560   fi
22561 
22562   # Now new_path has a complete unix path to the binary
22563   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22564     # Keep paths in /bin as-is, but remove trailing .exe if any
22565     new_path="${new_path/%.exe/}"
22566     # Do not save /bin paths to all_fixpath_prefixes!
22567   else
22568     # Not in mixed or Windows style, start by that.
22569     new_path=`cmd //c echo $new_path`
22570 
22571   input_path="$new_path"
22572   # Check if we need to convert this using DOS-style short mode. If the path
22573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22574   # take no chances and rewrite it.
22575   # Note: m4 eats our [], so we need to use [ and ] instead.
22576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22577   if test "x$has_forbidden_chars" != x; then
22578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22580   fi
22581 
22582     # Output is in $new_path
22583 
22584   windows_path="$new_path"
22585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22586     unix_path=`$CYGPATH -u "$windows_path"`
22587     new_path="$unix_path"
22588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22590     new_path="$unix_path"
22591   fi
22592 
22593     # remove trailing .exe if any
22594     new_path="${new_path/%.exe/}"
22595 
22596     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22597     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22598   fi
22599 
22600   else
22601     # We're on a posix platform. Hooray! :)
22602     # First separate the path from the arguments. This will split at the first
22603     # space.
22604     complete="$AR"
22605     path="${complete%% *}"
22606     tmp="$complete EOL"
22607     arguments="${tmp#* }"
22608 
22609     # Cannot rely on the command "which" here since it doesn't always work.
22610     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22611     if test -z "$is_absolute_path"; then
22612       # Path to executable is not absolute. Find it.
22613       IFS_save="$IFS"
22614       IFS=:
22615       for p in $PATH; do
22616         if test -f "$p/$path" && test -x "$p/$path"; then
22617           new_path="$p/$path"
22618           break
22619         fi
22620       done
22621       IFS="$IFS_save"
22622     else
22623       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22624 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22625       new_path="$path"
22626     fi
22627 
22628     if test "x$new_path" = x; then
22629         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22630 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22631         has_space=`$ECHO "$complete" | $GREP " "`
22632         if test "x$has_space" != x; then
22633           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22634 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22635         fi
22636         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22637       fi
22638   fi
22639 
22640       # Now join together the path and the arguments once again
22641       if test "x$arguments" != xEOL; then
22642         new_complete="$new_path ${arguments% *}"
22643       else
22644         new_complete="$new_path"
22645       fi
22646 
22647   if test "x$complete" != "x$new_complete"; then
22648       AR="$new_complete"
22649       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22650 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22651     fi
22652 
22653 fi
22654 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22655     ARFLAGS="-r"
22656 else
22657     ARFLAGS=""
22658 fi
22659 
22660 
22661 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22662 HOTSPOT_CXX="$CXX"
22663 HOTSPOT_LD="$LD"
22664 
22665 
22666 
22667 COMPILER_NAME=gcc
22668 COMPILER_TYPE=CC
22669 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22670 
22671     # For now, assume that we are always compiling using cl.exe.
22672     CC_OUT_OPTION=-Fo
22673     EXE_OUT_OPTION=-out:
22674     LD_OUT_OPTION=-out:
22675     AR_OUT_OPTION=-out:
22676     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22677     # program for something completely different.
22678     # Extract the first word of "link", so it can be a program name with args.
22679 set dummy link; ac_word=$2
22680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22681 $as_echo_n "checking for $ac_word... " >&6; }
22682 if test "${ac_cv_prog_WINLD+set}" = set; then :
22683   $as_echo_n "(cached) " >&6
22684 else
22685   if test -n "$WINLD"; then
22686   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22687 else
22688   ac_prog_rejected=no
22689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22690 for as_dir in $PATH
22691 do
22692   IFS=$as_save_IFS
22693   test -z "$as_dir" && as_dir=.
22694     for ac_exec_ext in '' $ac_executable_extensions; do
22695   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22696     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22697        ac_prog_rejected=yes
22698        continue
22699      fi
22700     ac_cv_prog_WINLD="link"
22701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22702     break 2
22703   fi
22704 done
22705   done
22706 IFS=$as_save_IFS
22707 
22708 if test $ac_prog_rejected = yes; then
22709   # We found a bogon in the path, so make sure we never use it.
22710   set dummy $ac_cv_prog_WINLD
22711   shift
22712   if test $# != 0; then
22713     # We chose a different compiler from the bogus one.
22714     # However, it has the same basename, so the bogon will be chosen
22715     # first if we set WINLD to just the basename; use the full file name.
22716     shift
22717     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22718   fi
22719 fi
22720 fi
22721 fi
22722 WINLD=$ac_cv_prog_WINLD
22723 if test -n "$WINLD"; then
22724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22725 $as_echo "$WINLD" >&6; }
22726 else
22727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22728 $as_echo "no" >&6; }
22729 fi
22730 
22731 
22732     # Since we must ignore the first found link, WINLD will contain
22733     # the full path to the link.exe program.
22734 
22735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22736 
22737   # First separate the path from the arguments. This will split at the first
22738   # space.
22739   complete="$WINLD"
22740   path="${complete%% *}"
22741   tmp="$complete EOL"
22742   arguments="${tmp#* }"
22743 
22744   # Input might be given as Windows format, start by converting to
22745   # unix format.
22746   new_path=`$CYGPATH -u "$path"`
22747 
22748   # Now try to locate executable using which
22749   new_path=`$WHICH "$new_path" 2> /dev/null`
22750   # bat and cmd files are not always considered executable in cygwin causing which
22751   # to not find them
22752   if test "x$new_path" = x \
22753            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22754            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22755     new_path=`$CYGPATH -u "$path"`
22756   fi
22757   if test "x$new_path" = x; then
22758     # Oops. Which didn't find the executable.
22759     # The splitting of arguments from the executable at a space might have been incorrect,
22760     # since paths with space are more likely in Windows. Give it another try with the whole
22761     # argument.
22762     path="$complete"
22763     arguments="EOL"
22764     new_path=`$CYGPATH -u "$path"`
22765     new_path=`$WHICH "$new_path" 2> /dev/null`
22766     # bat and cmd files are not always considered executable in cygwin causing which
22767     # to not find them
22768     if test "x$new_path" = x \
22769              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22770              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22771       new_path=`$CYGPATH -u "$path"`
22772     fi
22773     if test "x$new_path" = x; then
22774       # It's still not found. Now this is an unrecoverable error.
22775       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22776 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22777       has_space=`$ECHO "$complete" | $GREP " "`
22778       if test "x$has_space" != x; then
22779         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22780 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22781       fi
22782       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22783     fi
22784   fi
22785 
22786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22789   # "foo.exe" is OK but "foo" is an error.
22790   #
22791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22792   # It is also a way to make sure we got the proper file name for the real test later on.
22793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22794   if test "x$test_shortpath" = x; then
22795     # Short path failed, file does not exist as specified.
22796     # Try adding .exe or .cmd
22797     if test -f "${new_path}.exe"; then
22798        input_to_shortpath="${new_path}.exe"
22799     elif test -f "${new_path}.cmd"; then
22800        input_to_shortpath="${new_path}.cmd"
22801     else
22802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22803 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22804       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22805 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22806       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22807     fi
22808   else
22809     input_to_shortpath="$new_path"
22810   fi
22811 
22812   # Call helper function which possibly converts this using DOS-style short mode.
22813   # If so, the updated path is stored in $new_path.
22814   new_path="$input_to_shortpath"
22815 
22816   input_path="$input_to_shortpath"
22817   # Check if we need to convert this using DOS-style short mode. If the path
22818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22819   # take no chances and rewrite it.
22820   # Note: m4 eats our [], so we need to use [ and ] instead.
22821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22822   if test "x$has_forbidden_chars" != x; then
22823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22824     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22825     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22826     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22827       # Going to short mode and back again did indeed matter. Since short mode is
22828       # case insensitive, let's make it lowercase to improve readability.
22829       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22830       # Now convert it back to Unix-stile (cygpath)
22831       input_path=`$CYGPATH -u "$shortmode_path"`
22832       new_path="$input_path"
22833     fi
22834   fi
22835 
22836   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22837   if test "x$test_cygdrive_prefix" = x; then
22838     # As a simple fix, exclude /usr/bin since it's not a real path.
22839     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22840       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22841       # a path prefixed by /cygdrive for fixpath to work.
22842       new_path="$CYGWIN_ROOT_PATH$input_path"
22843     fi
22844   fi
22845 
22846   # remove trailing .exe if any
22847   new_path="${new_path/%.exe/}"
22848 
22849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22850 
22851   # First separate the path from the arguments. This will split at the first
22852   # space.
22853   complete="$WINLD"
22854   path="${complete%% *}"
22855   tmp="$complete EOL"
22856   arguments="${tmp#* }"
22857 
22858   # Input might be given as Windows format, start by converting to
22859   # unix format.
22860   new_path="$path"
22861 
22862   windows_path="$new_path"
22863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22864     unix_path=`$CYGPATH -u "$windows_path"`
22865     new_path="$unix_path"
22866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22868     new_path="$unix_path"
22869   fi
22870 
22871 
22872   # Now try to locate executable using which
22873   new_path=`$WHICH "$new_path" 2> /dev/null`
22874 
22875   if test "x$new_path" = x; then
22876     # Oops. Which didn't find the executable.
22877     # The splitting of arguments from the executable at a space might have been incorrect,
22878     # since paths with space are more likely in Windows. Give it another try with the whole
22879     # argument.
22880     path="$complete"
22881     arguments="EOL"
22882     new_path="$path"
22883 
22884   windows_path="$new_path"
22885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22886     unix_path=`$CYGPATH -u "$windows_path"`
22887     new_path="$unix_path"
22888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22890     new_path="$unix_path"
22891   fi
22892 
22893 
22894     new_path=`$WHICH "$new_path" 2> /dev/null`
22895 
22896     if test "x$new_path" = x; then
22897       # It's still not found. Now this is an unrecoverable error.
22898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22899 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22900       has_space=`$ECHO "$complete" | $GREP " "`
22901       if test "x$has_space" != x; then
22902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22904       fi
22905       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22906     fi
22907   fi
22908 
22909   # Now new_path has a complete unix path to the binary
22910   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22911     # Keep paths in /bin as-is, but remove trailing .exe if any
22912     new_path="${new_path/%.exe/}"
22913     # Do not save /bin paths to all_fixpath_prefixes!
22914   else
22915     # Not in mixed or Windows style, start by that.
22916     new_path=`cmd //c echo $new_path`
22917 
22918   input_path="$new_path"
22919   # Check if we need to convert this using DOS-style short mode. If the path
22920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22921   # take no chances and rewrite it.
22922   # Note: m4 eats our [], so we need to use [ and ] instead.
22923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22924   if test "x$has_forbidden_chars" != x; then
22925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22926     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22927   fi
22928 
22929     # Output is in $new_path
22930 
22931   windows_path="$new_path"
22932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22933     unix_path=`$CYGPATH -u "$windows_path"`
22934     new_path="$unix_path"
22935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22937     new_path="$unix_path"
22938   fi
22939 
22940     # remove trailing .exe if any
22941     new_path="${new_path/%.exe/}"
22942 
22943     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22944     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22945   fi
22946 
22947   else
22948     # We're on a posix platform. Hooray! :)
22949     # First separate the path from the arguments. This will split at the first
22950     # space.
22951     complete="$WINLD"
22952     path="${complete%% *}"
22953     tmp="$complete EOL"
22954     arguments="${tmp#* }"
22955 
22956     # Cannot rely on the command "which" here since it doesn't always work.
22957     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22958     if test -z "$is_absolute_path"; then
22959       # Path to executable is not absolute. Find it.
22960       IFS_save="$IFS"
22961       IFS=:
22962       for p in $PATH; do
22963         if test -f "$p/$path" && test -x "$p/$path"; then
22964           new_path="$p/$path"
22965           break
22966         fi
22967       done
22968       IFS="$IFS_save"
22969     else
22970       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22971 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22972       new_path="$path"
22973     fi
22974 
22975     if test "x$new_path" = x; then
22976         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22977 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22978         has_space=`$ECHO "$complete" | $GREP " "`
22979         if test "x$has_space" != x; then
22980           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22981 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22982         fi
22983         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22984       fi
22985   fi
22986 
22987       # Now join together the path and the arguments once again
22988       if test "x$arguments" != xEOL; then
22989         new_complete="$new_path ${arguments% *}"
22990       else
22991         new_complete="$new_path"
22992       fi
22993 
22994   if test "x$complete" != "x$new_complete"; then
22995       WINLD="$new_complete"
22996       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22997 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22998     fi
22999 
23000     printf "Windows linker was found at $WINLD\n"
23001     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23002 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23003     "$WINLD" --version > /dev/null
23004     if test $? -eq 0 ; then
23005       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23006 $as_echo "no" >&6; }
23007       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23008     else
23009       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23010 $as_echo "yes" >&6; }
23011     fi
23012     LD="$WINLD"
23013     LDEXE="$WINLD"
23014     LDCXX="$WINLD"
23015     LDEXECXX="$WINLD"
23016 
23017     # Extract the first word of "mt", so it can be a program name with args.
23018 set dummy mt; ac_word=$2
23019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23020 $as_echo_n "checking for $ac_word... " >&6; }
23021 if test "${ac_cv_prog_MT+set}" = set; then :
23022   $as_echo_n "(cached) " >&6
23023 else
23024   if test -n "$MT"; then
23025   ac_cv_prog_MT="$MT" # Let the user override the test.
23026 else
23027   ac_prog_rejected=no
23028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23029 for as_dir in $PATH
23030 do
23031   IFS=$as_save_IFS
23032   test -z "$as_dir" && as_dir=.
23033     for ac_exec_ext in '' $ac_executable_extensions; do
23034   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23035     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23036        ac_prog_rejected=yes
23037        continue
23038      fi
23039     ac_cv_prog_MT="mt"
23040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23041     break 2
23042   fi
23043 done
23044   done
23045 IFS=$as_save_IFS
23046 
23047 if test $ac_prog_rejected = yes; then
23048   # We found a bogon in the path, so make sure we never use it.
23049   set dummy $ac_cv_prog_MT
23050   shift
23051   if test $# != 0; then
23052     # We chose a different compiler from the bogus one.
23053     # However, it has the same basename, so the bogon will be chosen
23054     # first if we set MT to just the basename; use the full file name.
23055     shift
23056     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23057   fi
23058 fi
23059 fi
23060 fi
23061 MT=$ac_cv_prog_MT
23062 if test -n "$MT"; then
23063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23064 $as_echo "$MT" >&6; }
23065 else
23066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23067 $as_echo "no" >&6; }
23068 fi
23069 
23070 
23071 
23072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23073 
23074   # First separate the path from the arguments. This will split at the first
23075   # space.
23076   complete="$MT"
23077   path="${complete%% *}"
23078   tmp="$complete EOL"
23079   arguments="${tmp#* }"
23080 
23081   # Input might be given as Windows format, start by converting to
23082   # unix format.
23083   new_path=`$CYGPATH -u "$path"`
23084 
23085   # Now try to locate executable using which
23086   new_path=`$WHICH "$new_path" 2> /dev/null`
23087   # bat and cmd files are not always considered executable in cygwin causing which
23088   # to not find them
23089   if test "x$new_path" = x \
23090            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23091            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23092     new_path=`$CYGPATH -u "$path"`
23093   fi
23094   if test "x$new_path" = x; then
23095     # Oops. Which didn't find the executable.
23096     # The splitting of arguments from the executable at a space might have been incorrect,
23097     # since paths with space are more likely in Windows. Give it another try with the whole
23098     # argument.
23099     path="$complete"
23100     arguments="EOL"
23101     new_path=`$CYGPATH -u "$path"`
23102     new_path=`$WHICH "$new_path" 2> /dev/null`
23103     # bat and cmd files are not always considered executable in cygwin causing which
23104     # to not find them
23105     if test "x$new_path" = x \
23106              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23107              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23108       new_path=`$CYGPATH -u "$path"`
23109     fi
23110     if test "x$new_path" = x; then
23111       # It's still not found. Now this is an unrecoverable error.
23112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23113 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23114       has_space=`$ECHO "$complete" | $GREP " "`
23115       if test "x$has_space" != x; then
23116         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23117 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23118       fi
23119       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23120     fi
23121   fi
23122 
23123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23126   # "foo.exe" is OK but "foo" is an error.
23127   #
23128   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23129   # It is also a way to make sure we got the proper file name for the real test later on.
23130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23131   if test "x$test_shortpath" = x; then
23132     # Short path failed, file does not exist as specified.
23133     # Try adding .exe or .cmd
23134     if test -f "${new_path}.exe"; then
23135        input_to_shortpath="${new_path}.exe"
23136     elif test -f "${new_path}.cmd"; then
23137        input_to_shortpath="${new_path}.cmd"
23138     else
23139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23140 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23141       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23142 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23143       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23144     fi
23145   else
23146     input_to_shortpath="$new_path"
23147   fi
23148 
23149   # Call helper function which possibly converts this using DOS-style short mode.
23150   # If so, the updated path is stored in $new_path.
23151   new_path="$input_to_shortpath"
23152 
23153   input_path="$input_to_shortpath"
23154   # Check if we need to convert this using DOS-style short mode. If the path
23155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23156   # take no chances and rewrite it.
23157   # Note: m4 eats our [], so we need to use [ and ] instead.
23158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23159   if test "x$has_forbidden_chars" != x; then
23160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23161     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23162     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23163     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23164       # Going to short mode and back again did indeed matter. Since short mode is
23165       # case insensitive, let's make it lowercase to improve readability.
23166       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23167       # Now convert it back to Unix-stile (cygpath)
23168       input_path=`$CYGPATH -u "$shortmode_path"`
23169       new_path="$input_path"
23170     fi
23171   fi
23172 
23173   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23174   if test "x$test_cygdrive_prefix" = x; then
23175     # As a simple fix, exclude /usr/bin since it's not a real path.
23176     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23177       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23178       # a path prefixed by /cygdrive for fixpath to work.
23179       new_path="$CYGWIN_ROOT_PATH$input_path"
23180     fi
23181   fi
23182 
23183   # remove trailing .exe if any
23184   new_path="${new_path/%.exe/}"
23185 
23186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23187 
23188   # First separate the path from the arguments. This will split at the first
23189   # space.
23190   complete="$MT"
23191   path="${complete%% *}"
23192   tmp="$complete EOL"
23193   arguments="${tmp#* }"
23194 
23195   # Input might be given as Windows format, start by converting to
23196   # unix format.
23197   new_path="$path"
23198 
23199   windows_path="$new_path"
23200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23201     unix_path=`$CYGPATH -u "$windows_path"`
23202     new_path="$unix_path"
23203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23205     new_path="$unix_path"
23206   fi
23207 
23208 
23209   # Now try to locate executable using which
23210   new_path=`$WHICH "$new_path" 2> /dev/null`
23211 
23212   if test "x$new_path" = x; then
23213     # Oops. Which didn't find the executable.
23214     # The splitting of arguments from the executable at a space might have been incorrect,
23215     # since paths with space are more likely in Windows. Give it another try with the whole
23216     # argument.
23217     path="$complete"
23218     arguments="EOL"
23219     new_path="$path"
23220 
23221   windows_path="$new_path"
23222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23223     unix_path=`$CYGPATH -u "$windows_path"`
23224     new_path="$unix_path"
23225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23227     new_path="$unix_path"
23228   fi
23229 
23230 
23231     new_path=`$WHICH "$new_path" 2> /dev/null`
23232 
23233     if test "x$new_path" = x; then
23234       # It's still not found. Now this is an unrecoverable error.
23235       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23236 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23237       has_space=`$ECHO "$complete" | $GREP " "`
23238       if test "x$has_space" != x; then
23239         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23240 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23241       fi
23242       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23243     fi
23244   fi
23245 
23246   # Now new_path has a complete unix path to the binary
23247   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23248     # Keep paths in /bin as-is, but remove trailing .exe if any
23249     new_path="${new_path/%.exe/}"
23250     # Do not save /bin paths to all_fixpath_prefixes!
23251   else
23252     # Not in mixed or Windows style, start by that.
23253     new_path=`cmd //c echo $new_path`
23254 
23255   input_path="$new_path"
23256   # Check if we need to convert this using DOS-style short mode. If the path
23257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23258   # take no chances and rewrite it.
23259   # Note: m4 eats our [], so we need to use [ and ] instead.
23260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23261   if test "x$has_forbidden_chars" != x; then
23262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23264   fi
23265 
23266     # Output is in $new_path
23267 
23268   windows_path="$new_path"
23269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23270     unix_path=`$CYGPATH -u "$windows_path"`
23271     new_path="$unix_path"
23272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23274     new_path="$unix_path"
23275   fi
23276 
23277     # remove trailing .exe if any
23278     new_path="${new_path/%.exe/}"
23279 
23280     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23281     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23282   fi
23283 
23284   else
23285     # We're on a posix platform. Hooray! :)
23286     # First separate the path from the arguments. This will split at the first
23287     # space.
23288     complete="$MT"
23289     path="${complete%% *}"
23290     tmp="$complete EOL"
23291     arguments="${tmp#* }"
23292 
23293     # Cannot rely on the command "which" here since it doesn't always work.
23294     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23295     if test -z "$is_absolute_path"; then
23296       # Path to executable is not absolute. Find it.
23297       IFS_save="$IFS"
23298       IFS=:
23299       for p in $PATH; do
23300         if test -f "$p/$path" && test -x "$p/$path"; then
23301           new_path="$p/$path"
23302           break
23303         fi
23304       done
23305       IFS="$IFS_save"
23306     else
23307       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23308 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23309       new_path="$path"
23310     fi
23311 
23312     if test "x$new_path" = x; then
23313         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23314 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23315         has_space=`$ECHO "$complete" | $GREP " "`
23316         if test "x$has_space" != x; then
23317           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23318 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23319         fi
23320         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23321       fi
23322   fi
23323 
23324       # Now join together the path and the arguments once again
23325       if test "x$arguments" != xEOL; then
23326         new_complete="$new_path ${arguments% *}"
23327       else
23328         new_complete="$new_path"
23329       fi
23330 
23331   if test "x$complete" != "x$new_complete"; then
23332       MT="$new_complete"
23333       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23334 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23335     fi
23336 
23337     # The resource compiler
23338     # Extract the first word of "rc", so it can be a program name with args.
23339 set dummy rc; ac_word=$2
23340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23341 $as_echo_n "checking for $ac_word... " >&6; }
23342 if test "${ac_cv_prog_RC+set}" = set; then :
23343   $as_echo_n "(cached) " >&6
23344 else
23345   if test -n "$RC"; then
23346   ac_cv_prog_RC="$RC" # Let the user override the test.
23347 else
23348   ac_prog_rejected=no
23349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23350 for as_dir in $PATH
23351 do
23352   IFS=$as_save_IFS
23353   test -z "$as_dir" && as_dir=.
23354     for ac_exec_ext in '' $ac_executable_extensions; do
23355   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23356     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23357        ac_prog_rejected=yes
23358        continue
23359      fi
23360     ac_cv_prog_RC="rc"
23361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23362     break 2
23363   fi
23364 done
23365   done
23366 IFS=$as_save_IFS
23367 
23368 if test $ac_prog_rejected = yes; then
23369   # We found a bogon in the path, so make sure we never use it.
23370   set dummy $ac_cv_prog_RC
23371   shift
23372   if test $# != 0; then
23373     # We chose a different compiler from the bogus one.
23374     # However, it has the same basename, so the bogon will be chosen
23375     # first if we set RC to just the basename; use the full file name.
23376     shift
23377     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23378   fi
23379 fi
23380 fi
23381 fi
23382 RC=$ac_cv_prog_RC
23383 if test -n "$RC"; then
23384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23385 $as_echo "$RC" >&6; }
23386 else
23387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23388 $as_echo "no" >&6; }
23389 fi
23390 
23391 
23392 
23393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23394 
23395   # First separate the path from the arguments. This will split at the first
23396   # space.
23397   complete="$RC"
23398   path="${complete%% *}"
23399   tmp="$complete EOL"
23400   arguments="${tmp#* }"
23401 
23402   # Input might be given as Windows format, start by converting to
23403   # unix format.
23404   new_path=`$CYGPATH -u "$path"`
23405 
23406   # Now try to locate executable using which
23407   new_path=`$WHICH "$new_path" 2> /dev/null`
23408   # bat and cmd files are not always considered executable in cygwin causing which
23409   # to not find them
23410   if test "x$new_path" = x \
23411            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23412            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23413     new_path=`$CYGPATH -u "$path"`
23414   fi
23415   if test "x$new_path" = x; then
23416     # Oops. Which didn't find the executable.
23417     # The splitting of arguments from the executable at a space might have been incorrect,
23418     # since paths with space are more likely in Windows. Give it another try with the whole
23419     # argument.
23420     path="$complete"
23421     arguments="EOL"
23422     new_path=`$CYGPATH -u "$path"`
23423     new_path=`$WHICH "$new_path" 2> /dev/null`
23424     # bat and cmd files are not always considered executable in cygwin causing which
23425     # to not find them
23426     if test "x$new_path" = x \
23427              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23428              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23429       new_path=`$CYGPATH -u "$path"`
23430     fi
23431     if test "x$new_path" = x; then
23432       # It's still not found. Now this is an unrecoverable error.
23433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23434 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23435       has_space=`$ECHO "$complete" | $GREP " "`
23436       if test "x$has_space" != x; then
23437         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23438 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23439       fi
23440       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23441     fi
23442   fi
23443 
23444   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23445   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23446   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23447   # "foo.exe" is OK but "foo" is an error.
23448   #
23449   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23450   # It is also a way to make sure we got the proper file name for the real test later on.
23451   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23452   if test "x$test_shortpath" = x; then
23453     # Short path failed, file does not exist as specified.
23454     # Try adding .exe or .cmd
23455     if test -f "${new_path}.exe"; then
23456        input_to_shortpath="${new_path}.exe"
23457     elif test -f "${new_path}.cmd"; then
23458        input_to_shortpath="${new_path}.cmd"
23459     else
23460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23461 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23462       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23463 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23464       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23465     fi
23466   else
23467     input_to_shortpath="$new_path"
23468   fi
23469 
23470   # Call helper function which possibly converts this using DOS-style short mode.
23471   # If so, the updated path is stored in $new_path.
23472   new_path="$input_to_shortpath"
23473 
23474   input_path="$input_to_shortpath"
23475   # Check if we need to convert this using DOS-style short mode. If the path
23476   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23477   # take no chances and rewrite it.
23478   # Note: m4 eats our [], so we need to use [ and ] instead.
23479   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23480   if test "x$has_forbidden_chars" != x; then
23481     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23482     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23483     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23484     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23485       # Going to short mode and back again did indeed matter. Since short mode is
23486       # case insensitive, let's make it lowercase to improve readability.
23487       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23488       # Now convert it back to Unix-stile (cygpath)
23489       input_path=`$CYGPATH -u "$shortmode_path"`
23490       new_path="$input_path"
23491     fi
23492   fi
23493 
23494   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23495   if test "x$test_cygdrive_prefix" = x; then
23496     # As a simple fix, exclude /usr/bin since it's not a real path.
23497     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23498       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23499       # a path prefixed by /cygdrive for fixpath to work.
23500       new_path="$CYGWIN_ROOT_PATH$input_path"
23501     fi
23502   fi
23503 
23504   # remove trailing .exe if any
23505   new_path="${new_path/%.exe/}"
23506 
23507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23508 
23509   # First separate the path from the arguments. This will split at the first
23510   # space.
23511   complete="$RC"
23512   path="${complete%% *}"
23513   tmp="$complete EOL"
23514   arguments="${tmp#* }"
23515 
23516   # Input might be given as Windows format, start by converting to
23517   # unix format.
23518   new_path="$path"
23519 
23520   windows_path="$new_path"
23521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23522     unix_path=`$CYGPATH -u "$windows_path"`
23523     new_path="$unix_path"
23524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23526     new_path="$unix_path"
23527   fi
23528 
23529 
23530   # Now try to locate executable using which
23531   new_path=`$WHICH "$new_path" 2> /dev/null`
23532 
23533   if test "x$new_path" = x; then
23534     # Oops. Which didn't find the executable.
23535     # The splitting of arguments from the executable at a space might have been incorrect,
23536     # since paths with space are more likely in Windows. Give it another try with the whole
23537     # argument.
23538     path="$complete"
23539     arguments="EOL"
23540     new_path="$path"
23541 
23542   windows_path="$new_path"
23543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23544     unix_path=`$CYGPATH -u "$windows_path"`
23545     new_path="$unix_path"
23546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23548     new_path="$unix_path"
23549   fi
23550 
23551 
23552     new_path=`$WHICH "$new_path" 2> /dev/null`
23553 
23554     if test "x$new_path" = x; then
23555       # It's still not found. Now this is an unrecoverable error.
23556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23557 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23558       has_space=`$ECHO "$complete" | $GREP " "`
23559       if test "x$has_space" != x; then
23560         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23561 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23562       fi
23563       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23564     fi
23565   fi
23566 
23567   # Now new_path has a complete unix path to the binary
23568   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23569     # Keep paths in /bin as-is, but remove trailing .exe if any
23570     new_path="${new_path/%.exe/}"
23571     # Do not save /bin paths to all_fixpath_prefixes!
23572   else
23573     # Not in mixed or Windows style, start by that.
23574     new_path=`cmd //c echo $new_path`
23575 
23576   input_path="$new_path"
23577   # Check if we need to convert this using DOS-style short mode. If the path
23578   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23579   # take no chances and rewrite it.
23580   # Note: m4 eats our [], so we need to use [ and ] instead.
23581   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23582   if test "x$has_forbidden_chars" != x; then
23583     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23584     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23585   fi
23586 
23587     # Output is in $new_path
23588 
23589   windows_path="$new_path"
23590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23591     unix_path=`$CYGPATH -u "$windows_path"`
23592     new_path="$unix_path"
23593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23595     new_path="$unix_path"
23596   fi
23597 
23598     # remove trailing .exe if any
23599     new_path="${new_path/%.exe/}"
23600 
23601     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23602     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23603   fi
23604 
23605   else
23606     # We're on a posix platform. Hooray! :)
23607     # First separate the path from the arguments. This will split at the first
23608     # space.
23609     complete="$RC"
23610     path="${complete%% *}"
23611     tmp="$complete EOL"
23612     arguments="${tmp#* }"
23613 
23614     # Cannot rely on the command "which" here since it doesn't always work.
23615     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23616     if test -z "$is_absolute_path"; then
23617       # Path to executable is not absolute. Find it.
23618       IFS_save="$IFS"
23619       IFS=:
23620       for p in $PATH; do
23621         if test -f "$p/$path" && test -x "$p/$path"; then
23622           new_path="$p/$path"
23623           break
23624         fi
23625       done
23626       IFS="$IFS_save"
23627     else
23628       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23629 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23630       new_path="$path"
23631     fi
23632 
23633     if test "x$new_path" = x; then
23634         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23635 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23636         has_space=`$ECHO "$complete" | $GREP " "`
23637         if test "x$has_space" != x; then
23638           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23639 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23640         fi
23641         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23642       fi
23643   fi
23644 
23645       # Now join together the path and the arguments once again
23646       if test "x$arguments" != xEOL; then
23647         new_complete="$new_path ${arguments% *}"
23648       else
23649         new_complete="$new_path"
23650       fi
23651 
23652   if test "x$complete" != "x$new_complete"; then
23653       RC="$new_complete"
23654       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23655 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23656     fi
23657 
23658 
23659     # For hotspot, we need these in Windows mixed path,
23660     # so rewrite them all. Need added .exe suffix.
23661     HOTSPOT_CXX="$CXX.exe"
23662     HOTSPOT_LD="$LD.exe"
23663     HOTSPOT_MT="$MT.exe"
23664     HOTSPOT_RC="$RC.exe"
23665 
23666   unix_path="$HOTSPOT_CXX"
23667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23668     windows_path=`$CYGPATH -m "$unix_path"`
23669     HOTSPOT_CXX="$windows_path"
23670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23671     windows_path=`cmd //c echo $unix_path`
23672     HOTSPOT_CXX="$windows_path"
23673   fi
23674 
23675 
23676   unix_path="$HOTSPOT_LD"
23677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23678     windows_path=`$CYGPATH -m "$unix_path"`
23679     HOTSPOT_LD="$windows_path"
23680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23681     windows_path=`cmd //c echo $unix_path`
23682     HOTSPOT_LD="$windows_path"
23683   fi
23684 
23685 
23686   unix_path="$HOTSPOT_MT"
23687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23688     windows_path=`$CYGPATH -m "$unix_path"`
23689     HOTSPOT_MT="$windows_path"
23690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23691     windows_path=`cmd //c echo $unix_path`
23692     HOTSPOT_MT="$windows_path"
23693   fi
23694 
23695 
23696   unix_path="$HOTSPOT_RC"
23697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23698     windows_path=`$CYGPATH -m "$unix_path"`
23699     HOTSPOT_RC="$windows_path"
23700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23701     windows_path=`cmd //c echo $unix_path`
23702     HOTSPOT_RC="$windows_path"
23703   fi
23704 
23705 
23706 
23707 
23708     RC_FLAGS="-nologo -l 0x409 -r"
23709     if test "x$VARIANT" = xOPT; then :
23710 
23711         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23712 
23713 fi
23714     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23715     if test "x$JDK_UPDATE_VERSION" = x; then :
23716 
23717         JDK_UPDATE_VERSION_NOTNULL=0
23718 
23719 fi
23720     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23721     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23722     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23723     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23724     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23725     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23726     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23727 
23728     # lib.exe is used to create static libraries.
23729     # Extract the first word of "lib", so it can be a program name with args.
23730 set dummy lib; ac_word=$2
23731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23732 $as_echo_n "checking for $ac_word... " >&6; }
23733 if test "${ac_cv_prog_WINAR+set}" = set; then :
23734   $as_echo_n "(cached) " >&6
23735 else
23736   if test -n "$WINAR"; then
23737   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23738 else
23739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23740 for as_dir in $PATH
23741 do
23742   IFS=$as_save_IFS
23743   test -z "$as_dir" && as_dir=.
23744     for ac_exec_ext in '' $ac_executable_extensions; do
23745   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23746     ac_cv_prog_WINAR="lib"
23747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23748     break 2
23749   fi
23750 done
23751   done
23752 IFS=$as_save_IFS
23753 
23754 fi
23755 fi
23756 WINAR=$ac_cv_prog_WINAR
23757 if test -n "$WINAR"; then
23758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23759 $as_echo "$WINAR" >&6; }
23760 else
23761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23762 $as_echo "no" >&6; }
23763 fi
23764 
23765 
23766 
23767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23768 
23769   # First separate the path from the arguments. This will split at the first
23770   # space.
23771   complete="$WINAR"
23772   path="${complete%% *}"
23773   tmp="$complete EOL"
23774   arguments="${tmp#* }"
23775 
23776   # Input might be given as Windows format, start by converting to
23777   # unix format.
23778   new_path=`$CYGPATH -u "$path"`
23779 
23780   # Now try to locate executable using which
23781   new_path=`$WHICH "$new_path" 2> /dev/null`
23782   # bat and cmd files are not always considered executable in cygwin causing which
23783   # to not find them
23784   if test "x$new_path" = x \
23785            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23786            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23787     new_path=`$CYGPATH -u "$path"`
23788   fi
23789   if test "x$new_path" = x; then
23790     # Oops. Which didn't find the executable.
23791     # The splitting of arguments from the executable at a space might have been incorrect,
23792     # since paths with space are more likely in Windows. Give it another try with the whole
23793     # argument.
23794     path="$complete"
23795     arguments="EOL"
23796     new_path=`$CYGPATH -u "$path"`
23797     new_path=`$WHICH "$new_path" 2> /dev/null`
23798     # bat and cmd files are not always considered executable in cygwin causing which
23799     # to not find them
23800     if test "x$new_path" = x \
23801              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23802              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23803       new_path=`$CYGPATH -u "$path"`
23804     fi
23805     if test "x$new_path" = x; then
23806       # It's still not found. Now this is an unrecoverable error.
23807       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23808 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23809       has_space=`$ECHO "$complete" | $GREP " "`
23810       if test "x$has_space" != x; then
23811         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23812 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23813       fi
23814       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23815     fi
23816   fi
23817 
23818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23821   # "foo.exe" is OK but "foo" is an error.
23822   #
23823   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23824   # It is also a way to make sure we got the proper file name for the real test later on.
23825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23826   if test "x$test_shortpath" = x; then
23827     # Short path failed, file does not exist as specified.
23828     # Try adding .exe or .cmd
23829     if test -f "${new_path}.exe"; then
23830        input_to_shortpath="${new_path}.exe"
23831     elif test -f "${new_path}.cmd"; then
23832        input_to_shortpath="${new_path}.cmd"
23833     else
23834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23835 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23836       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23837 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23838       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23839     fi
23840   else
23841     input_to_shortpath="$new_path"
23842   fi
23843 
23844   # Call helper function which possibly converts this using DOS-style short mode.
23845   # If so, the updated path is stored in $new_path.
23846   new_path="$input_to_shortpath"
23847 
23848   input_path="$input_to_shortpath"
23849   # Check if we need to convert this using DOS-style short mode. If the path
23850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23851   # take no chances and rewrite it.
23852   # Note: m4 eats our [], so we need to use [ and ] instead.
23853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23854   if test "x$has_forbidden_chars" != x; then
23855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23859       # Going to short mode and back again did indeed matter. Since short mode is
23860       # case insensitive, let's make it lowercase to improve readability.
23861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23862       # Now convert it back to Unix-stile (cygpath)
23863       input_path=`$CYGPATH -u "$shortmode_path"`
23864       new_path="$input_path"
23865     fi
23866   fi
23867 
23868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23869   if test "x$test_cygdrive_prefix" = x; then
23870     # As a simple fix, exclude /usr/bin since it's not a real path.
23871     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23873       # a path prefixed by /cygdrive for fixpath to work.
23874       new_path="$CYGWIN_ROOT_PATH$input_path"
23875     fi
23876   fi
23877 
23878   # remove trailing .exe if any
23879   new_path="${new_path/%.exe/}"
23880 
23881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23882 
23883   # First separate the path from the arguments. This will split at the first
23884   # space.
23885   complete="$WINAR"
23886   path="${complete%% *}"
23887   tmp="$complete EOL"
23888   arguments="${tmp#* }"
23889 
23890   # Input might be given as Windows format, start by converting to
23891   # unix format.
23892   new_path="$path"
23893 
23894   windows_path="$new_path"
23895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23896     unix_path=`$CYGPATH -u "$windows_path"`
23897     new_path="$unix_path"
23898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23900     new_path="$unix_path"
23901   fi
23902 
23903 
23904   # Now try to locate executable using which
23905   new_path=`$WHICH "$new_path" 2> /dev/null`
23906 
23907   if test "x$new_path" = x; then
23908     # Oops. Which didn't find the executable.
23909     # The splitting of arguments from the executable at a space might have been incorrect,
23910     # since paths with space are more likely in Windows. Give it another try with the whole
23911     # argument.
23912     path="$complete"
23913     arguments="EOL"
23914     new_path="$path"
23915 
23916   windows_path="$new_path"
23917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23918     unix_path=`$CYGPATH -u "$windows_path"`
23919     new_path="$unix_path"
23920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23922     new_path="$unix_path"
23923   fi
23924 
23925 
23926     new_path=`$WHICH "$new_path" 2> /dev/null`
23927 
23928     if test "x$new_path" = x; then
23929       # It's still not found. Now this is an unrecoverable error.
23930       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23931 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23932       has_space=`$ECHO "$complete" | $GREP " "`
23933       if test "x$has_space" != x; then
23934         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23935 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23936       fi
23937       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23938     fi
23939   fi
23940 
23941   # Now new_path has a complete unix path to the binary
23942   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23943     # Keep paths in /bin as-is, but remove trailing .exe if any
23944     new_path="${new_path/%.exe/}"
23945     # Do not save /bin paths to all_fixpath_prefixes!
23946   else
23947     # Not in mixed or Windows style, start by that.
23948     new_path=`cmd //c echo $new_path`
23949 
23950   input_path="$new_path"
23951   # Check if we need to convert this using DOS-style short mode. If the path
23952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23953   # take no chances and rewrite it.
23954   # Note: m4 eats our [], so we need to use [ and ] instead.
23955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23956   if test "x$has_forbidden_chars" != x; then
23957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23958     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23959   fi
23960 
23961     # Output is in $new_path
23962 
23963   windows_path="$new_path"
23964   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23965     unix_path=`$CYGPATH -u "$windows_path"`
23966     new_path="$unix_path"
23967   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23968     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23969     new_path="$unix_path"
23970   fi
23971 
23972     # remove trailing .exe if any
23973     new_path="${new_path/%.exe/}"
23974 
23975     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23976     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23977   fi
23978 
23979   else
23980     # We're on a posix platform. Hooray! :)
23981     # First separate the path from the arguments. This will split at the first
23982     # space.
23983     complete="$WINAR"
23984     path="${complete%% *}"
23985     tmp="$complete EOL"
23986     arguments="${tmp#* }"
23987 
23988     # Cannot rely on the command "which" here since it doesn't always work.
23989     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23990     if test -z "$is_absolute_path"; then
23991       # Path to executable is not absolute. Find it.
23992       IFS_save="$IFS"
23993       IFS=:
23994       for p in $PATH; do
23995         if test -f "$p/$path" && test -x "$p/$path"; then
23996           new_path="$p/$path"
23997           break
23998         fi
23999       done
24000       IFS="$IFS_save"
24001     else
24002       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24003 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24004       new_path="$path"
24005     fi
24006 
24007     if test "x$new_path" = x; then
24008         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24009 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24010         has_space=`$ECHO "$complete" | $GREP " "`
24011         if test "x$has_space" != x; then
24012           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24013 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24014         fi
24015         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24016       fi
24017   fi
24018 
24019       # Now join together the path and the arguments once again
24020       if test "x$arguments" != xEOL; then
24021         new_complete="$new_path ${arguments% *}"
24022       else
24023         new_complete="$new_path"
24024       fi
24025 
24026   if test "x$complete" != "x$new_complete"; then
24027       WINAR="$new_complete"
24028       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24029 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24030     fi
24031 
24032     AR="$WINAR"
24033     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24034 
24035     # Extract the first word of "dumpbin", so it can be a program name with args.
24036 set dummy dumpbin; ac_word=$2
24037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24038 $as_echo_n "checking for $ac_word... " >&6; }
24039 if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24040   $as_echo_n "(cached) " >&6
24041 else
24042   if test -n "$DUMPBIN"; then
24043   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24044 else
24045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24046 for as_dir in $PATH
24047 do
24048   IFS=$as_save_IFS
24049   test -z "$as_dir" && as_dir=.
24050     for ac_exec_ext in '' $ac_executable_extensions; do
24051   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24052     ac_cv_prog_DUMPBIN="dumpbin"
24053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24054     break 2
24055   fi
24056 done
24057   done
24058 IFS=$as_save_IFS
24059 
24060 fi
24061 fi
24062 DUMPBIN=$ac_cv_prog_DUMPBIN
24063 if test -n "$DUMPBIN"; then
24064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24065 $as_echo "$DUMPBIN" >&6; }
24066 else
24067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24068 $as_echo "no" >&6; }
24069 fi
24070 
24071 
24072 
24073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24074 
24075   # First separate the path from the arguments. This will split at the first
24076   # space.
24077   complete="$DUMPBIN"
24078   path="${complete%% *}"
24079   tmp="$complete EOL"
24080   arguments="${tmp#* }"
24081 
24082   # Input might be given as Windows format, start by converting to
24083   # unix format.
24084   new_path=`$CYGPATH -u "$path"`
24085 
24086   # Now try to locate executable using which
24087   new_path=`$WHICH "$new_path" 2> /dev/null`
24088   # bat and cmd files are not always considered executable in cygwin causing which
24089   # to not find them
24090   if test "x$new_path" = x \
24091            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24092            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24093     new_path=`$CYGPATH -u "$path"`
24094   fi
24095   if test "x$new_path" = x; then
24096     # Oops. Which didn't find the executable.
24097     # The splitting of arguments from the executable at a space might have been incorrect,
24098     # since paths with space are more likely in Windows. Give it another try with the whole
24099     # argument.
24100     path="$complete"
24101     arguments="EOL"
24102     new_path=`$CYGPATH -u "$path"`
24103     new_path=`$WHICH "$new_path" 2> /dev/null`
24104     # bat and cmd files are not always considered executable in cygwin causing which
24105     # to not find them
24106     if test "x$new_path" = x \
24107              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24108              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24109       new_path=`$CYGPATH -u "$path"`
24110     fi
24111     if test "x$new_path" = x; then
24112       # It's still not found. Now this is an unrecoverable error.
24113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24114 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24115       has_space=`$ECHO "$complete" | $GREP " "`
24116       if test "x$has_space" != x; then
24117         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24118 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24119       fi
24120       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24121     fi
24122   fi
24123 
24124   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24125   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24126   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24127   # "foo.exe" is OK but "foo" is an error.
24128   #
24129   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24130   # It is also a way to make sure we got the proper file name for the real test later on.
24131   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24132   if test "x$test_shortpath" = x; then
24133     # Short path failed, file does not exist as specified.
24134     # Try adding .exe or .cmd
24135     if test -f "${new_path}.exe"; then
24136        input_to_shortpath="${new_path}.exe"
24137     elif test -f "${new_path}.cmd"; then
24138        input_to_shortpath="${new_path}.cmd"
24139     else
24140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24141 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24142       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24143 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24144       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24145     fi
24146   else
24147     input_to_shortpath="$new_path"
24148   fi
24149 
24150   # Call helper function which possibly converts this using DOS-style short mode.
24151   # If so, the updated path is stored in $new_path.
24152   new_path="$input_to_shortpath"
24153 
24154   input_path="$input_to_shortpath"
24155   # Check if we need to convert this using DOS-style short mode. If the path
24156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24157   # take no chances and rewrite it.
24158   # Note: m4 eats our [], so we need to use [ and ] instead.
24159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24160   if test "x$has_forbidden_chars" != x; then
24161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24162     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24163     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24164     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24165       # Going to short mode and back again did indeed matter. Since short mode is
24166       # case insensitive, let's make it lowercase to improve readability.
24167       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24168       # Now convert it back to Unix-stile (cygpath)
24169       input_path=`$CYGPATH -u "$shortmode_path"`
24170       new_path="$input_path"
24171     fi
24172   fi
24173 
24174   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24175   if test "x$test_cygdrive_prefix" = x; then
24176     # As a simple fix, exclude /usr/bin since it's not a real path.
24177     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24178       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24179       # a path prefixed by /cygdrive for fixpath to work.
24180       new_path="$CYGWIN_ROOT_PATH$input_path"
24181     fi
24182   fi
24183 
24184   # remove trailing .exe if any
24185   new_path="${new_path/%.exe/}"
24186 
24187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24188 
24189   # First separate the path from the arguments. This will split at the first
24190   # space.
24191   complete="$DUMPBIN"
24192   path="${complete%% *}"
24193   tmp="$complete EOL"
24194   arguments="${tmp#* }"
24195 
24196   # Input might be given as Windows format, start by converting to
24197   # unix format.
24198   new_path="$path"
24199 
24200   windows_path="$new_path"
24201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24202     unix_path=`$CYGPATH -u "$windows_path"`
24203     new_path="$unix_path"
24204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24206     new_path="$unix_path"
24207   fi
24208 
24209 
24210   # Now try to locate executable using which
24211   new_path=`$WHICH "$new_path" 2> /dev/null`
24212 
24213   if test "x$new_path" = x; then
24214     # Oops. Which didn't find the executable.
24215     # The splitting of arguments from the executable at a space might have been incorrect,
24216     # since paths with space are more likely in Windows. Give it another try with the whole
24217     # argument.
24218     path="$complete"
24219     arguments="EOL"
24220     new_path="$path"
24221 
24222   windows_path="$new_path"
24223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24224     unix_path=`$CYGPATH -u "$windows_path"`
24225     new_path="$unix_path"
24226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24228     new_path="$unix_path"
24229   fi
24230 
24231 
24232     new_path=`$WHICH "$new_path" 2> /dev/null`
24233 
24234     if test "x$new_path" = x; then
24235       # It's still not found. Now this is an unrecoverable error.
24236       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24237 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24238       has_space=`$ECHO "$complete" | $GREP " "`
24239       if test "x$has_space" != x; then
24240         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24241 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24242       fi
24243       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24244     fi
24245   fi
24246 
24247   # Now new_path has a complete unix path to the binary
24248   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24249     # Keep paths in /bin as-is, but remove trailing .exe if any
24250     new_path="${new_path/%.exe/}"
24251     # Do not save /bin paths to all_fixpath_prefixes!
24252   else
24253     # Not in mixed or Windows style, start by that.
24254     new_path=`cmd //c echo $new_path`
24255 
24256   input_path="$new_path"
24257   # Check if we need to convert this using DOS-style short mode. If the path
24258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24259   # take no chances and rewrite it.
24260   # Note: m4 eats our [], so we need to use [ and ] instead.
24261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24262   if test "x$has_forbidden_chars" != x; then
24263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24264     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24265   fi
24266 
24267     # Output is in $new_path
24268 
24269   windows_path="$new_path"
24270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24271     unix_path=`$CYGPATH -u "$windows_path"`
24272     new_path="$unix_path"
24273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24275     new_path="$unix_path"
24276   fi
24277 
24278     # remove trailing .exe if any
24279     new_path="${new_path/%.exe/}"
24280 
24281     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24282     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24283   fi
24284 
24285   else
24286     # We're on a posix platform. Hooray! :)
24287     # First separate the path from the arguments. This will split at the first
24288     # space.
24289     complete="$DUMPBIN"
24290     path="${complete%% *}"
24291     tmp="$complete EOL"
24292     arguments="${tmp#* }"
24293 
24294     # Cannot rely on the command "which" here since it doesn't always work.
24295     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24296     if test -z "$is_absolute_path"; then
24297       # Path to executable is not absolute. Find it.
24298       IFS_save="$IFS"
24299       IFS=:
24300       for p in $PATH; do
24301         if test -f "$p/$path" && test -x "$p/$path"; then
24302           new_path="$p/$path"
24303           break
24304         fi
24305       done
24306       IFS="$IFS_save"
24307     else
24308       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24309 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24310       new_path="$path"
24311     fi
24312 
24313     if test "x$new_path" = x; then
24314         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24315 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24316         has_space=`$ECHO "$complete" | $GREP " "`
24317         if test "x$has_space" != x; then
24318           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24319 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24320         fi
24321         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24322       fi
24323   fi
24324 
24325       # Now join together the path and the arguments once again
24326       if test "x$arguments" != xEOL; then
24327         new_complete="$new_path ${arguments% *}"
24328       else
24329         new_complete="$new_path"
24330       fi
24331 
24332   if test "x$complete" != "x$new_complete"; then
24333       DUMPBIN="$new_complete"
24334       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24335 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24336     fi
24337 
24338 
24339     COMPILER_TYPE=CL
24340     CCXXFLAGS="$CCXXFLAGS -nologo"
24341 
24342 fi
24343 
24344 
24345 
24346 ac_ext=c
24347 ac_cpp='$CPP $CPPFLAGS'
24348 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24349 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24350 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24352 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24353 # On Suns, sometimes $CPP names a directory.
24354 if test -n "$CPP" && test -d "$CPP"; then
24355   CPP=
24356 fi
24357 if test -z "$CPP"; then
24358   if test "${ac_cv_prog_CPP+set}" = set; then :
24359   $as_echo_n "(cached) " >&6
24360 else
24361       # Double quotes because CPP needs to be expanded
24362     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24363     do
24364       ac_preproc_ok=false
24365 for ac_c_preproc_warn_flag in '' yes
24366 do
24367   # Use a header file that comes with gcc, so configuring glibc
24368   # with a fresh cross-compiler works.
24369   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24370   # <limits.h> exists even on freestanding compilers.
24371   # On the NeXT, cc -E runs the code through the compiler's parser,
24372   # not just through cpp. "Syntax error" is here to catch this case.
24373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24374 /* end confdefs.h.  */
24375 #ifdef __STDC__
24376 # include <limits.h>
24377 #else
24378 # include <assert.h>
24379 #endif
24380                      Syntax error
24381 _ACEOF
24382 if ac_fn_c_try_cpp "$LINENO"; then :
24383 
24384 else
24385   # Broken: fails on valid input.
24386 continue
24387 fi
24388 rm -f conftest.err conftest.i conftest.$ac_ext
24389 
24390   # OK, works on sane cases.  Now check whether nonexistent headers
24391   # can be detected and how.
24392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24393 /* end confdefs.h.  */
24394 #include <ac_nonexistent.h>
24395 _ACEOF
24396 if ac_fn_c_try_cpp "$LINENO"; then :
24397   # Broken: success on invalid input.
24398 continue
24399 else
24400   # Passes both tests.
24401 ac_preproc_ok=:
24402 break
24403 fi
24404 rm -f conftest.err conftest.i conftest.$ac_ext
24405 
24406 done
24407 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24408 rm -f conftest.i conftest.err conftest.$ac_ext
24409 if $ac_preproc_ok; then :
24410   break
24411 fi
24412 
24413     done
24414     ac_cv_prog_CPP=$CPP
24415 
24416 fi
24417   CPP=$ac_cv_prog_CPP
24418 else
24419   ac_cv_prog_CPP=$CPP
24420 fi
24421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24422 $as_echo "$CPP" >&6; }
24423 ac_preproc_ok=false
24424 for ac_c_preproc_warn_flag in '' yes
24425 do
24426   # Use a header file that comes with gcc, so configuring glibc
24427   # with a fresh cross-compiler works.
24428   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24429   # <limits.h> exists even on freestanding compilers.
24430   # On the NeXT, cc -E runs the code through the compiler's parser,
24431   # not just through cpp. "Syntax error" is here to catch this case.
24432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24433 /* end confdefs.h.  */
24434 #ifdef __STDC__
24435 # include <limits.h>
24436 #else
24437 # include <assert.h>
24438 #endif
24439                      Syntax error
24440 _ACEOF
24441 if ac_fn_c_try_cpp "$LINENO"; then :
24442 
24443 else
24444   # Broken: fails on valid input.
24445 continue
24446 fi
24447 rm -f conftest.err conftest.i conftest.$ac_ext
24448 
24449   # OK, works on sane cases.  Now check whether nonexistent headers
24450   # can be detected and how.
24451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24452 /* end confdefs.h.  */
24453 #include <ac_nonexistent.h>
24454 _ACEOF
24455 if ac_fn_c_try_cpp "$LINENO"; then :
24456   # Broken: success on invalid input.
24457 continue
24458 else
24459   # Passes both tests.
24460 ac_preproc_ok=:
24461 break
24462 fi
24463 rm -f conftest.err conftest.i conftest.$ac_ext
24464 
24465 done
24466 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24467 rm -f conftest.i conftest.err conftest.$ac_ext
24468 if $ac_preproc_ok; then :
24469 
24470 else
24471   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24472 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24473 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24474 See \`config.log' for more details" "$LINENO" 5 ; }
24475 fi
24476 
24477 ac_ext=cpp
24478 ac_cpp='$CXXCPP $CPPFLAGS'
24479 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24480 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24481 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24482 
24483 
24484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24485 
24486   # First separate the path from the arguments. This will split at the first
24487   # space.
24488   complete="$CPP"
24489   path="${complete%% *}"
24490   tmp="$complete EOL"
24491   arguments="${tmp#* }"
24492 
24493   # Input might be given as Windows format, start by converting to
24494   # unix format.
24495   new_path=`$CYGPATH -u "$path"`
24496 
24497   # Now try to locate executable using which
24498   new_path=`$WHICH "$new_path" 2> /dev/null`
24499   # bat and cmd files are not always considered executable in cygwin causing which
24500   # to not find them
24501   if test "x$new_path" = x \
24502            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24503            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24504     new_path=`$CYGPATH -u "$path"`
24505   fi
24506   if test "x$new_path" = x; then
24507     # Oops. Which didn't find the executable.
24508     # The splitting of arguments from the executable at a space might have been incorrect,
24509     # since paths with space are more likely in Windows. Give it another try with the whole
24510     # argument.
24511     path="$complete"
24512     arguments="EOL"
24513     new_path=`$CYGPATH -u "$path"`
24514     new_path=`$WHICH "$new_path" 2> /dev/null`
24515     # bat and cmd files are not always considered executable in cygwin causing which
24516     # to not find them
24517     if test "x$new_path" = x \
24518              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24519              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24520       new_path=`$CYGPATH -u "$path"`
24521     fi
24522     if test "x$new_path" = x; then
24523       # It's still not found. Now this is an unrecoverable error.
24524       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24525 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24526       has_space=`$ECHO "$complete" | $GREP " "`
24527       if test "x$has_space" != x; then
24528         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24529 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24530       fi
24531       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24532     fi
24533   fi
24534 
24535   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24536   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24537   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24538   # "foo.exe" is OK but "foo" is an error.
24539   #
24540   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24541   # It is also a way to make sure we got the proper file name for the real test later on.
24542   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24543   if test "x$test_shortpath" = x; then
24544     # Short path failed, file does not exist as specified.
24545     # Try adding .exe or .cmd
24546     if test -f "${new_path}.exe"; then
24547        input_to_shortpath="${new_path}.exe"
24548     elif test -f "${new_path}.cmd"; then
24549        input_to_shortpath="${new_path}.cmd"
24550     else
24551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24552 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24553       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24554 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24555       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24556     fi
24557   else
24558     input_to_shortpath="$new_path"
24559   fi
24560 
24561   # Call helper function which possibly converts this using DOS-style short mode.
24562   # If so, the updated path is stored in $new_path.
24563   new_path="$input_to_shortpath"
24564 
24565   input_path="$input_to_shortpath"
24566   # Check if we need to convert this using DOS-style short mode. If the path
24567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24568   # take no chances and rewrite it.
24569   # Note: m4 eats our [], so we need to use [ and ] instead.
24570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24571   if test "x$has_forbidden_chars" != x; then
24572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24573     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24574     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24575     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24576       # Going to short mode and back again did indeed matter. Since short mode is
24577       # case insensitive, let's make it lowercase to improve readability.
24578       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24579       # Now convert it back to Unix-stile (cygpath)
24580       input_path=`$CYGPATH -u "$shortmode_path"`
24581       new_path="$input_path"
24582     fi
24583   fi
24584 
24585   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24586   if test "x$test_cygdrive_prefix" = x; then
24587     # As a simple fix, exclude /usr/bin since it's not a real path.
24588     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24589       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24590       # a path prefixed by /cygdrive for fixpath to work.
24591       new_path="$CYGWIN_ROOT_PATH$input_path"
24592     fi
24593   fi
24594 
24595   # remove trailing .exe if any
24596   new_path="${new_path/%.exe/}"
24597 
24598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24599 
24600   # First separate the path from the arguments. This will split at the first
24601   # space.
24602   complete="$CPP"
24603   path="${complete%% *}"
24604   tmp="$complete EOL"
24605   arguments="${tmp#* }"
24606 
24607   # Input might be given as Windows format, start by converting to
24608   # unix format.
24609   new_path="$path"
24610 
24611   windows_path="$new_path"
24612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24613     unix_path=`$CYGPATH -u "$windows_path"`
24614     new_path="$unix_path"
24615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24617     new_path="$unix_path"
24618   fi
24619 
24620 
24621   # Now try to locate executable using which
24622   new_path=`$WHICH "$new_path" 2> /dev/null`
24623 
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="$path"
24632 
24633   windows_path="$new_path"
24634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24635     unix_path=`$CYGPATH -u "$windows_path"`
24636     new_path="$unix_path"
24637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24639     new_path="$unix_path"
24640   fi
24641 
24642 
24643     new_path=`$WHICH "$new_path" 2> /dev/null`
24644 
24645     if test "x$new_path" = x; then
24646       # It's still not found. Now this is an unrecoverable error.
24647       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24648 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24649       has_space=`$ECHO "$complete" | $GREP " "`
24650       if test "x$has_space" != x; then
24651         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24652 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24653       fi
24654       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24655     fi
24656   fi
24657 
24658   # Now new_path has a complete unix path to the binary
24659   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24660     # Keep paths in /bin as-is, but remove trailing .exe if any
24661     new_path="${new_path/%.exe/}"
24662     # Do not save /bin paths to all_fixpath_prefixes!
24663   else
24664     # Not in mixed or Windows style, start by that.
24665     new_path=`cmd //c echo $new_path`
24666 
24667   input_path="$new_path"
24668   # Check if we need to convert this using DOS-style short mode. If the path
24669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24670   # take no chances and rewrite it.
24671   # Note: m4 eats our [], so we need to use [ and ] instead.
24672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24673   if test "x$has_forbidden_chars" != x; then
24674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24675     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24676   fi
24677 
24678     # Output is in $new_path
24679 
24680   windows_path="$new_path"
24681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24682     unix_path=`$CYGPATH -u "$windows_path"`
24683     new_path="$unix_path"
24684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24686     new_path="$unix_path"
24687   fi
24688 
24689     # remove trailing .exe if any
24690     new_path="${new_path/%.exe/}"
24691 
24692     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24693     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24694   fi
24695 
24696   else
24697     # We're on a posix platform. Hooray! :)
24698     # First separate the path from the arguments. This will split at the first
24699     # space.
24700     complete="$CPP"
24701     path="${complete%% *}"
24702     tmp="$complete EOL"
24703     arguments="${tmp#* }"
24704 
24705     # Cannot rely on the command "which" here since it doesn't always work.
24706     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24707     if test -z "$is_absolute_path"; then
24708       # Path to executable is not absolute. Find it.
24709       IFS_save="$IFS"
24710       IFS=:
24711       for p in $PATH; do
24712         if test -f "$p/$path" && test -x "$p/$path"; then
24713           new_path="$p/$path"
24714           break
24715         fi
24716       done
24717       IFS="$IFS_save"
24718     else
24719       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24720 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24721       new_path="$path"
24722     fi
24723 
24724     if test "x$new_path" = x; then
24725         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24726 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24727         has_space=`$ECHO "$complete" | $GREP " "`
24728         if test "x$has_space" != x; then
24729           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24730 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24731         fi
24732         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24733       fi
24734   fi
24735 
24736       # Now join together the path and the arguments once again
24737       if test "x$arguments" != xEOL; then
24738         new_complete="$new_path ${arguments% *}"
24739       else
24740         new_complete="$new_path"
24741       fi
24742 
24743   if test "x$complete" != "x$new_complete"; then
24744       CPP="$new_complete"
24745       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24746 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24747     fi
24748 
24749 
24750 ac_ext=cpp
24751 ac_cpp='$CXXCPP $CPPFLAGS'
24752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24756 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24757 if test -z "$CXXCPP"; then
24758   if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24759   $as_echo_n "(cached) " >&6
24760 else
24761       # Double quotes because CXXCPP needs to be expanded
24762     for CXXCPP in "$CXX -E" "/lib/cpp"
24763     do
24764       ac_preproc_ok=false
24765 for ac_cxx_preproc_warn_flag in '' yes
24766 do
24767   # Use a header file that comes with gcc, so configuring glibc
24768   # with a fresh cross-compiler works.
24769   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24770   # <limits.h> exists even on freestanding compilers.
24771   # On the NeXT, cc -E runs the code through the compiler's parser,
24772   # not just through cpp. "Syntax error" is here to catch this case.
24773   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24774 /* end confdefs.h.  */
24775 #ifdef __STDC__
24776 # include <limits.h>
24777 #else
24778 # include <assert.h>
24779 #endif
24780                      Syntax error
24781 _ACEOF
24782 if ac_fn_cxx_try_cpp "$LINENO"; then :
24783 
24784 else
24785   # Broken: fails on valid input.
24786 continue
24787 fi
24788 rm -f conftest.err conftest.i conftest.$ac_ext
24789 
24790   # OK, works on sane cases.  Now check whether nonexistent headers
24791   # can be detected and how.
24792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24793 /* end confdefs.h.  */
24794 #include <ac_nonexistent.h>
24795 _ACEOF
24796 if ac_fn_cxx_try_cpp "$LINENO"; then :
24797   # Broken: success on invalid input.
24798 continue
24799 else
24800   # Passes both tests.
24801 ac_preproc_ok=:
24802 break
24803 fi
24804 rm -f conftest.err conftest.i conftest.$ac_ext
24805 
24806 done
24807 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24808 rm -f conftest.i conftest.err conftest.$ac_ext
24809 if $ac_preproc_ok; then :
24810   break
24811 fi
24812 
24813     done
24814     ac_cv_prog_CXXCPP=$CXXCPP
24815 
24816 fi
24817   CXXCPP=$ac_cv_prog_CXXCPP
24818 else
24819   ac_cv_prog_CXXCPP=$CXXCPP
24820 fi
24821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24822 $as_echo "$CXXCPP" >&6; }
24823 ac_preproc_ok=false
24824 for ac_cxx_preproc_warn_flag in '' yes
24825 do
24826   # Use a header file that comes with gcc, so configuring glibc
24827   # with a fresh cross-compiler works.
24828   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24829   # <limits.h> exists even on freestanding compilers.
24830   # On the NeXT, cc -E runs the code through the compiler's parser,
24831   # not just through cpp. "Syntax error" is here to catch this case.
24832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24833 /* end confdefs.h.  */
24834 #ifdef __STDC__
24835 # include <limits.h>
24836 #else
24837 # include <assert.h>
24838 #endif
24839                      Syntax error
24840 _ACEOF
24841 if ac_fn_cxx_try_cpp "$LINENO"; then :
24842 
24843 else
24844   # Broken: fails on valid input.
24845 continue
24846 fi
24847 rm -f conftest.err conftest.i conftest.$ac_ext
24848 
24849   # OK, works on sane cases.  Now check whether nonexistent headers
24850   # can be detected and how.
24851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24852 /* end confdefs.h.  */
24853 #include <ac_nonexistent.h>
24854 _ACEOF
24855 if ac_fn_cxx_try_cpp "$LINENO"; then :
24856   # Broken: success on invalid input.
24857 continue
24858 else
24859   # Passes both tests.
24860 ac_preproc_ok=:
24861 break
24862 fi
24863 rm -f conftest.err conftest.i conftest.$ac_ext
24864 
24865 done
24866 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24867 rm -f conftest.i conftest.err conftest.$ac_ext
24868 if $ac_preproc_ok; then :
24869 
24870 else
24871   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24872 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24873 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24874 See \`config.log' for more details" "$LINENO" 5 ; }
24875 fi
24876 
24877 ac_ext=cpp
24878 ac_cpp='$CXXCPP $CPPFLAGS'
24879 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24880 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24881 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24882 
24883 
24884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24885 
24886   # First separate the path from the arguments. This will split at the first
24887   # space.
24888   complete="$CXXCPP"
24889   path="${complete%% *}"
24890   tmp="$complete EOL"
24891   arguments="${tmp#* }"
24892 
24893   # Input might be given as Windows format, start by converting to
24894   # unix format.
24895   new_path=`$CYGPATH -u "$path"`
24896 
24897   # Now try to locate executable using which
24898   new_path=`$WHICH "$new_path" 2> /dev/null`
24899   # bat and cmd files are not always considered executable in cygwin causing which
24900   # to not find them
24901   if test "x$new_path" = x \
24902            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24903            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24904     new_path=`$CYGPATH -u "$path"`
24905   fi
24906   if test "x$new_path" = x; then
24907     # Oops. Which didn't find the executable.
24908     # The splitting of arguments from the executable at a space might have been incorrect,
24909     # since paths with space are more likely in Windows. Give it another try with the whole
24910     # argument.
24911     path="$complete"
24912     arguments="EOL"
24913     new_path=`$CYGPATH -u "$path"`
24914     new_path=`$WHICH "$new_path" 2> /dev/null`
24915     # bat and cmd files are not always considered executable in cygwin causing which
24916     # to not find them
24917     if test "x$new_path" = x \
24918              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24919              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24920       new_path=`$CYGPATH -u "$path"`
24921     fi
24922     if test "x$new_path" = x; then
24923       # It's still not found. Now this is an unrecoverable error.
24924       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24925 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24926       has_space=`$ECHO "$complete" | $GREP " "`
24927       if test "x$has_space" != x; then
24928         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24929 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24930       fi
24931       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24932     fi
24933   fi
24934 
24935   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24936   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24937   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24938   # "foo.exe" is OK but "foo" is an error.
24939   #
24940   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24941   # It is also a way to make sure we got the proper file name for the real test later on.
24942   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24943   if test "x$test_shortpath" = x; then
24944     # Short path failed, file does not exist as specified.
24945     # Try adding .exe or .cmd
24946     if test -f "${new_path}.exe"; then
24947        input_to_shortpath="${new_path}.exe"
24948     elif test -f "${new_path}.cmd"; then
24949        input_to_shortpath="${new_path}.cmd"
24950     else
24951       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24952 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24953       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24954 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24955       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24956     fi
24957   else
24958     input_to_shortpath="$new_path"
24959   fi
24960 
24961   # Call helper function which possibly converts this using DOS-style short mode.
24962   # If so, the updated path is stored in $new_path.
24963   new_path="$input_to_shortpath"
24964 
24965   input_path="$input_to_shortpath"
24966   # Check if we need to convert this using DOS-style short mode. If the path
24967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24968   # take no chances and rewrite it.
24969   # Note: m4 eats our [], so we need to use [ and ] instead.
24970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24971   if test "x$has_forbidden_chars" != x; then
24972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24973     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24974     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24975     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24976       # Going to short mode and back again did indeed matter. Since short mode is
24977       # case insensitive, let's make it lowercase to improve readability.
24978       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24979       # Now convert it back to Unix-stile (cygpath)
24980       input_path=`$CYGPATH -u "$shortmode_path"`
24981       new_path="$input_path"
24982     fi
24983   fi
24984 
24985   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24986   if test "x$test_cygdrive_prefix" = x; then
24987     # As a simple fix, exclude /usr/bin since it's not a real path.
24988     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24989       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24990       # a path prefixed by /cygdrive for fixpath to work.
24991       new_path="$CYGWIN_ROOT_PATH$input_path"
24992     fi
24993   fi
24994 
24995   # remove trailing .exe if any
24996   new_path="${new_path/%.exe/}"
24997 
24998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24999 
25000   # First separate the path from the arguments. This will split at the first
25001   # space.
25002   complete="$CXXCPP"
25003   path="${complete%% *}"
25004   tmp="$complete EOL"
25005   arguments="${tmp#* }"
25006 
25007   # Input might be given as Windows format, start by converting to
25008   # unix format.
25009   new_path="$path"
25010 
25011   windows_path="$new_path"
25012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25013     unix_path=`$CYGPATH -u "$windows_path"`
25014     new_path="$unix_path"
25015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25017     new_path="$unix_path"
25018   fi
25019 
25020 
25021   # Now try to locate executable using which
25022   new_path=`$WHICH "$new_path" 2> /dev/null`
25023 
25024   if test "x$new_path" = x; then
25025     # Oops. Which didn't find the executable.
25026     # The splitting of arguments from the executable at a space might have been incorrect,
25027     # since paths with space are more likely in Windows. Give it another try with the whole
25028     # argument.
25029     path="$complete"
25030     arguments="EOL"
25031     new_path="$path"
25032 
25033   windows_path="$new_path"
25034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25035     unix_path=`$CYGPATH -u "$windows_path"`
25036     new_path="$unix_path"
25037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25039     new_path="$unix_path"
25040   fi
25041 
25042 
25043     new_path=`$WHICH "$new_path" 2> /dev/null`
25044 
25045     if test "x$new_path" = x; then
25046       # It's still not found. Now this is an unrecoverable error.
25047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25048 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25049       has_space=`$ECHO "$complete" | $GREP " "`
25050       if test "x$has_space" != x; then
25051         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25053       fi
25054       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25055     fi
25056   fi
25057 
25058   # Now new_path has a complete unix path to the binary
25059   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25060     # Keep paths in /bin as-is, but remove trailing .exe if any
25061     new_path="${new_path/%.exe/}"
25062     # Do not save /bin paths to all_fixpath_prefixes!
25063   else
25064     # Not in mixed or Windows style, start by that.
25065     new_path=`cmd //c echo $new_path`
25066 
25067   input_path="$new_path"
25068   # Check if we need to convert this using DOS-style short mode. If the path
25069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25070   # take no chances and rewrite it.
25071   # Note: m4 eats our [], so we need to use [ and ] instead.
25072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25073   if test "x$has_forbidden_chars" != x; then
25074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25075     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25076   fi
25077 
25078     # Output is in $new_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     # remove trailing .exe if any
25090     new_path="${new_path/%.exe/}"
25091 
25092     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25093     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25094   fi
25095 
25096   else
25097     # We're on a posix platform. Hooray! :)
25098     # First separate the path from the arguments. This will split at the first
25099     # space.
25100     complete="$CXXCPP"
25101     path="${complete%% *}"
25102     tmp="$complete EOL"
25103     arguments="${tmp#* }"
25104 
25105     # Cannot rely on the command "which" here since it doesn't always work.
25106     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25107     if test -z "$is_absolute_path"; then
25108       # Path to executable is not absolute. Find it.
25109       IFS_save="$IFS"
25110       IFS=:
25111       for p in $PATH; do
25112         if test -f "$p/$path" && test -x "$p/$path"; then
25113           new_path="$p/$path"
25114           break
25115         fi
25116       done
25117       IFS="$IFS_save"
25118     else
25119       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25120 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25121       new_path="$path"
25122     fi
25123 
25124     if test "x$new_path" = x; then
25125         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25126 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25127         has_space=`$ECHO "$complete" | $GREP " "`
25128         if test "x$has_space" != x; then
25129           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25130 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25131         fi
25132         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25133       fi
25134   fi
25135 
25136       # Now join together the path and the arguments once again
25137       if test "x$arguments" != xEOL; then
25138         new_complete="$new_path ${arguments% *}"
25139       else
25140         new_complete="$new_path"
25141       fi
25142 
25143   if test "x$complete" != "x$new_complete"; then
25144       CXXCPP="$new_complete"
25145       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25146 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25147     fi
25148 
25149 
25150 if test "x$COMPILE_TYPE" != "xcross"; then
25151     # If we are not cross compiling, use the same compilers for
25152     # building the build platform executables. The cross-compilation
25153     # case needed to be done earlier, but this can only be done after
25154     # the native tools have been localized.
25155     BUILD_CC="$CC"
25156     BUILD_CXX="$CXX"
25157     BUILD_LD="$LD"
25158 fi
25159 
25160 # for solaris we really need solaris tools, and not gnu equivalent
25161 #   these seems to normally reside in /usr/ccs/bin so add that to path before
25162 #   starting to probe
25163 #
25164 #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25165 #         so that it can be overriden --with-tools-dir
25166 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25167     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25168 fi
25169 
25170 # Find the right assembler.
25171 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25172     # Extract the first word of "as", so it can be a program name with args.
25173 set dummy as; ac_word=$2
25174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25175 $as_echo_n "checking for $ac_word... " >&6; }
25176 if test "${ac_cv_path_AS+set}" = set; then :
25177   $as_echo_n "(cached) " >&6
25178 else
25179   case $AS in
25180   [\\/]* | ?:[\\/]*)
25181   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25182   ;;
25183   *)
25184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25185 for as_dir in $PATH
25186 do
25187   IFS=$as_save_IFS
25188   test -z "$as_dir" && as_dir=.
25189     for ac_exec_ext in '' $ac_executable_extensions; do
25190   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25191     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25193     break 2
25194   fi
25195 done
25196   done
25197 IFS=$as_save_IFS
25198 
25199   ;;
25200 esac
25201 fi
25202 AS=$ac_cv_path_AS
25203 if test -n "$AS"; then
25204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25205 $as_echo "$AS" >&6; }
25206 else
25207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25208 $as_echo "no" >&6; }
25209 fi
25210 
25211 
25212 
25213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25214 
25215   # First separate the path from the arguments. This will split at the first
25216   # space.
25217   complete="$AS"
25218   path="${complete%% *}"
25219   tmp="$complete EOL"
25220   arguments="${tmp#* }"
25221 
25222   # Input might be given as Windows format, start by converting to
25223   # unix format.
25224   new_path=`$CYGPATH -u "$path"`
25225 
25226   # Now try to locate executable using which
25227   new_path=`$WHICH "$new_path" 2> /dev/null`
25228   # bat and cmd files are not always considered executable in cygwin causing which
25229   # to not find them
25230   if test "x$new_path" = x \
25231            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25232            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25233     new_path=`$CYGPATH -u "$path"`
25234   fi
25235   if test "x$new_path" = x; then
25236     # Oops. Which didn't find the executable.
25237     # The splitting of arguments from the executable at a space might have been incorrect,
25238     # since paths with space are more likely in Windows. Give it another try with the whole
25239     # argument.
25240     path="$complete"
25241     arguments="EOL"
25242     new_path=`$CYGPATH -u "$path"`
25243     new_path=`$WHICH "$new_path" 2> /dev/null`
25244     # bat and cmd files are not always considered executable in cygwin causing which
25245     # to not find them
25246     if test "x$new_path" = x \
25247              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25248              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25249       new_path=`$CYGPATH -u "$path"`
25250     fi
25251     if test "x$new_path" = x; then
25252       # It's still not found. Now this is an unrecoverable error.
25253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25254 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25255       has_space=`$ECHO "$complete" | $GREP " "`
25256       if test "x$has_space" != x; then
25257         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25258 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25259       fi
25260       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25261     fi
25262   fi
25263 
25264   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25265   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25266   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25267   # "foo.exe" is OK but "foo" is an error.
25268   #
25269   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25270   # It is also a way to make sure we got the proper file name for the real test later on.
25271   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25272   if test "x$test_shortpath" = x; then
25273     # Short path failed, file does not exist as specified.
25274     # Try adding .exe or .cmd
25275     if test -f "${new_path}.exe"; then
25276        input_to_shortpath="${new_path}.exe"
25277     elif test -f "${new_path}.cmd"; then
25278        input_to_shortpath="${new_path}.cmd"
25279     else
25280       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25281 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25282       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25283 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25284       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25285     fi
25286   else
25287     input_to_shortpath="$new_path"
25288   fi
25289 
25290   # Call helper function which possibly converts this using DOS-style short mode.
25291   # If so, the updated path is stored in $new_path.
25292   new_path="$input_to_shortpath"
25293 
25294   input_path="$input_to_shortpath"
25295   # Check if we need to convert this using DOS-style short mode. If the path
25296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25297   # take no chances and rewrite it.
25298   # Note: m4 eats our [], so we need to use [ and ] instead.
25299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25300   if test "x$has_forbidden_chars" != x; then
25301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25302     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25303     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25304     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25305       # Going to short mode and back again did indeed matter. Since short mode is
25306       # case insensitive, let's make it lowercase to improve readability.
25307       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25308       # Now convert it back to Unix-stile (cygpath)
25309       input_path=`$CYGPATH -u "$shortmode_path"`
25310       new_path="$input_path"
25311     fi
25312   fi
25313 
25314   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25315   if test "x$test_cygdrive_prefix" = x; then
25316     # As a simple fix, exclude /usr/bin since it's not a real path.
25317     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25318       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25319       # a path prefixed by /cygdrive for fixpath to work.
25320       new_path="$CYGWIN_ROOT_PATH$input_path"
25321     fi
25322   fi
25323 
25324   # remove trailing .exe if any
25325   new_path="${new_path/%.exe/}"
25326 
25327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25328 
25329   # First separate the path from the arguments. This will split at the first
25330   # space.
25331   complete="$AS"
25332   path="${complete%% *}"
25333   tmp="$complete EOL"
25334   arguments="${tmp#* }"
25335 
25336   # Input might be given as Windows format, start by converting to
25337   # unix format.
25338   new_path="$path"
25339 
25340   windows_path="$new_path"
25341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25342     unix_path=`$CYGPATH -u "$windows_path"`
25343     new_path="$unix_path"
25344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25346     new_path="$unix_path"
25347   fi
25348 
25349 
25350   # Now try to locate executable using which
25351   new_path=`$WHICH "$new_path" 2> /dev/null`
25352 
25353   if test "x$new_path" = x; then
25354     # Oops. Which didn't find the executable.
25355     # The splitting of arguments from the executable at a space might have been incorrect,
25356     # since paths with space are more likely in Windows. Give it another try with the whole
25357     # argument.
25358     path="$complete"
25359     arguments="EOL"
25360     new_path="$path"
25361 
25362   windows_path="$new_path"
25363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25364     unix_path=`$CYGPATH -u "$windows_path"`
25365     new_path="$unix_path"
25366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25368     new_path="$unix_path"
25369   fi
25370 
25371 
25372     new_path=`$WHICH "$new_path" 2> /dev/null`
25373 
25374     if test "x$new_path" = x; then
25375       # It's still not found. Now this is an unrecoverable error.
25376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25377 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25378       has_space=`$ECHO "$complete" | $GREP " "`
25379       if test "x$has_space" != x; then
25380         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25381 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25382       fi
25383       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25384     fi
25385   fi
25386 
25387   # Now new_path has a complete unix path to the binary
25388   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25389     # Keep paths in /bin as-is, but remove trailing .exe if any
25390     new_path="${new_path/%.exe/}"
25391     # Do not save /bin paths to all_fixpath_prefixes!
25392   else
25393     # Not in mixed or Windows style, start by that.
25394     new_path=`cmd //c echo $new_path`
25395 
25396   input_path="$new_path"
25397   # Check if we need to convert this using DOS-style short mode. If the path
25398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25399   # take no chances and rewrite it.
25400   # Note: m4 eats our [], so we need to use [ and ] instead.
25401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25402   if test "x$has_forbidden_chars" != x; then
25403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25404     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25405   fi
25406 
25407     # Output is in $new_path
25408 
25409   windows_path="$new_path"
25410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25411     unix_path=`$CYGPATH -u "$windows_path"`
25412     new_path="$unix_path"
25413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25415     new_path="$unix_path"
25416   fi
25417 
25418     # remove trailing .exe if any
25419     new_path="${new_path/%.exe/}"
25420 
25421     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25422     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25423   fi
25424 
25425   else
25426     # We're on a posix platform. Hooray! :)
25427     # First separate the path from the arguments. This will split at the first
25428     # space.
25429     complete="$AS"
25430     path="${complete%% *}"
25431     tmp="$complete EOL"
25432     arguments="${tmp#* }"
25433 
25434     # Cannot rely on the command "which" here since it doesn't always work.
25435     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25436     if test -z "$is_absolute_path"; then
25437       # Path to executable is not absolute. Find it.
25438       IFS_save="$IFS"
25439       IFS=:
25440       for p in $PATH; do
25441         if test -f "$p/$path" && test -x "$p/$path"; then
25442           new_path="$p/$path"
25443           break
25444         fi
25445       done
25446       IFS="$IFS_save"
25447     else
25448       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25449 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25450       new_path="$path"
25451     fi
25452 
25453     if test "x$new_path" = x; then
25454         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25455 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25456         has_space=`$ECHO "$complete" | $GREP " "`
25457         if test "x$has_space" != x; then
25458           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25459 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25460         fi
25461         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25462       fi
25463   fi
25464 
25465       # Now join together the path and the arguments once again
25466       if test "x$arguments" != xEOL; then
25467         new_complete="$new_path ${arguments% *}"
25468       else
25469         new_complete="$new_path"
25470       fi
25471 
25472   if test "x$complete" != "x$new_complete"; then
25473       AS="$new_complete"
25474       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25475 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25476     fi
25477 
25478 else
25479     AS="$CC -c"
25480 fi
25481 
25482 
25483 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25484     # Extract the first word of "nm", so it can be a program name with args.
25485 set dummy nm; ac_word=$2
25486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25487 $as_echo_n "checking for $ac_word... " >&6; }
25488 if test "${ac_cv_path_NM+set}" = set; then :
25489   $as_echo_n "(cached) " >&6
25490 else
25491   case $NM in
25492   [\\/]* | ?:[\\/]*)
25493   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25494   ;;
25495   *)
25496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25497 for as_dir in $PATH
25498 do
25499   IFS=$as_save_IFS
25500   test -z "$as_dir" && as_dir=.
25501     for ac_exec_ext in '' $ac_executable_extensions; do
25502   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25503     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25505     break 2
25506   fi
25507 done
25508   done
25509 IFS=$as_save_IFS
25510 
25511   ;;
25512 esac
25513 fi
25514 NM=$ac_cv_path_NM
25515 if test -n "$NM"; then
25516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25517 $as_echo "$NM" >&6; }
25518 else
25519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25520 $as_echo "no" >&6; }
25521 fi
25522 
25523 
25524 
25525   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25526 
25527   # First separate the path from the arguments. This will split at the first
25528   # space.
25529   complete="$NM"
25530   path="${complete%% *}"
25531   tmp="$complete EOL"
25532   arguments="${tmp#* }"
25533 
25534   # Input might be given as Windows format, start by converting to
25535   # unix format.
25536   new_path=`$CYGPATH -u "$path"`
25537 
25538   # Now try to locate executable using which
25539   new_path=`$WHICH "$new_path" 2> /dev/null`
25540   # bat and cmd files are not always considered executable in cygwin causing which
25541   # to not find them
25542   if test "x$new_path" = x \
25543            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25544            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25545     new_path=`$CYGPATH -u "$path"`
25546   fi
25547   if test "x$new_path" = x; then
25548     # Oops. Which didn't find the executable.
25549     # The splitting of arguments from the executable at a space might have been incorrect,
25550     # since paths with space are more likely in Windows. Give it another try with the whole
25551     # argument.
25552     path="$complete"
25553     arguments="EOL"
25554     new_path=`$CYGPATH -u "$path"`
25555     new_path=`$WHICH "$new_path" 2> /dev/null`
25556     # bat and cmd files are not always considered executable in cygwin causing which
25557     # to not find them
25558     if test "x$new_path" = x \
25559              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25560              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25561       new_path=`$CYGPATH -u "$path"`
25562     fi
25563     if test "x$new_path" = x; then
25564       # It's still not found. Now this is an unrecoverable error.
25565       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25566 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25567       has_space=`$ECHO "$complete" | $GREP " "`
25568       if test "x$has_space" != x; then
25569         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25570 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25571       fi
25572       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25573     fi
25574   fi
25575 
25576   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25577   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25578   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25579   # "foo.exe" is OK but "foo" is an error.
25580   #
25581   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25582   # It is also a way to make sure we got the proper file name for the real test later on.
25583   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25584   if test "x$test_shortpath" = x; then
25585     # Short path failed, file does not exist as specified.
25586     # Try adding .exe or .cmd
25587     if test -f "${new_path}.exe"; then
25588        input_to_shortpath="${new_path}.exe"
25589     elif test -f "${new_path}.cmd"; then
25590        input_to_shortpath="${new_path}.cmd"
25591     else
25592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25593 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25594       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25595 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25596       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25597     fi
25598   else
25599     input_to_shortpath="$new_path"
25600   fi
25601 
25602   # Call helper function which possibly converts this using DOS-style short mode.
25603   # If so, the updated path is stored in $new_path.
25604   new_path="$input_to_shortpath"
25605 
25606   input_path="$input_to_shortpath"
25607   # Check if we need to convert this using DOS-style short mode. If the path
25608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25609   # take no chances and rewrite it.
25610   # Note: m4 eats our [], so we need to use [ and ] instead.
25611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25612   if test "x$has_forbidden_chars" != x; then
25613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25614     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25615     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25616     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25617       # Going to short mode and back again did indeed matter. Since short mode is
25618       # case insensitive, let's make it lowercase to improve readability.
25619       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25620       # Now convert it back to Unix-stile (cygpath)
25621       input_path=`$CYGPATH -u "$shortmode_path"`
25622       new_path="$input_path"
25623     fi
25624   fi
25625 
25626   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25627   if test "x$test_cygdrive_prefix" = x; then
25628     # As a simple fix, exclude /usr/bin since it's not a real path.
25629     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25630       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25631       # a path prefixed by /cygdrive for fixpath to work.
25632       new_path="$CYGWIN_ROOT_PATH$input_path"
25633     fi
25634   fi
25635 
25636   # remove trailing .exe if any
25637   new_path="${new_path/%.exe/}"
25638 
25639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25640 
25641   # First separate the path from the arguments. This will split at the first
25642   # space.
25643   complete="$NM"
25644   path="${complete%% *}"
25645   tmp="$complete EOL"
25646   arguments="${tmp#* }"
25647 
25648   # Input might be given as Windows format, start by converting to
25649   # unix format.
25650   new_path="$path"
25651 
25652   windows_path="$new_path"
25653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25654     unix_path=`$CYGPATH -u "$windows_path"`
25655     new_path="$unix_path"
25656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25658     new_path="$unix_path"
25659   fi
25660 
25661 
25662   # Now try to locate executable using which
25663   new_path=`$WHICH "$new_path" 2> /dev/null`
25664 
25665   if test "x$new_path" = x; then
25666     # Oops. Which didn't find the executable.
25667     # The splitting of arguments from the executable at a space might have been incorrect,
25668     # since paths with space are more likely in Windows. Give it another try with the whole
25669     # argument.
25670     path="$complete"
25671     arguments="EOL"
25672     new_path="$path"
25673 
25674   windows_path="$new_path"
25675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25676     unix_path=`$CYGPATH -u "$windows_path"`
25677     new_path="$unix_path"
25678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25680     new_path="$unix_path"
25681   fi
25682 
25683 
25684     new_path=`$WHICH "$new_path" 2> /dev/null`
25685 
25686     if test "x$new_path" = x; then
25687       # It's still not found. Now this is an unrecoverable error.
25688       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25689 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25690       has_space=`$ECHO "$complete" | $GREP " "`
25691       if test "x$has_space" != x; then
25692         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25693 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25694       fi
25695       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25696     fi
25697   fi
25698 
25699   # Now new_path has a complete unix path to the binary
25700   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25701     # Keep paths in /bin as-is, but remove trailing .exe if any
25702     new_path="${new_path/%.exe/}"
25703     # Do not save /bin paths to all_fixpath_prefixes!
25704   else
25705     # Not in mixed or Windows style, start by that.
25706     new_path=`cmd //c echo $new_path`
25707 
25708   input_path="$new_path"
25709   # Check if we need to convert this using DOS-style short mode. If the path
25710   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25711   # take no chances and rewrite it.
25712   # Note: m4 eats our [], so we need to use [ and ] instead.
25713   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25714   if test "x$has_forbidden_chars" != x; then
25715     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25716     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25717   fi
25718 
25719     # Output is in $new_path
25720 
25721   windows_path="$new_path"
25722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25723     unix_path=`$CYGPATH -u "$windows_path"`
25724     new_path="$unix_path"
25725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25727     new_path="$unix_path"
25728   fi
25729 
25730     # remove trailing .exe if any
25731     new_path="${new_path/%.exe/}"
25732 
25733     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25734     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25735   fi
25736 
25737   else
25738     # We're on a posix platform. Hooray! :)
25739     # First separate the path from the arguments. This will split at the first
25740     # space.
25741     complete="$NM"
25742     path="${complete%% *}"
25743     tmp="$complete EOL"
25744     arguments="${tmp#* }"
25745 
25746     # Cannot rely on the command "which" here since it doesn't always work.
25747     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25748     if test -z "$is_absolute_path"; then
25749       # Path to executable is not absolute. Find it.
25750       IFS_save="$IFS"
25751       IFS=:
25752       for p in $PATH; do
25753         if test -f "$p/$path" && test -x "$p/$path"; then
25754           new_path="$p/$path"
25755           break
25756         fi
25757       done
25758       IFS="$IFS_save"
25759     else
25760       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25761 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25762       new_path="$path"
25763     fi
25764 
25765     if test "x$new_path" = x; then
25766         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25767 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25768         has_space=`$ECHO "$complete" | $GREP " "`
25769         if test "x$has_space" != x; then
25770           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25771 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25772         fi
25773         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25774       fi
25775   fi
25776 
25777       # Now join together the path and the arguments once again
25778       if test "x$arguments" != xEOL; then
25779         new_complete="$new_path ${arguments% *}"
25780       else
25781         new_complete="$new_path"
25782       fi
25783 
25784   if test "x$complete" != "x$new_complete"; then
25785       NM="$new_complete"
25786       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25787 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25788     fi
25789 
25790     # Extract the first word of "gnm", so it can be a program name with args.
25791 set dummy gnm; ac_word=$2
25792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25793 $as_echo_n "checking for $ac_word... " >&6; }
25794 if test "${ac_cv_path_GNM+set}" = set; then :
25795   $as_echo_n "(cached) " >&6
25796 else
25797   case $GNM in
25798   [\\/]* | ?:[\\/]*)
25799   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25800   ;;
25801   *)
25802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25803 for as_dir in $PATH
25804 do
25805   IFS=$as_save_IFS
25806   test -z "$as_dir" && as_dir=.
25807     for ac_exec_ext in '' $ac_executable_extensions; do
25808   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25809     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25811     break 2
25812   fi
25813 done
25814   done
25815 IFS=$as_save_IFS
25816 
25817   ;;
25818 esac
25819 fi
25820 GNM=$ac_cv_path_GNM
25821 if test -n "$GNM"; then
25822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25823 $as_echo "$GNM" >&6; }
25824 else
25825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25826 $as_echo "no" >&6; }
25827 fi
25828 
25829 
25830 
25831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25832 
25833   # First separate the path from the arguments. This will split at the first
25834   # space.
25835   complete="$GNM"
25836   path="${complete%% *}"
25837   tmp="$complete EOL"
25838   arguments="${tmp#* }"
25839 
25840   # Input might be given as Windows format, start by converting to
25841   # unix format.
25842   new_path=`$CYGPATH -u "$path"`
25843 
25844   # Now try to locate executable using which
25845   new_path=`$WHICH "$new_path" 2> /dev/null`
25846   # bat and cmd files are not always considered executable in cygwin causing which
25847   # to not find them
25848   if test "x$new_path" = x \
25849            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25850            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25851     new_path=`$CYGPATH -u "$path"`
25852   fi
25853   if test "x$new_path" = x; then
25854     # Oops. Which didn't find the executable.
25855     # The splitting of arguments from the executable at a space might have been incorrect,
25856     # since paths with space are more likely in Windows. Give it another try with the whole
25857     # argument.
25858     path="$complete"
25859     arguments="EOL"
25860     new_path=`$CYGPATH -u "$path"`
25861     new_path=`$WHICH "$new_path" 2> /dev/null`
25862     # bat and cmd files are not always considered executable in cygwin causing which
25863     # to not find them
25864     if test "x$new_path" = x \
25865              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25866              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25867       new_path=`$CYGPATH -u "$path"`
25868     fi
25869     if test "x$new_path" = x; then
25870       # It's still not found. Now this is an unrecoverable error.
25871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25872 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25873       has_space=`$ECHO "$complete" | $GREP " "`
25874       if test "x$has_space" != x; then
25875         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25876 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25877       fi
25878       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25879     fi
25880   fi
25881 
25882   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25883   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25884   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25885   # "foo.exe" is OK but "foo" is an error.
25886   #
25887   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25888   # It is also a way to make sure we got the proper file name for the real test later on.
25889   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25890   if test "x$test_shortpath" = x; then
25891     # Short path failed, file does not exist as specified.
25892     # Try adding .exe or .cmd
25893     if test -f "${new_path}.exe"; then
25894        input_to_shortpath="${new_path}.exe"
25895     elif test -f "${new_path}.cmd"; then
25896        input_to_shortpath="${new_path}.cmd"
25897     else
25898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25899 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25900       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25901 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25902       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25903     fi
25904   else
25905     input_to_shortpath="$new_path"
25906   fi
25907 
25908   # Call helper function which possibly converts this using DOS-style short mode.
25909   # If so, the updated path is stored in $new_path.
25910   new_path="$input_to_shortpath"
25911 
25912   input_path="$input_to_shortpath"
25913   # Check if we need to convert this using DOS-style short mode. If the path
25914   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25915   # take no chances and rewrite it.
25916   # Note: m4 eats our [], so we need to use [ and ] instead.
25917   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25918   if test "x$has_forbidden_chars" != x; then
25919     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25920     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25921     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25922     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25923       # Going to short mode and back again did indeed matter. Since short mode is
25924       # case insensitive, let's make it lowercase to improve readability.
25925       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25926       # Now convert it back to Unix-stile (cygpath)
25927       input_path=`$CYGPATH -u "$shortmode_path"`
25928       new_path="$input_path"
25929     fi
25930   fi
25931 
25932   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25933   if test "x$test_cygdrive_prefix" = x; then
25934     # As a simple fix, exclude /usr/bin since it's not a real path.
25935     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25936       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25937       # a path prefixed by /cygdrive for fixpath to work.
25938       new_path="$CYGWIN_ROOT_PATH$input_path"
25939     fi
25940   fi
25941 
25942   # remove trailing .exe if any
25943   new_path="${new_path/%.exe/}"
25944 
25945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25946 
25947   # First separate the path from the arguments. This will split at the first
25948   # space.
25949   complete="$GNM"
25950   path="${complete%% *}"
25951   tmp="$complete EOL"
25952   arguments="${tmp#* }"
25953 
25954   # Input might be given as Windows format, start by converting to
25955   # unix format.
25956   new_path="$path"
25957 
25958   windows_path="$new_path"
25959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25960     unix_path=`$CYGPATH -u "$windows_path"`
25961     new_path="$unix_path"
25962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25964     new_path="$unix_path"
25965   fi
25966 
25967 
25968   # Now try to locate executable using which
25969   new_path=`$WHICH "$new_path" 2> /dev/null`
25970 
25971   if test "x$new_path" = x; then
25972     # Oops. Which didn't find the executable.
25973     # The splitting of arguments from the executable at a space might have been incorrect,
25974     # since paths with space are more likely in Windows. Give it another try with the whole
25975     # argument.
25976     path="$complete"
25977     arguments="EOL"
25978     new_path="$path"
25979 
25980   windows_path="$new_path"
25981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25982     unix_path=`$CYGPATH -u "$windows_path"`
25983     new_path="$unix_path"
25984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25986     new_path="$unix_path"
25987   fi
25988 
25989 
25990     new_path=`$WHICH "$new_path" 2> /dev/null`
25991 
25992     if test "x$new_path" = x; then
25993       # It's still not found. Now this is an unrecoverable error.
25994       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25995 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25996       has_space=`$ECHO "$complete" | $GREP " "`
25997       if test "x$has_space" != x; then
25998         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25999 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26000       fi
26001       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26002     fi
26003   fi
26004 
26005   # Now new_path has a complete unix path to the binary
26006   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26007     # Keep paths in /bin as-is, but remove trailing .exe if any
26008     new_path="${new_path/%.exe/}"
26009     # Do not save /bin paths to all_fixpath_prefixes!
26010   else
26011     # Not in mixed or Windows style, start by that.
26012     new_path=`cmd //c echo $new_path`
26013 
26014   input_path="$new_path"
26015   # Check if we need to convert this using DOS-style short mode. If the path
26016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26017   # take no chances and rewrite it.
26018   # Note: m4 eats our [], so we need to use [ and ] instead.
26019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26020   if test "x$has_forbidden_chars" != x; then
26021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26022     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26023   fi
26024 
26025     # Output is in $new_path
26026 
26027   windows_path="$new_path"
26028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26029     unix_path=`$CYGPATH -u "$windows_path"`
26030     new_path="$unix_path"
26031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26033     new_path="$unix_path"
26034   fi
26035 
26036     # remove trailing .exe if any
26037     new_path="${new_path/%.exe/}"
26038 
26039     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26040     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26041   fi
26042 
26043   else
26044     # We're on a posix platform. Hooray! :)
26045     # First separate the path from the arguments. This will split at the first
26046     # space.
26047     complete="$GNM"
26048     path="${complete%% *}"
26049     tmp="$complete EOL"
26050     arguments="${tmp#* }"
26051 
26052     # Cannot rely on the command "which" here since it doesn't always work.
26053     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26054     if test -z "$is_absolute_path"; then
26055       # Path to executable is not absolute. Find it.
26056       IFS_save="$IFS"
26057       IFS=:
26058       for p in $PATH; do
26059         if test -f "$p/$path" && test -x "$p/$path"; then
26060           new_path="$p/$path"
26061           break
26062         fi
26063       done
26064       IFS="$IFS_save"
26065     else
26066       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26067 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26068       new_path="$path"
26069     fi
26070 
26071     if test "x$new_path" = x; then
26072         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26073 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26074         has_space=`$ECHO "$complete" | $GREP " "`
26075         if test "x$has_space" != x; then
26076           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26077 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26078         fi
26079         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26080       fi
26081   fi
26082 
26083       # Now join together the path and the arguments once again
26084       if test "x$arguments" != xEOL; then
26085         new_complete="$new_path ${arguments% *}"
26086       else
26087         new_complete="$new_path"
26088       fi
26089 
26090   if test "x$complete" != "x$new_complete"; then
26091       GNM="$new_complete"
26092       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26093 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26094     fi
26095 
26096     # Extract the first word of "strip", so it can be a program name with args.
26097 set dummy strip; ac_word=$2
26098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26099 $as_echo_n "checking for $ac_word... " >&6; }
26100 if test "${ac_cv_path_STRIP+set}" = set; then :
26101   $as_echo_n "(cached) " >&6
26102 else
26103   case $STRIP in
26104   [\\/]* | ?:[\\/]*)
26105   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26106   ;;
26107   *)
26108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26109 for as_dir in $PATH
26110 do
26111   IFS=$as_save_IFS
26112   test -z "$as_dir" && as_dir=.
26113     for ac_exec_ext in '' $ac_executable_extensions; do
26114   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26115     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26117     break 2
26118   fi
26119 done
26120   done
26121 IFS=$as_save_IFS
26122 
26123   ;;
26124 esac
26125 fi
26126 STRIP=$ac_cv_path_STRIP
26127 if test -n "$STRIP"; then
26128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26129 $as_echo "$STRIP" >&6; }
26130 else
26131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26132 $as_echo "no" >&6; }
26133 fi
26134 
26135 
26136 
26137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26138 
26139   # First separate the path from the arguments. This will split at the first
26140   # space.
26141   complete="$STRIP"
26142   path="${complete%% *}"
26143   tmp="$complete EOL"
26144   arguments="${tmp#* }"
26145 
26146   # Input might be given as Windows format, start by converting to
26147   # unix format.
26148   new_path=`$CYGPATH -u "$path"`
26149 
26150   # Now try to locate executable using which
26151   new_path=`$WHICH "$new_path" 2> /dev/null`
26152   # bat and cmd files are not always considered executable in cygwin causing which
26153   # to not find them
26154   if test "x$new_path" = x \
26155            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26156            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26157     new_path=`$CYGPATH -u "$path"`
26158   fi
26159   if test "x$new_path" = x; then
26160     # Oops. Which didn't find the executable.
26161     # The splitting of arguments from the executable at a space might have been incorrect,
26162     # since paths with space are more likely in Windows. Give it another try with the whole
26163     # argument.
26164     path="$complete"
26165     arguments="EOL"
26166     new_path=`$CYGPATH -u "$path"`
26167     new_path=`$WHICH "$new_path" 2> /dev/null`
26168     # bat and cmd files are not always considered executable in cygwin causing which
26169     # to not find them
26170     if test "x$new_path" = x \
26171              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26172              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26173       new_path=`$CYGPATH -u "$path"`
26174     fi
26175     if test "x$new_path" = x; then
26176       # It's still not found. Now this is an unrecoverable error.
26177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26178 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26179       has_space=`$ECHO "$complete" | $GREP " "`
26180       if test "x$has_space" != x; then
26181         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26182 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26183       fi
26184       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26185     fi
26186   fi
26187 
26188   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26189   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26190   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26191   # "foo.exe" is OK but "foo" is an error.
26192   #
26193   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26194   # It is also a way to make sure we got the proper file name for the real test later on.
26195   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26196   if test "x$test_shortpath" = x; then
26197     # Short path failed, file does not exist as specified.
26198     # Try adding .exe or .cmd
26199     if test -f "${new_path}.exe"; then
26200        input_to_shortpath="${new_path}.exe"
26201     elif test -f "${new_path}.cmd"; then
26202        input_to_shortpath="${new_path}.cmd"
26203     else
26204       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26205 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26206       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26207 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26208       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26209     fi
26210   else
26211     input_to_shortpath="$new_path"
26212   fi
26213 
26214   # Call helper function which possibly converts this using DOS-style short mode.
26215   # If so, the updated path is stored in $new_path.
26216   new_path="$input_to_shortpath"
26217 
26218   input_path="$input_to_shortpath"
26219   # Check if we need to convert this using DOS-style short mode. If the path
26220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26221   # take no chances and rewrite it.
26222   # Note: m4 eats our [], so we need to use [ and ] instead.
26223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26224   if test "x$has_forbidden_chars" != x; then
26225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26226     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26227     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26228     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26229       # Going to short mode and back again did indeed matter. Since short mode is
26230       # case insensitive, let's make it lowercase to improve readability.
26231       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26232       # Now convert it back to Unix-stile (cygpath)
26233       input_path=`$CYGPATH -u "$shortmode_path"`
26234       new_path="$input_path"
26235     fi
26236   fi
26237 
26238   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26239   if test "x$test_cygdrive_prefix" = x; then
26240     # As a simple fix, exclude /usr/bin since it's not a real path.
26241     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26242       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26243       # a path prefixed by /cygdrive for fixpath to work.
26244       new_path="$CYGWIN_ROOT_PATH$input_path"
26245     fi
26246   fi
26247 
26248   # remove trailing .exe if any
26249   new_path="${new_path/%.exe/}"
26250 
26251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26252 
26253   # First separate the path from the arguments. This will split at the first
26254   # space.
26255   complete="$STRIP"
26256   path="${complete%% *}"
26257   tmp="$complete EOL"
26258   arguments="${tmp#* }"
26259 
26260   # Input might be given as Windows format, start by converting to
26261   # unix format.
26262   new_path="$path"
26263 
26264   windows_path="$new_path"
26265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26266     unix_path=`$CYGPATH -u "$windows_path"`
26267     new_path="$unix_path"
26268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26269     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26270     new_path="$unix_path"
26271   fi
26272 
26273 
26274   # Now try to locate executable using which
26275   new_path=`$WHICH "$new_path" 2> /dev/null`
26276 
26277   if test "x$new_path" = x; then
26278     # Oops. Which didn't find the executable.
26279     # The splitting of arguments from the executable at a space might have been incorrect,
26280     # since paths with space are more likely in Windows. Give it another try with the whole
26281     # argument.
26282     path="$complete"
26283     arguments="EOL"
26284     new_path="$path"
26285 
26286   windows_path="$new_path"
26287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26288     unix_path=`$CYGPATH -u "$windows_path"`
26289     new_path="$unix_path"
26290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26292     new_path="$unix_path"
26293   fi
26294 
26295 
26296     new_path=`$WHICH "$new_path" 2> /dev/null`
26297 
26298     if test "x$new_path" = x; then
26299       # It's still not found. Now this is an unrecoverable error.
26300       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26301 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26302       has_space=`$ECHO "$complete" | $GREP " "`
26303       if test "x$has_space" != x; then
26304         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26305 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26306       fi
26307       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26308     fi
26309   fi
26310 
26311   # Now new_path has a complete unix path to the binary
26312   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26313     # Keep paths in /bin as-is, but remove trailing .exe if any
26314     new_path="${new_path/%.exe/}"
26315     # Do not save /bin paths to all_fixpath_prefixes!
26316   else
26317     # Not in mixed or Windows style, start by that.
26318     new_path=`cmd //c echo $new_path`
26319 
26320   input_path="$new_path"
26321   # Check if we need to convert this using DOS-style short mode. If the path
26322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26323   # take no chances and rewrite it.
26324   # Note: m4 eats our [], so we need to use [ and ] instead.
26325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26326   if test "x$has_forbidden_chars" != x; then
26327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26328     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26329   fi
26330 
26331     # Output is in $new_path
26332 
26333   windows_path="$new_path"
26334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26335     unix_path=`$CYGPATH -u "$windows_path"`
26336     new_path="$unix_path"
26337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26339     new_path="$unix_path"
26340   fi
26341 
26342     # remove trailing .exe if any
26343     new_path="${new_path/%.exe/}"
26344 
26345     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26346     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26347   fi
26348 
26349   else
26350     # We're on a posix platform. Hooray! :)
26351     # First separate the path from the arguments. This will split at the first
26352     # space.
26353     complete="$STRIP"
26354     path="${complete%% *}"
26355     tmp="$complete EOL"
26356     arguments="${tmp#* }"
26357 
26358     # Cannot rely on the command "which" here since it doesn't always work.
26359     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26360     if test -z "$is_absolute_path"; then
26361       # Path to executable is not absolute. Find it.
26362       IFS_save="$IFS"
26363       IFS=:
26364       for p in $PATH; do
26365         if test -f "$p/$path" && test -x "$p/$path"; then
26366           new_path="$p/$path"
26367           break
26368         fi
26369       done
26370       IFS="$IFS_save"
26371     else
26372       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26373 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26374       new_path="$path"
26375     fi
26376 
26377     if test "x$new_path" = x; then
26378         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26379 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26380         has_space=`$ECHO "$complete" | $GREP " "`
26381         if test "x$has_space" != x; then
26382           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26383 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26384         fi
26385         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26386       fi
26387   fi
26388 
26389       # Now join together the path and the arguments once again
26390       if test "x$arguments" != xEOL; then
26391         new_complete="$new_path ${arguments% *}"
26392       else
26393         new_complete="$new_path"
26394       fi
26395 
26396   if test "x$complete" != "x$new_complete"; then
26397       STRIP="$new_complete"
26398       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26399 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26400     fi
26401 
26402     # Extract the first word of "mcs", so it can be a program name with args.
26403 set dummy mcs; ac_word=$2
26404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26405 $as_echo_n "checking for $ac_word... " >&6; }
26406 if test "${ac_cv_path_MCS+set}" = set; then :
26407   $as_echo_n "(cached) " >&6
26408 else
26409   case $MCS in
26410   [\\/]* | ?:[\\/]*)
26411   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26412   ;;
26413   *)
26414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26415 for as_dir in $PATH
26416 do
26417   IFS=$as_save_IFS
26418   test -z "$as_dir" && as_dir=.
26419     for ac_exec_ext in '' $ac_executable_extensions; do
26420   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26421     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26423     break 2
26424   fi
26425 done
26426   done
26427 IFS=$as_save_IFS
26428 
26429   ;;
26430 esac
26431 fi
26432 MCS=$ac_cv_path_MCS
26433 if test -n "$MCS"; then
26434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26435 $as_echo "$MCS" >&6; }
26436 else
26437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26438 $as_echo "no" >&6; }
26439 fi
26440 
26441 
26442 
26443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26444 
26445   # First separate the path from the arguments. This will split at the first
26446   # space.
26447   complete="$MCS"
26448   path="${complete%% *}"
26449   tmp="$complete EOL"
26450   arguments="${tmp#* }"
26451 
26452   # Input might be given as Windows format, start by converting to
26453   # unix format.
26454   new_path=`$CYGPATH -u "$path"`
26455 
26456   # Now try to locate executable using which
26457   new_path=`$WHICH "$new_path" 2> /dev/null`
26458   # bat and cmd files are not always considered executable in cygwin causing which
26459   # to not find them
26460   if test "x$new_path" = x \
26461            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26462            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26463     new_path=`$CYGPATH -u "$path"`
26464   fi
26465   if test "x$new_path" = x; then
26466     # Oops. Which didn't find the executable.
26467     # The splitting of arguments from the executable at a space might have been incorrect,
26468     # since paths with space are more likely in Windows. Give it another try with the whole
26469     # argument.
26470     path="$complete"
26471     arguments="EOL"
26472     new_path=`$CYGPATH -u "$path"`
26473     new_path=`$WHICH "$new_path" 2> /dev/null`
26474     # bat and cmd files are not always considered executable in cygwin causing which
26475     # to not find them
26476     if test "x$new_path" = x \
26477              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26478              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26479       new_path=`$CYGPATH -u "$path"`
26480     fi
26481     if test "x$new_path" = x; then
26482       # It's still not found. Now this is an unrecoverable error.
26483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26484 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26485       has_space=`$ECHO "$complete" | $GREP " "`
26486       if test "x$has_space" != x; then
26487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26489       fi
26490       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26491     fi
26492   fi
26493 
26494   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26495   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26496   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26497   # "foo.exe" is OK but "foo" is an error.
26498   #
26499   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26500   # It is also a way to make sure we got the proper file name for the real test later on.
26501   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26502   if test "x$test_shortpath" = x; then
26503     # Short path failed, file does not exist as specified.
26504     # Try adding .exe or .cmd
26505     if test -f "${new_path}.exe"; then
26506        input_to_shortpath="${new_path}.exe"
26507     elif test -f "${new_path}.cmd"; then
26508        input_to_shortpath="${new_path}.cmd"
26509     else
26510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26511 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26512       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26513 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26514       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26515     fi
26516   else
26517     input_to_shortpath="$new_path"
26518   fi
26519 
26520   # Call helper function which possibly converts this using DOS-style short mode.
26521   # If so, the updated path is stored in $new_path.
26522   new_path="$input_to_shortpath"
26523 
26524   input_path="$input_to_shortpath"
26525   # Check if we need to convert this using DOS-style short mode. If the path
26526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26527   # take no chances and rewrite it.
26528   # Note: m4 eats our [], so we need to use [ and ] instead.
26529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26530   if test "x$has_forbidden_chars" != x; then
26531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26532     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26533     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26534     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26535       # Going to short mode and back again did indeed matter. Since short mode is
26536       # case insensitive, let's make it lowercase to improve readability.
26537       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26538       # Now convert it back to Unix-stile (cygpath)
26539       input_path=`$CYGPATH -u "$shortmode_path"`
26540       new_path="$input_path"
26541     fi
26542   fi
26543 
26544   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26545   if test "x$test_cygdrive_prefix" = x; then
26546     # As a simple fix, exclude /usr/bin since it's not a real path.
26547     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26548       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26549       # a path prefixed by /cygdrive for fixpath to work.
26550       new_path="$CYGWIN_ROOT_PATH$input_path"
26551     fi
26552   fi
26553 
26554   # remove trailing .exe if any
26555   new_path="${new_path/%.exe/}"
26556 
26557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26558 
26559   # First separate the path from the arguments. This will split at the first
26560   # space.
26561   complete="$MCS"
26562   path="${complete%% *}"
26563   tmp="$complete EOL"
26564   arguments="${tmp#* }"
26565 
26566   # Input might be given as Windows format, start by converting to
26567   # unix format.
26568   new_path="$path"
26569 
26570   windows_path="$new_path"
26571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26572     unix_path=`$CYGPATH -u "$windows_path"`
26573     new_path="$unix_path"
26574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26576     new_path="$unix_path"
26577   fi
26578 
26579 
26580   # Now try to locate executable using which
26581   new_path=`$WHICH "$new_path" 2> /dev/null`
26582 
26583   if test "x$new_path" = x; then
26584     # Oops. Which didn't find the executable.
26585     # The splitting of arguments from the executable at a space might have been incorrect,
26586     # since paths with space are more likely in Windows. Give it another try with the whole
26587     # argument.
26588     path="$complete"
26589     arguments="EOL"
26590     new_path="$path"
26591 
26592   windows_path="$new_path"
26593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26594     unix_path=`$CYGPATH -u "$windows_path"`
26595     new_path="$unix_path"
26596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26598     new_path="$unix_path"
26599   fi
26600 
26601 
26602     new_path=`$WHICH "$new_path" 2> /dev/null`
26603 
26604     if test "x$new_path" = x; then
26605       # It's still not found. Now this is an unrecoverable error.
26606       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26607 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26608       has_space=`$ECHO "$complete" | $GREP " "`
26609       if test "x$has_space" != x; then
26610         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26611 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26612       fi
26613       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26614     fi
26615   fi
26616 
26617   # Now new_path has a complete unix path to the binary
26618   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26619     # Keep paths in /bin as-is, but remove trailing .exe if any
26620     new_path="${new_path/%.exe/}"
26621     # Do not save /bin paths to all_fixpath_prefixes!
26622   else
26623     # Not in mixed or Windows style, start by that.
26624     new_path=`cmd //c echo $new_path`
26625 
26626   input_path="$new_path"
26627   # Check if we need to convert this using DOS-style short mode. If the path
26628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26629   # take no chances and rewrite it.
26630   # Note: m4 eats our [], so we need to use [ and ] instead.
26631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26632   if test "x$has_forbidden_chars" != x; then
26633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26634     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26635   fi
26636 
26637     # Output is in $new_path
26638 
26639   windows_path="$new_path"
26640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26641     unix_path=`$CYGPATH -u "$windows_path"`
26642     new_path="$unix_path"
26643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26645     new_path="$unix_path"
26646   fi
26647 
26648     # remove trailing .exe if any
26649     new_path="${new_path/%.exe/}"
26650 
26651     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26652     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26653   fi
26654 
26655   else
26656     # We're on a posix platform. Hooray! :)
26657     # First separate the path from the arguments. This will split at the first
26658     # space.
26659     complete="$MCS"
26660     path="${complete%% *}"
26661     tmp="$complete EOL"
26662     arguments="${tmp#* }"
26663 
26664     # Cannot rely on the command "which" here since it doesn't always work.
26665     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26666     if test -z "$is_absolute_path"; then
26667       # Path to executable is not absolute. Find it.
26668       IFS_save="$IFS"
26669       IFS=:
26670       for p in $PATH; do
26671         if test -f "$p/$path" && test -x "$p/$path"; then
26672           new_path="$p/$path"
26673           break
26674         fi
26675       done
26676       IFS="$IFS_save"
26677     else
26678       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26679 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26680       new_path="$path"
26681     fi
26682 
26683     if test "x$new_path" = x; then
26684         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26685 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26686         has_space=`$ECHO "$complete" | $GREP " "`
26687         if test "x$has_space" != x; then
26688           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26689 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26690         fi
26691         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26692       fi
26693   fi
26694 
26695       # Now join together the path and the arguments once again
26696       if test "x$arguments" != xEOL; then
26697         new_complete="$new_path ${arguments% *}"
26698       else
26699         new_complete="$new_path"
26700       fi
26701 
26702   if test "x$complete" != "x$new_complete"; then
26703       MCS="$new_complete"
26704       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26705 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26706     fi
26707 
26708 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26709     if test -n "$ac_tool_prefix"; then
26710   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26711 set dummy ${ac_tool_prefix}nm; ac_word=$2
26712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26713 $as_echo_n "checking for $ac_word... " >&6; }
26714 if test "${ac_cv_prog_NM+set}" = set; then :
26715   $as_echo_n "(cached) " >&6
26716 else
26717   if test -n "$NM"; then
26718   ac_cv_prog_NM="$NM" # Let the user override the test.
26719 else
26720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26721 for as_dir in $PATH
26722 do
26723   IFS=$as_save_IFS
26724   test -z "$as_dir" && as_dir=.
26725     for ac_exec_ext in '' $ac_executable_extensions; do
26726   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26727     ac_cv_prog_NM="${ac_tool_prefix}nm"
26728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26729     break 2
26730   fi
26731 done
26732   done
26733 IFS=$as_save_IFS
26734 
26735 fi
26736 fi
26737 NM=$ac_cv_prog_NM
26738 if test -n "$NM"; then
26739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26740 $as_echo "$NM" >&6; }
26741 else
26742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26743 $as_echo "no" >&6; }
26744 fi
26745 
26746 
26747 fi
26748 if test -z "$ac_cv_prog_NM"; then
26749   ac_ct_NM=$NM
26750   # Extract the first word of "nm", so it can be a program name with args.
26751 set dummy nm; ac_word=$2
26752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26753 $as_echo_n "checking for $ac_word... " >&6; }
26754 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26755   $as_echo_n "(cached) " >&6
26756 else
26757   if test -n "$ac_ct_NM"; then
26758   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26759 else
26760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26761 for as_dir in $PATH
26762 do
26763   IFS=$as_save_IFS
26764   test -z "$as_dir" && as_dir=.
26765     for ac_exec_ext in '' $ac_executable_extensions; do
26766   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26767     ac_cv_prog_ac_ct_NM="nm"
26768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26769     break 2
26770   fi
26771 done
26772   done
26773 IFS=$as_save_IFS
26774 
26775 fi
26776 fi
26777 ac_ct_NM=$ac_cv_prog_ac_ct_NM
26778 if test -n "$ac_ct_NM"; then
26779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26780 $as_echo "$ac_ct_NM" >&6; }
26781 else
26782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26783 $as_echo "no" >&6; }
26784 fi
26785 
26786   if test "x$ac_ct_NM" = x; then
26787     NM=""
26788   else
26789     case $cross_compiling:$ac_tool_warned in
26790 yes:)
26791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26792 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26793 ac_tool_warned=yes ;;
26794 esac
26795     NM=$ac_ct_NM
26796   fi
26797 else
26798   NM="$ac_cv_prog_NM"
26799 fi
26800 
26801 
26802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26803 
26804   # First separate the path from the arguments. This will split at the first
26805   # space.
26806   complete="$NM"
26807   path="${complete%% *}"
26808   tmp="$complete EOL"
26809   arguments="${tmp#* }"
26810 
26811   # Input might be given as Windows format, start by converting to
26812   # unix format.
26813   new_path=`$CYGPATH -u "$path"`
26814 
26815   # Now try to locate executable using which
26816   new_path=`$WHICH "$new_path" 2> /dev/null`
26817   # bat and cmd files are not always considered executable in cygwin causing which
26818   # to not find them
26819   if test "x$new_path" = x \
26820            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26821            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26822     new_path=`$CYGPATH -u "$path"`
26823   fi
26824   if test "x$new_path" = x; then
26825     # Oops. Which didn't find the executable.
26826     # The splitting of arguments from the executable at a space might have been incorrect,
26827     # since paths with space are more likely in Windows. Give it another try with the whole
26828     # argument.
26829     path="$complete"
26830     arguments="EOL"
26831     new_path=`$CYGPATH -u "$path"`
26832     new_path=`$WHICH "$new_path" 2> /dev/null`
26833     # bat and cmd files are not always considered executable in cygwin causing which
26834     # to not find them
26835     if test "x$new_path" = x \
26836              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26837              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26838       new_path=`$CYGPATH -u "$path"`
26839     fi
26840     if test "x$new_path" = x; then
26841       # It's still not found. Now this is an unrecoverable error.
26842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26843 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26844       has_space=`$ECHO "$complete" | $GREP " "`
26845       if test "x$has_space" != x; then
26846         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26847 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26848       fi
26849       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26850     fi
26851   fi
26852 
26853   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26854   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26855   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26856   # "foo.exe" is OK but "foo" is an error.
26857   #
26858   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26859   # It is also a way to make sure we got the proper file name for the real test later on.
26860   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26861   if test "x$test_shortpath" = x; then
26862     # Short path failed, file does not exist as specified.
26863     # Try adding .exe or .cmd
26864     if test -f "${new_path}.exe"; then
26865        input_to_shortpath="${new_path}.exe"
26866     elif test -f "${new_path}.cmd"; then
26867        input_to_shortpath="${new_path}.cmd"
26868     else
26869       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26870 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26871       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26872 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26873       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26874     fi
26875   else
26876     input_to_shortpath="$new_path"
26877   fi
26878 
26879   # Call helper function which possibly converts this using DOS-style short mode.
26880   # If so, the updated path is stored in $new_path.
26881   new_path="$input_to_shortpath"
26882 
26883   input_path="$input_to_shortpath"
26884   # Check if we need to convert this using DOS-style short mode. If the path
26885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26886   # take no chances and rewrite it.
26887   # Note: m4 eats our [], so we need to use [ and ] instead.
26888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26889   if test "x$has_forbidden_chars" != x; then
26890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26891     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26892     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26893     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26894       # Going to short mode and back again did indeed matter. Since short mode is
26895       # case insensitive, let's make it lowercase to improve readability.
26896       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26897       # Now convert it back to Unix-stile (cygpath)
26898       input_path=`$CYGPATH -u "$shortmode_path"`
26899       new_path="$input_path"
26900     fi
26901   fi
26902 
26903   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26904   if test "x$test_cygdrive_prefix" = x; then
26905     # As a simple fix, exclude /usr/bin since it's not a real path.
26906     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26907       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26908       # a path prefixed by /cygdrive for fixpath to work.
26909       new_path="$CYGWIN_ROOT_PATH$input_path"
26910     fi
26911   fi
26912 
26913   # remove trailing .exe if any
26914   new_path="${new_path/%.exe/}"
26915 
26916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26917 
26918   # First separate the path from the arguments. This will split at the first
26919   # space.
26920   complete="$NM"
26921   path="${complete%% *}"
26922   tmp="$complete EOL"
26923   arguments="${tmp#* }"
26924 
26925   # Input might be given as Windows format, start by converting to
26926   # unix format.
26927   new_path="$path"
26928 
26929   windows_path="$new_path"
26930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26931     unix_path=`$CYGPATH -u "$windows_path"`
26932     new_path="$unix_path"
26933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26935     new_path="$unix_path"
26936   fi
26937 
26938 
26939   # Now try to locate executable using which
26940   new_path=`$WHICH "$new_path" 2> /dev/null`
26941 
26942   if test "x$new_path" = x; then
26943     # Oops. Which didn't find the executable.
26944     # The splitting of arguments from the executable at a space might have been incorrect,
26945     # since paths with space are more likely in Windows. Give it another try with the whole
26946     # argument.
26947     path="$complete"
26948     arguments="EOL"
26949     new_path="$path"
26950 
26951   windows_path="$new_path"
26952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26953     unix_path=`$CYGPATH -u "$windows_path"`
26954     new_path="$unix_path"
26955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26957     new_path="$unix_path"
26958   fi
26959 
26960 
26961     new_path=`$WHICH "$new_path" 2> /dev/null`
26962 
26963     if test "x$new_path" = x; then
26964       # It's still not found. Now this is an unrecoverable error.
26965       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26966 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26967       has_space=`$ECHO "$complete" | $GREP " "`
26968       if test "x$has_space" != x; then
26969         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26970 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26971       fi
26972       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26973     fi
26974   fi
26975 
26976   # Now new_path has a complete unix path to the binary
26977   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26978     # Keep paths in /bin as-is, but remove trailing .exe if any
26979     new_path="${new_path/%.exe/}"
26980     # Do not save /bin paths to all_fixpath_prefixes!
26981   else
26982     # Not in mixed or Windows style, start by that.
26983     new_path=`cmd //c echo $new_path`
26984 
26985   input_path="$new_path"
26986   # Check if we need to convert this using DOS-style short mode. If the path
26987   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26988   # take no chances and rewrite it.
26989   # Note: m4 eats our [], so we need to use [ and ] instead.
26990   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26991   if test "x$has_forbidden_chars" != x; then
26992     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26993     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26994   fi
26995 
26996     # Output is in $new_path
26997 
26998   windows_path="$new_path"
26999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27000     unix_path=`$CYGPATH -u "$windows_path"`
27001     new_path="$unix_path"
27002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27004     new_path="$unix_path"
27005   fi
27006 
27007     # remove trailing .exe if any
27008     new_path="${new_path/%.exe/}"
27009 
27010     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27011     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27012   fi
27013 
27014   else
27015     # We're on a posix platform. Hooray! :)
27016     # First separate the path from the arguments. This will split at the first
27017     # space.
27018     complete="$NM"
27019     path="${complete%% *}"
27020     tmp="$complete EOL"
27021     arguments="${tmp#* }"
27022 
27023     # Cannot rely on the command "which" here since it doesn't always work.
27024     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27025     if test -z "$is_absolute_path"; then
27026       # Path to executable is not absolute. Find it.
27027       IFS_save="$IFS"
27028       IFS=:
27029       for p in $PATH; do
27030         if test -f "$p/$path" && test -x "$p/$path"; then
27031           new_path="$p/$path"
27032           break
27033         fi
27034       done
27035       IFS="$IFS_save"
27036     else
27037       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27038 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27039       new_path="$path"
27040     fi
27041 
27042     if test "x$new_path" = x; then
27043         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27044 $as_echo "$as_me: The path of NM, 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}: This might be caused by spaces in the path, which is not allowed." >&5
27048 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27049         fi
27050         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27051       fi
27052   fi
27053 
27054       # Now join together the path and the arguments once again
27055       if test "x$arguments" != xEOL; then
27056         new_complete="$new_path ${arguments% *}"
27057       else
27058         new_complete="$new_path"
27059       fi
27060 
27061   if test "x$complete" != "x$new_complete"; then
27062       NM="$new_complete"
27063       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27064 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27065     fi
27066 
27067     GNM="$NM"
27068 
27069     if test -n "$ac_tool_prefix"; then
27070   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27071 set dummy ${ac_tool_prefix}strip; ac_word=$2
27072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27073 $as_echo_n "checking for $ac_word... " >&6; }
27074 if test "${ac_cv_prog_STRIP+set}" = set; then :
27075   $as_echo_n "(cached) " >&6
27076 else
27077   if test -n "$STRIP"; then
27078   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27079 else
27080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27081 for as_dir in $PATH
27082 do
27083   IFS=$as_save_IFS
27084   test -z "$as_dir" && as_dir=.
27085     for ac_exec_ext in '' $ac_executable_extensions; do
27086   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27087     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27089     break 2
27090   fi
27091 done
27092   done
27093 IFS=$as_save_IFS
27094 
27095 fi
27096 fi
27097 STRIP=$ac_cv_prog_STRIP
27098 if test -n "$STRIP"; then
27099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27100 $as_echo "$STRIP" >&6; }
27101 else
27102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27103 $as_echo "no" >&6; }
27104 fi
27105 
27106 
27107 fi
27108 if test -z "$ac_cv_prog_STRIP"; then
27109   ac_ct_STRIP=$STRIP
27110   # Extract the first word of "strip", so it can be a program name with args.
27111 set dummy strip; ac_word=$2
27112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27113 $as_echo_n "checking for $ac_word... " >&6; }
27114 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27115   $as_echo_n "(cached) " >&6
27116 else
27117   if test -n "$ac_ct_STRIP"; then
27118   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27119 else
27120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27121 for as_dir in $PATH
27122 do
27123   IFS=$as_save_IFS
27124   test -z "$as_dir" && as_dir=.
27125     for ac_exec_ext in '' $ac_executable_extensions; do
27126   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27127     ac_cv_prog_ac_ct_STRIP="strip"
27128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27129     break 2
27130   fi
27131 done
27132   done
27133 IFS=$as_save_IFS
27134 
27135 fi
27136 fi
27137 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27138 if test -n "$ac_ct_STRIP"; then
27139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27140 $as_echo "$ac_ct_STRIP" >&6; }
27141 else
27142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27143 $as_echo "no" >&6; }
27144 fi
27145 
27146   if test "x$ac_ct_STRIP" = x; then
27147     STRIP=""
27148   else
27149     case $cross_compiling:$ac_tool_warned in
27150 yes:)
27151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27152 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27153 ac_tool_warned=yes ;;
27154 esac
27155     STRIP=$ac_ct_STRIP
27156   fi
27157 else
27158   STRIP="$ac_cv_prog_STRIP"
27159 fi
27160 
27161 
27162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27163 
27164   # First separate the path from the arguments. This will split at the first
27165   # space.
27166   complete="$STRIP"
27167   path="${complete%% *}"
27168   tmp="$complete EOL"
27169   arguments="${tmp#* }"
27170 
27171   # Input might be given as Windows format, start by converting to
27172   # unix format.
27173   new_path=`$CYGPATH -u "$path"`
27174 
27175   # Now try to locate executable using which
27176   new_path=`$WHICH "$new_path" 2> /dev/null`
27177   # bat and cmd files are not always considered executable in cygwin causing which
27178   # to not find them
27179   if test "x$new_path" = x \
27180            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27181            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27182     new_path=`$CYGPATH -u "$path"`
27183   fi
27184   if test "x$new_path" = x; then
27185     # Oops. Which didn't find the executable.
27186     # The splitting of arguments from the executable at a space might have been incorrect,
27187     # since paths with space are more likely in Windows. Give it another try with the whole
27188     # argument.
27189     path="$complete"
27190     arguments="EOL"
27191     new_path=`$CYGPATH -u "$path"`
27192     new_path=`$WHICH "$new_path" 2> /dev/null`
27193     # bat and cmd files are not always considered executable in cygwin causing which
27194     # to not find them
27195     if test "x$new_path" = x \
27196              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27197              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27198       new_path=`$CYGPATH -u "$path"`
27199     fi
27200     if test "x$new_path" = x; then
27201       # It's still not found. Now this is an unrecoverable error.
27202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27203 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27204       has_space=`$ECHO "$complete" | $GREP " "`
27205       if test "x$has_space" != x; then
27206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27208       fi
27209       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27210     fi
27211   fi
27212 
27213   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27214   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27215   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27216   # "foo.exe" is OK but "foo" is an error.
27217   #
27218   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27219   # It is also a way to make sure we got the proper file name for the real test later on.
27220   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27221   if test "x$test_shortpath" = x; then
27222     # Short path failed, file does not exist as specified.
27223     # Try adding .exe or .cmd
27224     if test -f "${new_path}.exe"; then
27225        input_to_shortpath="${new_path}.exe"
27226     elif test -f "${new_path}.cmd"; then
27227        input_to_shortpath="${new_path}.cmd"
27228     else
27229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27230 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27231       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27232 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27233       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27234     fi
27235   else
27236     input_to_shortpath="$new_path"
27237   fi
27238 
27239   # Call helper function which possibly converts this using DOS-style short mode.
27240   # If so, the updated path is stored in $new_path.
27241   new_path="$input_to_shortpath"
27242 
27243   input_path="$input_to_shortpath"
27244   # Check if we need to convert this using DOS-style short mode. If the path
27245   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27246   # take no chances and rewrite it.
27247   # Note: m4 eats our [], so we need to use [ and ] instead.
27248   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27249   if test "x$has_forbidden_chars" != x; then
27250     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27251     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27252     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27253     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27254       # Going to short mode and back again did indeed matter. Since short mode is
27255       # case insensitive, let's make it lowercase to improve readability.
27256       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27257       # Now convert it back to Unix-stile (cygpath)
27258       input_path=`$CYGPATH -u "$shortmode_path"`
27259       new_path="$input_path"
27260     fi
27261   fi
27262 
27263   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27264   if test "x$test_cygdrive_prefix" = x; then
27265     # As a simple fix, exclude /usr/bin since it's not a real path.
27266     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27267       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27268       # a path prefixed by /cygdrive for fixpath to work.
27269       new_path="$CYGWIN_ROOT_PATH$input_path"
27270     fi
27271   fi
27272 
27273   # remove trailing .exe if any
27274   new_path="${new_path/%.exe/}"
27275 
27276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27277 
27278   # First separate the path from the arguments. This will split at the first
27279   # space.
27280   complete="$STRIP"
27281   path="${complete%% *}"
27282   tmp="$complete EOL"
27283   arguments="${tmp#* }"
27284 
27285   # Input might be given as Windows format, start by converting to
27286   # unix format.
27287   new_path="$path"
27288 
27289   windows_path="$new_path"
27290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27291     unix_path=`$CYGPATH -u "$windows_path"`
27292     new_path="$unix_path"
27293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27295     new_path="$unix_path"
27296   fi
27297 
27298 
27299   # Now try to locate executable using which
27300   new_path=`$WHICH "$new_path" 2> /dev/null`
27301 
27302   if test "x$new_path" = x; then
27303     # Oops. Which didn't find the executable.
27304     # The splitting of arguments from the executable at a space might have been incorrect,
27305     # since paths with space are more likely in Windows. Give it another try with the whole
27306     # argument.
27307     path="$complete"
27308     arguments="EOL"
27309     new_path="$path"
27310 
27311   windows_path="$new_path"
27312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27313     unix_path=`$CYGPATH -u "$windows_path"`
27314     new_path="$unix_path"
27315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27317     new_path="$unix_path"
27318   fi
27319 
27320 
27321     new_path=`$WHICH "$new_path" 2> /dev/null`
27322 
27323     if test "x$new_path" = x; then
27324       # It's still not found. Now this is an unrecoverable error.
27325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27326 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27327       has_space=`$ECHO "$complete" | $GREP " "`
27328       if test "x$has_space" != x; then
27329         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27330 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27331       fi
27332       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27333     fi
27334   fi
27335 
27336   # Now new_path has a complete unix path to the binary
27337   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27338     # Keep paths in /bin as-is, but remove trailing .exe if any
27339     new_path="${new_path/%.exe/}"
27340     # Do not save /bin paths to all_fixpath_prefixes!
27341   else
27342     # Not in mixed or Windows style, start by that.
27343     new_path=`cmd //c echo $new_path`
27344 
27345   input_path="$new_path"
27346   # Check if we need to convert this using DOS-style short mode. If the path
27347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27348   # take no chances and rewrite it.
27349   # Note: m4 eats our [], so we need to use [ and ] instead.
27350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27351   if test "x$has_forbidden_chars" != x; then
27352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27354   fi
27355 
27356     # Output is in $new_path
27357 
27358   windows_path="$new_path"
27359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27360     unix_path=`$CYGPATH -u "$windows_path"`
27361     new_path="$unix_path"
27362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27364     new_path="$unix_path"
27365   fi
27366 
27367     # remove trailing .exe if any
27368     new_path="${new_path/%.exe/}"
27369 
27370     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27371     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27372   fi
27373 
27374   else
27375     # We're on a posix platform. Hooray! :)
27376     # First separate the path from the arguments. This will split at the first
27377     # space.
27378     complete="$STRIP"
27379     path="${complete%% *}"
27380     tmp="$complete EOL"
27381     arguments="${tmp#* }"
27382 
27383     # Cannot rely on the command "which" here since it doesn't always work.
27384     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27385     if test -z "$is_absolute_path"; then
27386       # Path to executable is not absolute. Find it.
27387       IFS_save="$IFS"
27388       IFS=:
27389       for p in $PATH; do
27390         if test -f "$p/$path" && test -x "$p/$path"; then
27391           new_path="$p/$path"
27392           break
27393         fi
27394       done
27395       IFS="$IFS_save"
27396     else
27397       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27398 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27399       new_path="$path"
27400     fi
27401 
27402     if test "x$new_path" = x; then
27403         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27404 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27405         has_space=`$ECHO "$complete" | $GREP " "`
27406         if test "x$has_space" != x; then
27407           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27408 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27409         fi
27410         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27411       fi
27412   fi
27413 
27414       # Now join together the path and the arguments once again
27415       if test "x$arguments" != xEOL; then
27416         new_complete="$new_path ${arguments% *}"
27417       else
27418         new_complete="$new_path"
27419       fi
27420 
27421   if test "x$complete" != "x$new_complete"; then
27422       STRIP="$new_complete"
27423       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27424 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27425     fi
27426 
27427 fi
27428 
27429 # objcopy is used for moving debug symbols to separate files when
27430 # full debug symbols are enabled.
27431 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27432     if test -n "$ac_tool_prefix"; then
27433   for ac_prog in gobjcopy objcopy
27434   do
27435     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27436 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27438 $as_echo_n "checking for $ac_word... " >&6; }
27439 if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27440   $as_echo_n "(cached) " >&6
27441 else
27442   if test -n "$OBJCOPY"; then
27443   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27444 else
27445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27446 for as_dir in $PATH
27447 do
27448   IFS=$as_save_IFS
27449   test -z "$as_dir" && as_dir=.
27450     for ac_exec_ext in '' $ac_executable_extensions; do
27451   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27452     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27454     break 2
27455   fi
27456 done
27457   done
27458 IFS=$as_save_IFS
27459 
27460 fi
27461 fi
27462 OBJCOPY=$ac_cv_prog_OBJCOPY
27463 if test -n "$OBJCOPY"; then
27464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27465 $as_echo "$OBJCOPY" >&6; }
27466 else
27467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27468 $as_echo "no" >&6; }
27469 fi
27470 
27471 
27472     test -n "$OBJCOPY" && break
27473   done
27474 fi
27475 if test -z "$OBJCOPY"; then
27476   ac_ct_OBJCOPY=$OBJCOPY
27477   for ac_prog in gobjcopy objcopy
27478 do
27479   # Extract the first word of "$ac_prog", so it can be a program name with args.
27480 set dummy $ac_prog; ac_word=$2
27481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27482 $as_echo_n "checking for $ac_word... " >&6; }
27483 if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27484   $as_echo_n "(cached) " >&6
27485 else
27486   if test -n "$ac_ct_OBJCOPY"; then
27487   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27488 else
27489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27490 for as_dir in $PATH
27491 do
27492   IFS=$as_save_IFS
27493   test -z "$as_dir" && as_dir=.
27494     for ac_exec_ext in '' $ac_executable_extensions; do
27495   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27496     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27498     break 2
27499   fi
27500 done
27501   done
27502 IFS=$as_save_IFS
27503 
27504 fi
27505 fi
27506 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27507 if test -n "$ac_ct_OBJCOPY"; then
27508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27509 $as_echo "$ac_ct_OBJCOPY" >&6; }
27510 else
27511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27512 $as_echo "no" >&6; }
27513 fi
27514 
27515 
27516   test -n "$ac_ct_OBJCOPY" && break
27517 done
27518 
27519   if test "x$ac_ct_OBJCOPY" = x; then
27520     OBJCOPY=""
27521   else
27522     case $cross_compiling:$ac_tool_warned in
27523 yes:)
27524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27525 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27526 ac_tool_warned=yes ;;
27527 esac
27528     OBJCOPY=$ac_ct_OBJCOPY
27529   fi
27530 fi
27531 
27532     # Only call fixup if objcopy was found.
27533     if test -n "$OBJCOPY"; then
27534 
27535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27536 
27537   # First separate the path from the arguments. This will split at the first
27538   # space.
27539   complete="$OBJCOPY"
27540   path="${complete%% *}"
27541   tmp="$complete EOL"
27542   arguments="${tmp#* }"
27543 
27544   # Input might be given as Windows format, start by converting to
27545   # unix format.
27546   new_path=`$CYGPATH -u "$path"`
27547 
27548   # Now try to locate executable using which
27549   new_path=`$WHICH "$new_path" 2> /dev/null`
27550   # bat and cmd files are not always considered executable in cygwin causing which
27551   # to not find them
27552   if test "x$new_path" = x \
27553            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27554            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27555     new_path=`$CYGPATH -u "$path"`
27556   fi
27557   if test "x$new_path" = x; then
27558     # Oops. Which didn't find the executable.
27559     # The splitting of arguments from the executable at a space might have been incorrect,
27560     # since paths with space are more likely in Windows. Give it another try with the whole
27561     # argument.
27562     path="$complete"
27563     arguments="EOL"
27564     new_path=`$CYGPATH -u "$path"`
27565     new_path=`$WHICH "$new_path" 2> /dev/null`
27566     # bat and cmd files are not always considered executable in cygwin causing which
27567     # to not find them
27568     if test "x$new_path" = x \
27569              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27570              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27571       new_path=`$CYGPATH -u "$path"`
27572     fi
27573     if test "x$new_path" = x; then
27574       # It's still not found. Now this is an unrecoverable error.
27575       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27576 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27577       has_space=`$ECHO "$complete" | $GREP " "`
27578       if test "x$has_space" != x; then
27579         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27580 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27581       fi
27582       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27583     fi
27584   fi
27585 
27586   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27587   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27588   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27589   # "foo.exe" is OK but "foo" is an error.
27590   #
27591   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27592   # It is also a way to make sure we got the proper file name for the real test later on.
27593   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27594   if test "x$test_shortpath" = x; then
27595     # Short path failed, file does not exist as specified.
27596     # Try adding .exe or .cmd
27597     if test -f "${new_path}.exe"; then
27598        input_to_shortpath="${new_path}.exe"
27599     elif test -f "${new_path}.cmd"; then
27600        input_to_shortpath="${new_path}.cmd"
27601     else
27602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27603 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27604       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27605 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27606       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27607     fi
27608   else
27609     input_to_shortpath="$new_path"
27610   fi
27611 
27612   # Call helper function which possibly converts this using DOS-style short mode.
27613   # If so, the updated path is stored in $new_path.
27614   new_path="$input_to_shortpath"
27615 
27616   input_path="$input_to_shortpath"
27617   # Check if we need to convert this using DOS-style short mode. If the path
27618   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27619   # take no chances and rewrite it.
27620   # Note: m4 eats our [], so we need to use [ and ] instead.
27621   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27622   if test "x$has_forbidden_chars" != x; then
27623     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27624     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27625     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27626     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27627       # Going to short mode and back again did indeed matter. Since short mode is
27628       # case insensitive, let's make it lowercase to improve readability.
27629       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27630       # Now convert it back to Unix-stile (cygpath)
27631       input_path=`$CYGPATH -u "$shortmode_path"`
27632       new_path="$input_path"
27633     fi
27634   fi
27635 
27636   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27637   if test "x$test_cygdrive_prefix" = x; then
27638     # As a simple fix, exclude /usr/bin since it's not a real path.
27639     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27640       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27641       # a path prefixed by /cygdrive for fixpath to work.
27642       new_path="$CYGWIN_ROOT_PATH$input_path"
27643     fi
27644   fi
27645 
27646   # remove trailing .exe if any
27647   new_path="${new_path/%.exe/}"
27648 
27649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27650 
27651   # First separate the path from the arguments. This will split at the first
27652   # space.
27653   complete="$OBJCOPY"
27654   path="${complete%% *}"
27655   tmp="$complete EOL"
27656   arguments="${tmp#* }"
27657 
27658   # Input might be given as Windows format, start by converting to
27659   # unix format.
27660   new_path="$path"
27661 
27662   windows_path="$new_path"
27663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27664     unix_path=`$CYGPATH -u "$windows_path"`
27665     new_path="$unix_path"
27666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27668     new_path="$unix_path"
27669   fi
27670 
27671 
27672   # Now try to locate executable using which
27673   new_path=`$WHICH "$new_path" 2> /dev/null`
27674 
27675   if test "x$new_path" = x; then
27676     # Oops. Which didn't find the executable.
27677     # The splitting of arguments from the executable at a space might have been incorrect,
27678     # since paths with space are more likely in Windows. Give it another try with the whole
27679     # argument.
27680     path="$complete"
27681     arguments="EOL"
27682     new_path="$path"
27683 
27684   windows_path="$new_path"
27685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27686     unix_path=`$CYGPATH -u "$windows_path"`
27687     new_path="$unix_path"
27688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27690     new_path="$unix_path"
27691   fi
27692 
27693 
27694     new_path=`$WHICH "$new_path" 2> /dev/null`
27695 
27696     if test "x$new_path" = x; then
27697       # It's still not found. Now this is an unrecoverable error.
27698       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27699 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27700       has_space=`$ECHO "$complete" | $GREP " "`
27701       if test "x$has_space" != x; then
27702         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27703 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27704       fi
27705       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27706     fi
27707   fi
27708 
27709   # Now new_path has a complete unix path to the binary
27710   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27711     # Keep paths in /bin as-is, but remove trailing .exe if any
27712     new_path="${new_path/%.exe/}"
27713     # Do not save /bin paths to all_fixpath_prefixes!
27714   else
27715     # Not in mixed or Windows style, start by that.
27716     new_path=`cmd //c echo $new_path`
27717 
27718   input_path="$new_path"
27719   # Check if we need to convert this using DOS-style short mode. If the path
27720   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27721   # take no chances and rewrite it.
27722   # Note: m4 eats our [], so we need to use [ and ] instead.
27723   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27724   if test "x$has_forbidden_chars" != x; then
27725     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27726     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27727   fi
27728 
27729     # Output is in $new_path
27730 
27731   windows_path="$new_path"
27732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27733     unix_path=`$CYGPATH -u "$windows_path"`
27734     new_path="$unix_path"
27735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27737     new_path="$unix_path"
27738   fi
27739 
27740     # remove trailing .exe if any
27741     new_path="${new_path/%.exe/}"
27742 
27743     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27744     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27745   fi
27746 
27747   else
27748     # We're on a posix platform. Hooray! :)
27749     # First separate the path from the arguments. This will split at the first
27750     # space.
27751     complete="$OBJCOPY"
27752     path="${complete%% *}"
27753     tmp="$complete EOL"
27754     arguments="${tmp#* }"
27755 
27756     # Cannot rely on the command "which" here since it doesn't always work.
27757     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27758     if test -z "$is_absolute_path"; then
27759       # Path to executable is not absolute. Find it.
27760       IFS_save="$IFS"
27761       IFS=:
27762       for p in $PATH; do
27763         if test -f "$p/$path" && test -x "$p/$path"; then
27764           new_path="$p/$path"
27765           break
27766         fi
27767       done
27768       IFS="$IFS_save"
27769     else
27770       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27771 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27772       new_path="$path"
27773     fi
27774 
27775     if test "x$new_path" = x; then
27776         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27777 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27778         has_space=`$ECHO "$complete" | $GREP " "`
27779         if test "x$has_space" != x; then
27780           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27781 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27782         fi
27783         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27784       fi
27785   fi
27786 
27787       # Now join together the path and the arguments once again
27788       if test "x$arguments" != xEOL; then
27789         new_complete="$new_path ${arguments% *}"
27790       else
27791         new_complete="$new_path"
27792       fi
27793 
27794   if test "x$complete" != "x$new_complete"; then
27795       OBJCOPY="$new_complete"
27796       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27797 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27798     fi
27799 
27800     fi
27801 fi
27802 
27803 if test -n "$ac_tool_prefix"; then
27804   for ac_prog in gobjdump objdump
27805   do
27806     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27807 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27809 $as_echo_n "checking for $ac_word... " >&6; }
27810 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27811   $as_echo_n "(cached) " >&6
27812 else
27813   if test -n "$OBJDUMP"; then
27814   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27815 else
27816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27817 for as_dir in $PATH
27818 do
27819   IFS=$as_save_IFS
27820   test -z "$as_dir" && as_dir=.
27821     for ac_exec_ext in '' $ac_executable_extensions; do
27822   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27823     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27825     break 2
27826   fi
27827 done
27828   done
27829 IFS=$as_save_IFS
27830 
27831 fi
27832 fi
27833 OBJDUMP=$ac_cv_prog_OBJDUMP
27834 if test -n "$OBJDUMP"; then
27835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27836 $as_echo "$OBJDUMP" >&6; }
27837 else
27838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27839 $as_echo "no" >&6; }
27840 fi
27841 
27842 
27843     test -n "$OBJDUMP" && break
27844   done
27845 fi
27846 if test -z "$OBJDUMP"; then
27847   ac_ct_OBJDUMP=$OBJDUMP
27848   for ac_prog in gobjdump objdump
27849 do
27850   # Extract the first word of "$ac_prog", so it can be a program name with args.
27851 set dummy $ac_prog; ac_word=$2
27852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27853 $as_echo_n "checking for $ac_word... " >&6; }
27854 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27855   $as_echo_n "(cached) " >&6
27856 else
27857   if test -n "$ac_ct_OBJDUMP"; then
27858   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27859 else
27860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27861 for as_dir in $PATH
27862 do
27863   IFS=$as_save_IFS
27864   test -z "$as_dir" && as_dir=.
27865     for ac_exec_ext in '' $ac_executable_extensions; do
27866   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27867     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27869     break 2
27870   fi
27871 done
27872   done
27873 IFS=$as_save_IFS
27874 
27875 fi
27876 fi
27877 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27878 if test -n "$ac_ct_OBJDUMP"; then
27879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27880 $as_echo "$ac_ct_OBJDUMP" >&6; }
27881 else
27882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27883 $as_echo "no" >&6; }
27884 fi
27885 
27886 
27887   test -n "$ac_ct_OBJDUMP" && break
27888 done
27889 
27890   if test "x$ac_ct_OBJDUMP" = x; then
27891     OBJDUMP=""
27892   else
27893     case $cross_compiling:$ac_tool_warned in
27894 yes:)
27895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27896 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27897 ac_tool_warned=yes ;;
27898 esac
27899     OBJDUMP=$ac_ct_OBJDUMP
27900   fi
27901 fi
27902 
27903 if test "x$OBJDUMP" != x; then
27904   # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27905 
27906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27907 
27908   # First separate the path from the arguments. This will split at the first
27909   # space.
27910   complete="$OBJDUMP"
27911   path="${complete%% *}"
27912   tmp="$complete EOL"
27913   arguments="${tmp#* }"
27914 
27915   # Input might be given as Windows format, start by converting to
27916   # unix format.
27917   new_path=`$CYGPATH -u "$path"`
27918 
27919   # Now try to locate executable using which
27920   new_path=`$WHICH "$new_path" 2> /dev/null`
27921   # bat and cmd files are not always considered executable in cygwin causing which
27922   # to not find them
27923   if test "x$new_path" = x \
27924            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27925            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27926     new_path=`$CYGPATH -u "$path"`
27927   fi
27928   if test "x$new_path" = x; then
27929     # Oops. Which didn't find the executable.
27930     # The splitting of arguments from the executable at a space might have been incorrect,
27931     # since paths with space are more likely in Windows. Give it another try with the whole
27932     # argument.
27933     path="$complete"
27934     arguments="EOL"
27935     new_path=`$CYGPATH -u "$path"`
27936     new_path=`$WHICH "$new_path" 2> /dev/null`
27937     # bat and cmd files are not always considered executable in cygwin causing which
27938     # to not find them
27939     if test "x$new_path" = x \
27940              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27941              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27942       new_path=`$CYGPATH -u "$path"`
27943     fi
27944     if test "x$new_path" = x; then
27945       # It's still not found. Now this is an unrecoverable error.
27946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27947 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27948       has_space=`$ECHO "$complete" | $GREP " "`
27949       if test "x$has_space" != x; then
27950         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27951 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27952       fi
27953       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27954     fi
27955   fi
27956 
27957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27960   # "foo.exe" is OK but "foo" is an error.
27961   #
27962   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27963   # It is also a way to make sure we got the proper file name for the real test later on.
27964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27965   if test "x$test_shortpath" = x; then
27966     # Short path failed, file does not exist as specified.
27967     # Try adding .exe or .cmd
27968     if test -f "${new_path}.exe"; then
27969        input_to_shortpath="${new_path}.exe"
27970     elif test -f "${new_path}.cmd"; then
27971        input_to_shortpath="${new_path}.cmd"
27972     else
27973       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27974 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27975       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27976 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27977       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27978     fi
27979   else
27980     input_to_shortpath="$new_path"
27981   fi
27982 
27983   # Call helper function which possibly converts this using DOS-style short mode.
27984   # If so, the updated path is stored in $new_path.
27985   new_path="$input_to_shortpath"
27986 
27987   input_path="$input_to_shortpath"
27988   # Check if we need to convert this using DOS-style short mode. If the path
27989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27990   # take no chances and rewrite it.
27991   # Note: m4 eats our [], so we need to use [ and ] instead.
27992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27993   if test "x$has_forbidden_chars" != x; then
27994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27998       # Going to short mode and back again did indeed matter. Since short mode is
27999       # case insensitive, let's make it lowercase to improve readability.
28000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28001       # Now convert it back to Unix-stile (cygpath)
28002       input_path=`$CYGPATH -u "$shortmode_path"`
28003       new_path="$input_path"
28004     fi
28005   fi
28006 
28007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28008   if test "x$test_cygdrive_prefix" = x; then
28009     # As a simple fix, exclude /usr/bin since it's not a real path.
28010     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28012       # a path prefixed by /cygdrive for fixpath to work.
28013       new_path="$CYGWIN_ROOT_PATH$input_path"
28014     fi
28015   fi
28016 
28017   # remove trailing .exe if any
28018   new_path="${new_path/%.exe/}"
28019 
28020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28021 
28022   # First separate the path from the arguments. This will split at the first
28023   # space.
28024   complete="$OBJDUMP"
28025   path="${complete%% *}"
28026   tmp="$complete EOL"
28027   arguments="${tmp#* }"
28028 
28029   # Input might be given as Windows format, start by converting to
28030   # unix format.
28031   new_path="$path"
28032 
28033   windows_path="$new_path"
28034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28035     unix_path=`$CYGPATH -u "$windows_path"`
28036     new_path="$unix_path"
28037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28039     new_path="$unix_path"
28040   fi
28041 
28042 
28043   # Now try to locate executable using which
28044   new_path=`$WHICH "$new_path" 2> /dev/null`
28045 
28046   if test "x$new_path" = x; then
28047     # Oops. Which didn't find the executable.
28048     # The splitting of arguments from the executable at a space might have been incorrect,
28049     # since paths with space are more likely in Windows. Give it another try with the whole
28050     # argument.
28051     path="$complete"
28052     arguments="EOL"
28053     new_path="$path"
28054 
28055   windows_path="$new_path"
28056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28057     unix_path=`$CYGPATH -u "$windows_path"`
28058     new_path="$unix_path"
28059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28061     new_path="$unix_path"
28062   fi
28063 
28064 
28065     new_path=`$WHICH "$new_path" 2> /dev/null`
28066 
28067     if test "x$new_path" = x; then
28068       # It's still not found. Now this is an unrecoverable error.
28069       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28070 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28071       has_space=`$ECHO "$complete" | $GREP " "`
28072       if test "x$has_space" != x; then
28073         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28074 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28075       fi
28076       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28077     fi
28078   fi
28079 
28080   # Now new_path has a complete unix path to the binary
28081   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28082     # Keep paths in /bin as-is, but remove trailing .exe if any
28083     new_path="${new_path/%.exe/}"
28084     # Do not save /bin paths to all_fixpath_prefixes!
28085   else
28086     # Not in mixed or Windows style, start by that.
28087     new_path=`cmd //c echo $new_path`
28088 
28089   input_path="$new_path"
28090   # Check if we need to convert this using DOS-style short mode. If the path
28091   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28092   # take no chances and rewrite it.
28093   # Note: m4 eats our [], so we need to use [ and ] instead.
28094   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28095   if test "x$has_forbidden_chars" != x; then
28096     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28097     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28098   fi
28099 
28100     # Output is in $new_path
28101 
28102   windows_path="$new_path"
28103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28104     unix_path=`$CYGPATH -u "$windows_path"`
28105     new_path="$unix_path"
28106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28108     new_path="$unix_path"
28109   fi
28110 
28111     # remove trailing .exe if any
28112     new_path="${new_path/%.exe/}"
28113 
28114     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28115     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28116   fi
28117 
28118   else
28119     # We're on a posix platform. Hooray! :)
28120     # First separate the path from the arguments. This will split at the first
28121     # space.
28122     complete="$OBJDUMP"
28123     path="${complete%% *}"
28124     tmp="$complete EOL"
28125     arguments="${tmp#* }"
28126 
28127     # Cannot rely on the command "which" here since it doesn't always work.
28128     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28129     if test -z "$is_absolute_path"; then
28130       # Path to executable is not absolute. Find it.
28131       IFS_save="$IFS"
28132       IFS=:
28133       for p in $PATH; do
28134         if test -f "$p/$path" && test -x "$p/$path"; then
28135           new_path="$p/$path"
28136           break
28137         fi
28138       done
28139       IFS="$IFS_save"
28140     else
28141       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28142 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28143       new_path="$path"
28144     fi
28145 
28146     if test "x$new_path" = x; then
28147         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28148 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28149         has_space=`$ECHO "$complete" | $GREP " "`
28150         if test "x$has_space" != x; then
28151           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28152 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28153         fi
28154         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28155       fi
28156   fi
28157 
28158       # Now join together the path and the arguments once again
28159       if test "x$arguments" != xEOL; then
28160         new_complete="$new_path ${arguments% *}"
28161       else
28162         new_complete="$new_path"
28163       fi
28164 
28165   if test "x$complete" != "x$new_complete"; then
28166       OBJDUMP="$new_complete"
28167       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28168 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28169     fi
28170 
28171 fi
28172 
28173 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28174    # Extract the first word of "lipo", so it can be a program name with args.
28175 set dummy lipo; ac_word=$2
28176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28177 $as_echo_n "checking for $ac_word... " >&6; }
28178 if test "${ac_cv_path_LIPO+set}" = set; then :
28179   $as_echo_n "(cached) " >&6
28180 else
28181   case $LIPO in
28182   [\\/]* | ?:[\\/]*)
28183   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28184   ;;
28185   *)
28186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28187 for as_dir in $PATH
28188 do
28189   IFS=$as_save_IFS
28190   test -z "$as_dir" && as_dir=.
28191     for ac_exec_ext in '' $ac_executable_extensions; do
28192   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28193     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28195     break 2
28196   fi
28197 done
28198   done
28199 IFS=$as_save_IFS
28200 
28201   ;;
28202 esac
28203 fi
28204 LIPO=$ac_cv_path_LIPO
28205 if test -n "$LIPO"; then
28206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28207 $as_echo "$LIPO" >&6; }
28208 else
28209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28210 $as_echo "no" >&6; }
28211 fi
28212 
28213 
28214 
28215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28216 
28217   # First separate the path from the arguments. This will split at the first
28218   # space.
28219   complete="$LIPO"
28220   path="${complete%% *}"
28221   tmp="$complete EOL"
28222   arguments="${tmp#* }"
28223 
28224   # Input might be given as Windows format, start by converting to
28225   # unix format.
28226   new_path=`$CYGPATH -u "$path"`
28227 
28228   # Now try to locate executable using which
28229   new_path=`$WHICH "$new_path" 2> /dev/null`
28230   # bat and cmd files are not always considered executable in cygwin causing which
28231   # to not find them
28232   if test "x$new_path" = x \
28233            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28234            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28235     new_path=`$CYGPATH -u "$path"`
28236   fi
28237   if test "x$new_path" = x; then
28238     # Oops. Which didn't find the executable.
28239     # The splitting of arguments from the executable at a space might have been incorrect,
28240     # since paths with space are more likely in Windows. Give it another try with the whole
28241     # argument.
28242     path="$complete"
28243     arguments="EOL"
28244     new_path=`$CYGPATH -u "$path"`
28245     new_path=`$WHICH "$new_path" 2> /dev/null`
28246     # bat and cmd files are not always considered executable in cygwin causing which
28247     # to not find them
28248     if test "x$new_path" = x \
28249              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28250              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28251       new_path=`$CYGPATH -u "$path"`
28252     fi
28253     if test "x$new_path" = x; then
28254       # It's still not found. Now this is an unrecoverable error.
28255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28256 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28257       has_space=`$ECHO "$complete" | $GREP " "`
28258       if test "x$has_space" != x; then
28259         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28260 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28261       fi
28262       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28263     fi
28264   fi
28265 
28266   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28267   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28268   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28269   # "foo.exe" is OK but "foo" is an error.
28270   #
28271   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28272   # It is also a way to make sure we got the proper file name for the real test later on.
28273   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28274   if test "x$test_shortpath" = x; then
28275     # Short path failed, file does not exist as specified.
28276     # Try adding .exe or .cmd
28277     if test -f "${new_path}.exe"; then
28278        input_to_shortpath="${new_path}.exe"
28279     elif test -f "${new_path}.cmd"; then
28280        input_to_shortpath="${new_path}.cmd"
28281     else
28282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28283 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28284       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28285 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28286       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28287     fi
28288   else
28289     input_to_shortpath="$new_path"
28290   fi
28291 
28292   # Call helper function which possibly converts this using DOS-style short mode.
28293   # If so, the updated path is stored in $new_path.
28294   new_path="$input_to_shortpath"
28295 
28296   input_path="$input_to_shortpath"
28297   # Check if we need to convert this using DOS-style short mode. If the path
28298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28299   # take no chances and rewrite it.
28300   # Note: m4 eats our [], so we need to use [ and ] instead.
28301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28302   if test "x$has_forbidden_chars" != x; then
28303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28304     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28305     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28306     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28307       # Going to short mode and back again did indeed matter. Since short mode is
28308       # case insensitive, let's make it lowercase to improve readability.
28309       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28310       # Now convert it back to Unix-stile (cygpath)
28311       input_path=`$CYGPATH -u "$shortmode_path"`
28312       new_path="$input_path"
28313     fi
28314   fi
28315 
28316   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28317   if test "x$test_cygdrive_prefix" = x; then
28318     # As a simple fix, exclude /usr/bin since it's not a real path.
28319     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28320       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28321       # a path prefixed by /cygdrive for fixpath to work.
28322       new_path="$CYGWIN_ROOT_PATH$input_path"
28323     fi
28324   fi
28325 
28326   # remove trailing .exe if any
28327   new_path="${new_path/%.exe/}"
28328 
28329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28330 
28331   # First separate the path from the arguments. This will split at the first
28332   # space.
28333   complete="$LIPO"
28334   path="${complete%% *}"
28335   tmp="$complete EOL"
28336   arguments="${tmp#* }"
28337 
28338   # Input might be given as Windows format, start by converting to
28339   # unix format.
28340   new_path="$path"
28341 
28342   windows_path="$new_path"
28343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28344     unix_path=`$CYGPATH -u "$windows_path"`
28345     new_path="$unix_path"
28346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28348     new_path="$unix_path"
28349   fi
28350 
28351 
28352   # Now try to locate executable using which
28353   new_path=`$WHICH "$new_path" 2> /dev/null`
28354 
28355   if test "x$new_path" = x; then
28356     # Oops. Which didn't find the executable.
28357     # The splitting of arguments from the executable at a space might have been incorrect,
28358     # since paths with space are more likely in Windows. Give it another try with the whole
28359     # argument.
28360     path="$complete"
28361     arguments="EOL"
28362     new_path="$path"
28363 
28364   windows_path="$new_path"
28365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28366     unix_path=`$CYGPATH -u "$windows_path"`
28367     new_path="$unix_path"
28368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28370     new_path="$unix_path"
28371   fi
28372 
28373 
28374     new_path=`$WHICH "$new_path" 2> /dev/null`
28375 
28376     if test "x$new_path" = x; then
28377       # It's still not found. Now this is an unrecoverable error.
28378       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28379 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28380       has_space=`$ECHO "$complete" | $GREP " "`
28381       if test "x$has_space" != x; then
28382         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28383 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28384       fi
28385       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28386     fi
28387   fi
28388 
28389   # Now new_path has a complete unix path to the binary
28390   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28391     # Keep paths in /bin as-is, but remove trailing .exe if any
28392     new_path="${new_path/%.exe/}"
28393     # Do not save /bin paths to all_fixpath_prefixes!
28394   else
28395     # Not in mixed or Windows style, start by that.
28396     new_path=`cmd //c echo $new_path`
28397 
28398   input_path="$new_path"
28399   # Check if we need to convert this using DOS-style short mode. If the path
28400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28401   # take no chances and rewrite it.
28402   # Note: m4 eats our [], so we need to use [ and ] instead.
28403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28404   if test "x$has_forbidden_chars" != x; then
28405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28407   fi
28408 
28409     # Output is in $new_path
28410 
28411   windows_path="$new_path"
28412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28413     unix_path=`$CYGPATH -u "$windows_path"`
28414     new_path="$unix_path"
28415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28417     new_path="$unix_path"
28418   fi
28419 
28420     # remove trailing .exe if any
28421     new_path="${new_path/%.exe/}"
28422 
28423     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28424     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28425   fi
28426 
28427   else
28428     # We're on a posix platform. Hooray! :)
28429     # First separate the path from the arguments. This will split at the first
28430     # space.
28431     complete="$LIPO"
28432     path="${complete%% *}"
28433     tmp="$complete EOL"
28434     arguments="${tmp#* }"
28435 
28436     # Cannot rely on the command "which" here since it doesn't always work.
28437     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28438     if test -z "$is_absolute_path"; then
28439       # Path to executable is not absolute. Find it.
28440       IFS_save="$IFS"
28441       IFS=:
28442       for p in $PATH; do
28443         if test -f "$p/$path" && test -x "$p/$path"; then
28444           new_path="$p/$path"
28445           break
28446         fi
28447       done
28448       IFS="$IFS_save"
28449     else
28450       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28451 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28452       new_path="$path"
28453     fi
28454 
28455     if test "x$new_path" = x; then
28456         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28457 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28458         has_space=`$ECHO "$complete" | $GREP " "`
28459         if test "x$has_space" != x; then
28460           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28461 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28462         fi
28463         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28464       fi
28465   fi
28466 
28467       # Now join together the path and the arguments once again
28468       if test "x$arguments" != xEOL; then
28469         new_complete="$new_path ${arguments% *}"
28470       else
28471         new_complete="$new_path"
28472       fi
28473 
28474   if test "x$complete" != "x$new_complete"; then
28475       LIPO="$new_complete"
28476       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28477 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28478     fi
28479 
28480 fi
28481 
28482 
28483 
28484 # Restore old path without tools dir
28485 PATH="$OLD_PATH"
28486 
28487 
28488 # FIXME: Currently we must test this after paths but before flags. Fix!
28489 
28490 # And we can test some aspects on the target using configure macros.
28491 
28492 
28493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28494 $as_echo_n "checking for ANSI C header files... " >&6; }
28495 if test "${ac_cv_header_stdc+set}" = set; then :
28496   $as_echo_n "(cached) " >&6
28497 else
28498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28499 /* end confdefs.h.  */
28500 #include <stdlib.h>
28501 #include <stdarg.h>
28502 #include <string.h>
28503 #include <float.h>
28504 
28505 int
28506 main ()
28507 {
28508 
28509   ;
28510   return 0;
28511 }
28512 _ACEOF
28513 if ac_fn_cxx_try_compile "$LINENO"; then :
28514   ac_cv_header_stdc=yes
28515 else
28516   ac_cv_header_stdc=no
28517 fi
28518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28519 
28520 if test $ac_cv_header_stdc = yes; then
28521   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28523 /* end confdefs.h.  */
28524 #include <string.h>
28525 
28526 _ACEOF
28527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28528   $EGREP "memchr" >/dev/null 2>&1; then :
28529 
28530 else
28531   ac_cv_header_stdc=no
28532 fi
28533 rm -f conftest*
28534 
28535 fi
28536 
28537 if test $ac_cv_header_stdc = yes; then
28538   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28540 /* end confdefs.h.  */
28541 #include <stdlib.h>
28542 
28543 _ACEOF
28544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28545   $EGREP "free" >/dev/null 2>&1; then :
28546 
28547 else
28548   ac_cv_header_stdc=no
28549 fi
28550 rm -f conftest*
28551 
28552 fi
28553 
28554 if test $ac_cv_header_stdc = yes; then
28555   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28556   if test "$cross_compiling" = yes; then :
28557   :
28558 else
28559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28560 /* end confdefs.h.  */
28561 #include <ctype.h>
28562 #include <stdlib.h>
28563 #if ((' ' & 0x0FF) == 0x020)
28564 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28565 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28566 #else
28567 # define ISLOWER(c) \
28568                    (('a' <= (c) && (c) <= 'i') \
28569                      || ('j' <= (c) && (c) <= 'r') \
28570                      || ('s' <= (c) && (c) <= 'z'))
28571 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28572 #endif
28573 
28574 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28575 int
28576 main ()
28577 {
28578   int i;
28579   for (i = 0; i < 256; i++)
28580     if (XOR (islower (i), ISLOWER (i))
28581         || toupper (i) != TOUPPER (i))
28582       return 2;
28583   return 0;
28584 }
28585 _ACEOF
28586 if ac_fn_cxx_try_run "$LINENO"; then :
28587 
28588 else
28589   ac_cv_header_stdc=no
28590 fi
28591 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28592   conftest.$ac_objext conftest.beam conftest.$ac_ext
28593 fi
28594 
28595 fi
28596 fi
28597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28598 $as_echo "$ac_cv_header_stdc" >&6; }
28599 if test $ac_cv_header_stdc = yes; then
28600 
28601 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28602 
28603 fi
28604 
28605 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28606 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28607                   inttypes.h stdint.h unistd.h
28608 do :
28609   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28610 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28611 "
28612 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28613   cat >>confdefs.h <<_ACEOF
28614 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28615 _ACEOF
28616 
28617 fi
28618 
28619 done
28620 
28621 
28622 
28623 ###############################################################################
28624 #
28625 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28626 # (The JVM can use 32 or 64 bit Java pointers but that decision
28627 # is made at runtime.)
28628 #
28629 
28630 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28631   # Always specify -m flags on Solaris
28632 
28633   # keep track of c/cxx flags that we added outselves...
28634   #   to prevent emitting warning...
28635   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28636   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28637   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28638 
28639   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28640   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28641   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28642 
28643   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28644   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28645   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28646 
28647 elif test "x$COMPILE_TYPE" = xreduced; then
28648   if test "x$OPENJDK_TARGET_OS" != xwindows; then
28649     # Specify -m if running reduced on other Posix platforms
28650 
28651   # keep track of c/cxx flags that we added outselves...
28652   #   to prevent emitting warning...
28653   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28654   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28655   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28656 
28657   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28658   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28659   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28660 
28661   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28662   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28663   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28664 
28665   fi
28666 fi
28667 
28668 # Make compilation sanity check
28669 for ac_header in stdio.h
28670 do :
28671   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28672 if test "x$ac_cv_header_stdio_h" = x""yes; then :
28673   cat >>confdefs.h <<_ACEOF
28674 #define HAVE_STDIO_H 1
28675 _ACEOF
28676 
28677 else
28678 
28679   { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28680 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28681   if test "x$COMPILE_TYPE" = xreduced; then
28682     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28683 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28684   elif test "x$COMPILE_TYPE" = xcross; then
28685     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28686 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28687   fi
28688   as_fn_error $? "Cannot continue." "$LINENO" 5
28689 
28690 fi
28691 
28692 done
28693 
28694 
28695 # The cast to long int works around a bug in the HP C Compiler
28696 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28697 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28698 # This bug is HP SR number 8606223364.
28699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28700 $as_echo_n "checking size of int *... " >&6; }
28701 if test "${ac_cv_sizeof_int_p+set}" = set; then :
28702   $as_echo_n "(cached) " >&6
28703 else
28704   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28705 
28706 else
28707   if test "$ac_cv_type_int_p" = yes; then
28708      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28709 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28710 as_fn_error 77 "cannot compute sizeof (int *)
28711 See \`config.log' for more details" "$LINENO" 5 ; }
28712    else
28713      ac_cv_sizeof_int_p=0
28714    fi
28715 fi
28716 
28717 fi
28718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28719 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28720 
28721 
28722 
28723 cat >>confdefs.h <<_ACEOF
28724 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28725 _ACEOF
28726 
28727 
28728 
28729 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28730   # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28731   SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28732 fi
28733 
28734 if test "x$SIZEOF_INT_P" = x; then
28735     # The test failed, lets stick to the assumed value.
28736     { $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
28737 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28738 else
28739     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28740 
28741     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28742         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
28743     fi
28744 fi
28745 
28746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28747 $as_echo_n "checking for target address size... " >&6; }
28748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28749 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28750 
28751 
28752 ###############################################################################
28753 #
28754 # Is the target little of big endian?
28755 #
28756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28757 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28758 if test "${ac_cv_c_bigendian+set}" = set; then :
28759   $as_echo_n "(cached) " >&6
28760 else
28761   ac_cv_c_bigendian=unknown
28762     # See if we're dealing with a universal compiler.
28763     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28764 /* end confdefs.h.  */
28765 #ifndef __APPLE_CC__
28766                not a universal capable compiler
28767              #endif
28768              typedef int dummy;
28769 
28770 _ACEOF
28771 if ac_fn_cxx_try_compile "$LINENO"; then :
28772 
28773         # Check for potential -arch flags.  It is not universal unless
28774         # there are at least two -arch flags with different values.
28775         ac_arch=
28776         ac_prev=
28777         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28778          if test -n "$ac_prev"; then
28779            case $ac_word in
28780              i?86 | x86_64 | ppc | ppc64)
28781                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28782                  ac_arch=$ac_word
28783                else
28784                  ac_cv_c_bigendian=universal
28785                  break
28786                fi
28787                ;;
28788            esac
28789            ac_prev=
28790          elif test "x$ac_word" = "x-arch"; then
28791            ac_prev=arch
28792          fi
28793        done
28794 fi
28795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28796     if test $ac_cv_c_bigendian = unknown; then
28797       # See if sys/param.h defines the BYTE_ORDER macro.
28798       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28799 /* end confdefs.h.  */
28800 #include <sys/types.h>
28801              #include <sys/param.h>
28802 
28803 int
28804 main ()
28805 {
28806 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28807                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28808                      && LITTLE_ENDIAN)
28809               bogus endian macros
28810              #endif
28811 
28812   ;
28813   return 0;
28814 }
28815 _ACEOF
28816 if ac_fn_cxx_try_compile "$LINENO"; then :
28817   # It does; now see whether it defined to BIG_ENDIAN or not.
28818          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28819 /* end confdefs.h.  */
28820 #include <sys/types.h>
28821                 #include <sys/param.h>
28822 
28823 int
28824 main ()
28825 {
28826 #if BYTE_ORDER != BIG_ENDIAN
28827                  not big endian
28828                 #endif
28829 
28830   ;
28831   return 0;
28832 }
28833 _ACEOF
28834 if ac_fn_cxx_try_compile "$LINENO"; then :
28835   ac_cv_c_bigendian=yes
28836 else
28837   ac_cv_c_bigendian=no
28838 fi
28839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28840 fi
28841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28842     fi
28843     if test $ac_cv_c_bigendian = unknown; then
28844       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28845       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28846 /* end confdefs.h.  */
28847 #include <limits.h>
28848 
28849 int
28850 main ()
28851 {
28852 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28853               bogus endian macros
28854              #endif
28855 
28856   ;
28857   return 0;
28858 }
28859 _ACEOF
28860 if ac_fn_cxx_try_compile "$LINENO"; then :
28861   # It does; now see whether it defined to _BIG_ENDIAN or not.
28862          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28863 /* end confdefs.h.  */
28864 #include <limits.h>
28865 
28866 int
28867 main ()
28868 {
28869 #ifndef _BIG_ENDIAN
28870                  not big endian
28871                 #endif
28872 
28873   ;
28874   return 0;
28875 }
28876 _ACEOF
28877 if ac_fn_cxx_try_compile "$LINENO"; then :
28878   ac_cv_c_bigendian=yes
28879 else
28880   ac_cv_c_bigendian=no
28881 fi
28882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28883 fi
28884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28885     fi
28886     if test $ac_cv_c_bigendian = unknown; then
28887       # Compile a test program.
28888       if test "$cross_compiling" = yes; then :
28889   # Try to guess by grepping values from an object file.
28890          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28891 /* end confdefs.h.  */
28892 short int ascii_mm[] =
28893                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28894                 short int ascii_ii[] =
28895                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28896                 int use_ascii (int i) {
28897                   return ascii_mm[i] + ascii_ii[i];
28898                 }
28899                 short int ebcdic_ii[] =
28900                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28901                 short int ebcdic_mm[] =
28902                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28903                 int use_ebcdic (int i) {
28904                   return ebcdic_mm[i] + ebcdic_ii[i];
28905                 }
28906                 extern int foo;
28907 
28908 int
28909 main ()
28910 {
28911 return use_ascii (foo) == use_ebcdic (foo);
28912   ;
28913   return 0;
28914 }
28915 _ACEOF
28916 if ac_fn_cxx_try_compile "$LINENO"; then :
28917   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28918               ac_cv_c_bigendian=yes
28919             fi
28920             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28921               if test "$ac_cv_c_bigendian" = unknown; then
28922                 ac_cv_c_bigendian=no
28923               else
28924                 # finding both strings is unlikely to happen, but who knows?
28925                 ac_cv_c_bigendian=unknown
28926               fi
28927             fi
28928 fi
28929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28930 else
28931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28932 /* end confdefs.h.  */
28933 $ac_includes_default
28934 int
28935 main ()
28936 {
28937 
28938              /* Are we little or big endian?  From Harbison&Steele.  */
28939              union
28940              {
28941                long int l;
28942                char c[sizeof (long int)];
28943              } u;
28944              u.l = 1;
28945              return u.c[sizeof (long int) - 1] == 1;
28946 
28947   ;
28948   return 0;
28949 }
28950 _ACEOF
28951 if ac_fn_cxx_try_run "$LINENO"; then :
28952   ac_cv_c_bigendian=no
28953 else
28954   ac_cv_c_bigendian=yes
28955 fi
28956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28957   conftest.$ac_objext conftest.beam conftest.$ac_ext
28958 fi
28959 
28960     fi
28961 fi
28962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28963 $as_echo "$ac_cv_c_bigendian" >&6; }
28964  case $ac_cv_c_bigendian in #(
28965    yes)
28966      ENDIAN="big";; #(
28967    no)
28968      ENDIAN="little" ;; #(
28969    universal)
28970      ENDIAN="universal_endianness"
28971      ;; #(
28972    *)
28973      ENDIAN="unknown" ;;
28974  esac
28975 
28976 
28977 if test "x$ENDIAN" = xuniversal_endianness; then
28978     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28979 fi
28980 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28981     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
28982 fi
28983 
28984 
28985 # Configure flags for the tools
28986 
28987 
28988 ###############################################################################
28989 #
28990 # How to compile shared libraries.
28991 #
28992 
28993 if test "x$GCC" = xyes; then
28994     COMPILER_NAME=gcc
28995     PICFLAG="-fPIC"
28996     LIBRARY_PREFIX=lib
28997     SHARED_LIBRARY='lib$1.so'
28998     STATIC_LIBRARY='lib$1.a'
28999     SHARED_LIBRARY_FLAGS="-shared"
29000     SHARED_LIBRARY_SUFFIX='.so'
29001     STATIC_LIBRARY_SUFFIX='.a'
29002     OBJ_SUFFIX='.o'
29003     EXE_SUFFIX=''
29004     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29005     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29006     C_FLAG_REORDER=''
29007     CXX_FLAG_REORDER=''
29008     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29009     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29010     LD="$CC"
29011     LDEXE="$CC"
29012     LDCXX="$CXX"
29013     LDEXECXX="$CXX"
29014     POST_STRIP_CMD="$STRIP -g"
29015 
29016     # Linking is different on MacOSX
29017     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29018         # Might change in the future to clang.
29019         COMPILER_NAME=gcc
29020         SHARED_LIBRARY='lib$1.dylib'
29021         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29022         SHARED_LIBRARY_SUFFIX='.dylib'
29023         EXE_SUFFIX=''
29024         SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29025         SET_SHARED_LIBRARY_MAPFILE=''
29026         SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29027         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29028         POST_STRIP_CMD="$STRIP -S"
29029     fi
29030 else
29031     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29032         # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29033         COMPILER_NAME=ossc
29034         PICFLAG="-KPIC"
29035         LIBRARY_PREFIX=lib
29036         SHARED_LIBRARY='lib$1.so'
29037         STATIC_LIBRARY='lib$1.a'
29038         SHARED_LIBRARY_FLAGS="-G"
29039         SHARED_LIBRARY_SUFFIX='.so'
29040         STATIC_LIBRARY_SUFFIX='.a'
29041         OBJ_SUFFIX='.o'
29042         EXE_SUFFIX=''
29043         SET_SHARED_LIBRARY_NAME=''
29044         SET_SHARED_LIBRARY_MAPFILE='-M$1'
29045         C_FLAG_REORDER='-xF'
29046         CXX_FLAG_REORDER='-xF'
29047         SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29048         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29049         CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29050         CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29051         CFLAGS_JDKLIB_EXTRA='-xstrconst'
29052         POST_STRIP_CMD="$STRIP -x"
29053         POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29054     fi
29055     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29056         # If it is not gcc, then assume it is the MS Visual Studio compiler
29057         COMPILER_NAME=cl
29058         PICFLAG=""
29059         LIBRARY_PREFIX=
29060         SHARED_LIBRARY='$1.dll'
29061         STATIC_LIBRARY='$1.lib'
29062         SHARED_LIBRARY_FLAGS="-LD"
29063         SHARED_LIBRARY_SUFFIX='.dll'
29064         STATIC_LIBRARY_SUFFIX='.lib'
29065         OBJ_SUFFIX='.obj'
29066         EXE_SUFFIX='.exe'
29067         SET_SHARED_LIBRARY_NAME=''
29068         SET_SHARED_LIBRARY_MAPFILE=''
29069         SET_SHARED_LIBRARY_ORIGIN=''
29070         SET_EXECUTABLE_ORIGIN=''
29071     fi
29072 fi
29073 
29074 
29075 
29076 
29077 
29078 
29079 
29080 
29081 
29082 
29083 
29084 
29085 
29086 
29087 
29088 
29089 
29090 
29091 
29092 # The (cross) compiler is now configured, we can now test capabilities
29093 # of the target platform.
29094 
29095 
29096 
29097 ###############################################################################
29098 #
29099 # Setup the opt flags for different compilers
29100 # and different operating systems.
29101 #
29102 
29103 #
29104 # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29105 #
29106 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29107     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29108     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29109     CFLAGS="$CFLAGS -mstackrealign"
29110     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29111 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29112     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29113 /* end confdefs.h.  */
29114 int main() { return 0; }
29115 _ACEOF
29116 if ac_fn_cxx_try_link "$LINENO"; then :
29117 
29118                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29119 $as_echo "yes" >&6; }
29120 
29121 else
29122 
29123                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29124 $as_echo "no" >&6; }
29125                         as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29126 
29127 fi
29128 rm -f core conftest.err conftest.$ac_objext \
29129     conftest$ac_exeext conftest.$ac_ext
29130 fi
29131 
29132 C_FLAG_DEPS="-MMD -MF"
29133 CXX_FLAG_DEPS="-MMD -MF"
29134 
29135 case $COMPILER_TYPE in
29136   CC )
29137     D_FLAG="-g"
29138     case $COMPILER_NAME in
29139       gcc )
29140         case $OPENJDK_TARGET_OS in
29141           macosx )
29142             # On MacOSX we optimize for size, something
29143             # we should do for all platforms?
29144             C_O_FLAG_HI="-Os"
29145             C_O_FLAG_NORM="-Os"
29146             C_O_FLAG_NONE=""
29147             ;;
29148           *)
29149             C_O_FLAG_HI="-O3"
29150             C_O_FLAG_NORM="-O2"
29151             C_O_FLAG_NONE="-O0"
29152             CFLAGS_DEBUG_SYMBOLS="-g"
29153             CXXFLAGS_DEBUG_SYMBOLS="-g"
29154             if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29155                CFLAGS_DEBUG_SYMBOLS="-g1"
29156                CXXFLAGS_DEBUG_SYMBOLS="-g1"
29157             fi
29158             ;;
29159         esac
29160         CXX_O_FLAG_HI="$C_O_FLAG_HI"
29161         CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29162         CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29163         ;;
29164       ossc )
29165         #
29166         # Forte has different names for this with their C++ compiler...
29167         #
29168         C_FLAG_DEPS="-xMMD -xMF"
29169         CXX_FLAG_DEPS="-xMMD -xMF"
29170 
29171         # Extra options used with HIGHEST
29172         #
29173         # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29174         #          done with care, there are some assumptions below that need to
29175         #          be understood about the use of pointers, and IEEE behavior.
29176         #
29177         # Use non-standard floating point mode (not IEEE 754)
29178         CC_HIGHEST="$CC_HIGHEST -fns"
29179         # Do some simplification of floating point arithmetic (not IEEE 754)
29180         CC_HIGHEST="$CC_HIGHEST -fsimple"
29181         # Use single precision floating point with 'float'
29182         CC_HIGHEST="$CC_HIGHEST -fsingle"
29183         # Assume memory references via basic pointer types do not alias
29184         #   (Source with excessing pointer casting and data access with mixed
29185         #    pointer types are not recommended)
29186         CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29187         # Use intrinsic or inline versions for math/std functions
29188         #   (If you expect perfect errno behavior, do not use this)
29189         CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29190         # Loop data dependency optimizations (need -xO3 or higher)
29191         CC_HIGHEST="$CC_HIGHEST -xdepend"
29192         # Pointer parameters to functions do not overlap
29193         #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29194         #    If you pass in multiple pointers to the same data, do not use this)
29195         CC_HIGHEST="$CC_HIGHEST -xrestrict"
29196         # Inline some library routines
29197         #   (If you expect perfect errno behavior, do not use this)
29198         CC_HIGHEST="$CC_HIGHEST -xlibmil"
29199         # Use optimized math routines
29200         #   (If you expect perfect errno behavior, do not use this)
29201         #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29202         #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29203 
29204         if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29205           CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29206           CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29207         fi
29208 
29209         case $OPENJDK_TARGET_CPU_ARCH in
29210           x86)
29211             C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29212             C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29213             C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29214             C_O_FLAG_NONE="-xregs=no%frameptr"
29215             CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29216             CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29217             CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29218             CXX_O_FLAG_NONE="-xregs=no%frameptr"
29219             if test "x$OPENJDK_TARGET_CPU" = xx86; then
29220                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29221                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29222             fi
29223             ;;
29224           sparc)
29225             CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29226             CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29227             C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29228             C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29229             C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29230             C_O_FLAG_NONE=""
29231             CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29232             CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29233             CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29234             CXX_O_FLAG_NONE=""
29235             ;;
29236         esac
29237 
29238     CFLAGS_DEBUG_SYMBOLS="-g -xs"
29239     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29240     esac
29241     ;;
29242   CL )
29243     D_FLAG=
29244     C_O_FLAG_HIGHEST="-O2"
29245     C_O_FLAG_HI="-O1"
29246     C_O_FLAG_NORM="-O1"
29247     C_O_FLAG_NONE="-Od"
29248     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29249     CXX_O_FLAG_HI="$C_O_FLAG_HI"
29250     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29251     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29252     ;;
29253 esac
29254 
29255 if test -z "$C_O_FLAG_HIGHEST"; then
29256    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29257 fi
29258 
29259 if test -z "$CXX_O_FLAG_HIGHEST"; then
29260    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29261 fi
29262 
29263 
29264 
29265 
29266 
29267 
29268 
29269 
29270 
29271 
29272 
29273 
29274 
29275 
29276 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29277    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29278 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29279 fi
29280 
29281 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29283 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29284 fi
29285 
29286 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29287    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29288 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29289 fi
29290 
29291 
29292 # Check whether --with-extra-cflags was given.
29293 if test "${with_extra_cflags+set}" = set; then :
29294   withval=$with_extra_cflags;
29295 fi
29296 
29297 
29298 
29299 # Check whether --with-extra-cxxflags was given.
29300 if test "${with_extra_cxxflags+set}" = set; then :
29301   withval=$with_extra_cxxflags;
29302 fi
29303 
29304 
29305 
29306 # Check whether --with-extra-ldflags was given.
29307 if test "${with_extra_ldflags+set}" = set; then :
29308   withval=$with_extra_ldflags;
29309 fi
29310 
29311 
29312 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29313 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29314 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29315 
29316 # Hotspot needs these set in their legacy form
29317 LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29318 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29319 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29320 
29321 
29322 
29323 
29324 
29325 ###############################################################################
29326 #
29327 # Now setup the CFLAGS and LDFLAGS for the JDK build.
29328 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29329 #
29330 case $COMPILER_NAME in
29331       gcc )
29332           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29333                           -pipe \
29334                           -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29335           case $OPENJDK_TARGET_CPU_ARCH in
29336           arm )
29337             # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29338             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29339           ;;
29340           ppc )
29341             # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29342           ;;
29343           * )
29344             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29345             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29346           ;;
29347           esac
29348           ;;
29349       ossc )
29350           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29351           case $OPENJDK_TARGET_CPU_ARCH in
29352           x86 )
29353             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29354             CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29355           ;;
29356           esac
29357 
29358           CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29359           CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29360 
29361           LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29362           LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29363           ;;
29364       cl )
29365           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29366                -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29367                -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29368                -DWIN32 -DIAL"
29369           case $OPENJDK_TARGET_CPU in
29370               x86 )
29371                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29372                   ;;
29373               x86_64 )
29374                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29375                   ;;
29376           esac
29377           ;;
29378 esac
29379 
29380 ###############################################################################
29381 
29382 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29383 
29384 # The package path is used only on macosx?
29385 PACKAGE_PATH=/opt/local
29386 
29387 
29388 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29389     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29390     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29391     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29392     #   Note: -Dmacro         is the same as    #define macro 1
29393     #         -Dmacro=      is the same as    #define macro
29394     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29395         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29396     else
29397         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29398     fi
29399 else
29400     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29401 fi
29402 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29403     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29404 fi
29405 if test "x$OPENJDK_TARGET_OS" = xwindows; then
29406     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29407 fi
29408 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29409     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29410 fi
29411 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29412     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29413     # Setting these parameters makes it an error to link to macosx APIs that are
29414     # newer than the given OS version and makes the linked binaries compatible even
29415     # if built on a newer version of the OS.
29416     # The expected format is X.Y.Z
29417     MACOSX_VERSION_MIN=10.7.0
29418 
29419     # The macro takes the version with no dots, ex: 1070
29420     # Let the flags variables get resolved in make for easier override on make
29421     # command line.
29422     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29423     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29424 fi
29425 if test "x$OPENJDK_TARGET_OS" = xbsd; then
29426     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29427 fi
29428 if test "x$DEBUG_LEVEL" = xrelease; then
29429     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29430     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29431         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29432     fi
29433 else
29434     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29435 fi
29436 
29437 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29438 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29439 
29440 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29441         -I${JDK_OUTPUTDIR}/include \
29442         -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29443         -I${JDK_TOPDIR}/src/share/javavm/export \
29444         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29445         -I${JDK_TOPDIR}/src/share/native/common \
29446         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29447 
29448 # The shared libraries are compiled using the picflag.
29449 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29450 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29451 
29452 # Executable flags
29453 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29454 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29455 
29456 # Now this is odd. The JDK native libraries have to link against libjvm.so
29457 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29458 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29459 # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29460 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29461 # libraries will link to whatever is in memory. Yuck.
29462 #
29463 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29464 if test "x$COMPILER_NAME" = xcl; then
29465     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29466     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29467         LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29468     fi
29469     # TODO: make -debug optional "--disable-full-debug-symbols"
29470     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29471     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29472     LDFLAGS_JDKLIB_SUFFIX=""
29473     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29474         LDFLAGS_STACK_SIZE=1048576
29475     else
29476         LDFLAGS_STACK_SIZE=327680
29477     fi
29478     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29479 else
29480     if test "x$COMPILER_NAME" = xgcc; then
29481         # If this is a --hash-style=gnu system, use --hash-style=both, why?
29482         HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29483         if test -n "$HAS_GNU_HASH"; then
29484             LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29485         fi
29486         if test "x$OPENJDK_TARGET_OS" = xlinux; then
29487           # And since we now know that the linker is gnu, then add -z defs, to forbid
29488           # undefined symbols in object files.
29489           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29490           if test "x$DEBUG_LEVEL" = "xrelease"; then
29491               # When building release libraries, tell the linker optimize them.
29492               # Should this be supplied to the OSS linker as well?
29493               LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29494           fi
29495         fi
29496     fi
29497     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29498                     -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29499 
29500     # On some platforms (mac) the linker warns about non existing -L dirs.
29501     # Add server first if available. Linking aginst client does not always produce the same results.
29502     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29503     # Default to server for other variants.
29504     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29505         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29506     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29507         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29508     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29509         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29510     else
29511         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29512     fi
29513 
29514     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29515     if test "x$COMPILER_NAME" = xossc; then
29516         LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29517     fi
29518 
29519     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29520     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29521         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29522     fi
29523 fi
29524 
29525 # Adjust flags according to debug level.
29526 case $DEBUG_LEVEL in
29527       fastdebug )
29528               CFLAGS="$CFLAGS $D_FLAG"
29529               JAVAC_FLAGS="$JAVAC_FLAGS -g"
29530               ;;
29531       slowdebug )
29532               CFLAGS="$CFLAGS $D_FLAG"
29533               C_O_FLAG_HI="$C_O_FLAG_NONE"
29534               C_O_FLAG_NORM="$C_O_FLAG_NONE"
29535               CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29536               CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29537               JAVAC_FLAGS="$JAVAC_FLAGS -g"
29538               ;;
29539 esac
29540 
29541 
29542 
29543 
29544 
29545 
29546 
29547 
29548 
29549 
29550 
29551 
29552 
29553 
29554 
29555 
29556   # Some Zero and Shark settings.
29557   # ZERO_ARCHFLAG tells the compiler which mode to build for
29558   case "${OPENJDK_TARGET_CPU}" in
29559     s390)
29560       ZERO_ARCHFLAG="-m31"
29561       ;;
29562     *)
29563       ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29564   esac
29565 
29566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29567 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29568   supports=yes
29569 
29570   saved_cflags="$CFLAGS"
29571   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29572   ac_ext=c
29573 ac_cpp='$CPP $CPPFLAGS'
29574 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29575 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29576 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29577 
29578   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29579 /* end confdefs.h.  */
29580 
29581     int i;
29582 
29583 _ACEOF
29584 if ac_fn_c_try_compile "$LINENO"; then :
29585 
29586 else
29587   supports=no
29588 fi
29589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29590   ac_ext=cpp
29591 ac_cpp='$CXXCPP $CPPFLAGS'
29592 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29593 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29594 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29595 
29596   CFLAGS="$saved_cflags"
29597 
29598   saved_cxxflags="$CXXFLAGS"
29599   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29600   ac_ext=cpp
29601 ac_cpp='$CXXCPP $CPPFLAGS'
29602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29603 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29605 
29606   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29607 /* end confdefs.h.  */
29608 
29609     int i;
29610 
29611 _ACEOF
29612 if ac_fn_cxx_try_compile "$LINENO"; then :
29613 
29614 else
29615   supports=no
29616 fi
29617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29618   ac_ext=cpp
29619 ac_cpp='$CXXCPP $CPPFLAGS'
29620 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29621 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29622 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29623 
29624   CXXFLAGS="$saved_cxxflags"
29625 
29626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29627 $as_echo "$supports" >&6; }
29628   if test "x$supports" = "xyes" ; then
29629     :
29630   else
29631     ZERO_ARCHFLAG=""
29632   fi
29633 
29634 
29635 
29636   # Check that the compiler supports -mX flags
29637   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29638 
29639   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29640 $as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29641   supports=yes
29642 
29643   saved_cflags="$CFLAGS"
29644   CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29645   ac_ext=c
29646 ac_cpp='$CPP $CPPFLAGS'
29647 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29648 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29650 
29651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29652 /* end confdefs.h.  */
29653 
29654     int i;
29655 
29656 _ACEOF
29657 if ac_fn_c_try_compile "$LINENO"; then :
29658 
29659 else
29660   supports=no
29661 fi
29662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29663   ac_ext=cpp
29664 ac_cpp='$CXXCPP $CPPFLAGS'
29665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29668 
29669   CFLAGS="$saved_cflags"
29670 
29671   saved_cxxflags="$CXXFLAGS"
29672   CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29673   ac_ext=cpp
29674 ac_cpp='$CXXCPP $CPPFLAGS'
29675 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29676 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29677 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29678 
29679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29680 /* end confdefs.h.  */
29681 
29682     int i;
29683 
29684 _ACEOF
29685 if ac_fn_cxx_try_compile "$LINENO"; then :
29686 
29687 else
29688   supports=no
29689 fi
29690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29691   ac_ext=cpp
29692 ac_cpp='$CXXCPP $CPPFLAGS'
29693 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29694 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29695 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29696 
29697   CXXFLAGS="$saved_cxxflags"
29698 
29699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29700 $as_echo "$supports" >&6; }
29701   if test "x$supports" = "xyes" ; then
29702     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29703   else
29704     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29705   fi
29706 
29707 
29708 
29709 
29710 # Setup debug symbols (need objcopy from the toolchain for that)
29711 
29712 #
29713 # ENABLE_DEBUG_SYMBOLS
29714 # This must be done after the toolchain is setup, since we're looking at objcopy.
29715 #
29716 # Check whether --enable-debug-symbols was given.
29717 if test "${enable_debug_symbols+set}" = set; then :
29718   enableval=$enable_debug_symbols;
29719 fi
29720 
29721 
29722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29723 $as_echo_n "checking if we should generate debug symbols... " >&6; }
29724 
29725 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29726    # explicit enabling of enable-debug-symbols and can't find objcopy
29727    #   this is an error
29728    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29729 fi
29730 
29731 if test "x$enable_debug_symbols" = "xyes"; then
29732   ENABLE_DEBUG_SYMBOLS=true
29733 elif test "x$enable_debug_symbols" = "xno"; then
29734   ENABLE_DEBUG_SYMBOLS=false
29735 else
29736   # default on macosx is false
29737   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29738     ENABLE_DEBUG_SYMBOLS=false
29739   # Default is on if objcopy is found, otherwise off
29740   elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29741     ENABLE_DEBUG_SYMBOLS=true
29742   else
29743     ENABLE_DEBUG_SYMBOLS=false
29744   fi
29745 fi
29746 
29747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29748 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29749 
29750 #
29751 # ZIP_DEBUGINFO_FILES
29752 #
29753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29754 $as_echo_n "checking if we should zip debug-info files... " >&6; }
29755 # Check whether --enable-zip-debug-info was given.
29756 if test "${enable_zip_debug_info+set}" = set; then :
29757   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29758 else
29759   enable_zip_debug_info="yes"
29760 fi
29761 
29762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29763 $as_echo "${enable_zip_debug_info}" >&6; }
29764 
29765 if test "x${enable_zip_debug_info}" = "xno"; then
29766    ZIP_DEBUGINFO_FILES=false
29767 else
29768    ZIP_DEBUGINFO_FILES=true
29769 fi
29770 
29771 
29772 
29773 
29774 
29775 
29776 
29777 ###############################################################################
29778 #
29779 # Check dependencies for external and internal libraries.
29780 #
29781 ###############################################################################
29782 
29783 
29784 
29785 ###############################################################################
29786 #
29787 # OS specific settings that we never will need to probe.
29788 #
29789 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29790     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29791 $as_echo_n "checking what is not needed on Linux?... " >&6; }
29792     PULSE_NOT_NEEDED=yes
29793     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29794 $as_echo "pulse" >&6; }
29795 fi
29796 
29797 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29798     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29799 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
29800     ALSA_NOT_NEEDED=yes
29801     PULSE_NOT_NEEDED=yes
29802     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29803 $as_echo "alsa pulse" >&6; }
29804 fi
29805 
29806 if test "x$OPENJDK_TARGET_OS" = xwindows; then
29807     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29808 $as_echo_n "checking what is not needed on Windows?... " >&6; }
29809     CUPS_NOT_NEEDED=yes
29810     ALSA_NOT_NEEDED=yes
29811     PULSE_NOT_NEEDED=yes
29812     X11_NOT_NEEDED=yes
29813     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29814 $as_echo "alsa cups pulse x11" >&6; }
29815 fi
29816 
29817 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29818     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29819 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29820     ALSA_NOT_NEEDED=yes
29821     PULSE_NOT_NEEDED=yes
29822     X11_NOT_NEEDED=yes
29823     FREETYPE2_NOT_NEEDED=yes
29824     # If the java runtime framework is disabled, then we need X11.
29825     # This will be adjusted below.
29826     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29827 $as_echo "alsa pulse x11" >&6; }
29828 fi
29829 
29830 if test "x$OPENJDK_TARGET_OS" = xbsd; then
29831     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29832 $as_echo_n "checking what is not needed on bsd?... " >&6; }
29833     ALSA_NOT_NEEDED=yes
29834     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29835 $as_echo "alsa" >&6; }
29836 fi
29837 
29838 if test "x$OPENJDK" = "xfalse"; then
29839     FREETYPE2_NOT_NEEDED=yes
29840 fi
29841 
29842 if test "x$SUPPORT_HEADFUL" = xno; then
29843     X11_NOT_NEEDED=yes
29844 fi
29845 
29846 ###############################################################################
29847 #
29848 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29849 # that uses this API.
29850 #
29851 # Check whether --enable-macosx-runtime-support was given.
29852 if test "${enable_macosx_runtime_support+set}" = set; then :
29853   enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29854 else
29855   MACOSX_RUNTIME_SUPPORT="no"
29856 fi
29857 
29858 
29859 USE_MACOSX_RUNTIME_SUPPORT=no
29860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29861 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29862 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29863     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29864         MACOSX_RUNTIME_SUPPORT=yes
29865         USE_MACOSX_RUNTIME_SUPPORT=yes
29866         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29867 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29868     else
29869         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29870 $as_echo "yes, but explicitly disabled." >&6; }
29871     fi
29872 else
29873     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29874 $as_echo "no" >&6; }
29875 fi
29876 
29877 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29878     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29879 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29880     X11_NOT_NEEDED=
29881     FREETYPE2_NOT_NEEDED=
29882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29883 $as_echo "alsa pulse" >&6; }
29884 fi
29885 
29886 
29887 
29888 ###############################################################################
29889 #
29890 # Check for X Windows
29891 #
29892 
29893 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29894 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29895 # --x-libraries for the sysroot, if that seems to be correct.
29896 if test "x$SYS_ROOT" != "x/"; then
29897   if test "x$x_includes" = xNONE; then
29898     if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29899       x_includes="$SYS_ROOT/usr/X11R6/include"
29900     fi
29901   fi
29902   if test "x$x_libraries" = xNONE; then
29903     if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29904       x_libraries="$SYS_ROOT/usr/X11R6/lib"
29905     fi
29906   fi
29907 fi
29908 
29909 # Now let autoconf do it's magic
29910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29911 $as_echo_n "checking for X... " >&6; }
29912 
29913 
29914 # Check whether --with-x was given.
29915 if test "${with_x+set}" = set; then :
29916   withval=$with_x;
29917 fi
29918 
29919 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29920 if test "x$with_x" = xno; then
29921   # The user explicitly disabled X.
29922   have_x=disabled
29923 else
29924   case $x_includes,$x_libraries in #(
29925     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29926     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29927   $as_echo_n "(cached) " >&6
29928 else
29929   # One or both of the vars are not set, and there is no cached value.
29930 ac_x_includes=no ac_x_libraries=no
29931 rm -f -r conftest.dir
29932 if mkdir conftest.dir; then
29933   cd conftest.dir
29934   cat >Imakefile <<'_ACEOF'
29935 incroot:
29936         @echo incroot='${INCROOT}'
29937 usrlibdir:
29938         @echo usrlibdir='${USRLIBDIR}'
29939 libdir:
29940         @echo libdir='${LIBDIR}'
29941 _ACEOF
29942   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29943     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29944     for ac_var in incroot usrlibdir libdir; do
29945       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29946     done
29947     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29948     for ac_extension in a so sl dylib la dll; do
29949       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29950          test -f "$ac_im_libdir/libX11.$ac_extension"; then
29951         ac_im_usrlibdir=$ac_im_libdir; break
29952       fi
29953     done
29954     # Screen out bogus values from the imake configuration.  They are
29955     # bogus both because they are the default anyway, and because
29956     # using them would break gcc on systems where it needs fixed includes.
29957     case $ac_im_incroot in
29958         /usr/include) ac_x_includes= ;;
29959         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29960     esac
29961     case $ac_im_usrlibdir in
29962         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
29963         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29964     esac
29965   fi
29966   cd ..
29967   rm -f -r conftest.dir
29968 fi
29969 
29970 # Standard set of common directories for X headers.
29971 # Check X11 before X11Rn because it is often a symlink to the current release.
29972 ac_x_header_dirs='
29973 /usr/X11/include
29974 /usr/X11R7/include
29975 /usr/X11R6/include
29976 /usr/X11R5/include
29977 /usr/X11R4/include
29978 
29979 /usr/include/X11
29980 /usr/include/X11R7
29981 /usr/include/X11R6
29982 /usr/include/X11R5
29983 /usr/include/X11R4
29984 
29985 /usr/local/X11/include
29986 /usr/local/X11R7/include
29987 /usr/local/X11R6/include
29988 /usr/local/X11R5/include
29989 /usr/local/X11R4/include
29990 
29991 /usr/local/include/X11
29992 /usr/local/include/X11R7
29993 /usr/local/include/X11R6
29994 /usr/local/include/X11R5
29995 /usr/local/include/X11R4
29996 
29997 /usr/X386/include
29998 /usr/x386/include
29999 /usr/XFree86/include/X11
30000 
30001 /usr/include
30002 /usr/local/include
30003 /usr/unsupported/include
30004 /usr/athena/include
30005 /usr/local/x11r5/include
30006 /usr/lpp/Xamples/include
30007 
30008 /usr/openwin/include
30009 /usr/openwin/share/include'
30010 
30011 if test "$ac_x_includes" = no; then
30012   # Guess where to find include files, by looking for Xlib.h.
30013   # First, try using that file with no special directory specified.
30014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30015 /* end confdefs.h.  */
30016 #include <X11/Xlib.h>
30017 _ACEOF
30018 if ac_fn_cxx_try_cpp "$LINENO"; then :
30019   # We can compile using X headers with no special include directory.
30020 ac_x_includes=
30021 else
30022   for ac_dir in $ac_x_header_dirs; do
30023   if test -r "$ac_dir/X11/Xlib.h"; then
30024     ac_x_includes=$ac_dir
30025     break
30026   fi
30027 done
30028 fi
30029 rm -f conftest.err conftest.i conftest.$ac_ext
30030 fi # $ac_x_includes = no
30031 
30032 if test "$ac_x_libraries" = no; then
30033   # Check for the libraries.
30034   # See if we find them without any special options.
30035   # Don't add to $LIBS permanently.
30036   ac_save_LIBS=$LIBS
30037   LIBS="-lX11 $LIBS"
30038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30039 /* end confdefs.h.  */
30040 #include <X11/Xlib.h>
30041 int
30042 main ()
30043 {
30044 XrmInitialize ()
30045   ;
30046   return 0;
30047 }
30048 _ACEOF
30049 if ac_fn_cxx_try_link "$LINENO"; then :
30050   LIBS=$ac_save_LIBS
30051 # We can link X programs with no special library path.
30052 ac_x_libraries=
30053 else
30054   LIBS=$ac_save_LIBS
30055 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30056 do
30057   # Don't even attempt the hair of trying to link an X program!
30058   for ac_extension in a so sl dylib la dll; do
30059     if test -r "$ac_dir/libX11.$ac_extension"; then
30060       ac_x_libraries=$ac_dir
30061       break 2
30062     fi
30063   done
30064 done
30065 fi
30066 rm -f core conftest.err conftest.$ac_objext \
30067     conftest$ac_exeext conftest.$ac_ext
30068 fi # $ac_x_libraries = no
30069 
30070 case $ac_x_includes,$ac_x_libraries in #(
30071   no,* | *,no | *\'*)
30072     # Didn't find X, or a directory has "'" in its name.
30073     ac_cv_have_x="have_x=no";; #(
30074   *)
30075     # Record where we found X for the cache.
30076     ac_cv_have_x="have_x=yes\
30077         ac_x_includes='$ac_x_includes'\
30078         ac_x_libraries='$ac_x_libraries'"
30079 esac
30080 fi
30081 ;; #(
30082     *) have_x=yes;;
30083   esac
30084   eval "$ac_cv_have_x"
30085 fi # $with_x != no
30086 
30087 if test "$have_x" != yes; then
30088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30089 $as_echo "$have_x" >&6; }
30090   no_x=yes
30091 else
30092   # If each of the values was on the command line, it overrides each guess.
30093   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30094   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30095   # Update the cache value to reflect the command line values.
30096   ac_cv_have_x="have_x=yes\
30097         ac_x_includes='$x_includes'\
30098         ac_x_libraries='$x_libraries'"
30099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30100 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30101 fi
30102 
30103 if test "$no_x" = yes; then
30104   # Not all programs may use this symbol, but it does not hurt to define it.
30105 
30106 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30107 
30108   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30109 else
30110   if test -n "$x_includes"; then
30111     X_CFLAGS="$X_CFLAGS -I$x_includes"
30112   fi
30113 
30114   # It would also be nice to do this for all -L options, not just this one.
30115   if test -n "$x_libraries"; then
30116     X_LIBS="$X_LIBS -L$x_libraries"
30117     # For Solaris; some versions of Sun CC require a space after -R and
30118     # others require no space.  Words are not sufficient . . . .
30119     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30120 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30121     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30122     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30123     ac_cxx_werror_flag=yes
30124     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30125 /* end confdefs.h.  */
30126 
30127 int
30128 main ()
30129 {
30130 
30131   ;
30132   return 0;
30133 }
30134 _ACEOF
30135 if ac_fn_cxx_try_link "$LINENO"; then :
30136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30137 $as_echo "no" >&6; }
30138        X_LIBS="$X_LIBS -R$x_libraries"
30139 else
30140   LIBS="$ac_xsave_LIBS -R $x_libraries"
30141        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30142 /* end confdefs.h.  */
30143 
30144 int
30145 main ()
30146 {
30147 
30148   ;
30149   return 0;
30150 }
30151 _ACEOF
30152 if ac_fn_cxx_try_link "$LINENO"; then :
30153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30154 $as_echo "yes" >&6; }
30155           X_LIBS="$X_LIBS -R $x_libraries"
30156 else
30157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30158 $as_echo "neither works" >&6; }
30159 fi
30160 rm -f core conftest.err conftest.$ac_objext \
30161     conftest$ac_exeext conftest.$ac_ext
30162 fi
30163 rm -f core conftest.err conftest.$ac_objext \
30164     conftest$ac_exeext conftest.$ac_ext
30165     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30166     LIBS=$ac_xsave_LIBS
30167   fi
30168 
30169   # Check for system-dependent libraries X programs must link with.
30170   # Do this before checking for the system-independent R6 libraries
30171   # (-lICE), since we may need -lsocket or whatever for X linking.
30172 
30173   if test "$ISC" = yes; then
30174     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30175   else
30176     # Martyn Johnson says this is needed for Ultrix, if the X
30177     # libraries were built with DECnet support.  And Karl Berry says
30178     # the Alpha needs dnet_stub (dnet does not exist).
30179     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30180     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30181 /* end confdefs.h.  */
30182 
30183 /* Override any GCC internal prototype to avoid an error.
30184    Use char because int might match the return type of a GCC
30185    builtin and then its argument prototype would still apply.  */
30186 #ifdef __cplusplus
30187 extern "C"
30188 #endif
30189 char XOpenDisplay ();
30190 int
30191 main ()
30192 {
30193 return XOpenDisplay ();
30194   ;
30195   return 0;
30196 }
30197 _ACEOF
30198 if ac_fn_cxx_try_link "$LINENO"; then :
30199 
30200 else
30201   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30202 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30203 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30204   $as_echo_n "(cached) " >&6
30205 else
30206   ac_check_lib_save_LIBS=$LIBS
30207 LIBS="-ldnet  $LIBS"
30208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30209 /* end confdefs.h.  */
30210 
30211 /* Override any GCC internal prototype to avoid an error.
30212    Use char because int might match the return type of a GCC
30213    builtin and then its argument prototype would still apply.  */
30214 #ifdef __cplusplus
30215 extern "C"
30216 #endif
30217 char dnet_ntoa ();
30218 int
30219 main ()
30220 {
30221 return dnet_ntoa ();
30222   ;
30223   return 0;
30224 }
30225 _ACEOF
30226 if ac_fn_cxx_try_link "$LINENO"; then :
30227   ac_cv_lib_dnet_dnet_ntoa=yes
30228 else
30229   ac_cv_lib_dnet_dnet_ntoa=no
30230 fi
30231 rm -f core conftest.err conftest.$ac_objext \
30232     conftest$ac_exeext conftest.$ac_ext
30233 LIBS=$ac_check_lib_save_LIBS
30234 fi
30235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30236 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30237 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30238   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30239 fi
30240 
30241     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30242       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30243 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30244 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30245   $as_echo_n "(cached) " >&6
30246 else
30247   ac_check_lib_save_LIBS=$LIBS
30248 LIBS="-ldnet_stub  $LIBS"
30249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30250 /* end confdefs.h.  */
30251 
30252 /* Override any GCC internal prototype to avoid an error.
30253    Use char because int might match the return type of a GCC
30254    builtin and then its argument prototype would still apply.  */
30255 #ifdef __cplusplus
30256 extern "C"
30257 #endif
30258 char dnet_ntoa ();
30259 int
30260 main ()
30261 {
30262 return dnet_ntoa ();
30263   ;
30264   return 0;
30265 }
30266 _ACEOF
30267 if ac_fn_cxx_try_link "$LINENO"; then :
30268   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30269 else
30270   ac_cv_lib_dnet_stub_dnet_ntoa=no
30271 fi
30272 rm -f core conftest.err conftest.$ac_objext \
30273     conftest$ac_exeext conftest.$ac_ext
30274 LIBS=$ac_check_lib_save_LIBS
30275 fi
30276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30277 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30278 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30279   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30280 fi
30281 
30282     fi
30283 fi
30284 rm -f core conftest.err conftest.$ac_objext \
30285     conftest$ac_exeext conftest.$ac_ext
30286     LIBS="$ac_xsave_LIBS"
30287 
30288     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30289     # to get the SysV transport functions.
30290     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30291     # needs -lnsl.
30292     # The nsl library prevents programs from opening the X display
30293     # on Irix 5.2, according to T.E. Dickey.
30294     # The functions gethostbyname, getservbyname, and inet_addr are
30295     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30296     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30297 if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30298 
30299 fi
30300 
30301     if test $ac_cv_func_gethostbyname = no; then
30302       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30303 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30304 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30305   $as_echo_n "(cached) " >&6
30306 else
30307   ac_check_lib_save_LIBS=$LIBS
30308 LIBS="-lnsl  $LIBS"
30309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30310 /* end confdefs.h.  */
30311 
30312 /* Override any GCC internal prototype to avoid an error.
30313    Use char because int might match the return type of a GCC
30314    builtin and then its argument prototype would still apply.  */
30315 #ifdef __cplusplus
30316 extern "C"
30317 #endif
30318 char gethostbyname ();
30319 int
30320 main ()
30321 {
30322 return gethostbyname ();
30323   ;
30324   return 0;
30325 }
30326 _ACEOF
30327 if ac_fn_cxx_try_link "$LINENO"; then :
30328   ac_cv_lib_nsl_gethostbyname=yes
30329 else
30330   ac_cv_lib_nsl_gethostbyname=no
30331 fi
30332 rm -f core conftest.err conftest.$ac_objext \
30333     conftest$ac_exeext conftest.$ac_ext
30334 LIBS=$ac_check_lib_save_LIBS
30335 fi
30336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30337 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30338 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30339   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30340 fi
30341 
30342       if test $ac_cv_lib_nsl_gethostbyname = no; then
30343         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30344 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30345 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30346   $as_echo_n "(cached) " >&6
30347 else
30348   ac_check_lib_save_LIBS=$LIBS
30349 LIBS="-lbsd  $LIBS"
30350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30351 /* end confdefs.h.  */
30352 
30353 /* Override any GCC internal prototype to avoid an error.
30354    Use char because int might match the return type of a GCC
30355    builtin and then its argument prototype would still apply.  */
30356 #ifdef __cplusplus
30357 extern "C"
30358 #endif
30359 char gethostbyname ();
30360 int
30361 main ()
30362 {
30363 return gethostbyname ();
30364   ;
30365   return 0;
30366 }
30367 _ACEOF
30368 if ac_fn_cxx_try_link "$LINENO"; then :
30369   ac_cv_lib_bsd_gethostbyname=yes
30370 else
30371   ac_cv_lib_bsd_gethostbyname=no
30372 fi
30373 rm -f core conftest.err conftest.$ac_objext \
30374     conftest$ac_exeext conftest.$ac_ext
30375 LIBS=$ac_check_lib_save_LIBS
30376 fi
30377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30378 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30379 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30380   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30381 fi
30382 
30383       fi
30384     fi
30385 
30386     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30387     # socket/setsockopt and other routines are undefined under SCO ODT
30388     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30389     # on later versions), says Simon Leinen: it contains gethostby*
30390     # variants that don't use the name server (or something).  -lsocket
30391     # must be given before -lnsl if both are needed.  We assume that
30392     # if connect needs -lnsl, so does gethostbyname.
30393     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30394 if test "x$ac_cv_func_connect" = x""yes; then :
30395 
30396 fi
30397 
30398     if test $ac_cv_func_connect = no; then
30399       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30400 $as_echo_n "checking for connect in -lsocket... " >&6; }
30401 if test "${ac_cv_lib_socket_connect+set}" = set; then :
30402   $as_echo_n "(cached) " >&6
30403 else
30404   ac_check_lib_save_LIBS=$LIBS
30405 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30407 /* end confdefs.h.  */
30408 
30409 /* Override any GCC internal prototype to avoid an error.
30410    Use char because int might match the return type of a GCC
30411    builtin and then its argument prototype would still apply.  */
30412 #ifdef __cplusplus
30413 extern "C"
30414 #endif
30415 char connect ();
30416 int
30417 main ()
30418 {
30419 return connect ();
30420   ;
30421   return 0;
30422 }
30423 _ACEOF
30424 if ac_fn_cxx_try_link "$LINENO"; then :
30425   ac_cv_lib_socket_connect=yes
30426 else
30427   ac_cv_lib_socket_connect=no
30428 fi
30429 rm -f core conftest.err conftest.$ac_objext \
30430     conftest$ac_exeext conftest.$ac_ext
30431 LIBS=$ac_check_lib_save_LIBS
30432 fi
30433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30434 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30435 if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30436   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30437 fi
30438 
30439     fi
30440 
30441     # Guillermo Gomez says -lposix is necessary on A/UX.
30442     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30443 if test "x$ac_cv_func_remove" = x""yes; then :
30444 
30445 fi
30446 
30447     if test $ac_cv_func_remove = no; then
30448       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30449 $as_echo_n "checking for remove in -lposix... " >&6; }
30450 if test "${ac_cv_lib_posix_remove+set}" = set; then :
30451   $as_echo_n "(cached) " >&6
30452 else
30453   ac_check_lib_save_LIBS=$LIBS
30454 LIBS="-lposix  $LIBS"
30455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30456 /* end confdefs.h.  */
30457 
30458 /* Override any GCC internal prototype to avoid an error.
30459    Use char because int might match the return type of a GCC
30460    builtin and then its argument prototype would still apply.  */
30461 #ifdef __cplusplus
30462 extern "C"
30463 #endif
30464 char remove ();
30465 int
30466 main ()
30467 {
30468 return remove ();
30469   ;
30470   return 0;
30471 }
30472 _ACEOF
30473 if ac_fn_cxx_try_link "$LINENO"; then :
30474   ac_cv_lib_posix_remove=yes
30475 else
30476   ac_cv_lib_posix_remove=no
30477 fi
30478 rm -f core conftest.err conftest.$ac_objext \
30479     conftest$ac_exeext conftest.$ac_ext
30480 LIBS=$ac_check_lib_save_LIBS
30481 fi
30482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30483 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30484 if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30485   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30486 fi
30487 
30488     fi
30489 
30490     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30491     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30492 if test "x$ac_cv_func_shmat" = x""yes; then :
30493 
30494 fi
30495 
30496     if test $ac_cv_func_shmat = no; then
30497       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30498 $as_echo_n "checking for shmat in -lipc... " >&6; }
30499 if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30500   $as_echo_n "(cached) " >&6
30501 else
30502   ac_check_lib_save_LIBS=$LIBS
30503 LIBS="-lipc  $LIBS"
30504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30505 /* end confdefs.h.  */
30506 
30507 /* Override any GCC internal prototype to avoid an error.
30508    Use char because int might match the return type of a GCC
30509    builtin and then its argument prototype would still apply.  */
30510 #ifdef __cplusplus
30511 extern "C"
30512 #endif
30513 char shmat ();
30514 int
30515 main ()
30516 {
30517 return shmat ();
30518   ;
30519   return 0;
30520 }
30521 _ACEOF
30522 if ac_fn_cxx_try_link "$LINENO"; then :
30523   ac_cv_lib_ipc_shmat=yes
30524 else
30525   ac_cv_lib_ipc_shmat=no
30526 fi
30527 rm -f core conftest.err conftest.$ac_objext \
30528     conftest$ac_exeext conftest.$ac_ext
30529 LIBS=$ac_check_lib_save_LIBS
30530 fi
30531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30532 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30533 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30534   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30535 fi
30536 
30537     fi
30538   fi
30539 
30540   # Check for libraries that X11R6 Xt/Xaw programs need.
30541   ac_save_LDFLAGS=$LDFLAGS
30542   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30543   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30544   # check for ICE first), but we must link in the order -lSM -lICE or
30545   # we get undefined symbols.  So assume we have SM if we have ICE.
30546   # These have to be linked with before -lX11, unlike the other
30547   # libraries we check for below, so use a different variable.
30548   # John Interrante, Karl Berry
30549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30550 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30551 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30552   $as_echo_n "(cached) " >&6
30553 else
30554   ac_check_lib_save_LIBS=$LIBS
30555 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30557 /* end confdefs.h.  */
30558 
30559 /* Override any GCC internal prototype to avoid an error.
30560    Use char because int might match the return type of a GCC
30561    builtin and then its argument prototype would still apply.  */
30562 #ifdef __cplusplus
30563 extern "C"
30564 #endif
30565 char IceConnectionNumber ();
30566 int
30567 main ()
30568 {
30569 return IceConnectionNumber ();
30570   ;
30571   return 0;
30572 }
30573 _ACEOF
30574 if ac_fn_cxx_try_link "$LINENO"; then :
30575   ac_cv_lib_ICE_IceConnectionNumber=yes
30576 else
30577   ac_cv_lib_ICE_IceConnectionNumber=no
30578 fi
30579 rm -f core conftest.err conftest.$ac_objext \
30580     conftest$ac_exeext conftest.$ac_ext
30581 LIBS=$ac_check_lib_save_LIBS
30582 fi
30583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30584 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30585 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30586   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30587 fi
30588 
30589   LDFLAGS=$ac_save_LDFLAGS
30590 
30591 fi
30592 
30593 
30594 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30595 # this doesn't make sense so we remove it.
30596 if test "x$COMPILE_TYPE" = xcross; then
30597   X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30598 fi
30599 
30600 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30601 
30602     # Print a helpful message on how to acquire the necessary build dependency.
30603     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30604     MISSING_DEPENDENCY=x11
30605     PKGHANDLER_COMMAND=
30606 
30607     case $PKGHANDLER in
30608         apt-get)
30609                 apt_help     $MISSING_DEPENDENCY ;;
30610     yum)
30611                 yum_help     $MISSING_DEPENDENCY ;;
30612         port)
30613                 port_help    $MISSING_DEPENDENCY ;;
30614         pkgutil)
30615                 pkgutil_help $MISSING_DEPENDENCY ;;
30616         pkgadd)
30617                 pkgadd_help  $MISSING_DEPENDENCY ;;
30618     * )
30619       break ;;
30620     esac
30621 
30622     if test "x$PKGHANDLER_COMMAND" != x; then
30623         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30624     fi
30625 
30626     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30627 fi
30628 
30629 # Some of the old makefiles require a setting of OPENWIN_HOME
30630 # Since the X11R6 directory has disappeared on later Linuxes,
30631 # we need to probe for it.
30632 if test "x$OPENJDK_TARGET_OS" = xlinux; then
30633     if test -d "$SYS_ROOT/usr/X11R6"; then
30634         OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30635     fi
30636     if test -d "$SYS_ROOT/usr/include/X11"; then
30637         OPENWIN_HOME="$SYS_ROOT/usr"
30638     fi
30639 fi
30640 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30641     OPENWIN_HOME="/usr/openwin"
30642 fi
30643 
30644 
30645 
30646 #
30647 # Weird Sol10 something check...TODO change to try compile
30648 #
30649 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30650   if test "`uname -r`" = "5.10"; then
30651      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30652         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30653      fi
30654   fi
30655 fi
30656 
30657 ac_ext=c
30658 ac_cpp='$CPP $CPPFLAGS'
30659 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30660 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30661 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30662 
30663 OLD_CFLAGS="$CFLAGS"
30664 CFLAGS="$CFLAGS $X_CFLAGS"
30665 
30666 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30667 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30668 do :
30669   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30670 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30671                    # include <X11/Xutil.h>
30672 
30673 "
30674 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30675   cat >>confdefs.h <<_ACEOF
30676 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30677 _ACEOF
30678  X11_A_OK=yes
30679 else
30680   X11_A_OK=no; break
30681 fi
30682 
30683 done
30684 
30685 
30686 CFLAGS="$OLD_CFLAGS"
30687 ac_ext=cpp
30688 ac_cpp='$CXXCPP $CPPFLAGS'
30689 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30690 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30691 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30692 
30693 
30694 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30695 
30696     # Print a helpful message on how to acquire the necessary build dependency.
30697     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30698     MISSING_DEPENDENCY=x11
30699     PKGHANDLER_COMMAND=
30700 
30701     case $PKGHANDLER in
30702         apt-get)
30703                 apt_help     $MISSING_DEPENDENCY ;;
30704     yum)
30705                 yum_help     $MISSING_DEPENDENCY ;;
30706         port)
30707                 port_help    $MISSING_DEPENDENCY ;;
30708         pkgutil)
30709                 pkgutil_help $MISSING_DEPENDENCY ;;
30710         pkgadd)
30711                 pkgadd_help  $MISSING_DEPENDENCY ;;
30712     * )
30713       break ;;
30714     esac
30715 
30716     if test "x$PKGHANDLER_COMMAND" != x; then
30717         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30718     fi
30719 
30720     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30721 fi
30722 
30723 
30724 
30725 
30726 
30727 
30728 ###############################################################################
30729 #
30730 # The common unix printing system cups is used to print from java.
30731 #
30732 
30733 # Check whether --with-cups was given.
30734 if test "${with_cups+set}" = set; then :
30735   withval=$with_cups;
30736 fi
30737 
30738 
30739 # Check whether --with-cups-include was given.
30740 if test "${with_cups_include+set}" = set; then :
30741   withval=$with_cups_include;
30742 fi
30743 
30744 
30745 if test "x$CUPS_NOT_NEEDED" = xyes; then
30746         if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30747                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30748 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30749         fi
30750         CUPS_CFLAGS=
30751 else
30752         CUPS_FOUND=no
30753 
30754         if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30755             as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30756         fi
30757 
30758         if test "x${with_cups}" != x; then
30759             CUPS_CFLAGS="-I${with_cups}/include"
30760             CUPS_FOUND=yes
30761         fi
30762         if test "x${with_cups_include}" != x; then
30763             CUPS_CFLAGS="-I${with_cups_include}"
30764             CUPS_FOUND=yes
30765         fi
30766         if test "x$CUPS_FOUND" = xno; then
30767 
30768 
30769     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30770         # Source the builddeps file again, to make sure it uses the latest variables!
30771         . $builddepsfile
30772         # Look for a target and build machine specific resource!
30773         eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30774         if test "x$resource" = x; then
30775             # Ok, lets instead look for a target specific resource
30776             eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30777         fi
30778         if test "x$resource" = x; then
30779             # Ok, lets instead look for a build specific resource
30780             eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30781         fi
30782         if test "x$resource" = x; then
30783             # Ok, lets instead look for a generic resource
30784             # (The cups comes from M4 and not the shell, thus no need for eval here.)
30785             resource=${builddep_cups}
30786         fi
30787         if test "x$resource" != x; then
30788             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30789 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30790             # If the resource in the builddeps.conf file is an existing directory,
30791             # for example /java/linux/cups
30792             if test -d ${resource}; then
30793                depdir=${resource}
30794             else
30795 
30796 # cups is for example mymodule
30797 # $resource is for example libs/general/libmymod_1_2_3.zip
30798 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30799 # $with_builddeps_dir is for example /localhome/builddeps
30800 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30801 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30802 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30803     filename=`basename $resource`
30804     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30805     filebase=${filename%%.*}
30806     extension=${filename#*.}
30807     installdir=$with_builddeps_dir/$filebase
30808     if test ! -f $installdir/$filename.unpacked; then
30809         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30810 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30811         if test ! -d $installdir; then
30812             mkdir -p $installdir
30813         fi
30814         if test ! -d $installdir; then
30815             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30816         fi
30817         tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30818         touch $tmpfile
30819         if test ! -f $tmpfile; then
30820             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30821         fi
30822 
30823     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30824     # $tmpfile is the local file name for the downloaded file.
30825     VALID_TOOL=no
30826     if test "x$BDEPS_FTP" = xwget; then
30827        VALID_TOOL=yes
30828        wget -O $tmpfile $with_builddeps_server/$resource
30829     fi
30830     if test "x$BDEPS_FTP" = xlftp; then
30831        VALID_TOOL=yes
30832        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30833     fi
30834     if test "x$BDEPS_FTP" = xftp; then
30835         VALID_TOOL=yes
30836         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30837         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30838         FTPUSERPWD=${FTPSERVER%%@*}
30839         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30840             FTPUSER=${userpwd%%:*}
30841             FTPPWD=${userpwd#*@}
30842             FTPSERVER=${FTPSERVER#*@}
30843         else
30844             FTPUSER=ftp
30845             FTPPWD=ftp
30846         fi
30847         # the "pass" command does not work on some
30848         # ftp clients (read ftp.exe) but if it works,
30849         # passive mode is better!
30850         (\
30851             echo "user $FTPUSER $FTPPWD"        ;\
30852             echo "pass"                         ;\
30853             echo "bin"                          ;\
30854             echo "get $FTPPATH $tmpfile"              ;\
30855         ) | ftp -in $FTPSERVER
30856     fi
30857     if test "x$VALID_TOOL" != xyes; then
30858        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30859     fi
30860 
30861         mv $tmpfile $installdir/$filename
30862         if test ! -s $installdir/$filename; then
30863             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30864         fi
30865         case "$extension" in
30866             zip)  echo "Unzipping $installdir/$filename..."
30867                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30868             ;;
30869             tar.gz) echo "Untaring $installdir/$filename..."
30870                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30871             ;;
30872             tgz) echo "Untaring $installdir/$filename..."
30873                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30874             ;;
30875             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30876             ;;
30877         esac
30878     fi
30879     if test -f $installdir/$filename.unpacked; then
30880         depdir=$installdir
30881     fi
30882 
30883             fi
30884             # Source the builddeps file again, because in the previous command, the depdir
30885             # was updated to point at the current build dependency install directory.
30886             . $builddepsfile
30887             # Now extract variables from the builddeps.conf files.
30888             theroot=${builddep_cups_ROOT}
30889             thecflags=${builddep_cups_CFLAGS}
30890             thelibs=${builddep_cups_LIBS}
30891             if test "x$depdir" = x; then
30892                 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30893             fi
30894             CUPS=$depdir
30895             if test "x$theroot" != x; then
30896                CUPS="$theroot"
30897             fi
30898             if test "x$thecflags" != x; then
30899                CUPS_CFLAGS="$thecflags"
30900             fi
30901             if test "x$thelibs" != x; then
30902                CUPS_LIBS="$thelibs"
30903             fi
30904             CUPS_FOUND=yes
30905 
30906         fi
30907 
30908     fi
30909 
30910         fi
30911         if test "x$CUPS_FOUND" = xno; then
30912             # Are the cups headers installed in the default /usr/include location?
30913             for ac_header in cups/cups.h cups/ppd.h
30914 do :
30915   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30916 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30917 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30918   cat >>confdefs.h <<_ACEOF
30919 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30920 _ACEOF
30921  CUPS_FOUND=yes
30922                               CUPS_CFLAGS=
30923                               DEFAULT_CUPS=yes
30924 fi
30925 
30926 done
30927 
30928         fi
30929         if test "x$CUPS_FOUND" = xno; then
30930             # Getting nervous now? Lets poke around for standard Solaris third-party
30931             # package installation locations.
30932             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30933 $as_echo_n "checking for cups headers... " >&6; }
30934             if test -s /opt/sfw/cups/include/cups/cups.h; then
30935                # An SFW package seems to be installed!
30936                CUPS_FOUND=yes
30937                CUPS_CFLAGS="-I/opt/sfw/cups/include"
30938             elif test -s /opt/csw/include/cups/cups.h; then
30939                # A CSW package seems to be installed!
30940                CUPS_FOUND=yes
30941                CUPS_CFLAGS="-I/opt/csw/include"
30942             fi
30943             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30944 $as_echo "$CUPS_FOUND" >&6; }
30945         fi
30946         if test "x$CUPS_FOUND" = xno; then
30947 
30948     # Print a helpful message on how to acquire the necessary build dependency.
30949     # cups is the help tag: freetyp2, cups, pulse, alsa etc
30950     MISSING_DEPENDENCY=cups
30951     PKGHANDLER_COMMAND=
30952 
30953     case $PKGHANDLER in
30954         apt-get)
30955                 apt_help     $MISSING_DEPENDENCY ;;
30956     yum)
30957                 yum_help     $MISSING_DEPENDENCY ;;
30958         port)
30959                 port_help    $MISSING_DEPENDENCY ;;
30960         pkgutil)
30961                 pkgutil_help $MISSING_DEPENDENCY ;;
30962         pkgadd)
30963                 pkgadd_help  $MISSING_DEPENDENCY ;;
30964     * )
30965       break ;;
30966     esac
30967 
30968     if test "x$PKGHANDLER_COMMAND" != x; then
30969         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30970     fi
30971 
30972             as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30973         fi
30974 fi
30975 
30976 
30977 
30978 
30979 
30980 
30981 ###############################################################################
30982 #
30983 # The ubiquitous freetype2 library is used to render fonts.
30984 #
30985 
30986 # Check whether --with-freetype was given.
30987 if test "${with_freetype+set}" = set; then :
30988   withval=$with_freetype;
30989 fi
30990 
30991 
30992 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30993 USING_SYSTEM_FT_LIB=false
30994 
30995 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30996         if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30997                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30998 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30999         fi
31000         FREETYPE2_CFLAGS=
31001         FREETYPE2_LIBS=
31002         FREETYPE2_LIB_PATH=
31003 else
31004         FREETYPE2_FOUND=no
31005 
31006         if test "x$with_freetype" != x; then
31007 
31008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31009 
31010   # Input might be given as Windows format, start by converting to
31011   # unix format.
31012   path="$with_freetype"
31013   new_path=`$CYGPATH -u "$path"`
31014 
31015   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31016   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31017   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31018   # "foo.exe" is OK but "foo" is an error.
31019   #
31020   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31021   # It is also a way to make sure we got the proper file name for the real test later on.
31022   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31023   if test "x$test_shortpath" = x; then
31024     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31025 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31026     as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31027   fi
31028 
31029   # Call helper function which possibly converts this using DOS-style short mode.
31030   # If so, the updated path is stored in $new_path.
31031 
31032   input_path="$new_path"
31033   # Check if we need to convert this using DOS-style short mode. If the path
31034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31035   # take no chances and rewrite it.
31036   # Note: m4 eats our [], so we need to use [ and ] instead.
31037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31038   if test "x$has_forbidden_chars" != x; then
31039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31040     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31041     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31042     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31043       # Going to short mode and back again did indeed matter. Since short mode is
31044       # case insensitive, let's make it lowercase to improve readability.
31045       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31046       # Now convert it back to Unix-stile (cygpath)
31047       input_path=`$CYGPATH -u "$shortmode_path"`
31048       new_path="$input_path"
31049     fi
31050   fi
31051 
31052   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31053   if test "x$test_cygdrive_prefix" = x; then
31054     # As a simple fix, exclude /usr/bin since it's not a real path.
31055     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31056       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31057       # a path prefixed by /cygdrive for fixpath to work.
31058       new_path="$CYGWIN_ROOT_PATH$input_path"
31059     fi
31060   fi
31061 
31062 
31063   if test "x$path" != "x$new_path"; then
31064     with_freetype="$new_path"
31065     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31066 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31067   fi
31068 
31069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31070 
31071   path="$with_freetype"
31072   has_colon=`$ECHO $path | $GREP ^.:`
31073   new_path="$path"
31074   if test "x$has_colon" = x; then
31075     # Not in mixed or Windows style, start by that.
31076     new_path=`cmd //c echo $path`
31077   fi
31078 
31079 
31080   input_path="$new_path"
31081   # Check if we need to convert this using DOS-style short mode. If the path
31082   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31083   # take no chances and rewrite it.
31084   # Note: m4 eats our [], so we need to use [ and ] instead.
31085   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31086   if test "x$has_forbidden_chars" != x; then
31087     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31088     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31089   fi
31090 
31091 
31092   windows_path="$new_path"
31093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31094     unix_path=`$CYGPATH -u "$windows_path"`
31095     new_path="$unix_path"
31096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31097     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31098     new_path="$unix_path"
31099   fi
31100 
31101   if test "x$path" != "x$new_path"; then
31102     with_freetype="$new_path"
31103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31104 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31105   fi
31106 
31107   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31108   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31109 
31110   else
31111     # We're on a posix platform. Hooray! :)
31112     path="$with_freetype"
31113     has_space=`$ECHO "$path" | $GREP " "`
31114     if test "x$has_space" != x; then
31115       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31116 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31117       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31118     fi
31119 
31120     # Use eval to expand a potential ~
31121     eval path="$path"
31122     if test ! -f "$path" && test ! -d "$path"; then
31123       as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31124     fi
31125 
31126     with_freetype="`cd "$path"; $THEPWDCMD -L`"
31127   fi
31128 
31129             FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31130             FREETYPE2_LIB_PATH="$with_freetype/lib"
31131             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31132                 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31133                 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31134             fi
31135             if test "x$OPENJDK_TARGET_OS" = xwindows; then
31136                 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31137             fi
31138             FREETYPE2_CFLAGS="-I$with_freetype/include"
31139             if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31140                 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31141             fi
31142             FREETYPE2_FOUND=yes
31143             if test "x$FREETYPE2_FOUND" = xyes; then
31144                 # Verify that the directories exist
31145                 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31146                    as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31147                 fi
31148                 # List the contents of the lib.
31149                 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31150                 if test "x$FREETYPELIB" = x; then
31151                    as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31152                 fi
31153                 # Check one h-file
31154                 if ! test -s "$with_freetype/include/ft2build.h"; then
31155                    as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31156                 fi
31157             fi
31158         fi
31159         if test "x$FREETYPE2_FOUND" = xno; then
31160 
31161 
31162     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31163         # Source the builddeps file again, to make sure it uses the latest variables!
31164         . $builddepsfile
31165         # Look for a target and build machine specific resource!
31166         eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31167         if test "x$resource" = x; then
31168             # Ok, lets instead look for a target specific resource
31169             eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31170         fi
31171         if test "x$resource" = x; then
31172             # Ok, lets instead look for a build specific resource
31173             eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31174         fi
31175         if test "x$resource" = x; then
31176             # Ok, lets instead look for a generic resource
31177             # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31178             resource=${builddep_freetype2}
31179         fi
31180         if test "x$resource" != x; then
31181             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31182 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31183             # If the resource in the builddeps.conf file is an existing directory,
31184             # for example /java/linux/cups
31185             if test -d ${resource}; then
31186                depdir=${resource}
31187             else
31188 
31189 # freetype2 is for example mymodule
31190 # $resource is for example libs/general/libmymod_1_2_3.zip
31191 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31192 # $with_builddeps_dir is for example /localhome/builddeps
31193 # depdir is the name of the variable into which we store the depdir, eg MYMOD
31194 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31195 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31196     filename=`basename $resource`
31197     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31198     filebase=${filename%%.*}
31199     extension=${filename#*.}
31200     installdir=$with_builddeps_dir/$filebase
31201     if test ! -f $installdir/$filename.unpacked; then
31202         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31203 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31204         if test ! -d $installdir; then
31205             mkdir -p $installdir
31206         fi
31207         if test ! -d $installdir; then
31208             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31209         fi
31210         tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31211         touch $tmpfile
31212         if test ! -f $tmpfile; then
31213             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31214         fi
31215 
31216     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31217     # $tmpfile is the local file name for the downloaded file.
31218     VALID_TOOL=no
31219     if test "x$BDEPS_FTP" = xwget; then
31220        VALID_TOOL=yes
31221        wget -O $tmpfile $with_builddeps_server/$resource
31222     fi
31223     if test "x$BDEPS_FTP" = xlftp; then
31224        VALID_TOOL=yes
31225        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31226     fi
31227     if test "x$BDEPS_FTP" = xftp; then
31228         VALID_TOOL=yes
31229         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31230         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31231         FTPUSERPWD=${FTPSERVER%%@*}
31232         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31233             FTPUSER=${userpwd%%:*}
31234             FTPPWD=${userpwd#*@}
31235             FTPSERVER=${FTPSERVER#*@}
31236         else
31237             FTPUSER=ftp
31238             FTPPWD=ftp
31239         fi
31240         # the "pass" command does not work on some
31241         # ftp clients (read ftp.exe) but if it works,
31242         # passive mode is better!
31243         (\
31244             echo "user $FTPUSER $FTPPWD"        ;\
31245             echo "pass"                         ;\
31246             echo "bin"                          ;\
31247             echo "get $FTPPATH $tmpfile"              ;\
31248         ) | ftp -in $FTPSERVER
31249     fi
31250     if test "x$VALID_TOOL" != xyes; then
31251        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31252     fi
31253 
31254         mv $tmpfile $installdir/$filename
31255         if test ! -s $installdir/$filename; then
31256             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31257         fi
31258         case "$extension" in
31259             zip)  echo "Unzipping $installdir/$filename..."
31260                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31261             ;;
31262             tar.gz) echo "Untaring $installdir/$filename..."
31263                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31264             ;;
31265             tgz) echo "Untaring $installdir/$filename..."
31266                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31267             ;;
31268             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31269             ;;
31270         esac
31271     fi
31272     if test -f $installdir/$filename.unpacked; then
31273         depdir=$installdir
31274     fi
31275 
31276             fi
31277             # Source the builddeps file again, because in the previous command, the depdir
31278             # was updated to point at the current build dependency install directory.
31279             . $builddepsfile
31280             # Now extract variables from the builddeps.conf files.
31281             theroot=${builddep_freetype2_ROOT}
31282             thecflags=${builddep_freetype2_CFLAGS}
31283             thelibs=${builddep_freetype2_LIBS}
31284             if test "x$depdir" = x; then
31285                 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31286             fi
31287             FREETYPE2=$depdir
31288             if test "x$theroot" != x; then
31289                FREETYPE2="$theroot"
31290             fi
31291             if test "x$thecflags" != x; then
31292                FREETYPE2_CFLAGS="$thecflags"
31293             fi
31294             if test "x$thelibs" != x; then
31295                FREETYPE2_LIBS="$thelibs"
31296             fi
31297             FREETYPE2_FOUND=yes
31298             else FREETYPE2_FOUND=no
31299 
31300         fi
31301         else FREETYPE2_FOUND=no
31302 
31303     fi
31304 
31305             USING_SYSTEM_FT_LIB=true
31306         fi
31307         if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31308             FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31309 
31310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31311 
31312   # Input might be given as Windows format, start by converting to
31313   # unix format.
31314   path="$FREETYPELOCATION"
31315   new_path=`$CYGPATH -u "$path"`
31316 
31317   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31318   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31319   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31320   # "foo.exe" is OK but "foo" is an error.
31321   #
31322   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31323   # It is also a way to make sure we got the proper file name for the real test later on.
31324   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31325   if test "x$test_shortpath" = x; then
31326     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31327 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31328     as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31329   fi
31330 
31331   # Call helper function which possibly converts this using DOS-style short mode.
31332   # If so, the updated path is stored in $new_path.
31333 
31334   input_path="$new_path"
31335   # Check if we need to convert this using DOS-style short mode. If the path
31336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31337   # take no chances and rewrite it.
31338   # Note: m4 eats our [], so we need to use [ and ] instead.
31339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31340   if test "x$has_forbidden_chars" != x; then
31341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31342     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31343     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31344     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31345       # Going to short mode and back again did indeed matter. Since short mode is
31346       # case insensitive, let's make it lowercase to improve readability.
31347       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31348       # Now convert it back to Unix-stile (cygpath)
31349       input_path=`$CYGPATH -u "$shortmode_path"`
31350       new_path="$input_path"
31351     fi
31352   fi
31353 
31354   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31355   if test "x$test_cygdrive_prefix" = x; then
31356     # As a simple fix, exclude /usr/bin since it's not a real path.
31357     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31358       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31359       # a path prefixed by /cygdrive for fixpath to work.
31360       new_path="$CYGWIN_ROOT_PATH$input_path"
31361     fi
31362   fi
31363 
31364 
31365   if test "x$path" != "x$new_path"; then
31366     FREETYPELOCATION="$new_path"
31367     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31368 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31369   fi
31370 
31371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31372 
31373   path="$FREETYPELOCATION"
31374   has_colon=`$ECHO $path | $GREP ^.:`
31375   new_path="$path"
31376   if test "x$has_colon" = x; then
31377     # Not in mixed or Windows style, start by that.
31378     new_path=`cmd //c echo $path`
31379   fi
31380 
31381 
31382   input_path="$new_path"
31383   # Check if we need to convert this using DOS-style short mode. If the path
31384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31385   # take no chances and rewrite it.
31386   # Note: m4 eats our [], so we need to use [ and ] instead.
31387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31388   if test "x$has_forbidden_chars" != x; then
31389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31390     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31391   fi
31392 
31393 
31394   windows_path="$new_path"
31395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31396     unix_path=`$CYGPATH -u "$windows_path"`
31397     new_path="$unix_path"
31398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31400     new_path="$unix_path"
31401   fi
31402 
31403   if test "x$path" != "x$new_path"; then
31404     FREETYPELOCATION="$new_path"
31405     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31406 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31407   fi
31408 
31409   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31410   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31411 
31412   else
31413     # We're on a posix platform. Hooray! :)
31414     path="$FREETYPELOCATION"
31415     has_space=`$ECHO "$path" | $GREP " "`
31416     if test "x$has_space" != x; then
31417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31418 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31419       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31420     fi
31421 
31422     # Use eval to expand a potential ~
31423     eval path="$path"
31424     if test ! -f "$path" && test ! -d "$path"; then
31425       as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31426     fi
31427 
31428     FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31429   fi
31430 
31431             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31432 $as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31433             if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31434                 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31435                 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31436                 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31437                 if ! test -s "$FREETYPE2_LIBS"; then
31438                    as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31439                 fi
31440                 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31441                    as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31442                 fi
31443                 USING_SYSTEM_FT_LIB=true
31444                 FREETYPE2_FOUND=yes
31445             fi
31446             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31447 $as_echo "$FREETYPE2_FOUND" >&6; }
31448         fi
31449         if test "x$FREETYPE2_FOUND" = xno; then
31450 
31451 pkg_failed=no
31452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31453 $as_echo_n "checking for FREETYPE2... " >&6; }
31454 
31455 if test -n "$FREETYPE2_CFLAGS"; then
31456     pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31457  elif test -n "$PKG_CONFIG"; then
31458     if test -n "$PKG_CONFIG" && \
31459     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31460   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31461   ac_status=$?
31462   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31463   test $ac_status = 0; }; then
31464   pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31465 else
31466   pkg_failed=yes
31467 fi
31468  else
31469     pkg_failed=untried
31470 fi
31471 if test -n "$FREETYPE2_LIBS"; then
31472     pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31473  elif test -n "$PKG_CONFIG"; then
31474     if test -n "$PKG_CONFIG" && \
31475     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31476   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31477   ac_status=$?
31478   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31479   test $ac_status = 0; }; then
31480   pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31481 else
31482   pkg_failed=yes
31483 fi
31484  else
31485     pkg_failed=untried
31486 fi
31487 
31488 
31489 
31490 if test $pkg_failed = yes; then
31491 
31492 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31493         _pkg_short_errors_supported=yes
31494 else
31495         _pkg_short_errors_supported=no
31496 fi
31497         if test $_pkg_short_errors_supported = yes; then
31498                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31499         else
31500                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31501         fi
31502         # Put the nasty error message in config.log where it belongs
31503         echo "$FREETYPE2_PKG_ERRORS" >&5
31504 
31505         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31506 $as_echo "no" >&6; }
31507                 FREETYPE2_FOUND=no
31508 elif test $pkg_failed = untried; then
31509         FREETYPE2_FOUND=no
31510 else
31511         FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31512         FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31513         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31514 $as_echo "yes" >&6; }
31515         FREETYPE2_FOUND=yes
31516 fi
31517             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31518             FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31519             USING_SYSTEM_FT_LIB=true
31520             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31521             if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31522               FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31523             fi
31524         fi
31525         if test "x$FREETYPE2_FOUND" = xno; then
31526             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31527 $as_echo_n "checking for freetype in some standard locations... " >&6; }
31528 
31529             if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31530                 DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31531                 DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31532             fi
31533             if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31534                 DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31535                 DEFAULT_FREETYPE_LIBS="-lfreetype"
31536             fi
31537 
31538             PREV_CXXCFLAGS="$CXXFLAGS"
31539             PREV_LDFLAGS="$LDFLAGS"
31540             CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31541             LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31542             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31543 /* end confdefs.h.  */
31544 #include<ft2build.h>
31545                             #include FT_FREETYPE_H
31546                            int main() { return 0; }
31547 
31548 _ACEOF
31549 if ac_fn_cxx_try_link "$LINENO"; then :
31550 
31551                               # Yes, the default cflags and libs did the trick.
31552                               FREETYPE2_FOUND=yes
31553                               FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31554                               FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31555 
31556 else
31557 
31558                               FREETYPE2_FOUND=no
31559 
31560 fi
31561 rm -f core conftest.err conftest.$ac_objext \
31562     conftest$ac_exeext conftest.$ac_ext
31563             CXXCFLAGS="$PREV_CXXFLAGS"
31564             LDFLAGS="$PREV_LDFLAGS"
31565             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31566 $as_echo "$FREETYPE2_FOUND" >&6; }
31567             USING_SYSTEM_FT_LIB=true
31568         fi
31569         if test "x$FREETYPE2_FOUND" = xno; then
31570 
31571     # Print a helpful message on how to acquire the necessary build dependency.
31572     # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31573     MISSING_DEPENDENCY=freetype2
31574     PKGHANDLER_COMMAND=
31575 
31576     case $PKGHANDLER in
31577         apt-get)
31578                 apt_help     $MISSING_DEPENDENCY ;;
31579     yum)
31580                 yum_help     $MISSING_DEPENDENCY ;;
31581         port)
31582                 port_help    $MISSING_DEPENDENCY ;;
31583         pkgutil)
31584                 pkgutil_help $MISSING_DEPENDENCY ;;
31585         pkgadd)
31586                 pkgadd_help  $MISSING_DEPENDENCY ;;
31587     * )
31588       break ;;
31589     esac
31590 
31591     if test "x$PKGHANDLER_COMMAND" != x; then
31592         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31593     fi
31594 
31595                 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31596         fi
31597 
31598         if test "x$OPENJDK_TARGET_OS" != xwindows; then
31599             # AC_CHECK_LIB does not support use of cl.exe
31600             PREV_LDFLAGS="$LDFLAGS"
31601             LDFLAGS="$FREETYPE2_LIBS"
31602             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31603 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31604 if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31605   $as_echo_n "(cached) " >&6
31606 else
31607   ac_check_lib_save_LIBS=$LIBS
31608 LIBS="-lfreetype  $LIBS"
31609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31610 /* end confdefs.h.  */
31611 
31612 /* Override any GCC internal prototype to avoid an error.
31613    Use char because int might match the return type of a GCC
31614    builtin and then its argument prototype would still apply.  */
31615 #ifdef __cplusplus
31616 extern "C"
31617 #endif
31618 char FT_Init_FreeType ();
31619 int
31620 main ()
31621 {
31622 return FT_Init_FreeType ();
31623   ;
31624   return 0;
31625 }
31626 _ACEOF
31627 if ac_fn_cxx_try_link "$LINENO"; then :
31628   ac_cv_lib_freetype_FT_Init_FreeType=yes
31629 else
31630   ac_cv_lib_freetype_FT_Init_FreeType=no
31631 fi
31632 rm -f core conftest.err conftest.$ac_objext \
31633     conftest$ac_exeext conftest.$ac_ext
31634 LIBS=$ac_check_lib_save_LIBS
31635 fi
31636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31637 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31638 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31639   FREETYPE2_FOUND=true
31640 else
31641   as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31642 fi
31643 
31644             LDFLAGS="$PREV_LDFLAGS"
31645         fi
31646 fi
31647 
31648 
31649 
31650 
31651 
31652 
31653 
31654 
31655 
31656 ###############################################################################
31657 #
31658 # Check for alsa headers and libraries. Used on Linux/GNU systems.
31659 #
31660 
31661 # Check whether --with-alsa was given.
31662 if test "${with_alsa+set}" = set; then :
31663   withval=$with_alsa;
31664 fi
31665 
31666 
31667 # Check whether --with-alsa-include was given.
31668 if test "${with_alsa_include+set}" = set; then :
31669   withval=$with_alsa_include;
31670 fi
31671 
31672 
31673 # Check whether --with-alsa-lib was given.
31674 if test "${with_alsa_lib+set}" = set; then :
31675   withval=$with_alsa_lib;
31676 fi
31677 
31678 
31679 if test "x$ALSA_NOT_NEEDED" = xyes; then
31680         if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31681                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31682 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31683         fi
31684         ALSA_CFLAGS=
31685         ALSA_LIBS=
31686 else
31687         ALSA_FOUND=no
31688 
31689         if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31690             as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31691         fi
31692 
31693         if test "x${with_alsa}" != x; then
31694             ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31695             ALSA_CFLAGS="-I${with_alsa}/include"
31696             ALSA_FOUND=yes
31697         fi
31698         if test "x${with_alsa_include}" != x; then
31699             ALSA_CFLAGS="-I${with_alsa_include}"
31700             ALSA_FOUND=yes
31701         fi
31702         if test "x${with_alsa_lib}" != x; then
31703             ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31704             ALSA_FOUND=yes
31705         fi
31706         if test "x$ALSA_FOUND" = xno; then
31707 
31708 
31709     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31710         # Source the builddeps file again, to make sure it uses the latest variables!
31711         . $builddepsfile
31712         # Look for a target and build machine specific resource!
31713         eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31714         if test "x$resource" = x; then
31715             # Ok, lets instead look for a target specific resource
31716             eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31717         fi
31718         if test "x$resource" = x; then
31719             # Ok, lets instead look for a build specific resource
31720             eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31721         fi
31722         if test "x$resource" = x; then
31723             # Ok, lets instead look for a generic resource
31724             # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31725             resource=${builddep_alsa}
31726         fi
31727         if test "x$resource" != x; then
31728             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31729 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31730             # If the resource in the builddeps.conf file is an existing directory,
31731             # for example /java/linux/cups
31732             if test -d ${resource}; then
31733                depdir=${resource}
31734             else
31735 
31736 # alsa is for example mymodule
31737 # $resource is for example libs/general/libmymod_1_2_3.zip
31738 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31739 # $with_builddeps_dir is for example /localhome/builddeps
31740 # depdir is the name of the variable into which we store the depdir, eg MYMOD
31741 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31742 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31743     filename=`basename $resource`
31744     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31745     filebase=${filename%%.*}
31746     extension=${filename#*.}
31747     installdir=$with_builddeps_dir/$filebase
31748     if test ! -f $installdir/$filename.unpacked; then
31749         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31750 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31751         if test ! -d $installdir; then
31752             mkdir -p $installdir
31753         fi
31754         if test ! -d $installdir; then
31755             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31756         fi
31757         tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31758         touch $tmpfile
31759         if test ! -f $tmpfile; then
31760             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31761         fi
31762 
31763     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31764     # $tmpfile is the local file name for the downloaded file.
31765     VALID_TOOL=no
31766     if test "x$BDEPS_FTP" = xwget; then
31767        VALID_TOOL=yes
31768        wget -O $tmpfile $with_builddeps_server/$resource
31769     fi
31770     if test "x$BDEPS_FTP" = xlftp; then
31771        VALID_TOOL=yes
31772        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31773     fi
31774     if test "x$BDEPS_FTP" = xftp; then
31775         VALID_TOOL=yes
31776         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31777         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31778         FTPUSERPWD=${FTPSERVER%%@*}
31779         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31780             FTPUSER=${userpwd%%:*}
31781             FTPPWD=${userpwd#*@}
31782             FTPSERVER=${FTPSERVER#*@}
31783         else
31784             FTPUSER=ftp
31785             FTPPWD=ftp
31786         fi
31787         # the "pass" command does not work on some
31788         # ftp clients (read ftp.exe) but if it works,
31789         # passive mode is better!
31790         (\
31791             echo "user $FTPUSER $FTPPWD"        ;\
31792             echo "pass"                         ;\
31793             echo "bin"                          ;\
31794             echo "get $FTPPATH $tmpfile"              ;\
31795         ) | ftp -in $FTPSERVER
31796     fi
31797     if test "x$VALID_TOOL" != xyes; then
31798        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31799     fi
31800 
31801         mv $tmpfile $installdir/$filename
31802         if test ! -s $installdir/$filename; then
31803             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31804         fi
31805         case "$extension" in
31806             zip)  echo "Unzipping $installdir/$filename..."
31807                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31808             ;;
31809             tar.gz) echo "Untaring $installdir/$filename..."
31810                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31811             ;;
31812             tgz) echo "Untaring $installdir/$filename..."
31813                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31814             ;;
31815             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31816             ;;
31817         esac
31818     fi
31819     if test -f $installdir/$filename.unpacked; then
31820         depdir=$installdir
31821     fi
31822 
31823             fi
31824             # Source the builddeps file again, because in the previous command, the depdir
31825             # was updated to point at the current build dependency install directory.
31826             . $builddepsfile
31827             # Now extract variables from the builddeps.conf files.
31828             theroot=${builddep_alsa_ROOT}
31829             thecflags=${builddep_alsa_CFLAGS}
31830             thelibs=${builddep_alsa_LIBS}
31831             if test "x$depdir" = x; then
31832                 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31833             fi
31834             ALSA=$depdir
31835             if test "x$theroot" != x; then
31836                ALSA="$theroot"
31837             fi
31838             if test "x$thecflags" != x; then
31839                ALSA_CFLAGS="$thecflags"
31840             fi
31841             if test "x$thelibs" != x; then
31842                ALSA_LIBS="$thelibs"
31843             fi
31844             ALSA_FOUND=yes
31845             else ALSA_FOUND=no
31846 
31847         fi
31848         else ALSA_FOUND=no
31849 
31850     fi
31851 
31852         fi
31853         if test "x$ALSA_FOUND" = xno; then
31854 
31855 pkg_failed=no
31856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31857 $as_echo_n "checking for ALSA... " >&6; }
31858 
31859 if test -n "$ALSA_CFLAGS"; then
31860     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31861  elif test -n "$PKG_CONFIG"; then
31862     if test -n "$PKG_CONFIG" && \
31863     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31864   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31865   ac_status=$?
31866   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31867   test $ac_status = 0; }; then
31868   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31869 else
31870   pkg_failed=yes
31871 fi
31872  else
31873     pkg_failed=untried
31874 fi
31875 if test -n "$ALSA_LIBS"; then
31876     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31877  elif test -n "$PKG_CONFIG"; then
31878     if test -n "$PKG_CONFIG" && \
31879     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31880   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31881   ac_status=$?
31882   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31883   test $ac_status = 0; }; then
31884   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31885 else
31886   pkg_failed=yes
31887 fi
31888  else
31889     pkg_failed=untried
31890 fi
31891 
31892 
31893 
31894 if test $pkg_failed = yes; then
31895 
31896 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31897         _pkg_short_errors_supported=yes
31898 else
31899         _pkg_short_errors_supported=no
31900 fi
31901         if test $_pkg_short_errors_supported = yes; then
31902                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31903         else
31904                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31905         fi
31906         # Put the nasty error message in config.log where it belongs
31907         echo "$ALSA_PKG_ERRORS" >&5
31908 
31909         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31910 $as_echo "no" >&6; }
31911                 ALSA_FOUND=no
31912 elif test $pkg_failed = untried; then
31913         ALSA_FOUND=no
31914 else
31915         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31916         ALSA_LIBS=$pkg_cv_ALSA_LIBS
31917         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31918 $as_echo "yes" >&6; }
31919         ALSA_FOUND=yes
31920 fi
31921         fi
31922         if test "x$ALSA_FOUND" = xno; then
31923             for ac_header in alsa/asoundlib.h
31924 do :
31925   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31926 if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31927   cat >>confdefs.h <<_ACEOF
31928 #define HAVE_ALSA_ASOUNDLIB_H 1
31929 _ACEOF
31930  ALSA_FOUND=yes
31931                               ALSA_CFLAGS=-Iignoreme
31932                               ALSA_LIBS=-lasound
31933                               DEFAULT_ALSA=yes
31934 else
31935   ALSA_FOUND=no
31936 fi
31937 
31938 done
31939 
31940         fi
31941         if test "x$ALSA_FOUND" = xno; then
31942 
31943     # Print a helpful message on how to acquire the necessary build dependency.
31944     # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31945     MISSING_DEPENDENCY=alsa
31946     PKGHANDLER_COMMAND=
31947 
31948     case $PKGHANDLER in
31949         apt-get)
31950                 apt_help     $MISSING_DEPENDENCY ;;
31951     yum)
31952                 yum_help     $MISSING_DEPENDENCY ;;
31953         port)
31954                 port_help    $MISSING_DEPENDENCY ;;
31955         pkgutil)
31956                 pkgutil_help $MISSING_DEPENDENCY ;;
31957         pkgadd)
31958                 pkgadd_help  $MISSING_DEPENDENCY ;;
31959     * )
31960       break ;;
31961     esac
31962 
31963     if test "x$PKGHANDLER_COMMAND" != x; then
31964         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31965     fi
31966 
31967             as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31968         fi
31969 fi
31970 
31971 
31972 
31973 
31974 
31975 
31976 
31977 ###############################################################################
31978 #
31979 # Check for the jpeg library
31980 #
31981 
31982 USE_EXTERNAL_LIBJPEG=true
31983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31984 $as_echo_n "checking for main in -ljpeg... " >&6; }
31985 if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31986   $as_echo_n "(cached) " >&6
31987 else
31988   ac_check_lib_save_LIBS=$LIBS
31989 LIBS="-ljpeg  $LIBS"
31990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31991 /* end confdefs.h.  */
31992 
31993 
31994 int
31995 main ()
31996 {
31997 return main ();
31998   ;
31999   return 0;
32000 }
32001 _ACEOF
32002 if ac_fn_cxx_try_link "$LINENO"; then :
32003   ac_cv_lib_jpeg_main=yes
32004 else
32005   ac_cv_lib_jpeg_main=no
32006 fi
32007 rm -f core conftest.err conftest.$ac_objext \
32008     conftest$ac_exeext conftest.$ac_ext
32009 LIBS=$ac_check_lib_save_LIBS
32010 fi
32011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32012 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
32013 if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32014   cat >>confdefs.h <<_ACEOF
32015 #define HAVE_LIBJPEG 1
32016 _ACEOF
32017 
32018   LIBS="-ljpeg $LIBS"
32019 
32020 else
32021    USE_EXTERNAL_LIBJPEG=false
32022                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32023 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32024 
32025 fi
32026 
32027 
32028 
32029 ###############################################################################
32030 #
32031 # Check for the gif library
32032 #
32033 
32034 
32035 # Check whether --with-giflib was given.
32036 if test "${with_giflib+set}" = set; then :
32037   withval=$with_giflib;
32038 fi
32039 
32040 
32041 
32042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32043 $as_echo_n "checking for which giflib to use... " >&6; }
32044 
32045 # default is bundled
32046 DEFAULT_GIFLIB=bundled
32047 
32048 #
32049 # if user didn't specify, use DEFAULT_GIFLIB
32050 #
32051 if test "x${with_giflib}" = "x"; then
32052     with_giflib=${DEFAULT_GIFLIB}
32053 fi
32054 
32055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32056 $as_echo "${with_giflib}" >&6; }
32057 
32058 if test "x${with_giflib}" = "xbundled"; then
32059     USE_EXTERNAL_LIBGIF=false
32060 elif test "x${with_giflib}" = "xsystem"; then
32061     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32062 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32063 
32064 else
32065    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32066 fi
32067 
32068 
32069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32070 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32071 if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32072   $as_echo_n "(cached) " >&6
32073 else
32074   ac_check_lib_save_LIBS=$LIBS
32075 LIBS="-lgif  $LIBS"
32076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32077 /* end confdefs.h.  */
32078 
32079 /* Override any GCC internal prototype to avoid an error.
32080    Use char because int might match the return type of a GCC
32081    builtin and then its argument prototype would still apply.  */
32082 #ifdef __cplusplus
32083 extern "C"
32084 #endif
32085 char DGifGetCode ();
32086 int
32087 main ()
32088 {
32089 return DGifGetCode ();
32090   ;
32091   return 0;
32092 }
32093 _ACEOF
32094 if ac_fn_cxx_try_link "$LINENO"; then :
32095   ac_cv_lib_gif_DGifGetCode=yes
32096 else
32097   ac_cv_lib_gif_DGifGetCode=no
32098 fi
32099 rm -f core conftest.err conftest.$ac_objext \
32100     conftest$ac_exeext conftest.$ac_ext
32101 LIBS=$ac_check_lib_save_LIBS
32102 fi
32103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32104 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32105 if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32106   cat >>confdefs.h <<_ACEOF
32107 #define HAVE_LIBGIF 1
32108 _ACEOF
32109 
32110   LIBS="-lgif $LIBS"
32111 
32112 else
32113    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32114 fi
32115 
32116 
32117     USE_EXTERNAL_LIBGIF=true
32118 else
32119     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32120 fi
32121 
32122 
32123 ###############################################################################
32124 #
32125 # Check for the zlib library
32126 #
32127 
32128 
32129 # Check whether --with-zlib was given.
32130 if test "${with_zlib+set}" = set; then :
32131   withval=$with_zlib;
32132 fi
32133 
32134 
32135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32136 $as_echo_n "checking for compress in -lz... " >&6; }
32137 if test "${ac_cv_lib_z_compress+set}" = set; then :
32138   $as_echo_n "(cached) " >&6
32139 else
32140   ac_check_lib_save_LIBS=$LIBS
32141 LIBS="-lz  $LIBS"
32142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32143 /* end confdefs.h.  */
32144 
32145 /* Override any GCC internal prototype to avoid an error.
32146    Use char because int might match the return type of a GCC
32147    builtin and then its argument prototype would still apply.  */
32148 #ifdef __cplusplus
32149 extern "C"
32150 #endif
32151 char compress ();
32152 int
32153 main ()
32154 {
32155 return compress ();
32156   ;
32157   return 0;
32158 }
32159 _ACEOF
32160 if ac_fn_cxx_try_link "$LINENO"; then :
32161   ac_cv_lib_z_compress=yes
32162 else
32163   ac_cv_lib_z_compress=no
32164 fi
32165 rm -f core conftest.err conftest.$ac_objext \
32166     conftest$ac_exeext conftest.$ac_ext
32167 LIBS=$ac_check_lib_save_LIBS
32168 fi
32169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32170 $as_echo "$ac_cv_lib_z_compress" >&6; }
32171 if test "x$ac_cv_lib_z_compress" = x""yes; then :
32172    ZLIB_FOUND=yes
32173 else
32174    ZLIB_FOUND=no
32175 fi
32176 
32177 
32178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32179 $as_echo_n "checking for which zlib to use... " >&6; }
32180 
32181 DEFAULT_ZLIB=bundled
32182 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32183 #
32184 # On macosx default is system...on others default is
32185 #
32186     DEFAULT_ZLIB=system
32187 fi
32188 
32189 if test "x${ZLIB_FOUND}" != "xyes"; then
32190 #
32191 # If we don't find any system...set default to bundled
32192 #
32193     DEFAULT_ZLIB=bundled
32194 fi
32195 
32196 #
32197 # If user didn't specify, use DEFAULT_ZLIB
32198 #
32199 if test "x${with_zlib}" = "x"; then
32200     with_zlib=${DEFAULT_ZLIB}
32201 fi
32202 
32203 if test "x${with_zlib}" = "xbundled"; then
32204     USE_EXTERNAL_LIBZ=false
32205     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32206 $as_echo "bundled" >&6; }
32207 elif test "x${with_zlib}" = "xsystem"; then
32208     if test "x${ZLIB_FOUND}" = "xyes"; then
32209         USE_EXTERNAL_LIBZ=true
32210         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32211 $as_echo "system" >&6; }
32212     else
32213         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32214 $as_echo "system not found" >&6; }
32215         as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32216     fi
32217 else
32218     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32219 fi
32220 
32221 
32222 
32223 ###############################################################################
32224 LIBZIP_CAN_USE_MMAP=true
32225 
32226 
32227 
32228 ###############################################################################
32229 #
32230 # Check if altzone exists in time.h
32231 #
32232 
32233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32234 /* end confdefs.h.  */
32235 #include <time.h>
32236 int
32237 main ()
32238 {
32239 return (int)altzone;
32240   ;
32241   return 0;
32242 }
32243 _ACEOF
32244 if ac_fn_cxx_try_link "$LINENO"; then :
32245   has_altzone=yes
32246 else
32247   has_altzone=no
32248 fi
32249 rm -f core conftest.err conftest.$ac_objext \
32250     conftest$ac_exeext conftest.$ac_ext
32251 if test "x$has_altzone" = xyes; then
32252 
32253 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32254 
32255 fi
32256 
32257 ###############################################################################
32258 #
32259 # Check the maths library
32260 #
32261 
32262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32263 $as_echo_n "checking for cos in -lm... " >&6; }
32264 if test "${ac_cv_lib_m_cos+set}" = set; then :
32265   $as_echo_n "(cached) " >&6
32266 else
32267   ac_check_lib_save_LIBS=$LIBS
32268 LIBS="-lm  $LIBS"
32269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32270 /* end confdefs.h.  */
32271 
32272 /* Override any GCC internal prototype to avoid an error.
32273    Use char because int might match the return type of a GCC
32274    builtin and then its argument prototype would still apply.  */
32275 #ifdef __cplusplus
32276 extern "C"
32277 #endif
32278 char cos ();
32279 int
32280 main ()
32281 {
32282 return cos ();
32283   ;
32284   return 0;
32285 }
32286 _ACEOF
32287 if ac_fn_cxx_try_link "$LINENO"; then :
32288   ac_cv_lib_m_cos=yes
32289 else
32290   ac_cv_lib_m_cos=no
32291 fi
32292 rm -f core conftest.err conftest.$ac_objext \
32293     conftest$ac_exeext conftest.$ac_ext
32294 LIBS=$ac_check_lib_save_LIBS
32295 fi
32296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32297 $as_echo "$ac_cv_lib_m_cos" >&6; }
32298 if test "x$ac_cv_lib_m_cos" = x""yes; then :
32299   cat >>confdefs.h <<_ACEOF
32300 #define HAVE_LIBM 1
32301 _ACEOF
32302 
32303   LIBS="-lm $LIBS"
32304 
32305 else
32306 
32307                   { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32308 $as_echo "$as_me: Maths library was not found" >&6;}
32309 
32310 fi
32311 
32312 
32313 
32314 ###############################################################################
32315 #
32316 # Check for libdl.so
32317 
32318 save_LIBS="$LIBS"
32319 LIBS=""
32320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32321 $as_echo_n "checking for dlopen in -ldl... " >&6; }
32322 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32323   $as_echo_n "(cached) " >&6
32324 else
32325   ac_check_lib_save_LIBS=$LIBS
32326 LIBS="-ldl  $LIBS"
32327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32328 /* end confdefs.h.  */
32329 
32330 /* Override any GCC internal prototype to avoid an error.
32331    Use char because int might match the return type of a GCC
32332    builtin and then its argument prototype would still apply.  */
32333 #ifdef __cplusplus
32334 extern "C"
32335 #endif
32336 char dlopen ();
32337 int
32338 main ()
32339 {
32340 return dlopen ();
32341   ;
32342   return 0;
32343 }
32344 _ACEOF
32345 if ac_fn_cxx_try_link "$LINENO"; then :
32346   ac_cv_lib_dl_dlopen=yes
32347 else
32348   ac_cv_lib_dl_dlopen=no
32349 fi
32350 rm -f core conftest.err conftest.$ac_objext \
32351     conftest$ac_exeext conftest.$ac_ext
32352 LIBS=$ac_check_lib_save_LIBS
32353 fi
32354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32355 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32356 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32357   cat >>confdefs.h <<_ACEOF
32358 #define HAVE_LIBDL 1
32359 _ACEOF
32360 
32361   LIBS="-ldl $LIBS"
32362 
32363 fi
32364 
32365 LIBDL="$LIBS"
32366 
32367 LIBS="$save_LIBS"
32368 
32369 
32370 
32371 ###############################################################################
32372 #
32373 # statically link libstdc++ before C++ ABI is stablized on Linux unless
32374 # dynamic build is configured on command line.
32375 #
32376 
32377 # Check whether --with-stdc++lib was given.
32378 if test "${with_stdc__lib+set}" = set; then :
32379   withval=$with_stdc__lib;
32380     if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32381         && test "x$with_stdc__lib" != xdefault; then
32382       as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32383     fi
32384 
32385 else
32386   with_stdc__lib=default
32387 
32388 fi
32389 
32390 
32391 if test "x$OPENJDK_TARGET_OS" = xlinux; then
32392     # Test if -lstdc++ works.
32393     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32394 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32395     ac_ext=cpp
32396 ac_cpp='$CXXCPP $CPPFLAGS'
32397 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32398 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32399 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32400 
32401     OLD_CXXFLAGS="$CXXFLAGS"
32402     CXXFLAGS="$CXXFLAGS -lstdc++"
32403     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32404 /* end confdefs.h.  */
32405 
32406 int
32407 main ()
32408 {
32409 return 0;
32410   ;
32411   return 0;
32412 }
32413 _ACEOF
32414 if ac_fn_cxx_try_link "$LINENO"; then :
32415   has_dynamic_libstdcxx=yes
32416 else
32417   has_dynamic_libstdcxx=no
32418 fi
32419 rm -f core conftest.err conftest.$ac_objext \
32420     conftest$ac_exeext conftest.$ac_ext
32421     CXXFLAGS="$OLD_CXXFLAGS"
32422     ac_ext=cpp
32423 ac_cpp='$CXXCPP $CPPFLAGS'
32424 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32425 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32426 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32427 
32428     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32429 $as_echo "$has_dynamic_libstdcxx" >&6; }
32430 
32431     # Test if stdc++ can be linked statically.
32432     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32433 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32434     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32435     ac_ext=cpp
32436 ac_cpp='$CXXCPP $CPPFLAGS'
32437 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32438 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32439 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32440 
32441     OLD_LIBS="$LIBS"
32442     OLD_CXX="$CXX"
32443     LIBS="$STATIC_STDCXX_FLAGS"
32444     CXX="$CC"
32445     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32446 /* end confdefs.h.  */
32447 
32448 int
32449 main ()
32450 {
32451 return 0;
32452   ;
32453   return 0;
32454 }
32455 _ACEOF
32456 if ac_fn_cxx_try_link "$LINENO"; then :
32457   has_static_libstdcxx=yes
32458 else
32459   has_static_libstdcxx=no
32460 fi
32461 rm -f core conftest.err conftest.$ac_objext \
32462     conftest$ac_exeext conftest.$ac_ext
32463     LIBS="$OLD_LIBS"
32464     CXX="$OLD_CXX"
32465     ac_ext=cpp
32466 ac_cpp='$CXXCPP $CPPFLAGS'
32467 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32468 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32469 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32470 
32471     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32472 $as_echo "$has_static_libstdcxx" >&6; }
32473 
32474     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32475         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32476     fi
32477 
32478     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32479         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32480     fi
32481 
32482     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32483         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32484     fi
32485 
32486     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32487 $as_echo_n "checking how to link with libstdc++... " >&6; }
32488     # If dynamic was requested, it's available since it would fail above otherwise.
32489     # If dynamic wasn't requested, go with static unless it isn't available.
32490     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32491         LIBCXX="$LIBCXX -lstdc++"
32492         LDCXX="$CXX"
32493         STATIC_CXX_SETTING="STATIC_CXX=false"
32494         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32495 $as_echo "dynamic" >&6; }
32496     else
32497         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32498         LDCXX="$CC"
32499         STATIC_CXX_SETTING="STATIC_CXX=true"
32500         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32501 $as_echo "static" >&6; }
32502     fi
32503 fi
32504 
32505 
32506 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32507     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32508 
32509 pkg_failed=no
32510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32511 $as_echo_n "checking for LIBFFI... " >&6; }
32512 
32513 if test -n "$LIBFFI_CFLAGS"; then
32514     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32515  elif test -n "$PKG_CONFIG"; then
32516     if test -n "$PKG_CONFIG" && \
32517     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32518   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32519   ac_status=$?
32520   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32521   test $ac_status = 0; }; then
32522   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32523 else
32524   pkg_failed=yes
32525 fi
32526  else
32527     pkg_failed=untried
32528 fi
32529 if test -n "$LIBFFI_LIBS"; then
32530     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32531  elif test -n "$PKG_CONFIG"; then
32532     if test -n "$PKG_CONFIG" && \
32533     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32534   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32535   ac_status=$?
32536   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32537   test $ac_status = 0; }; then
32538   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32539 else
32540   pkg_failed=yes
32541 fi
32542  else
32543     pkg_failed=untried
32544 fi
32545 
32546 
32547 
32548 if test $pkg_failed = yes; then
32549 
32550 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32551         _pkg_short_errors_supported=yes
32552 else
32553         _pkg_short_errors_supported=no
32554 fi
32555         if test $_pkg_short_errors_supported = yes; then
32556                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32557         else
32558                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32559         fi
32560         # Put the nasty error message in config.log where it belongs
32561         echo "$LIBFFI_PKG_ERRORS" >&5
32562 
32563         as_fn_error $? "Package requirements (libffi) were not met:
32564 
32565 $LIBFFI_PKG_ERRORS
32566 
32567 Consider adjusting the PKG_CONFIG_PATH environment variable if you
32568 installed software in a non-standard prefix.
32569 
32570 Alternatively, you may set the environment variables LIBFFI_CFLAGS
32571 and LIBFFI_LIBS to avoid the need to call pkg-config.
32572 See the pkg-config man page for more details.
32573 " "$LINENO" 5
32574 elif test $pkg_failed = untried; then
32575         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32576 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32577 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32578 is in your PATH or set the PKG_CONFIG environment variable to the full
32579 path to pkg-config.
32580 
32581 Alternatively, you may set the environment variables LIBFFI_CFLAGS
32582 and LIBFFI_LIBS to avoid the need to call pkg-config.
32583 See the pkg-config man page for more details.
32584 
32585 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32586 See \`config.log' for more details" "$LINENO" 5 ; }
32587 else
32588         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32589         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32590         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32591 $as_echo "yes" >&6; }
32592         :
32593 fi
32594 
32595 fi
32596 
32597 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32598     # Extract the first word of "llvm-config", so it can be a program name with args.
32599 set dummy llvm-config; ac_word=$2
32600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32601 $as_echo_n "checking for $ac_word... " >&6; }
32602 if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32603   $as_echo_n "(cached) " >&6
32604 else
32605   if test -n "$LLVM_CONFIG"; then
32606   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32607 else
32608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32609 for as_dir in $PATH
32610 do
32611   IFS=$as_save_IFS
32612   test -z "$as_dir" && as_dir=.
32613     for ac_exec_ext in '' $ac_executable_extensions; do
32614   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32615     ac_cv_prog_LLVM_CONFIG="llvm-config"
32616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32617     break 2
32618   fi
32619 done
32620   done
32621 IFS=$as_save_IFS
32622 
32623 fi
32624 fi
32625 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32626 if test -n "$LLVM_CONFIG"; then
32627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32628 $as_echo "$LLVM_CONFIG" >&6; }
32629 else
32630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32631 $as_echo "no" >&6; }
32632 fi
32633 
32634 
32635 
32636     if test "x$LLVM_CONFIG" != xllvm-config; then
32637         as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32638     fi
32639 
32640     llvm_components="jit mcjit engine nativecodegen native"
32641     unset LLVM_CFLAGS
32642     for flag in $("$LLVM_CONFIG" --cxxflags); do
32643       if echo "${flag}" | grep -q '^-[ID]'; then
32644         if test "${flag}" != "-D_DEBUG" ; then
32645           if test "${LLVM_CFLAGS}" != "" ; then
32646             LLVM_CFLAGS="${LLVM_CFLAGS} "
32647           fi
32648           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32649         fi
32650       fi
32651     done
32652     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32653     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32654 
32655     unset LLVM_LDFLAGS
32656     for flag in $("${LLVM_CONFIG}" --ldflags); do
32657       if echo "${flag}" | grep -q '^-L'; then
32658         if test "${LLVM_LDFLAGS}" != ""; then
32659           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32660         fi
32661         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32662       fi
32663     done
32664 
32665     unset LLVM_LIBS
32666     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32667       if echo "${flag}" | grep -q '^-l'; then
32668         if test "${LLVM_LIBS}" != ""; then
32669           LLVM_LIBS="${LLVM_LIBS} "
32670         fi
32671         LLVM_LIBS="${LLVM_LIBS}${flag}"
32672       fi
32673     done
32674 
32675 
32676 
32677 
32678 fi
32679 
32680 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32681 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32682     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32683 fi
32684 
32685 # TODO better (platform agnostic) test
32686 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32687     LIBCXX="-lstdc++"
32688 fi
32689 
32690 
32691 
32692 
32693 
32694 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32695 
32696 # When using cygwin or msys, we need a wrapper binary that renames
32697 # /cygdrive/c/ arguments into c:/ arguments and peeks into
32698 # @files and rewrites these too! This wrapper binary is
32699 # called fixpath.
32700 FIXPATH=
32701 if test "x$OPENJDK_BUILD_OS" = xwindows; then
32702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32703 $as_echo_n "checking if fixpath can be created... " >&6; }
32704     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32705     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32706     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32707       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32708       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32709       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32710       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32711     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32712       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32713       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32714 
32715       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32716       # @ was chosen as separator to minimize risk of other tools messing around with it
32717       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32718       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32719 
32720       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32721     fi
32722     rm -f $OUTPUT_ROOT/fixpath*
32723     cd $OUTPUT_ROOT
32724     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32725     cd $CURDIR
32726 
32727     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32728         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32729 $as_echo "no" >&6; }
32730         cat $OUTPUT_ROOT/fixpath1.log
32731         as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32732     fi
32733     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32734 $as_echo "yes" >&6; }
32735     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32736 $as_echo_n "checking if fixpath.exe works... " >&6; }
32737     cd $OUTPUT_ROOT
32738     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32739     cd $CURDIR
32740     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32741         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32742 $as_echo "no" >&6; }
32743         cat $OUTPUT_ROOT/fixpath2.log
32744         as_fn_error $? "fixpath did not work!" "$LINENO" 5
32745     fi
32746     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32747 $as_echo "yes" >&6; }
32748     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32749 fi
32750 
32751 
32752 
32753 
32754 ###############################################################################
32755 #
32756 # We need to do some final tweaking, when everything else is done.
32757 #
32758 ###############################################################################
32759 
32760 
32761 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32762 
32763 
32764 # The name of the Service Agent jar.
32765 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32766 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32767   SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32768 fi
32769 
32770 
32771 
32772 
32773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32774 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32775 
32776 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32777     ENABLE_INTREE_EC=yes
32778     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32779 $as_echo "yes" >&6; }
32780 else
32781     ENABLE_INTREE_EC=no
32782     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32783 $as_echo "no" >&6; }
32784 fi
32785 
32786 
32787 
32788 
32789 ###############################################################################
32790 #
32791 # Configure parts of the build that only affect the build performance,
32792 # not the result.
32793 #
32794 ###############################################################################
32795 
32796 
32797   # How many cores do we have on this build system?
32798 
32799 # Check whether --with-num-cores was given.
32800 if test "${with_num_cores+set}" = set; then :
32801   withval=$with_num_cores;
32802 fi
32803 
32804   if test "x$with_num_cores" = x; then
32805     # The number of cores were not specified, try to probe them.
32806 
32807     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32808 $as_echo_n "checking for number of cores... " >&6; }
32809     NUM_CORES=1
32810     FOUND_CORES=no
32811 
32812     if test -f /proc/cpuinfo; then
32813         # Looks like a Linux (or cygwin) system
32814         NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32815         FOUND_CORES=yes
32816     elif test -x /usr/sbin/psrinfo; then
32817         # Looks like a Solaris system
32818         NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32819         FOUND_CORES=yes
32820     elif test -x /usr/sbin/system_profiler; then
32821         # Looks like a MacOSX system
32822         NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32823         FOUND_CORES=yes
32824     elif test -n "$NUMBER_OF_PROCESSORS"; then
32825         # On windows, look in the env
32826         NUM_CORES=$NUMBER_OF_PROCESSORS
32827         FOUND_CORES=yes
32828     fi
32829 
32830     if test "x$FOUND_CORES" = xyes; then
32831         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32832 $as_echo "$NUM_CORES" >&6; }
32833     else
32834         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32835 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
32836         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32837 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32838     fi
32839 
32840 
32841   else
32842     NUM_CORES=$with_num_cores
32843   fi
32844 
32845 
32846 
32847   # How much memory do we have on this build system?
32848 
32849 # Check whether --with-memory-size was given.
32850 if test "${with_memory_size+set}" = set; then :
32851   withval=$with_memory_size;
32852 fi
32853 
32854   if test "x$with_memory_size" = x; then
32855     # The memory size was not specified, try to probe it.
32856 
32857     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32858 $as_echo_n "checking for memory size... " >&6; }
32859     # Default to 1024 MB
32860     MEMORY_SIZE=1024
32861     FOUND_MEM=no
32862 
32863     if test -f /proc/meminfo; then
32864         # Looks like a Linux (or cygwin) system
32865         MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32866         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32867         FOUND_MEM=yes
32868     elif test -x /usr/sbin/prtconf; then
32869         # Looks like a Solaris system
32870         MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32871         FOUND_MEM=yes
32872     elif test -x /usr/sbin/system_profiler; then
32873         # Looks like a MacOSX system
32874         MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32875         MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32876         FOUND_MEM=yes
32877     elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32878         # Windows, but without cygwin
32879         MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32880         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32881         FOUND_MEM=yes
32882     fi
32883 
32884     if test "x$FOUND_MEM" = xyes; then
32885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32886 $as_echo "$MEMORY_SIZE MB" >&6; }
32887     else
32888         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32889 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32890         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32891 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32892     fi
32893 
32894   else
32895     MEMORY_SIZE=$with_memory_size
32896   fi
32897 
32898 
32899 
32900   # Provide a decent default number of parallel jobs for make depending on
32901   # number of cores, amount of memory and machine architecture.
32902 
32903 # Check whether --with-jobs was given.
32904 if test "${with_jobs+set}" = set; then :
32905   withval=$with_jobs;
32906 fi
32907 
32908   if test "x$with_jobs" = x; then
32909     # Number of jobs was not specified, calculate.
32910     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32911 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32912     # Approximate memory in GB, rounding up a bit.
32913     memory_gb=`expr $MEMORY_SIZE / 1100`
32914     # Pick the lowest of memory in gb and number of cores.
32915     if test "$memory_gb" -lt "$NUM_CORES"; then
32916       JOBS="$memory_gb"
32917     else
32918       JOBS="$NUM_CORES"
32919       # On bigger machines, leave some room for other processes to run
32920       if test "$JOBS" -gt "4"; then
32921         JOBS=`expr $JOBS '*' 90 / 100`
32922       fi
32923     fi
32924     # Cap number of jobs to 16
32925     if test "$JOBS" -gt "16"; then
32926       JOBS=16
32927     fi
32928     if test "$JOBS" -eq "0"; then
32929       JOBS=1
32930     fi
32931     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32932 $as_echo "$JOBS" >&6; }
32933   else
32934     JOBS=$with_jobs
32935   fi
32936 
32937 
32938 
32939 # Setup smart javac (after cores and memory have been setup)
32940 
32941 
32942 # Check whether --with-sjavac-server-java was given.
32943 if test "${with_sjavac_server_java+set}" = set; then :
32944   withval=$with_sjavac_server_java;
32945 fi
32946 
32947 
32948 if test "x$with_sjavac_server_java" != x; then
32949     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32950     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32951     if test "x$FOUND_VERSION" = x; then
32952         as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32953     fi
32954 else
32955     SJAVAC_SERVER_JAVA=""
32956     # Hotspot specific options.
32957 
32958     $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32959     $ECHO "Command: $JAVA -verbosegc -version" >&5
32960     OUTPUT=`$JAVA -verbosegc -version 2>&1`
32961     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32962     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32963     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32964         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32965         JVM_ARG_OK=true
32966     else
32967         $ECHO "Arg failed:" >&5
32968         $ECHO "$OUTPUT" >&5
32969         JVM_ARG_OK=false
32970     fi
32971 
32972     # JRockit specific options.
32973 
32974     $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32975     $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32976     OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32977     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32978     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32979     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32980         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32981         JVM_ARG_OK=true
32982     else
32983         $ECHO "Arg failed:" >&5
32984         $ECHO "$OUTPUT" >&5
32985         JVM_ARG_OK=false
32986     fi
32987 
32988     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32989 fi
32990 
32991 
32992 if test "$MEMORY_SIZE" -gt "2500"; then
32993 
32994     $ECHO "Check if jvm arg is ok: -d64" >&5
32995     $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32996     OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32997     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32998     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32999     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33000         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33001         JVM_ARG_OK=true
33002     else
33003         $ECHO "Arg failed:" >&5
33004         $ECHO "$OUTPUT" >&5
33005         JVM_ARG_OK=false
33006     fi
33007 
33008     if test "$JVM_ARG_OK" = true; then
33009         JVM_64BIT=true
33010         JVM_ARG_OK=false
33011     fi
33012     fi
33013 
33014 if test "$JVM_64BIT" = true; then
33015     if test "$MEMORY_SIZE" -gt "17000"; then
33016 
33017     $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33018     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33019     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33020     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33021     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33022     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33023         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33024         JVM_ARG_OK=true
33025     else
33026         $ECHO "Arg failed:" >&5
33027         $ECHO "$OUTPUT" >&5
33028         JVM_ARG_OK=false
33029     fi
33030 
33031     fi
33032     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33033 
33034     $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33035     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33036     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33037     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33038     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33039     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33040         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33041         JVM_ARG_OK=true
33042     else
33043         $ECHO "Arg failed:" >&5
33044         $ECHO "$OUTPUT" >&5
33045         JVM_ARG_OK=false
33046     fi
33047 
33048     fi
33049     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33050 
33051     $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33052     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33053     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33054     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33055     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33056     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33057         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33058         JVM_ARG_OK=true
33059     else
33060         $ECHO "Arg failed:" >&5
33061         $ECHO "$OUTPUT" >&5
33062         JVM_ARG_OK=false
33063     fi
33064 
33065     fi
33066     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33067 
33068     $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33069     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33070     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33071     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33072     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33073     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33074         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33075         JVM_ARG_OK=true
33076     else
33077         $ECHO "Arg failed:" >&5
33078         $ECHO "$OUTPUT" >&5
33079         JVM_ARG_OK=false
33080     fi
33081 
33082     fi
33083 fi
33084 if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33085 
33086     $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33087     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33088     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33089     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33090     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33091     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33092         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33093         JVM_ARG_OK=true
33094     else
33095         $ECHO "Arg failed:" >&5
33096         $ECHO "$OUTPUT" >&5
33097         JVM_ARG_OK=false
33098     fi
33099 
33100 fi
33101 if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33102 
33103     $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33104     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33105     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33106     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33107     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33108     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33109         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33110         JVM_ARG_OK=true
33111     else
33112         $ECHO "Arg failed:" >&5
33113         $ECHO "$OUTPUT" >&5
33114         JVM_ARG_OK=false
33115     fi
33116 
33117 fi
33118 if test "$JVM_ARG_OK" = false; then
33119 
33120     $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33121     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33122     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33123     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33124     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33125     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33126         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33127         JVM_ARG_OK=true
33128     else
33129         $ECHO "Arg failed:" >&5
33130         $ECHO "$OUTPUT" >&5
33131         JVM_ARG_OK=false
33132     fi
33133 
33134 fi
33135 
33136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33137 $as_echo_n "checking whether to use sjavac... " >&6; }
33138 # Check whether --enable-sjavac was given.
33139 if test "${enable_sjavac+set}" = set; then :
33140   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33141 else
33142   ENABLE_SJAVAC='no'
33143 fi
33144 
33145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33146 $as_echo "$ENABLE_SJAVAC" >&6; }
33147 
33148 
33149 if test "x$ENABLE_SJAVAC" = xyes; then
33150     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33151 else
33152     SJAVAC_SERVER_DIR=
33153 fi
33154 
33155 
33156 
33157 
33158 # Can the C/C++ compiler use precompiled headers?
33159 
33160 
33161 ###############################################################################
33162 #
33163 # Can the C/C++ compiler use precompiled headers?
33164 #
33165 # Check whether --enable-precompiled-headers was given.
33166 if test "${enable_precompiled_headers+set}" = set; then :
33167   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33168 else
33169   ENABLE_PRECOMPH=yes
33170 fi
33171 
33172 
33173 USE_PRECOMPILED_HEADER=1
33174 if test "x$ENABLE_PRECOMPH" = xno; then
33175     USE_PRECOMPILED_HEADER=0
33176 fi
33177 
33178 if test "x$ENABLE_PRECOMPH" = xyes; then
33179     # Check that the compiler actually supports precomp headers.
33180     if test "x$GCC" = xyes; then
33181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33182 $as_echo_n "checking that precompiled headers work... " >&6; }
33183          echo "int alfa();" > conftest.h
33184          $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33185          if test ! -f conftest.hpp.gch; then
33186              USE_PRECOMPILED_HEADER=0
33187              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33188 $as_echo "no" >&6; }
33189          else
33190              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33191 $as_echo "yes" >&6; }
33192          fi
33193          rm -f conftest.h conftest.hpp.gch
33194     fi
33195 fi
33196 
33197 
33198 
33199 
33200 # Setup use of ccache, if available
33201 
33202     # Check whether --enable-ccache was given.
33203 if test "${enable_ccache+set}" = set; then :
33204   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33205 else
33206   ENABLE_CCACHE=yes
33207 fi
33208 
33209     if test "x$ENABLE_CCACHE" = xyes; then
33210         # Extract the first word of "ccache", so it can be a program name with args.
33211 set dummy ccache; ac_word=$2
33212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33213 $as_echo_n "checking for $ac_word... " >&6; }
33214 if test "${ac_cv_path_CCACHE+set}" = set; then :
33215   $as_echo_n "(cached) " >&6
33216 else
33217   case $CCACHE in
33218   [\\/]* | ?:[\\/]*)
33219   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33220   ;;
33221   *)
33222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33223 for as_dir in $PATH
33224 do
33225   IFS=$as_save_IFS
33226   test -z "$as_dir" && as_dir=.
33227     for ac_exec_ext in '' $ac_executable_extensions; do
33228   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33229     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33231     break 2
33232   fi
33233 done
33234   done
33235 IFS=$as_save_IFS
33236 
33237   ;;
33238 esac
33239 fi
33240 CCACHE=$ac_cv_path_CCACHE
33241 if test -n "$CCACHE"; then
33242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33243 $as_echo "$CCACHE" >&6; }
33244 else
33245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33246 $as_echo "no" >&6; }
33247 fi
33248 
33249 
33250     else
33251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33252 $as_echo_n "checking for ccache... " >&6; }
33253         { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33254 $as_echo "explicitly disabled" >&6; }
33255         CCACHE=
33256     fi
33257 
33258 
33259 
33260 # Check whether --with-ccache-dir was given.
33261 if test "${with_ccache_dir+set}" = set; then :
33262   withval=$with_ccache_dir;
33263 fi
33264 
33265 
33266     if test "x$with_ccache_dir" != x; then
33267         # When using a non home ccache directory, assume the use is to share ccache files
33268         # with other users. Thus change the umask.
33269         SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33270     fi
33271     CCACHE_FOUND=""
33272     if test "x$CCACHE" != x; then
33273 
33274     if test "x$CCACHE" != x; then
33275         CCACHE_FOUND="true"
33276         # Only use ccache if it is 3.1.4 or later, which supports
33277         # precompiled headers.
33278         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33279 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33280         HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33281         if test "x$HAS_GOOD_CCACHE" = x; then
33282             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33283 $as_echo "no, disabling ccache" >&6; }
33284             CCACHE=
33285         else
33286             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33287 $as_echo "yes" >&6; }
33288             { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33289 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33290             PUSHED_FLAGS="$CXXFLAGS"
33291             CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33292             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33293 /* end confdefs.h.  */
33294 
33295 int
33296 main ()
33297 {
33298 
33299   ;
33300   return 0;
33301 }
33302 _ACEOF
33303 if ac_fn_cxx_try_compile "$LINENO"; then :
33304   CC_KNOWS_CCACHE_TRICK=yes
33305 else
33306   CC_KNOWS_CCACHE_TRICK=no
33307 fi
33308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33309             CXXFLAGS="$PUSHED_FLAGS"
33310             if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33311                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33312 $as_echo "yes" >&6; }
33313             else
33314                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33315 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
33316                 CCACHE=
33317             fi
33318         fi
33319     fi
33320 
33321     if test "x$CCACHE" != x; then
33322         CCACHE_SLOPPINESS=time_macros
33323         CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33324         CCACHE_FLAGS=-fpch-preprocess
33325 
33326         if test "x$SET_CCACHE_DIR" != x; then
33327             mkdir -p $CCACHE_DIR > /dev/null 2>&1
33328             chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33329         fi
33330     fi
33331 
33332     fi
33333 
33334 
33335 ###############################################################################
33336 #
33337 # And now the finish...
33338 #
33339 ###############################################################################
33340 
33341 # Check for some common pitfalls
33342 
33343   if test x"$OPENJDK_BUILD_OS" = xwindows; then
33344     file_to_test="$SRC_ROOT/LICENSE"
33345     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33346       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
33347     fi
33348   fi
33349 
33350 
33351 
33352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33353 $as_echo_n "checking if build directory is on local disk... " >&6; }
33354 
33355         # df -l lists only local disks; if the given directory is not found then
33356         # a non-zero exit code is given
33357   if test "x$DF" = x; then
33358     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33359       # msys does not have df; use Windows "net use" instead.
33360       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33361       if test "x$IS_NETWORK_DISK" = x; then
33362         OUTPUT_DIR_IS_LOCAL="yes"
33363       else
33364         OUTPUT_DIR_IS_LOCAL="no"
33365       fi
33366     else
33367       # No df here, say it's local
33368       OUTPUT_DIR_IS_LOCAL="yes"
33369     fi
33370   else
33371     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33372       OUTPUT_DIR_IS_LOCAL="yes"
33373     else
33374       OUTPUT_DIR_IS_LOCAL="no"
33375     fi
33376   fi
33377 
33378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33379 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33380 
33381 
33382 
33383 # Check if the user has any old-style ALT_ variables set.
33384 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33385 
33386 # Before generating output files, test if they exist. If they do, this is a reconfigure.
33387 # Since we can't properly handle the dependencies for this, warn the user about the situation
33388 if test -e $OUTPUT_ROOT/spec.gmk; then
33389   IS_RECONFIGURE=yes
33390 else
33391   IS_RECONFIGURE=no
33392 fi
33393 
33394 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33395   HIDE_PERFORMANCE_HINTS=yes
33396 else
33397   HIDE_PERFORMANCE_HINTS=no
33398   # Hide it the next time around...
33399   $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33400 fi
33401 
33402 
33403 
33404 # At the end, call the custom hook. (Dummy macro if no custom sources available)
33405 
33406 
33407 # We're messing a bit with internal autoconf variables to put the config.status
33408 # in the output directory instead of the current directory.
33409 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33410 # Create the actual output files. Now the main work of configure is done.
33411 cat >confcache <<\_ACEOF
33412 # This file is a shell script that caches the results of configure
33413 # tests run on this system so they can be shared between configure
33414 # scripts and configure runs, see configure's option --config-cache.
33415 # It is not useful on other systems.  If it contains results you don't
33416 # want to keep, you may remove or edit it.
33417 #
33418 # config.status only pays attention to the cache file if you give it
33419 # the --recheck option to rerun configure.
33420 #
33421 # `ac_cv_env_foo' variables (set or unset) will be overridden when
33422 # loading this file, other *unset* `ac_cv_foo' will be assigned the
33423 # following values.
33424 
33425 _ACEOF
33426 
33427 # The following way of writing the cache mishandles newlines in values,
33428 # but we know of no workaround that is simple, portable, and efficient.
33429 # So, we kill variables containing newlines.
33430 # Ultrix sh set writes to stderr and can't be redirected directly,
33431 # and sets the high bit in the cache file unless we assign to the vars.
33432 (
33433   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33434     eval ac_val=\$$ac_var
33435     case $ac_val in #(
33436     *${as_nl}*)
33437       case $ac_var in #(
33438       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33439 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33440       esac
33441       case $ac_var in #(
33442       _ | IFS | as_nl) ;; #(
33443       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33444       *) { eval $ac_var=; unset $ac_var;} ;;
33445       esac ;;
33446     esac
33447   done
33448 
33449   (set) 2>&1 |
33450     case $as_nl`(ac_space=' '; set) 2>&1` in #(
33451     *${as_nl}ac_space=\ *)
33452       # `set' does not quote correctly, so add quotes: double-quote
33453       # substitution turns \\\\ into \\, and sed turns \\ into \.
33454       sed -n \
33455         "s/'/'\\\\''/g;
33456           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33457       ;; #(
33458     *)
33459       # `set' quotes correctly as required by POSIX, so do not add quotes.
33460       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33461       ;;
33462     esac |
33463     sort
33464 ) |
33465   sed '
33466      /^ac_cv_env_/b end
33467      t clear
33468      :clear
33469      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33470      t end
33471      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33472      :end' >>confcache
33473 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33474   if test -w "$cache_file"; then
33475     test "x$cache_file" != "x/dev/null" &&
33476       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33477 $as_echo "$as_me: updating cache $cache_file" >&6;}
33478     cat confcache >$cache_file
33479   else
33480     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33481 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33482   fi
33483 fi
33484 rm -f confcache
33485 
33486 test "x$prefix" = xNONE && prefix=$ac_default_prefix
33487 # Let make expand exec_prefix.
33488 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33489 
33490 DEFS=-DHAVE_CONFIG_H
33491 
33492 ac_libobjs=
33493 ac_ltlibobjs=
33494 U=
33495 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33496   # 1. Remove the extension, and $U if already installed.
33497   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33498   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33499   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33500   #    will be set to the directory where LIBOBJS objects are built.
33501   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33502   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33503 done
33504 LIBOBJS=$ac_libobjs
33505 
33506 LTLIBOBJS=$ac_ltlibobjs
33507 
33508 
33509 
33510 : ${CONFIG_STATUS=./config.status}
33511 ac_write_fail=0
33512 ac_clean_files_save=$ac_clean_files
33513 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33514 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33515 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33516 as_write_fail=0
33517 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33518 #! $SHELL
33519 # Generated by $as_me.
33520 # Run this file to recreate the current configuration.
33521 # Compiler output produced by configure, useful for debugging
33522 # configure, is in config.log if it exists.
33523 
33524 debug=false
33525 ac_cs_recheck=false
33526 ac_cs_silent=false
33527 
33528 SHELL=\${CONFIG_SHELL-$SHELL}
33529 export SHELL
33530 _ASEOF
33531 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33532 ## -------------------- ##
33533 ## M4sh Initialization. ##
33534 ## -------------------- ##
33535 
33536 # Be more Bourne compatible
33537 DUALCASE=1; export DUALCASE # for MKS sh
33538 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33539   emulate sh
33540   NULLCMD=:
33541   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33542   # is contrary to our usage.  Disable this feature.
33543   alias -g '${1+"$@"}'='"$@"'
33544   setopt NO_GLOB_SUBST
33545 else
33546   case `(set -o) 2>/dev/null` in #(
33547   *posix*) :
33548     set -o posix ;; #(
33549   *) :
33550      ;;
33551 esac
33552 fi
33553 
33554 
33555 as_nl='
33556 '
33557 export as_nl
33558 # Printing a long string crashes Solaris 7 /usr/bin/printf.
33559 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33560 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33561 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33562 # Prefer a ksh shell builtin over an external printf program on Solaris,
33563 # but without wasting forks for bash or zsh.
33564 if test -z "$BASH_VERSION$ZSH_VERSION" \
33565     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33566   as_echo='print -r --'
33567   as_echo_n='print -rn --'
33568 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33569   as_echo='printf %s\n'
33570   as_echo_n='printf %s'
33571 else
33572   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33573     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33574     as_echo_n='/usr/ucb/echo -n'
33575   else
33576     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33577     as_echo_n_body='eval
33578       arg=$1;
33579       case $arg in #(
33580       *"$as_nl"*)
33581         expr "X$arg" : "X\\(.*\\)$as_nl";
33582         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33583       esac;
33584       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33585     '
33586     export as_echo_n_body
33587     as_echo_n='sh -c $as_echo_n_body as_echo'
33588   fi
33589   export as_echo_body
33590   as_echo='sh -c $as_echo_body as_echo'
33591 fi
33592 
33593 # The user is always right.
33594 if test "${PATH_SEPARATOR+set}" != set; then
33595   PATH_SEPARATOR=:
33596   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33597     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33598       PATH_SEPARATOR=';'
33599   }
33600 fi
33601 
33602 
33603 # IFS
33604 # We need space, tab and new line, in precisely that order.  Quoting is
33605 # there to prevent editors from complaining about space-tab.
33606 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
33607 # splitting by setting IFS to empty value.)
33608 IFS=" ""        $as_nl"
33609 
33610 # Find who we are.  Look in the path if we contain no directory separator.
33611 case $0 in #((
33612   *[\\/]* ) as_myself=$0 ;;
33613   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33614 for as_dir in $PATH
33615 do
33616   IFS=$as_save_IFS
33617   test -z "$as_dir" && as_dir=.
33618     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33619   done
33620 IFS=$as_save_IFS
33621 
33622      ;;
33623 esac
33624 # We did not find ourselves, most probably we were run as `sh COMMAND'
33625 # in which case we are not to be found in the path.
33626 if test "x$as_myself" = x; then
33627   as_myself=$0
33628 fi
33629 if test ! -f "$as_myself"; then
33630   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33631   exit 1
33632 fi
33633 
33634 # Unset variables that we do not need and which cause bugs (e.g. in
33635 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33636 # suppresses any "Segmentation fault" message there.  '((' could
33637 # trigger a bug in pdksh 5.2.14.
33638 for as_var in BASH_ENV ENV MAIL MAILPATH
33639 do eval test x\${$as_var+set} = xset \
33640   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33641 done
33642 PS1='$ '
33643 PS2='> '
33644 PS4='+ '
33645 
33646 # NLS nuisances.
33647 LC_ALL=C
33648 export LC_ALL
33649 LANGUAGE=C
33650 export LANGUAGE
33651 
33652 # CDPATH.
33653 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33654 
33655 
33656 # as_fn_error STATUS ERROR [LINENO LOG_FD]
33657 # ----------------------------------------
33658 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33659 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33660 # script with STATUS, using 1 if that was 0.
33661 as_fn_error ()
33662 {
33663   as_status=$1; test $as_status -eq 0 && as_status=1
33664   if test "$4"; then
33665     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33666     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33667   fi
33668   $as_echo "$as_me: error: $2" >&2
33669   as_fn_exit $as_status
33670 } # as_fn_error
33671 
33672 
33673 # as_fn_set_status STATUS
33674 # -----------------------
33675 # Set $? to STATUS, without forking.
33676 as_fn_set_status ()
33677 {
33678   return $1
33679 } # as_fn_set_status
33680 
33681 # as_fn_exit STATUS
33682 # -----------------
33683 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33684 as_fn_exit ()
33685 {
33686   set +e
33687   as_fn_set_status $1
33688   exit $1
33689 } # as_fn_exit
33690 
33691 # as_fn_unset VAR
33692 # ---------------
33693 # Portably unset VAR.
33694 as_fn_unset ()
33695 {
33696   { eval $1=; unset $1;}
33697 }
33698 as_unset=as_fn_unset
33699 # as_fn_append VAR VALUE
33700 # ----------------------
33701 # Append the text in VALUE to the end of the definition contained in VAR. Take
33702 # advantage of any shell optimizations that allow amortized linear growth over
33703 # repeated appends, instead of the typical quadratic growth present in naive
33704 # implementations.
33705 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33706   eval 'as_fn_append ()
33707   {
33708     eval $1+=\$2
33709   }'
33710 else
33711   as_fn_append ()
33712   {
33713     eval $1=\$$1\$2
33714   }
33715 fi # as_fn_append
33716 
33717 # as_fn_arith ARG...
33718 # ------------------
33719 # Perform arithmetic evaluation on the ARGs, and store the result in the
33720 # global $as_val. Take advantage of shells that can avoid forks. The arguments
33721 # must be portable across $(()) and expr.
33722 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33723   eval 'as_fn_arith ()
33724   {
33725     as_val=$(( $* ))
33726   }'
33727 else
33728   as_fn_arith ()
33729   {
33730     as_val=`expr "$@" || test $? -eq 1`
33731   }
33732 fi # as_fn_arith
33733 
33734 
33735 if expr a : '\(a\)' >/dev/null 2>&1 &&
33736    test "X`expr 00001 : '.*\(...\)'`" = X001; then
33737   as_expr=expr
33738 else
33739   as_expr=false
33740 fi
33741 
33742 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33743   as_basename=basename
33744 else
33745   as_basename=false
33746 fi
33747 
33748 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33749   as_dirname=dirname
33750 else
33751   as_dirname=false
33752 fi
33753 
33754 as_me=`$as_basename -- "$0" ||
33755 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33756          X"$0" : 'X\(//\)$' \| \
33757          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33758 $as_echo X/"$0" |
33759     sed '/^.*\/\([^/][^/]*\)\/*$/{
33760             s//\1/
33761             q
33762           }
33763           /^X\/\(\/\/\)$/{
33764             s//\1/
33765             q
33766           }
33767           /^X\/\(\/\).*/{
33768             s//\1/
33769             q
33770           }
33771           s/.*/./; q'`
33772 
33773 # Avoid depending upon Character Ranges.
33774 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33775 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33776 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33777 as_cr_digits='0123456789'
33778 as_cr_alnum=$as_cr_Letters$as_cr_digits
33779 
33780 ECHO_C= ECHO_N= ECHO_T=
33781 case `echo -n x` in #(((((
33782 -n*)
33783   case `echo 'xy\c'` in
33784   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
33785   xy)  ECHO_C='\c';;
33786   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33787        ECHO_T=' ';;
33788   esac;;
33789 *)
33790   ECHO_N='-n';;
33791 esac
33792 
33793 rm -f conf$$ conf$$.exe conf$$.file
33794 if test -d conf$$.dir; then
33795   rm -f conf$$.dir/conf$$.file
33796 else
33797   rm -f conf$$.dir
33798   mkdir conf$$.dir 2>/dev/null
33799 fi
33800 if (echo >conf$$.file) 2>/dev/null; then
33801   if ln -s conf$$.file conf$$ 2>/dev/null; then
33802     as_ln_s='ln -s'
33803     # ... but there are two gotchas:
33804     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33805     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33806     # In both cases, we have to default to `cp -p'.
33807     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33808       as_ln_s='cp -p'
33809   elif ln conf$$.file conf$$ 2>/dev/null; then
33810     as_ln_s=ln
33811   else
33812     as_ln_s='cp -p'
33813   fi
33814 else
33815   as_ln_s='cp -p'
33816 fi
33817 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33818 rmdir conf$$.dir 2>/dev/null
33819 
33820 
33821 # as_fn_mkdir_p
33822 # -------------
33823 # Create "$as_dir" as a directory, including parents if necessary.
33824 as_fn_mkdir_p ()
33825 {
33826 
33827   case $as_dir in #(
33828   -*) as_dir=./$as_dir;;
33829   esac
33830   test -d "$as_dir" || eval $as_mkdir_p || {
33831     as_dirs=
33832     while :; do
33833       case $as_dir in #(
33834       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33835       *) as_qdir=$as_dir;;
33836       esac
33837       as_dirs="'$as_qdir' $as_dirs"
33838       as_dir=`$as_dirname -- "$as_dir" ||
33839 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33840          X"$as_dir" : 'X\(//\)[^/]' \| \
33841          X"$as_dir" : 'X\(//\)$' \| \
33842          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33843 $as_echo X"$as_dir" |
33844     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33845             s//\1/
33846             q
33847           }
33848           /^X\(\/\/\)[^/].*/{
33849             s//\1/
33850             q
33851           }
33852           /^X\(\/\/\)$/{
33853             s//\1/
33854             q
33855           }
33856           /^X\(\/\).*/{
33857             s//\1/
33858             q
33859           }
33860           s/.*/./; q'`
33861       test -d "$as_dir" && break
33862     done
33863     test -z "$as_dirs" || eval "mkdir $as_dirs"
33864   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33865 
33866 
33867 } # as_fn_mkdir_p
33868 if mkdir -p . 2>/dev/null; then
33869   as_mkdir_p='mkdir -p "$as_dir"'
33870 else
33871   test -d ./-p && rmdir ./-p
33872   as_mkdir_p=false
33873 fi
33874 
33875 if test -x / >/dev/null 2>&1; then
33876   as_test_x='test -x'
33877 else
33878   if ls -dL / >/dev/null 2>&1; then
33879     as_ls_L_option=L
33880   else
33881     as_ls_L_option=
33882   fi
33883   as_test_x='
33884     eval sh -c '\''
33885       if test -d "$1"; then
33886         test -d "$1/.";
33887       else
33888         case $1 in #(
33889         -*)set "./$1";;
33890         esac;
33891         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33892         ???[sx]*):;;*)false;;esac;fi
33893     '\'' sh
33894   '
33895 fi
33896 as_executable_p=$as_test_x
33897 
33898 # Sed expression to map a string onto a valid CPP name.
33899 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33900 
33901 # Sed expression to map a string onto a valid variable name.
33902 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33903 
33904 
33905 exec 6>&1
33906 ## ----------------------------------- ##
33907 ## Main body of $CONFIG_STATUS script. ##
33908 ## ----------------------------------- ##
33909 _ASEOF
33910 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33911 
33912 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33913 # Save the log message, to keep $0 and so on meaningful, and to
33914 # report actual input values of CONFIG_FILES etc. instead of their
33915 # values after options handling.
33916 ac_log="
33917 This file was extended by OpenJDK $as_me jdk8, which was
33918 generated by GNU Autoconf 2.67.  Invocation command line was
33919 
33920   CONFIG_FILES    = $CONFIG_FILES
33921   CONFIG_HEADERS  = $CONFIG_HEADERS
33922   CONFIG_LINKS    = $CONFIG_LINKS
33923   CONFIG_COMMANDS = $CONFIG_COMMANDS
33924   $ $0 $@
33925 
33926 on `(hostname || uname -n) 2>/dev/null | sed 1q`
33927 "
33928 
33929 _ACEOF
33930 
33931 case $ac_config_files in *"
33932 "*) set x $ac_config_files; shift; ac_config_files=$*;;
33933 esac
33934 
33935 case $ac_config_headers in *"
33936 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33937 esac
33938 
33939 
33940 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33941 # Files that config.status was made for.
33942 config_files="$ac_config_files"
33943 config_headers="$ac_config_headers"
33944 
33945 _ACEOF
33946 
33947 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33948 ac_cs_usage="\
33949 \`$as_me' instantiates files and other configuration actions
33950 from templates according to the current configuration.  Unless the files
33951 and actions are specified as TAGs, all are instantiated by default.
33952 
33953 Usage: $0 [OPTION]... [TAG]...
33954 
33955   -h, --help       print this help, then exit
33956   -V, --version    print version number and configuration settings, then exit
33957       --config     print configuration, then exit
33958   -q, --quiet, --silent
33959                    do not print progress messages
33960   -d, --debug      don't remove temporary files
33961       --recheck    update $as_me by reconfiguring in the same conditions
33962       --file=FILE[:TEMPLATE]
33963                    instantiate the configuration file FILE
33964       --header=FILE[:TEMPLATE]
33965                    instantiate the configuration header FILE
33966 
33967 Configuration files:
33968 $config_files
33969 
33970 Configuration headers:
33971 $config_headers
33972 
33973 Report bugs to <build-dev@openjdk.java.net>.
33974 OpenJDK home page: <http://openjdk.java.net>."
33975 
33976 _ACEOF
33977 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33978 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33979 ac_cs_version="\\
33980 OpenJDK config.status jdk8
33981 configured by $0, generated by GNU Autoconf 2.67,
33982   with options \\"\$ac_cs_config\\"
33983 
33984 Copyright (C) 2010 Free Software Foundation, Inc.
33985 This config.status script is free software; the Free Software Foundation
33986 gives unlimited permission to copy, distribute and modify it."
33987 
33988 ac_pwd='$ac_pwd'
33989 srcdir='$srcdir'
33990 AWK='$AWK'
33991 test -n "\$AWK" || AWK=awk
33992 _ACEOF
33993 
33994 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33995 # The default lists apply if the user does not specify any file.
33996 ac_need_defaults=:
33997 while test $# != 0
33998 do
33999   case $1 in
34000   --*=?*)
34001     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34002     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34003     ac_shift=:
34004     ;;
34005   --*=)
34006     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34007     ac_optarg=
34008     ac_shift=:
34009     ;;
34010   *)
34011     ac_option=$1
34012     ac_optarg=$2
34013     ac_shift=shift
34014     ;;
34015   esac
34016 
34017   case $ac_option in
34018   # Handling of the options.
34019   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34020     ac_cs_recheck=: ;;
34021   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34022     $as_echo "$ac_cs_version"; exit ;;
34023   --config | --confi | --conf | --con | --co | --c )
34024     $as_echo "$ac_cs_config"; exit ;;
34025   --debug | --debu | --deb | --de | --d | -d )
34026     debug=: ;;
34027   --file | --fil | --fi | --f )
34028     $ac_shift
34029     case $ac_optarg in
34030     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34031     '') as_fn_error $? "missing file argument" ;;
34032     esac
34033     as_fn_append CONFIG_FILES " '$ac_optarg'"
34034     ac_need_defaults=false;;
34035   --header | --heade | --head | --hea )
34036     $ac_shift
34037     case $ac_optarg in
34038     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34039     esac
34040     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34041     ac_need_defaults=false;;
34042   --he | --h)
34043     # Conflict between --help and --header
34044     as_fn_error $? "ambiguous option: \`$1'
34045 Try \`$0 --help' for more information.";;
34046   --help | --hel | -h )
34047     $as_echo "$ac_cs_usage"; exit ;;
34048   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34049   | -silent | --silent | --silen | --sile | --sil | --si | --s)
34050     ac_cs_silent=: ;;
34051 
34052   # This is an error.
34053   -*) as_fn_error $? "unrecognized option: \`$1'
34054 Try \`$0 --help' for more information." ;;
34055 
34056   *) as_fn_append ac_config_targets " $1"
34057      ac_need_defaults=false ;;
34058 
34059   esac
34060   shift
34061 done
34062 
34063 ac_configure_extra_args=
34064 
34065 if $ac_cs_silent; then
34066   exec 6>/dev/null
34067   ac_configure_extra_args="$ac_configure_extra_args --silent"
34068 fi
34069 
34070 _ACEOF
34071 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34072 if \$ac_cs_recheck; then
34073   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34074   shift
34075   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34076   CONFIG_SHELL='$SHELL'
34077   export CONFIG_SHELL
34078   exec "\$@"
34079 fi
34080 
34081 _ACEOF
34082 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34083 exec 5>>config.log
34084 {
34085   echo
34086   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34087 ## Running $as_me. ##
34088 _ASBOX
34089   $as_echo "$ac_log"
34090 } >&5
34091 
34092 _ACEOF
34093 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34094 _ACEOF
34095 
34096 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34097 
34098 # Handling of arguments.
34099 for ac_config_target in $ac_config_targets
34100 do
34101   case $ac_config_target in
34102     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34103     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34104     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34105     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34106     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34107     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34108     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34109 
34110   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34111   esac
34112 done
34113 
34114 
34115 # If the user did not use the arguments to specify the items to instantiate,
34116 # then the envvar interface is used.  Set only those that are not.
34117 # We use the long form for the default assignment because of an extremely
34118 # bizarre bug on SunOS 4.1.3.
34119 if $ac_need_defaults; then
34120   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34121   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34122 fi
34123 
34124 # Have a temporary directory for convenience.  Make it in the build tree
34125 # simply because there is no reason against having it here, and in addition,
34126 # creating and moving files from /tmp can sometimes cause problems.
34127 # Hook for its removal unless debugging.
34128 # Note that there is a small window in which the directory will not be cleaned:
34129 # after its creation but before its name has been assigned to `$tmp'.
34130 $debug ||
34131 {
34132   tmp=
34133   trap 'exit_status=$?
34134   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34135 ' 0
34136   trap 'as_fn_exit 1' 1 2 13 15
34137 }
34138 # Create a (secure) tmp directory for tmp files.
34139 
34140 {
34141   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34142   test -n "$tmp" && test -d "$tmp"
34143 }  ||
34144 {
34145   tmp=./conf$$-$RANDOM
34146   (umask 077 && mkdir "$tmp")
34147 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34148 
34149 # Set up the scripts for CONFIG_FILES section.
34150 # No need to generate them if there are no CONFIG_FILES.
34151 # This happens for instance with `./config.status config.h'.
34152 if test -n "$CONFIG_FILES"; then
34153 
34154 
34155 ac_cr=`echo X | tr X '\015'`
34156 # On cygwin, bash can eat \r inside `` if the user requested igncr.
34157 # But we know of no other shell where ac_cr would be empty at this
34158 # point, so we can use a bashism as a fallback.
34159 if test "x$ac_cr" = x; then
34160   eval ac_cr=\$\'\\r\'
34161 fi
34162 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34163 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34164   ac_cs_awk_cr='\\r'
34165 else
34166   ac_cs_awk_cr=$ac_cr
34167 fi
34168 
34169 echo 'BEGIN {' >"$tmp/subs1.awk" &&
34170 _ACEOF
34171 
34172 
34173 {
34174   echo "cat >conf$$subs.awk <<_ACEOF" &&
34175   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34176   echo "_ACEOF"
34177 } >conf$$subs.sh ||
34178   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34179 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34180 ac_delim='%!_!# '
34181 for ac_last_try in false false false false false :; do
34182   . ./conf$$subs.sh ||
34183     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34184 
34185   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34186   if test $ac_delim_n = $ac_delim_num; then
34187     break
34188   elif $ac_last_try; then
34189     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34190   else
34191     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34192   fi
34193 done
34194 rm -f conf$$subs.sh
34195 
34196 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34197 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34198 _ACEOF
34199 sed -n '
34200 h
34201 s/^/S["/; s/!.*/"]=/
34202 p
34203 g
34204 s/^[^!]*!//
34205 :repl
34206 t repl
34207 s/'"$ac_delim"'$//
34208 t delim
34209 :nl
34210 h
34211 s/\(.\{148\}\)..*/\1/
34212 t more1
34213 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34214 p
34215 n
34216 b repl
34217 :more1
34218 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34219 p
34220 g
34221 s/.\{148\}//
34222 t nl
34223 :delim
34224 h
34225 s/\(.\{148\}\)..*/\1/
34226 t more2
34227 s/["\\]/\\&/g; s/^/"/; s/$/"/
34228 p
34229 b
34230 :more2
34231 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34232 p
34233 g
34234 s/.\{148\}//
34235 t delim
34236 ' <conf$$subs.awk | sed '
34237 /^[^""]/{
34238   N
34239   s/\n//
34240 }
34241 ' >>$CONFIG_STATUS || ac_write_fail=1
34242 rm -f conf$$subs.awk
34243 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34244 _ACAWK
34245 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34246   for (key in S) S_is_set[key] = 1
34247   FS = ""
34248 
34249 }
34250 {
34251   line = $ 0
34252   nfields = split(line, field, "@")
34253   substed = 0
34254   len = length(field[1])
34255   for (i = 2; i < nfields; i++) {
34256     key = field[i]
34257     keylen = length(key)
34258     if (S_is_set[key]) {
34259       value = S[key]
34260       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34261       len += length(value) + length(field[++i])
34262       substed = 1
34263     } else
34264       len += 1 + keylen
34265   }
34266 
34267   print line
34268 }
34269 
34270 _ACAWK
34271 _ACEOF
34272 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34273 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34274   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34275 else
34276   cat
34277 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34278   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34279 _ACEOF
34280 
34281 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34282 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34283 # trailing colons and then remove the whole line if VPATH becomes empty
34284 # (actually we leave an empty line to preserve line numbers).
34285 if test "x$srcdir" = x.; then
34286   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
34287 h
34288 s///
34289 s/^/:/
34290 s/[      ]*$/:/
34291 s/:\$(srcdir):/:/g
34292 s/:\${srcdir}:/:/g
34293 s/:@srcdir@:/:/g
34294 s/^:*//
34295 s/:*$//
34296 x
34297 s/\(=[   ]*\).*/\1/
34298 G
34299 s/\n//
34300 s/^[^=]*=[       ]*$//
34301 }'
34302 fi
34303 
34304 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34305 fi # test -n "$CONFIG_FILES"
34306 
34307 # Set up the scripts for CONFIG_HEADERS section.
34308 # No need to generate them if there are no CONFIG_HEADERS.
34309 # This happens for instance with `./config.status Makefile'.
34310 if test -n "$CONFIG_HEADERS"; then
34311 cat >"$tmp/defines.awk" <<\_ACAWK ||
34312 BEGIN {
34313 _ACEOF
34314 
34315 # Transform confdefs.h into an awk script `defines.awk', embedded as
34316 # here-document in config.status, that substitutes the proper values into
34317 # config.h.in to produce config.h.
34318 
34319 # Create a delimiter string that does not exist in confdefs.h, to ease
34320 # handling of long lines.
34321 ac_delim='%!_!# '
34322 for ac_last_try in false false :; do
34323   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34324   if test -z "$ac_t"; then
34325     break
34326   elif $ac_last_try; then
34327     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34328   else
34329     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34330   fi
34331 done
34332 
34333 # For the awk script, D is an array of macro values keyed by name,
34334 # likewise P contains macro parameters if any.  Preserve backslash
34335 # newline sequences.
34336 
34337 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34338 sed -n '
34339 s/.\{148\}/&'"$ac_delim"'/g
34340 t rset
34341 :rset
34342 s/^[     ]*#[    ]*define[       ][      ]*/ /
34343 t def
34344 d
34345 :def
34346 s/\\$//
34347 t bsnl
34348 s/["\\]/\\&/g
34349 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34350 D["\1"]=" \3"/p
34351 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
34352 d
34353 :bsnl
34354 s/["\\]/\\&/g
34355 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34356 D["\1"]=" \3\\\\\\n"\\/p
34357 t cont
34358 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34359 t cont
34360 d
34361 :cont
34362 n
34363 s/.\{148\}/&'"$ac_delim"'/g
34364 t clear
34365 :clear
34366 s/\\$//
34367 t bsnlc
34368 s/["\\]/\\&/g; s/^/"/; s/$/"/p
34369 d
34370 :bsnlc
34371 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34372 b cont
34373 ' <confdefs.h | sed '
34374 s/'"$ac_delim"'/"\\\
34375 "/g' >>$CONFIG_STATUS || ac_write_fail=1
34376 
34377 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34378   for (key in D) D_is_set[key] = 1
34379   FS = ""
34380 }
34381 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34382   line = \$ 0
34383   split(line, arg, " ")
34384   if (arg[1] == "#") {
34385     defundef = arg[2]
34386     mac1 = arg[3]
34387   } else {
34388     defundef = substr(arg[1], 2)
34389     mac1 = arg[2]
34390   }
34391   split(mac1, mac2, "(") #)
34392   macro = mac2[1]
34393   prefix = substr(line, 1, index(line, defundef) - 1)
34394   if (D_is_set[macro]) {
34395     # Preserve the white space surrounding the "#".
34396     print prefix "define", macro P[macro] D[macro]
34397     next
34398   } else {
34399     # Replace #undef with comments.  This is necessary, for example,
34400     # in the case of _POSIX_SOURCE, which is predefined and required
34401     # on some systems where configure will not decide to define it.
34402     if (defundef == "undef") {
34403       print "/*", prefix defundef, macro, "*/"
34404       next
34405     }
34406   }
34407 }
34408 { print }
34409 _ACAWK
34410 _ACEOF
34411 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34412   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34413 fi # test -n "$CONFIG_HEADERS"
34414 
34415 
34416 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34417 shift
34418 for ac_tag
34419 do
34420   case $ac_tag in
34421   :[FHLC]) ac_mode=$ac_tag; continue;;
34422   esac
34423   case $ac_mode$ac_tag in
34424   :[FHL]*:*);;
34425   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34426   :[FH]-) ac_tag=-:-;;
34427   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34428   esac
34429   ac_save_IFS=$IFS
34430   IFS=:
34431   set x $ac_tag
34432   IFS=$ac_save_IFS
34433   shift
34434   ac_file=$1
34435   shift
34436 
34437   case $ac_mode in
34438   :L) ac_source=$1;;
34439   :[FH])
34440     ac_file_inputs=
34441     for ac_f
34442     do
34443       case $ac_f in
34444       -) ac_f="$tmp/stdin";;
34445       *) # Look for the file first in the build tree, then in the source tree
34446          # (if the path is not absolute).  The absolute path cannot be DOS-style,
34447          # because $ac_f cannot contain `:'.
34448          test -f "$ac_f" ||
34449            case $ac_f in
34450            [\\/$]*) false;;
34451            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34452            esac ||
34453            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34454       esac
34455       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34456       as_fn_append ac_file_inputs " '$ac_f'"
34457     done
34458 
34459     # Let's still pretend it is `configure' which instantiates (i.e., don't
34460     # use $as_me), people would be surprised to read:
34461     #    /* config.h.  Generated by config.status.  */
34462     configure_input='Generated from '`
34463           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34464         `' by configure.'
34465     if test x"$ac_file" != x-; then
34466       configure_input="$ac_file.  $configure_input"
34467       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34468 $as_echo "$as_me: creating $ac_file" >&6;}
34469     fi
34470     # Neutralize special characters interpreted by sed in replacement strings.
34471     case $configure_input in #(
34472     *\&* | *\|* | *\\* )
34473        ac_sed_conf_input=`$as_echo "$configure_input" |
34474        sed 's/[\\\\&|]/\\\\&/g'`;; #(
34475     *) ac_sed_conf_input=$configure_input;;
34476     esac
34477 
34478     case $ac_tag in
34479     *:-:* | *:-) cat >"$tmp/stdin" \
34480       || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34481     esac
34482     ;;
34483   esac
34484 
34485   ac_dir=`$as_dirname -- "$ac_file" ||
34486 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34487          X"$ac_file" : 'X\(//\)[^/]' \| \
34488          X"$ac_file" : 'X\(//\)$' \| \
34489          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34490 $as_echo X"$ac_file" |
34491     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34492             s//\1/
34493             q
34494           }
34495           /^X\(\/\/\)[^/].*/{
34496             s//\1/
34497             q
34498           }
34499           /^X\(\/\/\)$/{
34500             s//\1/
34501             q
34502           }
34503           /^X\(\/\).*/{
34504             s//\1/
34505             q
34506           }
34507           s/.*/./; q'`
34508   as_dir="$ac_dir"; as_fn_mkdir_p
34509   ac_builddir=.
34510 
34511 case "$ac_dir" in
34512 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34513 *)
34514   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34515   # A ".." for each directory in $ac_dir_suffix.
34516   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34517   case $ac_top_builddir_sub in
34518   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34519   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34520   esac ;;
34521 esac
34522 ac_abs_top_builddir=$ac_pwd
34523 ac_abs_builddir=$ac_pwd$ac_dir_suffix
34524 # for backward compatibility:
34525 ac_top_builddir=$ac_top_build_prefix
34526 
34527 case $srcdir in
34528   .)  # We are building in place.
34529     ac_srcdir=.
34530     ac_top_srcdir=$ac_top_builddir_sub
34531     ac_abs_top_srcdir=$ac_pwd ;;
34532   [\\/]* | ?:[\\/]* )  # Absolute name.
34533     ac_srcdir=$srcdir$ac_dir_suffix;
34534     ac_top_srcdir=$srcdir
34535     ac_abs_top_srcdir=$srcdir ;;
34536   *) # Relative name.
34537     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34538     ac_top_srcdir=$ac_top_build_prefix$srcdir
34539     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34540 esac
34541 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34542 
34543 
34544   case $ac_mode in
34545   :F)
34546   #
34547   # CONFIG_FILE
34548   #
34549 
34550 _ACEOF
34551 
34552 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34553 # If the template does not know about datarootdir, expand it.
34554 # FIXME: This hack should be removed a few years after 2.60.
34555 ac_datarootdir_hack=; ac_datarootdir_seen=
34556 ac_sed_dataroot='
34557 /datarootdir/ {
34558   p
34559   q
34560 }
34561 /@datadir@/p
34562 /@docdir@/p
34563 /@infodir@/p
34564 /@localedir@/p
34565 /@mandir@/p'
34566 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34567 *datarootdir*) ac_datarootdir_seen=yes;;
34568 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34569   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34570 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34571 _ACEOF
34572 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34573   ac_datarootdir_hack='
34574   s&@datadir@&$datadir&g
34575   s&@docdir@&$docdir&g
34576   s&@infodir@&$infodir&g
34577   s&@localedir@&$localedir&g
34578   s&@mandir@&$mandir&g
34579   s&\\\${datarootdir}&$datarootdir&g' ;;
34580 esac
34581 _ACEOF
34582 
34583 # Neutralize VPATH when `$srcdir' = `.'.
34584 # Shell code in configure.ac might set extrasub.
34585 # FIXME: do we really want to maintain this feature?
34586 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34587 ac_sed_extra="$ac_vpsub
34588 $extrasub
34589 _ACEOF
34590 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34591 :t
34592 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34593 s|@configure_input@|$ac_sed_conf_input|;t t
34594 s&@top_builddir@&$ac_top_builddir_sub&;t t
34595 s&@top_build_prefix@&$ac_top_build_prefix&;t t
34596 s&@srcdir@&$ac_srcdir&;t t
34597 s&@abs_srcdir@&$ac_abs_srcdir&;t t
34598 s&@top_srcdir@&$ac_top_srcdir&;t t
34599 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34600 s&@builddir@&$ac_builddir&;t t
34601 s&@abs_builddir@&$ac_abs_builddir&;t t
34602 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34603 $ac_datarootdir_hack
34604 "
34605 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34606   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34607 
34608 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34609   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34610   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34611   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34612 which seems to be undefined.  Please make sure it is defined" >&5
34613 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34614 which seems to be undefined.  Please make sure it is defined" >&2;}
34615 
34616   rm -f "$tmp/stdin"
34617   case $ac_file in
34618   -) cat "$tmp/out" && rm -f "$tmp/out";;
34619   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34620   esac \
34621   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34622  ;;
34623   :H)
34624   #
34625   # CONFIG_HEADER
34626   #
34627   if test x"$ac_file" != x-; then
34628     {
34629       $as_echo "/* $configure_input  */" \
34630       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34631     } >"$tmp/config.h" \
34632       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34633     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34634       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34635 $as_echo "$as_me: $ac_file is unchanged" >&6;}
34636     else
34637       rm -f "$ac_file"
34638       mv "$tmp/config.h" "$ac_file" \
34639         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34640     fi
34641   else
34642     $as_echo "/* $configure_input  */" \
34643       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34644       || as_fn_error $? "could not create -" "$LINENO" 5
34645   fi
34646  ;;
34647 
34648 
34649   esac
34650 
34651 done # for ac_tag
34652 
34653 
34654 as_fn_exit 0
34655 _ACEOF
34656 ac_clean_files=$ac_clean_files_save
34657 
34658 test $ac_write_fail = 0 ||
34659   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34660 
34661 
34662 # configure is writing to config.log, and then calls config.status.
34663 # config.status does its own redirection, appending to config.log.
34664 # Unfortunately, on DOS this fails, as config.log is still kept open
34665 # by configure, so config.status won't be able to write to it; its
34666 # output is simply discarded.  So we exec the FD to /dev/null,
34667 # effectively closing config.log, so it can be properly (re)opened and
34668 # appended to by config.status.  When coming back to configure, we
34669 # need to make the FD available again.
34670 if test "$no_create" != yes; then
34671   ac_cs_success=:
34672   ac_config_status_args=
34673   test "$silent" = yes &&
34674     ac_config_status_args="$ac_config_status_args --quiet"
34675   exec 5>/dev/null
34676   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34677   exec 5>>config.log
34678   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34679   # would make configure fail if this is the last instruction.
34680   $ac_cs_success || as_fn_exit 1
34681 fi
34682 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34683   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34684 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34685 fi
34686 
34687 
34688 # Make the compare script executable
34689 $CHMOD +x $OUTPUT_ROOT/compare.sh
34690 
34691 # Finally output some useful information to the user
34692 
34693 # Finally output some useful information to the user
34694 
34695 if test "x$CCACHE_FOUND" != x; then
34696         if  test "x$HAS_GOOD_CCACHE" = x; then
34697                 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34698                 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34699         else
34700                 CCACHE_STATUS="installed and in use"
34701         fi
34702 else
34703         if test "x$GCC" = xyes; then
34704                 CCACHE_STATUS="not installed (consider installing)"
34705                 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34706         else
34707                 CCACHE_STATUS="not available for your system"
34708         fi
34709 fi
34710 
34711 printf "\n"
34712 printf "====================================================\n"
34713 printf "A new configuration has been successfully created in\n"
34714 printf "$OUTPUT_ROOT\n"
34715 if test "x$CONFIGURE_COMMAND_LINE" != x; then
34716         printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34717 else
34718         printf "using default settings.\n"
34719 fi
34720 
34721 printf "\n"
34722 printf "Configuration summary:\n"
34723 printf "* Debug level:    $DEBUG_LEVEL\n"
34724 printf "* JDK variant:    $JDK_VARIANT\n"
34725 printf "* JVM variants:   $with_jvm_variants\n"
34726 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34727 
34728 printf "\n"
34729 printf "Tools summary:\n"
34730 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34731   printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34732 fi
34733 printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34734 printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34735 printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34736 
34737 printf "\n"
34738 printf "Build performance summary:\n"
34739 printf "* Cores to use:   $JOBS\n"
34740 printf "* Memory limit:   $MEMORY_SIZE MB\n"
34741 printf "* ccache status:  $CCACHE_STATUS\n"
34742 printf "\n"
34743 
34744 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34745         printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34746         printf "$CCACHE_HELP_MSG\n"
34747 
34748     # Print a helpful message on how to acquire the necessary build dependency.
34749     # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34750     MISSING_DEPENDENCY=ccache
34751     PKGHANDLER_COMMAND=
34752 
34753     case $PKGHANDLER in
34754         apt-get)
34755                 apt_help     $MISSING_DEPENDENCY ;;
34756     yum)
34757                 yum_help     $MISSING_DEPENDENCY ;;
34758         port)
34759                 port_help    $MISSING_DEPENDENCY ;;
34760         pkgutil)
34761                 pkgutil_help $MISSING_DEPENDENCY ;;
34762         pkgadd)
34763                 pkgadd_help  $MISSING_DEPENDENCY ;;
34764     * )
34765       break ;;
34766     esac
34767 
34768     if test "x$PKGHANDLER_COMMAND" != x; then
34769         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34770     fi
34771 
34772         printf "$HELP_MSG\n"
34773         printf "\n"
34774 fi
34775 
34776 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34777         printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34778         printf "will result in longer build times.\n"
34779         printf "\n"
34780 fi
34781 
34782 if test "x$FOUND_ALT_VARIABLES" != "x"; then
34783         printf "WARNING: You have old-style ALT_ environment variables set.\n"
34784         printf "These are not respected, and will be ignored. It is recommended\n"
34785         printf "that you clean your environment. The following variables are set:\n"
34786         printf "$FOUND_ALT_VARIABLES\n"
34787         printf "\n"
34788 fi
34789 
34790 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34791         printf "WARNING: Your build output directory is not on a local disk.\n"
34792         printf "This will severely degrade build performance!\n"
34793         printf "It is recommended that you create an output directory on a local disk,\n"
34794         printf "and run the configure script again from that directory.\n"
34795         printf "\n"
34796 fi
34797 
34798 if test "x$IS_RECONFIGURE" = "xyes"; then
34799         printf "WARNING: The result of this configuration has overridden an older\n"
34800         printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34801         printf "proper build. Failure to do so might result in strange build problems.\n"
34802         printf "\n"
34803 fi
34804