1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
   9 #
  10 #
  11 # This configure script is free software; the Free Software Foundation
  12 # gives unlimited permission to copy, distribute and modify it.
  13 ## -------------------- ##
  14 ## M4sh Initialization. ##
  15 ## -------------------- ##
  16 
  17 # Be more Bourne compatible
  18 DUALCASE=1; export DUALCASE # for MKS sh
  19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  20   emulate sh
  21   NULLCMD=:
  22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  23   # is contrary to our usage.  Disable this feature.
  24   alias -g '${1+"$@"}'='"$@"'
  25   setopt NO_GLOB_SUBST
  26 else
  27   case `(set -o) 2>/dev/null` in #(
  28   *posix*) :
  29     set -o posix ;; #(
  30   *) :
  31      ;;
  32 esac
  33 fi
  34 
  35 
  36 as_nl='
  37 '
  38 export as_nl
  39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  43 # Prefer a ksh shell builtin over an external printf program on Solaris,
  44 # but without wasting forks for bash or zsh.
  45 if test -z "$BASH_VERSION$ZSH_VERSION" \
  46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  47   as_echo='print -r --'
  48   as_echo_n='print -rn --'
  49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  50   as_echo='printf %s\n'
  51   as_echo_n='printf %s'
  52 else
  53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  55     as_echo_n='/usr/ucb/echo -n'
  56   else
  57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  58     as_echo_n_body='eval
  59       arg=$1;
  60       case $arg in #(
  61       *"$as_nl"*)
  62         expr "X$arg" : "X\\(.*\\)$as_nl";
  63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  64       esac;
  65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  66     '
  67     export as_echo_n_body
  68     as_echo_n='sh -c $as_echo_n_body as_echo'
  69   fi
  70   export as_echo_body
  71   as_echo='sh -c $as_echo_body as_echo'
  72 fi
  73 
  74 # The user is always right.
  75 if test "${PATH_SEPARATOR+set}" != set; then
  76   PATH_SEPARATOR=:
  77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  79       PATH_SEPARATOR=';'
  80   }
  81 fi
  82 
  83 
  84 # IFS
  85 # We need space, tab and new line, in precisely that order.  Quoting is
  86 # there to prevent editors from complaining about space-tab.
  87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  88 # splitting by setting IFS to empty value.)
  89 IFS=" ""        $as_nl"
  90 
  91 # Find who we are.  Look in the path if we contain no directory separator.
  92 as_myself=
  93 case $0 in #((
  94   *[\\/]* ) as_myself=$0 ;;
  95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  96 for as_dir in $PATH
  97 do
  98   IFS=$as_save_IFS
  99   test -z "$as_dir" && as_dir=.
 100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 101   done
 102 IFS=$as_save_IFS
 103 
 104      ;;
 105 esac
 106 # We did not find ourselves, most probably we were run as `sh COMMAND'
 107 # in which case we are not to be found in the path.
 108 if test "x$as_myself" = x; then
 109   as_myself=$0
 110 fi
 111 if test ! -f "$as_myself"; then
 112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 113   exit 1
 114 fi
 115 
 116 # Unset variables that we do not need and which cause bugs (e.g. in
 117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 118 # suppresses any "Segmentation fault" message there.  '((' could
 119 # trigger a bug in pdksh 5.2.14.
 120 for as_var in BASH_ENV ENV MAIL MAILPATH
 121 do eval test x\${$as_var+set} = xset \
 122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 123 done
 124 PS1='$ '
 125 PS2='> '
 126 PS4='+ '
 127 
 128 # NLS nuisances.
 129 LC_ALL=C
 130 export LC_ALL
 131 LANGUAGE=C
 132 export LANGUAGE
 133 
 134 # CDPATH.
 135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 136 
 137 # Use a proper internal environment variable to ensure we don't fall
 138   # into an infinite loop, continuously re-executing ourselves.
 139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 140     _as_can_reexec=no; export _as_can_reexec;
 141     # We cannot yet assume a decent shell, so we have to provide a
 142 # neutralization value for shells without unset; and this also
 143 # works around shells that cannot unset nonexistent variables.
 144 # Preserve -v and -x to the replacement shell.
 145 BASH_ENV=/dev/null
 146 ENV=/dev/null
 147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 148 case $- in # ((((
 149   *v*x* | *x*v* ) as_opts=-vx ;;
 150   *v* ) as_opts=-v ;;
 151   *x* ) as_opts=-x ;;
 152   * ) as_opts= ;;
 153 esac
 154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 155 # Admittedly, this is quite paranoid, since all the known shells bail
 156 # out after a failed `exec'.
 157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 158 as_fn_exit 255
 159   fi
 160   # We don't want this to propagate to other subprocesses.
 161           { _as_can_reexec=; unset _as_can_reexec;}
 162 if test "x$CONFIG_SHELL" = x; then
 163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 164   emulate sh
 165   NULLCMD=:
 166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 167   # is contrary to our usage.  Disable this feature.
 168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 169   setopt NO_GLOB_SUBST
 170 else
 171   case \`(set -o) 2>/dev/null\` in #(
 172   *posix*) :
 173     set -o posix ;; #(
 174   *) :
 175      ;;
 176 esac
 177 fi
 178 "
 179   as_required="as_fn_return () { (exit \$1); }
 180 as_fn_success () { as_fn_return 0; }
 181 as_fn_failure () { as_fn_return 1; }
 182 as_fn_ret_success () { return 0; }
 183 as_fn_ret_failure () { return 1; }
 184 
 185 exitcode=0
 186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 191 
 192 else
 193   exitcode=1; echo positional parameters were not saved.
 194 fi
 195 test x\$exitcode = x0 || exit 1
 196 test -x / || exit 1"
 197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 201 test \$(( 1 + 1 )) = 2 || exit 1"
 202   if (eval "$as_required") 2>/dev/null; then :
 203   as_have_required=yes
 204 else
 205   as_have_required=no
 206 fi
 207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 208 
 209 else
 210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 211 as_found=false
 212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 213 do
 214   IFS=$as_save_IFS
 215   test -z "$as_dir" && as_dir=.
 216   as_found=:
 217   case $as_dir in #(
 218          /*)
 219            for as_base in sh bash ksh sh5; do
 220              # Try only shells that exist, to save several forks.
 221              as_shell=$as_dir/$as_base
 222              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 223                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 224   CONFIG_SHELL=$as_shell as_have_required=yes
 225                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 226   break 2
 227 fi
 228 fi
 229            done;;
 230        esac
 231   as_found=false
 232 done
 233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 234               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 235   CONFIG_SHELL=$SHELL as_have_required=yes
 236 fi; }
 237 IFS=$as_save_IFS
 238 
 239 
 240       if test "x$CONFIG_SHELL" != x; then :
 241   export CONFIG_SHELL
 242              # We cannot yet assume a decent shell, so we have to provide a
 243 # neutralization value for shells without unset; and this also
 244 # works around shells that cannot unset nonexistent variables.
 245 # Preserve -v and -x to the replacement shell.
 246 BASH_ENV=/dev/null
 247 ENV=/dev/null
 248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 249 case $- in # ((((
 250   *v*x* | *x*v* ) as_opts=-vx ;;
 251   *v* ) as_opts=-v ;;
 252   *x* ) as_opts=-x ;;
 253   * ) as_opts= ;;
 254 esac
 255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 256 # Admittedly, this is quite paranoid, since all the known shells bail
 257 # out after a failed `exec'.
 258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 259 exit 255
 260 fi
 261 
 262     if test x$as_have_required = xno; then :
 263   $as_echo "$0: This script requires a shell more modern than all"
 264   $as_echo "$0: the shells that I found on your system."
 265   if test x${ZSH_VERSION+set} = xset ; then
 266     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 267     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 268   else
 269     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 270 $0: build-dev@openjdk.java.net about your system, including
 271 $0: any error possibly output before this message. Then
 272 $0: install a modern shell, or manually run the script
 273 $0: under such a shell if you do have one."
 274   fi
 275   exit 1
 276 fi
 277 fi
 278 fi
 279 SHELL=${CONFIG_SHELL-/bin/sh}
 280 export SHELL
 281 # Unset more variables known to interfere with behavior of common tools.
 282 CLICOLOR_FORCE= GREP_OPTIONS=
 283 unset CLICOLOR_FORCE GREP_OPTIONS
 284 
 285 ## --------------------- ##
 286 ## M4sh Shell Functions. ##
 287 ## --------------------- ##
 288 # as_fn_unset VAR
 289 # ---------------
 290 # Portably unset VAR.
 291 as_fn_unset ()
 292 {
 293   { eval $1=; unset $1;}
 294 }
 295 as_unset=as_fn_unset
 296 
 297 # as_fn_set_status STATUS
 298 # -----------------------
 299 # Set $? to STATUS, without forking.
 300 as_fn_set_status ()
 301 {
 302   return $1
 303 } # as_fn_set_status
 304 
 305 # as_fn_exit STATUS
 306 # -----------------
 307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 308 as_fn_exit ()
 309 {
 310   set +e
 311   as_fn_set_status $1
 312   exit $1
 313 } # as_fn_exit
 314 
 315 # as_fn_mkdir_p
 316 # -------------
 317 # Create "$as_dir" as a directory, including parents if necessary.
 318 as_fn_mkdir_p ()
 319 {
 320 
 321   case $as_dir in #(
 322   -*) as_dir=./$as_dir;;
 323   esac
 324   test -d "$as_dir" || eval $as_mkdir_p || {
 325     as_dirs=
 326     while :; do
 327       case $as_dir in #(
 328       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 329       *) as_qdir=$as_dir;;
 330       esac
 331       as_dirs="'$as_qdir' $as_dirs"
 332       as_dir=`$as_dirname -- "$as_dir" ||
 333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 334          X"$as_dir" : 'X\(//\)[^/]' \| \
 335          X"$as_dir" : 'X\(//\)$' \| \
 336          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 337 $as_echo X"$as_dir" |
 338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 339             s//\1/
 340             q
 341           }
 342           /^X\(\/\/\)[^/].*/{
 343             s//\1/
 344             q
 345           }
 346           /^X\(\/\/\)$/{
 347             s//\1/
 348             q
 349           }
 350           /^X\(\/\).*/{
 351             s//\1/
 352             q
 353           }
 354           s/.*/./; q'`
 355       test -d "$as_dir" && break
 356     done
 357     test -z "$as_dirs" || eval "mkdir $as_dirs"
 358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 359 
 360 
 361 } # as_fn_mkdir_p
 362 
 363 # as_fn_executable_p FILE
 364 # -----------------------
 365 # Test if FILE is an executable regular file.
 366 as_fn_executable_p ()
 367 {
 368   test -f "$1" && test -x "$1"
 369 } # as_fn_executable_p
 370 # as_fn_append VAR VALUE
 371 # ----------------------
 372 # Append the text in VALUE to the end of the definition contained in VAR. Take
 373 # advantage of any shell optimizations that allow amortized linear growth over
 374 # repeated appends, instead of the typical quadratic growth present in naive
 375 # implementations.
 376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 377   eval 'as_fn_append ()
 378   {
 379     eval $1+=\$2
 380   }'
 381 else
 382   as_fn_append ()
 383   {
 384     eval $1=\$$1\$2
 385   }
 386 fi # as_fn_append
 387 
 388 # as_fn_arith ARG...
 389 # ------------------
 390 # Perform arithmetic evaluation on the ARGs, and store the result in the
 391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 392 # must be portable across $(()) and expr.
 393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 394   eval 'as_fn_arith ()
 395   {
 396     as_val=$(( $* ))
 397   }'
 398 else
 399   as_fn_arith ()
 400   {
 401     as_val=`expr "$@" || test $? -eq 1`
 402   }
 403 fi # as_fn_arith
 404 
 405 
 406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 407 # ----------------------------------------
 408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 410 # script with STATUS, using 1 if that was 0.
 411 as_fn_error ()
 412 {
 413   as_status=$1; test $as_status -eq 0 && as_status=1
 414   if test "$4"; then
 415     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 416     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 417   fi
 418   $as_echo "$as_me: error: $2" >&2
 419   as_fn_exit $as_status
 420 } # as_fn_error
 421 
 422 if expr a : '\(a\)' >/dev/null 2>&1 &&
 423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 424   as_expr=expr
 425 else
 426   as_expr=false
 427 fi
 428 
 429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 430   as_basename=basename
 431 else
 432   as_basename=false
 433 fi
 434 
 435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 436   as_dirname=dirname
 437 else
 438   as_dirname=false
 439 fi
 440 
 441 as_me=`$as_basename -- "$0" ||
 442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 443          X"$0" : 'X\(//\)$' \| \
 444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 445 $as_echo X/"$0" |
 446     sed '/^.*\/\([^/][^/]*\)\/*$/{
 447             s//\1/
 448             q
 449           }
 450           /^X\/\(\/\/\)$/{
 451             s//\1/
 452             q
 453           }
 454           /^X\/\(\/\).*/{
 455             s//\1/
 456             q
 457           }
 458           s/.*/./; q'`
 459 
 460 # Avoid depending upon Character Ranges.
 461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 464 as_cr_digits='0123456789'
 465 as_cr_alnum=$as_cr_Letters$as_cr_digits
 466 
 467 
 468   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 469   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 470   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 471   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 472   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 473   sed -n '
 474     p
 475     /[$]LINENO/=
 476   ' <$as_myself |
 477     sed '
 478       s/[$]LINENO.*/&-/
 479       t lineno
 480       b
 481       :lineno
 482       N
 483       :loop
 484       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 485       t loop
 486       s/-\n.*//
 487     ' >$as_me.lineno &&
 488   chmod +x "$as_me.lineno" ||
 489     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 490 
 491   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 492   # already done that, so ensure we don't try to do so again and fall
 493   # in an infinite loop.  This has already happened in practice.
 494   _as_can_reexec=no; export _as_can_reexec
 495   # Don't try to exec as it changes $[0], causing all sort of problems
 496   # (the dirname of $[0] is not the place where we might find the
 497   # original and so on.  Autoconf is especially sensitive to this).
 498   . "./$as_me.lineno"
 499   # Exit status is that of the last command.
 500   exit
 501 }
 502 
 503 ECHO_C= ECHO_N= ECHO_T=
 504 case `echo -n x` in #(((((
 505 -n*)
 506   case `echo 'xy\c'` in
 507   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 508   xy)  ECHO_C='\c';;
 509   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 510        ECHO_T=' ';;
 511   esac;;
 512 *)
 513   ECHO_N='-n';;
 514 esac
 515 
 516 rm -f conf$$ conf$$.exe conf$$.file
 517 if test -d conf$$.dir; then
 518   rm -f conf$$.dir/conf$$.file
 519 else
 520   rm -f conf$$.dir
 521   mkdir conf$$.dir 2>/dev/null
 522 fi
 523 if (echo >conf$$.file) 2>/dev/null; then
 524   if ln -s conf$$.file conf$$ 2>/dev/null; then
 525     as_ln_s='ln -s'
 526     # ... but there are two gotchas:
 527     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 528     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 529     # In both cases, we have to default to `cp -pR'.
 530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 531       as_ln_s='cp -pR'
 532   elif ln conf$$.file conf$$ 2>/dev/null; then
 533     as_ln_s=ln
 534   else
 535     as_ln_s='cp -pR'
 536   fi
 537 else
 538   as_ln_s='cp -pR'
 539 fi
 540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 541 rmdir conf$$.dir 2>/dev/null
 542 
 543 if mkdir -p . 2>/dev/null; then
 544   as_mkdir_p='mkdir -p "$as_dir"'
 545 else
 546   test -d ./-p && rmdir ./-p
 547   as_mkdir_p=false
 548 fi
 549 
 550 as_test_x='test -x'
 551 as_executable_p=as_fn_executable_p
 552 
 553 # Sed expression to map a string onto a valid CPP name.
 554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 555 
 556 # Sed expression to map a string onto a valid variable name.
 557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 558 
 559 
 560 test -n "$DJDIR" || exec 7<&0 </dev/null
 561 exec 6>&1
 562 
 563 # Name of the host.
 564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 565 # so uname gets run too.
 566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 567 
 568 #
 569 # Initializations.
 570 #
 571 ac_default_prefix=/usr/local
 572 ac_clean_files=
 573 ac_config_libobj_dir=.
 574 LIBOBJS=
 575 cross_compiling=no
 576 subdirs=
 577 MFLAGS=
 578 MAKEFLAGS=
 579 
 580 # Identity of this package.
 581 PACKAGE_NAME='OpenJDK'
 582 PACKAGE_TARNAME='openjdk'
 583 PACKAGE_VERSION='jdk8'
 584 PACKAGE_STRING='OpenJDK jdk8'
 585 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 586 PACKAGE_URL='http://openjdk.java.net'
 587 
 588 # Factoring default headers for most tests.
 589 ac_includes_default="\
 590 #include <stdio.h>
 591 #ifdef HAVE_SYS_TYPES_H
 592 # include <sys/types.h>
 593 #endif
 594 #ifdef HAVE_SYS_STAT_H
 595 # include <sys/stat.h>
 596 #endif
 597 #ifdef STDC_HEADERS
 598 # include <stdlib.h>
 599 # include <stddef.h>
 600 #else
 601 # ifdef HAVE_STDLIB_H
 602 #  include <stdlib.h>
 603 # endif
 604 #endif
 605 #ifdef HAVE_STRING_H
 606 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 607 #  include <memory.h>
 608 # endif
 609 # include <string.h>
 610 #endif
 611 #ifdef HAVE_STRINGS_H
 612 # include <strings.h>
 613 #endif
 614 #ifdef HAVE_INTTYPES_H
 615 # include <inttypes.h>
 616 #endif
 617 #ifdef HAVE_STDINT_H
 618 # include <stdint.h>
 619 #endif
 620 #ifdef HAVE_UNISTD_H
 621 # include <unistd.h>
 622 #endif"
 623 
 624 ac_subst_vars='LTLIBOBJS
 625 LIBOBJS
 626 CCACHE
 627 USE_PRECOMPILED_HEADER
 628 SJAVAC_SERVER_DIR
 629 ENABLE_SJAVAC
 630 SJAVAC_SERVER_JAVA
 631 JOBS
 632 MEMORY_SIZE
 633 NUM_CORES
 634 ENABLE_INTREE_EC
 635 SALIB_NAME
 636 HOTSPOT_MAKE_ARGS
 637 LIBCXX
 638 LLVM_LIBS
 639 LLVM_LDFLAGS
 640 LLVM_CFLAGS
 641 LLVM_CONFIG
 642 LIBFFI_LIBS
 643 LIBFFI_CFLAGS
 644 STATIC_CXX_SETTING
 645 LIBDL
 646 LIBM
 647 LIBZIP_CAN_USE_MMAP
 648 USE_EXTERNAL_LIBZ
 649 USE_EXTERNAL_LIBGIF
 650 USE_EXTERNAL_LIBJPEG
 651 ALSA_LIBS
 652 ALSA_CFLAGS
 653 FREETYPE_BUNDLE_LIB_PATH
 654 FREETYPE_LIBS
 655 FREETYPE_CFLAGS
 656 CUPS_CFLAGS
 657 OPENWIN_HOME
 658 X_EXTRA_LIBS
 659 X_LIBS
 660 X_PRE_LIBS
 661 X_CFLAGS
 662 XMKMF
 663 FIXPATH
 664 CXXFLAGS_DEBUG_SYMBOLS
 665 CFLAGS_DEBUG_SYMBOLS
 666 ZIP_DEBUGINFO_FILES
 667 ENABLE_DEBUG_SYMBOLS
 668 USING_BROKEN_SUSE_LD
 669 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 670 ZERO_ARCHFLAG
 671 LDFLAGS_CXX_JDK
 672 LDFLAGS_JDKEXE_SUFFIX
 673 LDFLAGS_JDKLIB_SUFFIX
 674 LDFLAGS_JDKEXE
 675 LDFLAGS_JDKLIB
 676 CXXFLAGS_JDKEXE
 677 CXXFLAGS_JDKLIB
 678 CFLAGS_JDKEXE
 679 CFLAGS_JDKLIB
 680 MACOSX_VERSION_MIN
 681 PACKAGE_PATH
 682 LEGACY_EXTRA_LDFLAGS
 683 LEGACY_EXTRA_CXXFLAGS
 684 LEGACY_EXTRA_CFLAGS
 685 CXX_FLAG_DEPS
 686 C_FLAG_DEPS
 687 CXX_O_FLAG_NONE
 688 CXX_O_FLAG_NORM
 689 CXX_O_FLAG_HI
 690 CXX_O_FLAG_HIGHEST
 691 C_O_FLAG_NONE
 692 C_O_FLAG_NORM
 693 C_O_FLAG_HI
 694 C_O_FLAG_HIGHEST
 695 POST_MCS_CMD
 696 POST_STRIP_CMD
 697 SET_EXECUTABLE_ORIGIN
 698 SET_SHARED_LIBRARY_ORIGIN
 699 CXX_FLAG_REORDER
 700 C_FLAG_REORDER
 701 SET_SHARED_LIBRARY_MAPFILE
 702 SET_SHARED_LIBRARY_NAME
 703 SHARED_LIBRARY_FLAGS
 704 EXE_SUFFIX
 705 STATIC_LIBRARY_SUFFIX
 706 SHARED_LIBRARY_SUFFIX
 707 LIBRARY_PREFIX
 708 STATIC_LIBRARY
 709 SHARED_LIBRARY
 710 OBJ_SUFFIX
 711 COMPILER_NAME
 712 JT_HOME
 713 JTREGEXE
 714 ac_ct_OBJDUMP
 715 OBJDUMP
 716 ac_ct_OBJCOPY
 717 OBJCOPY
 718 OTOOL
 719 MCS
 720 STRIP
 721 GNM
 722 NM
 723 AS
 724 CXXCPP
 725 CPP
 726 COMPILER_TYPE
 727 RC_FLAGS
 728 DUMPBIN
 729 WINAR
 730 HOTSPOT_RC
 731 HOTSPOT_MT
 732 RC
 733 MT
 734 WINLD
 735 HOTSPOT_LD
 736 HOTSPOT_CXX
 737 ARFLAGS
 738 AR
 739 LDEXECXX
 740 LDCXX
 741 LDEXE
 742 LD
 743 ac_ct_OBJC
 744 OBJCFLAGS
 745 OBJC
 746 ac_ct_CXX
 747 CXXFLAGS
 748 CXX
 749 ac_ct_PROPER_COMPILER_CXX
 750 PROPER_COMPILER_CXX
 751 POTENTIAL_CXX
 752 TOOLS_DIR_CXX
 753 COMPILER_TARGET_BITS_FLAG
 754 OBJEXT
 755 EXEEXT
 756 ac_ct_CC
 757 CPPFLAGS
 758 LDFLAGS
 759 CFLAGS
 760 CC
 761 ac_ct_PROPER_COMPILER_CC
 762 PROPER_COMPILER_CC
 763 POTENTIAL_CC
 764 TOOLS_DIR_CC
 765 SDKPATH
 766 XCODEBUILD
 767 SET_DEVELOPER_DIR
 768 BUILD_LD
 769 BUILD_CXX
 770 BUILD_CC
 771 MSVCR_DLL
 772 VS_PATH
 773 VS_LIB
 774 VS_INCLUDE
 775 CYGWIN_LINK
 776 AR_OUT_OPTION
 777 LD_OUT_OPTION
 778 EXE_OUT_OPTION
 779 CC_OUT_OPTION
 780 BUILD_HOTSPOT
 781 HOTSPOT_DIST
 782 BUILD_OUTPUT
 783 OVERRIDE_SRC_ROOT
 784 ADD_SRC_ROOT
 785 JDK_TOPDIR
 786 NASHORN_TOPDIR
 787 HOTSPOT_TOPDIR
 788 JAXWS_TOPDIR
 789 JAXP_TOPDIR
 790 CORBA_TOPDIR
 791 LANGTOOLS_TOPDIR
 792 JAVA_FLAGS_SMALL
 793 JAVA_FLAGS_BIG
 794 JAVA_FLAGS
 795 JAVAC_FLAGS
 796 BOOT_JDK_SOURCETARGET
 797 BOOT_JDK
 798 BOOT_TOOLSJAR
 799 BOOT_RTJAR
 800 JAVA_CHECK
 801 JAVAC_CHECK
 802 COOKED_BUILD_NUMBER
 803 JDK_VERSION
 804 COPYRIGHT_YEAR
 805 MACOSX_BUNDLE_ID_BASE
 806 MACOSX_BUNDLE_NAME_BASE
 807 COMPANY_NAME
 808 JDK_RC_PLATFORM_NAME
 809 PRODUCT_SUFFIX
 810 PRODUCT_NAME
 811 LAUNCHER_NAME
 812 MILESTONE
 813 JDK_BUILD_NUMBER
 814 JDK_UPDATE_VERSION
 815 JDK_MICRO_VERSION
 816 JDK_MINOR_VERSION
 817 JDK_MAJOR_VERSION
 818 USER_RELEASE_SUFFIX
 819 COMPRESS_JARS
 820 UNLIMITED_CRYPTO
 821 CACERTS_FILE
 822 TEST_IN_BUILD
 823 BUILD_HEADLESS
 824 SUPPORT_HEADFUL
 825 SUPPORT_HEADLESS
 826 BDEPS_FTP
 827 BDEPS_UNZIP
 828 OS_VERSION_MICRO
 829 OS_VERSION_MINOR
 830 OS_VERSION_MAJOR
 831 PKG_CONFIG
 832 CODESIGN
 833 XATTR
 834 DSYMUTIL
 835 IS_GNU_TIME
 836 TIME
 837 STAT
 838 HG
 839 READELF
 840 LDD
 841 ZIP
 842 UNZIP
 843 FIND_DELETE
 844 MAKE
 845 CHECK_TOOLSDIR_MAKE
 846 CHECK_TOOLSDIR_GMAKE
 847 CHECK_MAKE
 848 CHECK_GMAKE
 849 PKGHANDLER
 850 OUTPUT_ROOT
 851 CONF_NAME
 852 SPEC
 853 BUILD_VARIANT_RELEASE
 854 DEBUG_CLASSFILES
 855 FASTDEBUG
 856 VARIANT
 857 DEBUG_LEVEL
 858 MACOSX_UNIVERSAL
 859 INCLUDE_SA
 860 JVM_VARIANT_CORE
 861 JVM_VARIANT_ZEROSHARK
 862 JVM_VARIANT_ZERO
 863 JVM_VARIANT_KERNEL
 864 JVM_VARIANT_MINIMAL1
 865 JVM_VARIANT_CLIENT
 866 JVM_VARIANT_SERVER
 867 JVM_VARIANTS
 868 JVM_INTERPRETER
 869 JDK_VARIANT
 870 SET_OPENJDK
 871 BUILD_LOG_WRAPPER
 872 BUILD_LOG_PREVIOUS
 873 BUILD_LOG
 874 SYS_ROOT
 875 PATH_SEP
 876 SRC_ROOT
 877 ZERO_ARCHDEF
 878 DEFINE_CROSS_COMPILE_ARCH
 879 LP64
 880 OPENJDK_TARGET_OS_EXPORT_DIR
 881 OPENJDK_TARGET_OS_API_DIR
 882 OPENJDK_TARGET_CPU_JLI_CFLAGS
 883 OPENJDK_TARGET_CPU_OSARCH
 884 OPENJDK_TARGET_CPU_ISADIR
 885 OPENJDK_TARGET_CPU_LIBDIR
 886 OPENJDK_TARGET_CPU_LEGACY_LIB
 887 OPENJDK_TARGET_CPU_LEGACY
 888 REQUIRED_OS_VERSION
 889 REQUIRED_OS_NAME
 890 COMPILE_TYPE
 891 OPENJDK_TARGET_CPU_ENDIAN
 892 OPENJDK_TARGET_CPU_BITS
 893 OPENJDK_TARGET_CPU_ARCH
 894 OPENJDK_TARGET_CPU
 895 OPENJDK_TARGET_OS_API
 896 OPENJDK_TARGET_OS
 897 OPENJDK_BUILD_CPU_ENDIAN
 898 OPENJDK_BUILD_CPU_BITS
 899 OPENJDK_BUILD_CPU_ARCH
 900 OPENJDK_BUILD_CPU
 901 OPENJDK_BUILD_OS_API
 902 OPENJDK_BUILD_OS
 903 OPENJDK_BUILD_AUTOCONF_NAME
 904 OPENJDK_TARGET_AUTOCONF_NAME
 905 target_os
 906 target_vendor
 907 target_cpu
 908 target
 909 host_os
 910 host_vendor
 911 host_cpu
 912 host
 913 build_os
 914 build_vendor
 915 build_cpu
 916 build
 917 SETFILE
 918 DF
 919 READLINK
 920 CYGPATH
 921 NAWK
 922 SED
 923 FGREP
 924 EGREP
 925 GREP
 926 AWK
 927 XARGS
 928 WHICH
 929 WC
 930 UNIQ
 931 UNAME
 932 TR
 933 TOUCH
 934 TEE
 935 TAR
 936 TAIL
 937 SORT
 938 SH
 939 RM
 940 PRINTF
 941 MV
 942 MKTEMP
 943 MKDIR
 944 LS
 945 LN
 946 HEAD
 947 FIND
 948 FILE
 949 EXPR
 950 ECHO
 951 DIRNAME
 952 DIFF
 953 DATE
 954 CUT
 955 CPIO
 956 CP
 957 COMM
 958 CMP
 959 CHMOD
 960 CAT
 961 BASH
 962 BASENAME
 963 DATE_WHEN_CONFIGURED
 964 CONFIGURE_COMMAND_LINE
 965 CUSTOM_MAKE_DIR
 966 target_alias
 967 host_alias
 968 build_alias
 969 LIBS
 970 ECHO_T
 971 ECHO_N
 972 ECHO_C
 973 DEFS
 974 mandir
 975 localedir
 976 libdir
 977 psdir
 978 pdfdir
 979 dvidir
 980 htmldir
 981 infodir
 982 docdir
 983 oldincludedir
 984 includedir
 985 localstatedir
 986 sharedstatedir
 987 sysconfdir
 988 datadir
 989 datarootdir
 990 libexecdir
 991 sbindir
 992 bindir
 993 program_transform_name
 994 prefix
 995 exec_prefix
 996 PACKAGE_URL
 997 PACKAGE_BUGREPORT
 998 PACKAGE_STRING
 999 PACKAGE_VERSION
1000 PACKAGE_TARNAME
1001 PACKAGE_NAME
1002 PATH_SEPARATOR
1003 SHELL'
1004 ac_subst_files=''
1005 ac_user_opts='
1006 enable_option_checking
1007 with_custom_make_dir
1008 with_target_bits
1009 with_sys_root
1010 with_tools_dir
1011 with_xcode_path
1012 with_devkit
1013 enable_openjdk_only
1014 with_jdk_variant
1015 with_jvm_interpreter
1016 with_jvm_variants
1017 enable_debug
1018 with_debug_level
1019 with_conf_name
1020 with_builddeps_conf
1021 with_builddeps_server
1022 with_builddeps_dir
1023 with_builddeps_group
1024 enable_headful
1025 enable_hotspot_test_in_build
1026 with_cacerts_file
1027 enable_unlimited_crypto
1028 with_milestone
1029 with_update_version
1030 with_user_release_suffix
1031 with_build_number
1032 with_copyright_year
1033 with_boot_jdk
1034 with_boot_jdk_jvmargs
1035 with_add_source_root
1036 with_override_source_root
1037 with_adds_and_overrides
1038 with_override_langtools
1039 with_override_corba
1040 with_override_jaxp
1041 with_override_jaxws
1042 with_override_hotspot
1043 with_override_nashorn
1044 with_override_jdk
1045 with_import_hotspot
1046 with_msvcr_dll
1047 with_dxsdk
1048 with_dxsdk_lib
1049 with_dxsdk_include
1050 with_jtreg
1051 with_extra_cflags
1052 with_extra_cxxflags
1053 with_extra_ldflags
1054 enable_debug_symbols
1055 enable_zip_debug_info
1056 enable_macosx_runtime_support
1057 with_x
1058 with_cups
1059 with_cups_include
1060 with_freetype
1061 with_freetype_include
1062 with_freetype_lib
1063 enable_freetype_bundling
1064 with_alsa
1065 with_alsa_include
1066 with_alsa_lib
1067 with_giflib
1068 with_zlib
1069 with_stdc__lib
1070 with_num_cores
1071 with_memory_size
1072 with_jobs
1073 with_sjavac_server_java
1074 enable_sjavac
1075 enable_precompiled_headers
1076 enable_ccache
1077 with_ccache_dir
1078 '
1079       ac_precious_vars='build_alias
1080 host_alias
1081 target_alias
1082 PKG_CONFIG
1083 CC
1084 CFLAGS
1085 LDFLAGS
1086 LIBS
1087 CPPFLAGS
1088 CXX
1089 CXXFLAGS
1090 CCC
1091 OBJC
1092 OBJCFLAGS
1093 CPP
1094 CXXCPP
1095 XMKMF
1096 FREETYPE_CFLAGS
1097 FREETYPE_LIBS
1098 ALSA_CFLAGS
1099 ALSA_LIBS
1100 LIBFFI_CFLAGS
1101 LIBFFI_LIBS'
1102 
1103 
1104 # Initialize some variables set by options.
1105 ac_init_help=
1106 ac_init_version=false
1107 ac_unrecognized_opts=
1108 ac_unrecognized_sep=
1109 # The variables have the same names as the options, with
1110 # dashes changed to underlines.
1111 cache_file=/dev/null
1112 exec_prefix=NONE
1113 no_create=
1114 no_recursion=
1115 prefix=NONE
1116 program_prefix=NONE
1117 program_suffix=NONE
1118 program_transform_name=s,x,x,
1119 silent=
1120 site=
1121 srcdir=
1122 verbose=
1123 x_includes=NONE
1124 x_libraries=NONE
1125 
1126 # Installation directory options.
1127 # These are left unexpanded so users can "make install exec_prefix=/foo"
1128 # and all the variables that are supposed to be based on exec_prefix
1129 # by default will actually change.
1130 # Use braces instead of parens because sh, perl, etc. also accept them.
1131 # (The list follows the same order as the GNU Coding Standards.)
1132 bindir='${exec_prefix}/bin'
1133 sbindir='${exec_prefix}/sbin'
1134 libexecdir='${exec_prefix}/libexec'
1135 datarootdir='${prefix}/share'
1136 datadir='${datarootdir}'
1137 sysconfdir='${prefix}/etc'
1138 sharedstatedir='${prefix}/com'
1139 localstatedir='${prefix}/var'
1140 includedir='${prefix}/include'
1141 oldincludedir='/usr/include'
1142 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1143 infodir='${datarootdir}/info'
1144 htmldir='${docdir}'
1145 dvidir='${docdir}'
1146 pdfdir='${docdir}'
1147 psdir='${docdir}'
1148 libdir='${exec_prefix}/lib'
1149 localedir='${datarootdir}/locale'
1150 mandir='${datarootdir}/man'
1151 
1152 ac_prev=
1153 ac_dashdash=
1154 for ac_option
1155 do
1156   # If the previous option needs an argument, assign it.
1157   if test -n "$ac_prev"; then
1158     eval $ac_prev=\$ac_option
1159     ac_prev=
1160     continue
1161   fi
1162 
1163   case $ac_option in
1164   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1165   *=)   ac_optarg= ;;
1166   *)    ac_optarg=yes ;;
1167   esac
1168 
1169   # Accept the important Cygnus configure options, so we can diagnose typos.
1170 
1171   case $ac_dashdash$ac_option in
1172   --)
1173     ac_dashdash=yes ;;
1174 
1175   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1176     ac_prev=bindir ;;
1177   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1178     bindir=$ac_optarg ;;
1179 
1180   -build | --build | --buil | --bui | --bu)
1181     ac_prev=build_alias ;;
1182   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1183     build_alias=$ac_optarg ;;
1184 
1185   -cache-file | --cache-file | --cache-fil | --cache-fi \
1186   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1187     ac_prev=cache_file ;;
1188   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1189   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1190     cache_file=$ac_optarg ;;
1191 
1192   --config-cache | -C)
1193     cache_file=config.cache ;;
1194 
1195   -datadir | --datadir | --datadi | --datad)
1196     ac_prev=datadir ;;
1197   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1198     datadir=$ac_optarg ;;
1199 
1200   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1201   | --dataroo | --dataro | --datar)
1202     ac_prev=datarootdir ;;
1203   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1204   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1205     datarootdir=$ac_optarg ;;
1206 
1207   -disable-* | --disable-*)
1208     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1209     # Reject names that are not valid shell variable names.
1210     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1211       as_fn_error $? "invalid feature name: $ac_useropt"
1212     ac_useropt_orig=$ac_useropt
1213     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214     case $ac_user_opts in
1215       *"
1216 "enable_$ac_useropt"
1217 "*) ;;
1218       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1219          ac_unrecognized_sep=', ';;
1220     esac
1221     eval enable_$ac_useropt=no ;;
1222 
1223   -docdir | --docdir | --docdi | --doc | --do)
1224     ac_prev=docdir ;;
1225   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1226     docdir=$ac_optarg ;;
1227 
1228   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1229     ac_prev=dvidir ;;
1230   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1231     dvidir=$ac_optarg ;;
1232 
1233   -enable-* | --enable-*)
1234     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1235     # Reject names that are not valid shell variable names.
1236     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1237       as_fn_error $? "invalid feature name: $ac_useropt"
1238     ac_useropt_orig=$ac_useropt
1239     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1240     case $ac_user_opts in
1241       *"
1242 "enable_$ac_useropt"
1243 "*) ;;
1244       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1245          ac_unrecognized_sep=', ';;
1246     esac
1247     eval enable_$ac_useropt=\$ac_optarg ;;
1248 
1249   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1250   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1251   | --exec | --exe | --ex)
1252     ac_prev=exec_prefix ;;
1253   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1254   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1255   | --exec=* | --exe=* | --ex=*)
1256     exec_prefix=$ac_optarg ;;
1257 
1258   -gas | --gas | --ga | --g)
1259     # Obsolete; use --with-gas.
1260     with_gas=yes ;;
1261 
1262   -help | --help | --hel | --he | -h)
1263     ac_init_help=long ;;
1264   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1265     ac_init_help=recursive ;;
1266   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1267     ac_init_help=short ;;
1268 
1269   -host | --host | --hos | --ho)
1270     ac_prev=host_alias ;;
1271   -host=* | --host=* | --hos=* | --ho=*)
1272     host_alias=$ac_optarg ;;
1273 
1274   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1275     ac_prev=htmldir ;;
1276   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1277   | --ht=*)
1278     htmldir=$ac_optarg ;;
1279 
1280   -includedir | --includedir | --includedi | --included | --include \
1281   | --includ | --inclu | --incl | --inc)
1282     ac_prev=includedir ;;
1283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1284   | --includ=* | --inclu=* | --incl=* | --inc=*)
1285     includedir=$ac_optarg ;;
1286 
1287   -infodir | --infodir | --infodi | --infod | --info | --inf)
1288     ac_prev=infodir ;;
1289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1290     infodir=$ac_optarg ;;
1291 
1292   -libdir | --libdir | --libdi | --libd)
1293     ac_prev=libdir ;;
1294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1295     libdir=$ac_optarg ;;
1296 
1297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1298   | --libexe | --libex | --libe)
1299     ac_prev=libexecdir ;;
1300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1301   | --libexe=* | --libex=* | --libe=*)
1302     libexecdir=$ac_optarg ;;
1303 
1304   -localedir | --localedir | --localedi | --localed | --locale)
1305     ac_prev=localedir ;;
1306   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1307     localedir=$ac_optarg ;;
1308 
1309   -localstatedir | --localstatedir | --localstatedi | --localstated \
1310   | --localstate | --localstat | --localsta | --localst | --locals)
1311     ac_prev=localstatedir ;;
1312   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1313   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1314     localstatedir=$ac_optarg ;;
1315 
1316   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1317     ac_prev=mandir ;;
1318   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1319     mandir=$ac_optarg ;;
1320 
1321   -nfp | --nfp | --nf)
1322     # Obsolete; use --without-fp.
1323     with_fp=no ;;
1324 
1325   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1326   | --no-cr | --no-c | -n)
1327     no_create=yes ;;
1328 
1329   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1330   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1331     no_recursion=yes ;;
1332 
1333   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1334   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1335   | --oldin | --oldi | --old | --ol | --o)
1336     ac_prev=oldincludedir ;;
1337   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1338   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1339   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1340     oldincludedir=$ac_optarg ;;
1341 
1342   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1343     ac_prev=prefix ;;
1344   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1345     prefix=$ac_optarg ;;
1346 
1347   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1348   | --program-pre | --program-pr | --program-p)
1349     ac_prev=program_prefix ;;
1350   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1351   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1352     program_prefix=$ac_optarg ;;
1353 
1354   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1355   | --program-suf | --program-su | --program-s)
1356     ac_prev=program_suffix ;;
1357   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1358   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1359     program_suffix=$ac_optarg ;;
1360 
1361   -program-transform-name | --program-transform-name \
1362   | --program-transform-nam | --program-transform-na \
1363   | --program-transform-n | --program-transform- \
1364   | --program-transform | --program-transfor \
1365   | --program-transfo | --program-transf \
1366   | --program-trans | --program-tran \
1367   | --progr-tra | --program-tr | --program-t)
1368     ac_prev=program_transform_name ;;
1369   -program-transform-name=* | --program-transform-name=* \
1370   | --program-transform-nam=* | --program-transform-na=* \
1371   | --program-transform-n=* | --program-transform-=* \
1372   | --program-transform=* | --program-transfor=* \
1373   | --program-transfo=* | --program-transf=* \
1374   | --program-trans=* | --program-tran=* \
1375   | --progr-tra=* | --program-tr=* | --program-t=*)
1376     program_transform_name=$ac_optarg ;;
1377 
1378   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1379     ac_prev=pdfdir ;;
1380   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1381     pdfdir=$ac_optarg ;;
1382 
1383   -psdir | --psdir | --psdi | --psd | --ps)
1384     ac_prev=psdir ;;
1385   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1386     psdir=$ac_optarg ;;
1387 
1388   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1389   | -silent | --silent | --silen | --sile | --sil)
1390     silent=yes ;;
1391 
1392   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1393     ac_prev=sbindir ;;
1394   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1395   | --sbi=* | --sb=*)
1396     sbindir=$ac_optarg ;;
1397 
1398   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1399   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1400   | --sharedst | --shareds | --shared | --share | --shar \
1401   | --sha | --sh)
1402     ac_prev=sharedstatedir ;;
1403   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1404   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1405   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1406   | --sha=* | --sh=*)
1407     sharedstatedir=$ac_optarg ;;
1408 
1409   -site | --site | --sit)
1410     ac_prev=site ;;
1411   -site=* | --site=* | --sit=*)
1412     site=$ac_optarg ;;
1413 
1414   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1415     ac_prev=srcdir ;;
1416   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1417     srcdir=$ac_optarg ;;
1418 
1419   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1420   | --syscon | --sysco | --sysc | --sys | --sy)
1421     ac_prev=sysconfdir ;;
1422   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1423   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1424     sysconfdir=$ac_optarg ;;
1425 
1426   -target | --target | --targe | --targ | --tar | --ta | --t)
1427     ac_prev=target_alias ;;
1428   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1429     target_alias=$ac_optarg ;;
1430 
1431   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1432     verbose=yes ;;
1433 
1434   -version | --version | --versio | --versi | --vers | -V)
1435     ac_init_version=: ;;
1436 
1437   -with-* | --with-*)
1438     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1439     # Reject names that are not valid shell variable names.
1440     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1441       as_fn_error $? "invalid package name: $ac_useropt"
1442     ac_useropt_orig=$ac_useropt
1443     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1444     case $ac_user_opts in
1445       *"
1446 "with_$ac_useropt"
1447 "*) ;;
1448       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1449          ac_unrecognized_sep=', ';;
1450     esac
1451     eval with_$ac_useropt=\$ac_optarg ;;
1452 
1453   -without-* | --without-*)
1454     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1455     # Reject names that are not valid shell variable names.
1456     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1457       as_fn_error $? "invalid package name: $ac_useropt"
1458     ac_useropt_orig=$ac_useropt
1459     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1460     case $ac_user_opts in
1461       *"
1462 "with_$ac_useropt"
1463 "*) ;;
1464       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1465          ac_unrecognized_sep=', ';;
1466     esac
1467     eval with_$ac_useropt=no ;;
1468 
1469   --x)
1470     # Obsolete; use --with-x.
1471     with_x=yes ;;
1472 
1473   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1474   | --x-incl | --x-inc | --x-in | --x-i)
1475     ac_prev=x_includes ;;
1476   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1477   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1478     x_includes=$ac_optarg ;;
1479 
1480   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1481   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1482     ac_prev=x_libraries ;;
1483   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1484   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1485     x_libraries=$ac_optarg ;;
1486 
1487   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1488 Try \`$0 --help' for more information"
1489     ;;
1490 
1491   *=*)
1492     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1493     # Reject names that are not valid shell variable names.
1494     case $ac_envvar in #(
1495       '' | [0-9]* | *[!_$as_cr_alnum]* )
1496       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1497     esac
1498     eval $ac_envvar=\$ac_optarg
1499     export $ac_envvar ;;
1500 
1501   *)
1502     # FIXME: should be removed in autoconf 3.0.
1503     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1504     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1505       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1506     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1507     ;;
1508 
1509   esac
1510 done
1511 
1512 if test -n "$ac_prev"; then
1513   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1514   as_fn_error $? "missing argument to $ac_option"
1515 fi
1516 
1517 if test -n "$ac_unrecognized_opts"; then
1518   case $enable_option_checking in
1519     no) ;;
1520     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1521     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1522   esac
1523 fi
1524 
1525 # Check all directory arguments for consistency.
1526 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1527                 datadir sysconfdir sharedstatedir localstatedir includedir \
1528                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1529                 libdir localedir mandir
1530 do
1531   eval ac_val=\$$ac_var
1532   # Remove trailing slashes.
1533   case $ac_val in
1534     */ )
1535       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1536       eval $ac_var=\$ac_val;;
1537   esac
1538   # Be sure to have absolute directory names.
1539   case $ac_val in
1540     [\\/$]* | ?:[\\/]* )  continue;;
1541     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1542   esac
1543   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1544 done
1545 
1546 # There might be people who depend on the old broken behavior: `$host'
1547 # used to hold the argument of --host etc.
1548 # FIXME: To remove some day.
1549 build=$build_alias
1550 host=$host_alias
1551 target=$target_alias
1552 
1553 # FIXME: To remove some day.
1554 if test "x$host_alias" != x; then
1555   if test "x$build_alias" = x; then
1556     cross_compiling=maybe
1557   elif test "x$build_alias" != "x$host_alias"; then
1558     cross_compiling=yes
1559   fi
1560 fi
1561 
1562 ac_tool_prefix=
1563 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1564 
1565 test "$silent" = yes && exec 6>/dev/null
1566 
1567 
1568 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1569 ac_ls_di=`ls -di .` &&
1570 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1571   as_fn_error $? "working directory cannot be determined"
1572 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1573   as_fn_error $? "pwd does not report name of working directory"
1574 
1575 
1576 # Find the source files, if location was not specified.
1577 if test -z "$srcdir"; then
1578   ac_srcdir_defaulted=yes
1579   # Try the directory containing this script, then the parent directory.
1580   ac_confdir=`$as_dirname -- "$as_myself" ||
1581 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1582          X"$as_myself" : 'X\(//\)[^/]' \| \
1583          X"$as_myself" : 'X\(//\)$' \| \
1584          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1585 $as_echo X"$as_myself" |
1586     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1587             s//\1/
1588             q
1589           }
1590           /^X\(\/\/\)[^/].*/{
1591             s//\1/
1592             q
1593           }
1594           /^X\(\/\/\)$/{
1595             s//\1/
1596             q
1597           }
1598           /^X\(\/\).*/{
1599             s//\1/
1600             q
1601           }
1602           s/.*/./; q'`
1603   srcdir=$ac_confdir
1604   if test ! -r "$srcdir/$ac_unique_file"; then
1605     srcdir=..
1606   fi
1607 else
1608   ac_srcdir_defaulted=no
1609 fi
1610 if test ! -r "$srcdir/$ac_unique_file"; then
1611   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1612   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1613 fi
1614 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1615 ac_abs_confdir=`(
1616         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1617         pwd)`
1618 # When building in place, set srcdir=.
1619 if test "$ac_abs_confdir" = "$ac_pwd"; then
1620   srcdir=.
1621 fi
1622 # Remove unnecessary trailing slashes from srcdir.
1623 # Double slashes in file names in object file debugging info
1624 # mess up M-x gdb in Emacs.
1625 case $srcdir in
1626 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1627 esac
1628 for ac_var in $ac_precious_vars; do
1629   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1630   eval ac_env_${ac_var}_value=\$${ac_var}
1631   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1632   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1633 done
1634 
1635 #
1636 # Report the --help message.
1637 #
1638 if test "$ac_init_help" = "long"; then
1639   # Omit some internal or obsolete options to make the list less imposing.
1640   # This message is too long to be a string in the A/UX 3.1 sh.
1641   cat <<_ACEOF
1642 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1643 
1644 Usage: $0 [OPTION]... [VAR=VALUE]...
1645 
1646 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1647 VAR=VALUE.  See below for descriptions of some of the useful variables.
1648 
1649 Defaults for the options are specified in brackets.
1650 
1651 Configuration:
1652   -h, --help              display this help and exit
1653       --help=short        display options specific to this package
1654       --help=recursive    display the short help of all the included packages
1655   -V, --version           display version information and exit
1656   -q, --quiet, --silent   do not print \`checking ...' messages
1657       --cache-file=FILE   cache test results in FILE [disabled]
1658   -C, --config-cache      alias for \`--cache-file=config.cache'
1659   -n, --no-create         do not create output files
1660       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1661 
1662 Installation directories:
1663   --prefix=PREFIX         install architecture-independent files in PREFIX
1664                           [$ac_default_prefix]
1665   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1666                           [PREFIX]
1667 
1668 By default, \`make install' will install all the files in
1669 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1670 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1671 for instance \`--prefix=\$HOME'.
1672 
1673 For better control, use the options below.
1674 
1675 Fine tuning of the installation directories:
1676   --bindir=DIR            user executables [EPREFIX/bin]
1677   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1678   --libexecdir=DIR        program executables [EPREFIX/libexec]
1679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1682   --libdir=DIR            object code libraries [EPREFIX/lib]
1683   --includedir=DIR        C header files [PREFIX/include]
1684   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1685   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1686   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1687   --infodir=DIR           info documentation [DATAROOTDIR/info]
1688   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1689   --mandir=DIR            man documentation [DATAROOTDIR/man]
1690   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1691   --htmldir=DIR           html documentation [DOCDIR]
1692   --dvidir=DIR            dvi documentation [DOCDIR]
1693   --pdfdir=DIR            pdf documentation [DOCDIR]
1694   --psdir=DIR             ps documentation [DOCDIR]
1695 _ACEOF
1696 
1697   cat <<\_ACEOF
1698 
1699 X features:
1700   --x-includes=DIR    X include files are in DIR
1701   --x-libraries=DIR   X library files are in DIR
1702 
1703 System types:
1704   --build=BUILD     configure for building on BUILD [guessed]
1705   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1706   --target=TARGET   configure for building compilers for TARGET [HOST]
1707 _ACEOF
1708 fi
1709 
1710 if test -n "$ac_init_help"; then
1711   case $ac_init_help in
1712      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1713    esac
1714   cat <<\_ACEOF
1715 
1716 Optional Features:
1717   --disable-option-checking  ignore unrecognized --enable/--with options
1718   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1719   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1720   --enable-openjdk-only   suppress building custom source even if present
1721                           [disabled]
1722   --enable-debug          set the debug level to fastdebug (shorthand for
1723                           --with-debug-level=fastdebug) [disabled]
1724   --disable-headful       disable building headful support (graphical UI
1725                           support) [enabled]
1726   --enable-hotspot-test-in-build
1727                           run the Queens test after Hotspot build [disabled]
1728   --enable-unlimited-crypto
1729                           Enable unlimited crypto policy [disabled]
1730   --disable-debug-symbols disable generation of debug symbols [enabled]
1731   --disable-zip-debug-info
1732                           disable zipping of debug-info files [enabled]
1733   --enable-macosx-runtime-support
1734                           Deprecated. Option is kept for backwards
1735                           compatibility and is ignored
1736   --disable-freetype-bundling
1737                           disable bundling of the freetype library with the
1738                           build result [enabled on Windows or when using
1739                           --with-freetype, disabled otherwise]
1740   --enable-sjavac         use sjavac to do fast incremental compiles
1741                           [disabled]
1742   --disable-precompiled-headers
1743                           disable using precompiled headers when compiling C++
1744                           [enabled]
1745   --disable-ccache        disable using ccache to speed up recompilations
1746                           [enabled]
1747 
1748 Optional Packages:
1749   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1750   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1751   --with-custom-make-dir  use this directory for custom build/make files
1752   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1753                           support it), e.g. --with-target-bits=32 [guessed]
1754   --with-sys-root         pass this sys-root to the compilers and tools (for
1755                           cross-compiling)
1756   --with-tools-dir        search this directory for compilers and tools (for
1757                           cross-compiling)
1758   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1759                           10.9 and later)
1760   --with-devkit           use this directory as base for tools-dir and
1761                           sys-root (for cross-compiling)
1762   --with-jdk-variant      JDK variant to build (normal) [normal]
1763   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1764   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1765                           client, minimal1, kernel, zero, zeroshark, core)
1766                           [server]
1767   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1768                           [release]
1769   --with-conf-name        use this as the name of the configuration [generated
1770                           from important configuration options]
1771   --with-builddeps-conf   use this configuration file for the builddeps
1772   --with-builddeps-server download and use build dependencies from this server
1773                           url
1774   --with-builddeps-dir    store downloaded build dependencies here
1775                           [/localhome/builddeps]
1776   --with-builddeps-group  chgrp the downloaded build dependencies to this
1777                           group
1778   --with-cacerts-file     specify alternative cacerts file
1779   --with-milestone        Set milestone value for build [internal]
1780   --with-update-version   Set update version value for build [b00]
1781   --with-user-release-suffix
1782                           Add a custom string to the version string if build
1783                           number isn't set.[username_builddateb00]
1784   --with-build-number     Set build number value for build [b00]
1785   --with-copyright-year   Set copyright year value for build [current year]
1786   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1787   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1788                           invocations of the Boot JDK, overriding the default
1789                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1790                           -enableassertions"
1791   --with-add-source-root  for each and every source directory, look in this
1792                           additional source root for the same directory; if it
1793                           exists and have files in it, include it in the build
1794   --with-override-source-root
1795                           for each and every source directory, look in this
1796                           override source root for the same directory; if it
1797                           exists, use that directory instead and ignore the
1798                           directory in the original source root
1799   --with-adds-and-overrides
1800                           use the subdirs 'adds' and 'overrides' in the
1801                           specified directory as add-source-root and
1802                           override-source-root
1803   --with-override-langtools
1804                           use this langtools dir for the build
1805   --with-override-corba   use this corba dir for the build
1806   --with-override-jaxp    use this jaxp dir for the build
1807   --with-override-jaxws   use this jaxws dir for the build
1808   --with-override-hotspot use this hotspot dir for the build
1809   --with-override-nashorn use this nashorn dir for the build
1810   --with-override-jdk     use this jdk dir for the build
1811   --with-import-hotspot   import hotspot binaries from this jdk image or
1812                           hotspot build dist dir instead of building from
1813                           source
1814   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1815                           only) [probed]
1816   --with-dxsdk            Deprecated. Option is kept for backwards
1817                           compatibility and is ignored
1818   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1819                           compatibility and is ignored
1820   --with-dxsdk-include    Deprecated. Option is kept for backwards
1821                           compatibility and is ignored
1822   --with-jtreg            Regression Test Harness [probed]
1823   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1824   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1825   --with-extra-ldflags    extra flags to be used when linking jdk
1826   --with-x                use the X Window System
1827   --with-cups             specify prefix directory for the cups package
1828                           (expecting the headers under PATH/include)
1829   --with-cups-include     specify directory for the cups include files
1830   --with-freetype         specify prefix directory for the freetype package
1831                           (expecting the libraries under PATH/lib and the
1832                           headers under PATH/include)
1833   --with-freetype-include specify directory for the freetype include files
1834   --with-freetype-lib     specify directory for the freetype library
1835   --with-alsa             specify prefix directory for the alsa package
1836                           (expecting the libraries under PATH/lib and the
1837                           headers under PATH/include)
1838   --with-alsa-include     specify directory for the alsa include files
1839   --with-alsa-lib         specify directory for the alsa library
1840   --with-giflib           use giflib from build system or OpenJDK source
1841                           (system, bundled) [bundled]
1842   --with-zlib             use zlib from build system or OpenJDK source
1843                           (system, bundled) [bundled]
1844   --with-stdc++lib=<static>,<dynamic>,<default>
1845                           force linking of the C++ runtime on Linux to either
1846                           static or dynamic, default is static with dynamic as
1847                           fallback
1848   --with-num-cores        number of cores in the build system, e.g.
1849                           --with-num-cores=8 [probed]
1850   --with-memory-size      memory (in MB) available in the build system, e.g.
1851                           --with-memory-size=1024 [probed]
1852   --with-jobs             number of parallel jobs to let make run [calculated
1853                           based on cores and memory]
1854   --with-sjavac-server-java
1855                           use this java binary for running the sjavac
1856                           background server [Boot JDK java]
1857   --with-ccache-dir       where to store ccache files [~/.ccache]
1858 
1859 Some influential environment variables:
1860   PKG_CONFIG  path to pkg-config utility
1861   CC          C compiler command
1862   CFLAGS      C compiler flags
1863   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1864               nonstandard directory <lib dir>
1865   LIBS        libraries to pass to the linker, e.g. -l<library>
1866   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1867               you have headers in a nonstandard directory <include dir>
1868   CXX         C++ compiler command
1869   CXXFLAGS    C++ compiler flags
1870   OBJC        Objective C compiler command
1871   OBJCFLAGS   Objective C compiler flags
1872   CPP         C preprocessor
1873   CXXCPP      C++ preprocessor
1874   XMKMF       Path to xmkmf, Makefile generator for X Window System
1875   FREETYPE_CFLAGS
1876               C compiler flags for FREETYPE, overriding pkg-config
1877   FREETYPE_LIBS
1878               linker flags for FREETYPE, overriding pkg-config
1879   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1880   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1881   LIBFFI_CFLAGS
1882               C compiler flags for LIBFFI, overriding pkg-config
1883   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1884 
1885 Use these variables to override the choices made by `configure' or to help
1886 it to find libraries and programs with nonstandard names/locations.
1887 
1888 Report bugs to <build-dev@openjdk.java.net>.
1889 OpenJDK home page: <http://openjdk.java.net>.
1890 _ACEOF
1891 ac_status=$?
1892 fi
1893 
1894 if test "$ac_init_help" = "recursive"; then
1895   # If there are subdirs, report their specific --help.
1896   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1897     test -d "$ac_dir" ||
1898       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1899       continue
1900     ac_builddir=.
1901 
1902 case "$ac_dir" in
1903 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1904 *)
1905   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1906   # A ".." for each directory in $ac_dir_suffix.
1907   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1908   case $ac_top_builddir_sub in
1909   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1910   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1911   esac ;;
1912 esac
1913 ac_abs_top_builddir=$ac_pwd
1914 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1915 # for backward compatibility:
1916 ac_top_builddir=$ac_top_build_prefix
1917 
1918 case $srcdir in
1919   .)  # We are building in place.
1920     ac_srcdir=.
1921     ac_top_srcdir=$ac_top_builddir_sub
1922     ac_abs_top_srcdir=$ac_pwd ;;
1923   [\\/]* | ?:[\\/]* )  # Absolute name.
1924     ac_srcdir=$srcdir$ac_dir_suffix;
1925     ac_top_srcdir=$srcdir
1926     ac_abs_top_srcdir=$srcdir ;;
1927   *) # Relative name.
1928     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1929     ac_top_srcdir=$ac_top_build_prefix$srcdir
1930     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1931 esac
1932 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1933 
1934     cd "$ac_dir" || { ac_status=$?; continue; }
1935     # Check for guested configure.
1936     if test -f "$ac_srcdir/configure.gnu"; then
1937       echo &&
1938       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1939     elif test -f "$ac_srcdir/configure"; then
1940       echo &&
1941       $SHELL "$ac_srcdir/configure" --help=recursive
1942     else
1943       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1944     fi || ac_status=$?
1945     cd "$ac_pwd" || { ac_status=$?; break; }
1946   done
1947 fi
1948 
1949 test -n "$ac_init_help" && exit $ac_status
1950 if $ac_init_version; then
1951   cat <<\_ACEOF
1952 OpenJDK configure jdk8
1953 generated by GNU Autoconf 2.69
1954 
1955 Copyright (C) 2012 Free Software Foundation, Inc.
1956 This configure script is free software; the Free Software Foundation
1957 gives unlimited permission to copy, distribute and modify it.
1958 _ACEOF
1959   exit
1960 fi
1961 
1962 ## ------------------------ ##
1963 ## Autoconf initialization. ##
1964 ## ------------------------ ##
1965 
1966 # ac_fn_c_try_compile LINENO
1967 # --------------------------
1968 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1969 ac_fn_c_try_compile ()
1970 {
1971   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972   rm -f conftest.$ac_objext
1973   if { { ac_try="$ac_compile"
1974 case "(($ac_try" in
1975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976   *) ac_try_echo=$ac_try;;
1977 esac
1978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979 $as_echo "$ac_try_echo"; } >&5
1980   (eval "$ac_compile") 2>conftest.err
1981   ac_status=$?
1982   if test -s conftest.err; then
1983     grep -v '^ *+' conftest.err >conftest.er1
1984     cat conftest.er1 >&5
1985     mv -f conftest.er1 conftest.err
1986   fi
1987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1988   test $ac_status = 0; } && {
1989          test -z "$ac_c_werror_flag" ||
1990          test ! -s conftest.err
1991        } && test -s conftest.$ac_objext; then :
1992   ac_retval=0
1993 else
1994   $as_echo "$as_me: failed program was:" >&5
1995 sed 's/^/| /' conftest.$ac_ext >&5
1996 
1997         ac_retval=1
1998 fi
1999   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2000   as_fn_set_status $ac_retval
2001 
2002 } # ac_fn_c_try_compile
2003 
2004 # ac_fn_cxx_try_compile LINENO
2005 # ----------------------------
2006 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2007 ac_fn_cxx_try_compile ()
2008 {
2009   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010   rm -f conftest.$ac_objext
2011   if { { ac_try="$ac_compile"
2012 case "(($ac_try" in
2013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2014   *) ac_try_echo=$ac_try;;
2015 esac
2016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2017 $as_echo "$ac_try_echo"; } >&5
2018   (eval "$ac_compile") 2>conftest.err
2019   ac_status=$?
2020   if test -s conftest.err; then
2021     grep -v '^ *+' conftest.err >conftest.er1
2022     cat conftest.er1 >&5
2023     mv -f conftest.er1 conftest.err
2024   fi
2025   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2026   test $ac_status = 0; } && {
2027          test -z "$ac_cxx_werror_flag" ||
2028          test ! -s conftest.err
2029        } && test -s conftest.$ac_objext; then :
2030   ac_retval=0
2031 else
2032   $as_echo "$as_me: failed program was:" >&5
2033 sed 's/^/| /' conftest.$ac_ext >&5
2034 
2035         ac_retval=1
2036 fi
2037   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2038   as_fn_set_status $ac_retval
2039 
2040 } # ac_fn_cxx_try_compile
2041 
2042 # ac_fn_objc_try_compile LINENO
2043 # -----------------------------
2044 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2045 ac_fn_objc_try_compile ()
2046 {
2047   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048   rm -f conftest.$ac_objext
2049   if { { ac_try="$ac_compile"
2050 case "(($ac_try" in
2051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2052   *) ac_try_echo=$ac_try;;
2053 esac
2054 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2055 $as_echo "$ac_try_echo"; } >&5
2056   (eval "$ac_compile") 2>conftest.err
2057   ac_status=$?
2058   if test -s conftest.err; then
2059     grep -v '^ *+' conftest.err >conftest.er1
2060     cat conftest.er1 >&5
2061     mv -f conftest.er1 conftest.err
2062   fi
2063   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2064   test $ac_status = 0; } && {
2065          test -z "$ac_objc_werror_flag" ||
2066          test ! -s conftest.err
2067        } && test -s conftest.$ac_objext; then :
2068   ac_retval=0
2069 else
2070   $as_echo "$as_me: failed program was:" >&5
2071 sed 's/^/| /' conftest.$ac_ext >&5
2072 
2073         ac_retval=1
2074 fi
2075   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2076   as_fn_set_status $ac_retval
2077 
2078 } # ac_fn_objc_try_compile
2079 
2080 # ac_fn_c_try_cpp LINENO
2081 # ----------------------
2082 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2083 ac_fn_c_try_cpp ()
2084 {
2085   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2086   if { { ac_try="$ac_cpp conftest.$ac_ext"
2087 case "(($ac_try" in
2088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2089   *) ac_try_echo=$ac_try;;
2090 esac
2091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2092 $as_echo "$ac_try_echo"; } >&5
2093   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2094   ac_status=$?
2095   if test -s conftest.err; then
2096     grep -v '^ *+' conftest.err >conftest.er1
2097     cat conftest.er1 >&5
2098     mv -f conftest.er1 conftest.err
2099   fi
2100   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2101   test $ac_status = 0; } > conftest.i && {
2102          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2103          test ! -s conftest.err
2104        }; then :
2105   ac_retval=0
2106 else
2107   $as_echo "$as_me: failed program was:" >&5
2108 sed 's/^/| /' conftest.$ac_ext >&5
2109 
2110     ac_retval=1
2111 fi
2112   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2113   as_fn_set_status $ac_retval
2114 
2115 } # ac_fn_c_try_cpp
2116 
2117 # ac_fn_cxx_try_cpp LINENO
2118 # ------------------------
2119 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2120 ac_fn_cxx_try_cpp ()
2121 {
2122   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123   if { { ac_try="$ac_cpp conftest.$ac_ext"
2124 case "(($ac_try" in
2125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2126   *) ac_try_echo=$ac_try;;
2127 esac
2128 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2129 $as_echo "$ac_try_echo"; } >&5
2130   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2131   ac_status=$?
2132   if test -s conftest.err; then
2133     grep -v '^ *+' conftest.err >conftest.er1
2134     cat conftest.er1 >&5
2135     mv -f conftest.er1 conftest.err
2136   fi
2137   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2138   test $ac_status = 0; } > conftest.i && {
2139          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2140          test ! -s conftest.err
2141        }; then :
2142   ac_retval=0
2143 else
2144   $as_echo "$as_me: failed program was:" >&5
2145 sed 's/^/| /' conftest.$ac_ext >&5
2146 
2147     ac_retval=1
2148 fi
2149   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2150   as_fn_set_status $ac_retval
2151 
2152 } # ac_fn_cxx_try_cpp
2153 
2154 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2155 # ---------------------------------------------------------
2156 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2157 # the include files in INCLUDES and setting the cache variable VAR
2158 # accordingly.
2159 ac_fn_cxx_check_header_mongrel ()
2160 {
2161   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2162   if eval \${$3+:} false; then :
2163   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2164 $as_echo_n "checking for $2... " >&6; }
2165 if eval \${$3+:} false; then :
2166   $as_echo_n "(cached) " >&6
2167 fi
2168 eval ac_res=\$$3
2169                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170 $as_echo "$ac_res" >&6; }
2171 else
2172   # Is the header compilable?
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2174 $as_echo_n "checking $2 usability... " >&6; }
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176 /* end confdefs.h.  */
2177 $4
2178 #include <$2>
2179 _ACEOF
2180 if ac_fn_cxx_try_compile "$LINENO"; then :
2181   ac_header_compiler=yes
2182 else
2183   ac_header_compiler=no
2184 fi
2185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2187 $as_echo "$ac_header_compiler" >&6; }
2188 
2189 # Is the header present?
2190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2191 $as_echo_n "checking $2 presence... " >&6; }
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193 /* end confdefs.h.  */
2194 #include <$2>
2195 _ACEOF
2196 if ac_fn_cxx_try_cpp "$LINENO"; then :
2197   ac_header_preproc=yes
2198 else
2199   ac_header_preproc=no
2200 fi
2201 rm -f conftest.err conftest.i conftest.$ac_ext
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2203 $as_echo "$ac_header_preproc" >&6; }
2204 
2205 # So?  What about this header?
2206 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2207   yes:no: )
2208     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2209 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2210     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2211 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2212     ;;
2213   no:yes:* )
2214     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2215 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2216     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2217 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2218     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2219 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2220     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2221 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2223 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2224 ( $as_echo "## ----------------------------------------- ##
2225 ## Report this to build-dev@openjdk.java.net ##
2226 ## ----------------------------------------- ##"
2227      ) | sed "s/^/$as_me: WARNING:     /" >&2
2228     ;;
2229 esac
2230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2231 $as_echo_n "checking for $2... " >&6; }
2232 if eval \${$3+:} false; then :
2233   $as_echo_n "(cached) " >&6
2234 else
2235   eval "$3=\$ac_header_compiler"
2236 fi
2237 eval ac_res=\$$3
2238                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239 $as_echo "$ac_res" >&6; }
2240 fi
2241   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242 
2243 } # ac_fn_cxx_check_header_mongrel
2244 
2245 # ac_fn_cxx_try_run LINENO
2246 # ------------------------
2247 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2248 # that executables *can* be run.
2249 ac_fn_cxx_try_run ()
2250 {
2251   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252   if { { ac_try="$ac_link"
2253 case "(($ac_try" in
2254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2255   *) ac_try_echo=$ac_try;;
2256 esac
2257 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2258 $as_echo "$ac_try_echo"; } >&5
2259   (eval "$ac_link") 2>&5
2260   ac_status=$?
2261   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2262   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2263   { { case "(($ac_try" in
2264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2265   *) ac_try_echo=$ac_try;;
2266 esac
2267 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2268 $as_echo "$ac_try_echo"; } >&5
2269   (eval "$ac_try") 2>&5
2270   ac_status=$?
2271   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2272   test $ac_status = 0; }; }; then :
2273   ac_retval=0
2274 else
2275   $as_echo "$as_me: program exited with status $ac_status" >&5
2276        $as_echo "$as_me: failed program was:" >&5
2277 sed 's/^/| /' conftest.$ac_ext >&5
2278 
2279        ac_retval=$ac_status
2280 fi
2281   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2282   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2283   as_fn_set_status $ac_retval
2284 
2285 } # ac_fn_cxx_try_run
2286 
2287 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2288 # ---------------------------------------------------------
2289 # Tests whether HEADER exists and can be compiled using the include files in
2290 # INCLUDES, setting the cache variable VAR accordingly.
2291 ac_fn_cxx_check_header_compile ()
2292 {
2293   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2295 $as_echo_n "checking for $2... " >&6; }
2296 if eval \${$3+:} false; then :
2297   $as_echo_n "(cached) " >&6
2298 else
2299   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300 /* end confdefs.h.  */
2301 $4
2302 #include <$2>
2303 _ACEOF
2304 if ac_fn_cxx_try_compile "$LINENO"; then :
2305   eval "$3=yes"
2306 else
2307   eval "$3=no"
2308 fi
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 fi
2311 eval ac_res=\$$3
2312                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2313 $as_echo "$ac_res" >&6; }
2314   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2315 
2316 } # ac_fn_cxx_check_header_compile
2317 
2318 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2319 # ----------------------------------------------
2320 # Tries to find the compile-time value of EXPR in a program that includes
2321 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2322 # computed
2323 ac_fn_cxx_compute_int ()
2324 {
2325   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2326   if test "$cross_compiling" = yes; then
2327     # Depending upon the size, compute the lo and hi bounds.
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h.  */
2330 $4
2331 int
2332 main ()
2333 {
2334 static int test_array [1 - 2 * !(($2) >= 0)];
2335 test_array [0] = 0;
2336 return test_array [0];
2337 
2338   ;
2339   return 0;
2340 }
2341 _ACEOF
2342 if ac_fn_cxx_try_compile "$LINENO"; then :
2343   ac_lo=0 ac_mid=0
2344   while :; do
2345     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346 /* end confdefs.h.  */
2347 $4
2348 int
2349 main ()
2350 {
2351 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2352 test_array [0] = 0;
2353 return test_array [0];
2354 
2355   ;
2356   return 0;
2357 }
2358 _ACEOF
2359 if ac_fn_cxx_try_compile "$LINENO"; then :
2360   ac_hi=$ac_mid; break
2361 else
2362   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2363                         if test $ac_lo -le $ac_mid; then
2364                           ac_lo= ac_hi=
2365                           break
2366                         fi
2367                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2368 fi
2369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370   done
2371 else
2372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373 /* end confdefs.h.  */
2374 $4
2375 int
2376 main ()
2377 {
2378 static int test_array [1 - 2 * !(($2) < 0)];
2379 test_array [0] = 0;
2380 return test_array [0];
2381 
2382   ;
2383   return 0;
2384 }
2385 _ACEOF
2386 if ac_fn_cxx_try_compile "$LINENO"; then :
2387   ac_hi=-1 ac_mid=-1
2388   while :; do
2389     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390 /* end confdefs.h.  */
2391 $4
2392 int
2393 main ()
2394 {
2395 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2396 test_array [0] = 0;
2397 return test_array [0];
2398 
2399   ;
2400   return 0;
2401 }
2402 _ACEOF
2403 if ac_fn_cxx_try_compile "$LINENO"; then :
2404   ac_lo=$ac_mid; break
2405 else
2406   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2407                         if test $ac_mid -le $ac_hi; then
2408                           ac_lo= ac_hi=
2409                           break
2410                         fi
2411                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2412 fi
2413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414   done
2415 else
2416   ac_lo= ac_hi=
2417 fi
2418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419 fi
2420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421 # Binary search between lo and hi bounds.
2422 while test "x$ac_lo" != "x$ac_hi"; do
2423   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425 /* end confdefs.h.  */
2426 $4
2427 int
2428 main ()
2429 {
2430 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2431 test_array [0] = 0;
2432 return test_array [0];
2433 
2434   ;
2435   return 0;
2436 }
2437 _ACEOF
2438 if ac_fn_cxx_try_compile "$LINENO"; then :
2439   ac_hi=$ac_mid
2440 else
2441   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2442 fi
2443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2444 done
2445 case $ac_lo in #((
2446 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2447 '') ac_retval=1 ;;
2448 esac
2449   else
2450     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2451 /* end confdefs.h.  */
2452 $4
2453 static long int longval () { return $2; }
2454 static unsigned long int ulongval () { return $2; }
2455 #include <stdio.h>
2456 #include <stdlib.h>
2457 int
2458 main ()
2459 {
2460 
2461   FILE *f = fopen ("conftest.val", "w");
2462   if (! f)
2463     return 1;
2464   if (($2) < 0)
2465     {
2466       long int i = longval ();
2467       if (i != ($2))
2468         return 1;
2469       fprintf (f, "%ld", i);
2470     }
2471   else
2472     {
2473       unsigned long int i = ulongval ();
2474       if (i != ($2))
2475         return 1;
2476       fprintf (f, "%lu", i);
2477     }
2478   /* Do not output a trailing newline, as this causes \r\n confusion
2479      on some platforms.  */
2480   return ferror (f) || fclose (f) != 0;
2481 
2482   ;
2483   return 0;
2484 }
2485 _ACEOF
2486 if ac_fn_cxx_try_run "$LINENO"; then :
2487   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2488 else
2489   ac_retval=1
2490 fi
2491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2492   conftest.$ac_objext conftest.beam conftest.$ac_ext
2493 rm -f conftest.val
2494 
2495   fi
2496   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2497   as_fn_set_status $ac_retval
2498 
2499 } # ac_fn_cxx_compute_int
2500 
2501 # ac_fn_cxx_try_link LINENO
2502 # -------------------------
2503 # Try to link conftest.$ac_ext, and return whether this succeeded.
2504 ac_fn_cxx_try_link ()
2505 {
2506   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2507   rm -f conftest.$ac_objext conftest$ac_exeext
2508   if { { ac_try="$ac_link"
2509 case "(($ac_try" in
2510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511   *) ac_try_echo=$ac_try;;
2512 esac
2513 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514 $as_echo "$ac_try_echo"; } >&5
2515   (eval "$ac_link") 2>conftest.err
2516   ac_status=$?
2517   if test -s conftest.err; then
2518     grep -v '^ *+' conftest.err >conftest.er1
2519     cat conftest.er1 >&5
2520     mv -f conftest.er1 conftest.err
2521   fi
2522   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523   test $ac_status = 0; } && {
2524          test -z "$ac_cxx_werror_flag" ||
2525          test ! -s conftest.err
2526        } && test -s conftest$ac_exeext && {
2527          test "$cross_compiling" = yes ||
2528          test -x conftest$ac_exeext
2529        }; then :
2530   ac_retval=0
2531 else
2532   $as_echo "$as_me: failed program was:" >&5
2533 sed 's/^/| /' conftest.$ac_ext >&5
2534 
2535         ac_retval=1
2536 fi
2537   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2538   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2539   # interfere with the next link command; also delete a directory that is
2540   # left behind by Apple's compiler.  We do this before executing the actions.
2541   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2542   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2543   as_fn_set_status $ac_retval
2544 
2545 } # ac_fn_cxx_try_link
2546 
2547 # ac_fn_cxx_check_func LINENO FUNC VAR
2548 # ------------------------------------
2549 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2550 ac_fn_cxx_check_func ()
2551 {
2552   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2554 $as_echo_n "checking for $2... " >&6; }
2555 if eval \${$3+:} false; then :
2556   $as_echo_n "(cached) " >&6
2557 else
2558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2559 /* end confdefs.h.  */
2560 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2561    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2562 #define $2 innocuous_$2
2563 
2564 /* System header to define __stub macros and hopefully few prototypes,
2565     which can conflict with char $2 (); below.
2566     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2567     <limits.h> exists even on freestanding compilers.  */
2568 
2569 #ifdef __STDC__
2570 # include <limits.h>
2571 #else
2572 # include <assert.h>
2573 #endif
2574 
2575 #undef $2
2576 
2577 /* Override any GCC internal prototype to avoid an error.
2578    Use char because int might match the return type of a GCC
2579    builtin and then its argument prototype would still apply.  */
2580 #ifdef __cplusplus
2581 extern "C"
2582 #endif
2583 char $2 ();
2584 /* The GNU C library defines this for functions which it implements
2585     to always fail with ENOSYS.  Some functions are actually named
2586     something starting with __ and the normal name is an alias.  */
2587 #if defined __stub_$2 || defined __stub___$2
2588 choke me
2589 #endif
2590 
2591 int
2592 main ()
2593 {
2594 return $2 ();
2595   ;
2596   return 0;
2597 }
2598 _ACEOF
2599 if ac_fn_cxx_try_link "$LINENO"; then :
2600   eval "$3=yes"
2601 else
2602   eval "$3=no"
2603 fi
2604 rm -f core conftest.err conftest.$ac_objext \
2605     conftest$ac_exeext conftest.$ac_ext
2606 fi
2607 eval ac_res=\$$3
2608                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2609 $as_echo "$ac_res" >&6; }
2610   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2611 
2612 } # ac_fn_cxx_check_func
2613 
2614 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2615 # -------------------------------------------------------
2616 # Tests whether HEADER exists and can be compiled using the include files in
2617 # INCLUDES, setting the cache variable VAR accordingly.
2618 ac_fn_c_check_header_compile ()
2619 {
2620   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2622 $as_echo_n "checking for $2... " >&6; }
2623 if eval \${$3+:} false; then :
2624   $as_echo_n "(cached) " >&6
2625 else
2626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627 /* end confdefs.h.  */
2628 $4
2629 #include <$2>
2630 _ACEOF
2631 if ac_fn_c_try_compile "$LINENO"; then :
2632   eval "$3=yes"
2633 else
2634   eval "$3=no"
2635 fi
2636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637 fi
2638 eval ac_res=\$$3
2639                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2640 $as_echo "$ac_res" >&6; }
2641   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2642 
2643 } # ac_fn_c_check_header_compile
2644 cat >config.log <<_ACEOF
2645 This file contains any messages produced by compilers while
2646 running configure, to aid debugging if configure makes a mistake.
2647 
2648 It was created by OpenJDK $as_me jdk8, which was
2649 generated by GNU Autoconf 2.69.  Invocation command line was
2650 
2651   $ $0 $@
2652 
2653 _ACEOF
2654 exec 5>>config.log
2655 {
2656 cat <<_ASUNAME
2657 ## --------- ##
2658 ## Platform. ##
2659 ## --------- ##
2660 
2661 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2662 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2663 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2664 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2665 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2666 
2667 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2668 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2669 
2670 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2671 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2672 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2673 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2674 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2675 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2676 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2677 
2678 _ASUNAME
2679 
2680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2681 for as_dir in $PATH
2682 do
2683   IFS=$as_save_IFS
2684   test -z "$as_dir" && as_dir=.
2685     $as_echo "PATH: $as_dir"
2686   done
2687 IFS=$as_save_IFS
2688 
2689 } >&5
2690 
2691 cat >&5 <<_ACEOF
2692 
2693 
2694 ## ----------- ##
2695 ## Core tests. ##
2696 ## ----------- ##
2697 
2698 _ACEOF
2699 
2700 
2701 # Keep a trace of the command line.
2702 # Strip out --no-create and --no-recursion so they do not pile up.
2703 # Strip out --silent because we don't want to record it for future runs.
2704 # Also quote any args containing shell meta-characters.
2705 # Make two passes to allow for proper duplicate-argument suppression.
2706 ac_configure_args=
2707 ac_configure_args0=
2708 ac_configure_args1=
2709 ac_must_keep_next=false
2710 for ac_pass in 1 2
2711 do
2712   for ac_arg
2713   do
2714     case $ac_arg in
2715     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2716     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2717     | -silent | --silent | --silen | --sile | --sil)
2718       continue ;;
2719     *\'*)
2720       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2721     esac
2722     case $ac_pass in
2723     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2724     2)
2725       as_fn_append ac_configure_args1 " '$ac_arg'"
2726       if test $ac_must_keep_next = true; then
2727         ac_must_keep_next=false # Got value, back to normal.
2728       else
2729         case $ac_arg in
2730           *=* | --config-cache | -C | -disable-* | --disable-* \
2731           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2732           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2733           | -with-* | --with-* | -without-* | --without-* | --x)
2734             case "$ac_configure_args0 " in
2735               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2736             esac
2737             ;;
2738           -* ) ac_must_keep_next=true ;;
2739         esac
2740       fi
2741       as_fn_append ac_configure_args " '$ac_arg'"
2742       ;;
2743     esac
2744   done
2745 done
2746 { ac_configure_args0=; unset ac_configure_args0;}
2747 { ac_configure_args1=; unset ac_configure_args1;}
2748 
2749 # When interrupted or exit'd, cleanup temporary files, and complete
2750 # config.log.  We remove comments because anyway the quotes in there
2751 # would cause problems or look ugly.
2752 # WARNING: Use '\'' to represent an apostrophe within the trap.
2753 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2754 trap 'exit_status=$?
2755   # Save into config.log some information that might help in debugging.
2756   {
2757     echo
2758 
2759     $as_echo "## ---------------- ##
2760 ## Cache variables. ##
2761 ## ---------------- ##"
2762     echo
2763     # The following way of writing the cache mishandles newlines in values,
2764 (
2765   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2766     eval ac_val=\$$ac_var
2767     case $ac_val in #(
2768     *${as_nl}*)
2769       case $ac_var in #(
2770       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2771 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2772       esac
2773       case $ac_var in #(
2774       _ | IFS | as_nl) ;; #(
2775       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2776       *) { eval $ac_var=; unset $ac_var;} ;;
2777       esac ;;
2778     esac
2779   done
2780   (set) 2>&1 |
2781     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2782     *${as_nl}ac_space=\ *)
2783       sed -n \
2784         "s/'\''/'\''\\\\'\'''\''/g;
2785           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2786       ;; #(
2787     *)
2788       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2789       ;;
2790     esac |
2791     sort
2792 )
2793     echo
2794 
2795     $as_echo "## ----------------- ##
2796 ## Output variables. ##
2797 ## ----------------- ##"
2798     echo
2799     for ac_var in $ac_subst_vars
2800     do
2801       eval ac_val=\$$ac_var
2802       case $ac_val in
2803       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2804       esac
2805       $as_echo "$ac_var='\''$ac_val'\''"
2806     done | sort
2807     echo
2808 
2809     if test -n "$ac_subst_files"; then
2810       $as_echo "## ------------------- ##
2811 ## File substitutions. ##
2812 ## ------------------- ##"
2813       echo
2814       for ac_var in $ac_subst_files
2815       do
2816         eval ac_val=\$$ac_var
2817         case $ac_val in
2818         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2819         esac
2820         $as_echo "$ac_var='\''$ac_val'\''"
2821       done | sort
2822       echo
2823     fi
2824 
2825     if test -s confdefs.h; then
2826       $as_echo "## ----------- ##
2827 ## confdefs.h. ##
2828 ## ----------- ##"
2829       echo
2830       cat confdefs.h
2831       echo
2832     fi
2833     test "$ac_signal" != 0 &&
2834       $as_echo "$as_me: caught signal $ac_signal"
2835     $as_echo "$as_me: exit $exit_status"
2836   } >&5
2837   rm -f core *.core core.conftest.* &&
2838     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2839     exit $exit_status
2840 ' 0
2841 for ac_signal in 1 2 13 15; do
2842   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2843 done
2844 ac_signal=0
2845 
2846 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2847 rm -f -r conftest* confdefs.h
2848 
2849 $as_echo "/* confdefs.h */" > confdefs.h
2850 
2851 # Predefined preprocessor variables.
2852 
2853 cat >>confdefs.h <<_ACEOF
2854 #define PACKAGE_NAME "$PACKAGE_NAME"
2855 _ACEOF
2856 
2857 cat >>confdefs.h <<_ACEOF
2858 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2859 _ACEOF
2860 
2861 cat >>confdefs.h <<_ACEOF
2862 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2863 _ACEOF
2864 
2865 cat >>confdefs.h <<_ACEOF
2866 #define PACKAGE_STRING "$PACKAGE_STRING"
2867 _ACEOF
2868 
2869 cat >>confdefs.h <<_ACEOF
2870 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2871 _ACEOF
2872 
2873 cat >>confdefs.h <<_ACEOF
2874 #define PACKAGE_URL "$PACKAGE_URL"
2875 _ACEOF
2876 
2877 
2878 # Let the site file select an alternate cache file if it wants to.
2879 # Prefer an explicitly selected file to automatically selected ones.
2880 ac_site_file1=NONE
2881 ac_site_file2=NONE
2882 if test -n "$CONFIG_SITE"; then
2883   # We do not want a PATH search for config.site.
2884   case $CONFIG_SITE in #((
2885     -*)  ac_site_file1=./$CONFIG_SITE;;
2886     */*) ac_site_file1=$CONFIG_SITE;;
2887     *)   ac_site_file1=./$CONFIG_SITE;;
2888   esac
2889 elif test "x$prefix" != xNONE; then
2890   ac_site_file1=$prefix/share/config.site
2891   ac_site_file2=$prefix/etc/config.site
2892 else
2893   ac_site_file1=$ac_default_prefix/share/config.site
2894   ac_site_file2=$ac_default_prefix/etc/config.site
2895 fi
2896 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2897 do
2898   test "x$ac_site_file" = xNONE && continue
2899   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2900     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2901 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2902     sed 's/^/| /' "$ac_site_file" >&5
2903     . "$ac_site_file" \
2904       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2906 as_fn_error $? "failed to load site script $ac_site_file
2907 See \`config.log' for more details" "$LINENO" 5; }
2908   fi
2909 done
2910 
2911 if test -r "$cache_file"; then
2912   # Some versions of bash will fail to source /dev/null (special files
2913   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2914   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2915     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2916 $as_echo "$as_me: loading cache $cache_file" >&6;}
2917     case $cache_file in
2918       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2919       *)                      . "./$cache_file";;
2920     esac
2921   fi
2922 else
2923   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2924 $as_echo "$as_me: creating cache $cache_file" >&6;}
2925   >$cache_file
2926 fi
2927 
2928 # Check that the precious variables saved in the cache have kept the same
2929 # value.
2930 ac_cache_corrupted=false
2931 for ac_var in $ac_precious_vars; do
2932   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2933   eval ac_new_set=\$ac_env_${ac_var}_set
2934   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2935   eval ac_new_val=\$ac_env_${ac_var}_value
2936   case $ac_old_set,$ac_new_set in
2937     set,)
2938       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2939 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2940       ac_cache_corrupted=: ;;
2941     ,set)
2942       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2943 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2944       ac_cache_corrupted=: ;;
2945     ,);;
2946     *)
2947       if test "x$ac_old_val" != "x$ac_new_val"; then
2948         # differences in whitespace do not lead to failure.
2949         ac_old_val_w=`echo x $ac_old_val`
2950         ac_new_val_w=`echo x $ac_new_val`
2951         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2952           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2953 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2954           ac_cache_corrupted=:
2955         else
2956           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2957 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2958           eval $ac_var=\$ac_old_val
2959         fi
2960         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2961 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2962         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2963 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2964       fi;;
2965   esac
2966   # Pass precious variables to config.status.
2967   if test "$ac_new_set" = set; then
2968     case $ac_new_val in
2969     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2970     *) ac_arg=$ac_var=$ac_new_val ;;
2971     esac
2972     case " $ac_configure_args " in
2973       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2974       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2975     esac
2976   fi
2977 done
2978 if $ac_cache_corrupted; then
2979   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2980 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2981   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2982 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2983   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2984 fi
2985 ## -------------------- ##
2986 ## Main body of script. ##
2987 ## -------------------- ##
2988 
2989 ac_ext=c
2990 ac_cpp='$CPP $CPPFLAGS'
2991 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2992 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2993 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2994 
2995 
2996 
2997 ac_aux_dir=
2998 for ac_dir in build-aux "$srcdir"/build-aux; do
2999   if test -f "$ac_dir/install-sh"; then
3000     ac_aux_dir=$ac_dir
3001     ac_install_sh="$ac_aux_dir/install-sh -c"
3002     break
3003   elif test -f "$ac_dir/install.sh"; then
3004     ac_aux_dir=$ac_dir
3005     ac_install_sh="$ac_aux_dir/install.sh -c"
3006     break
3007   elif test -f "$ac_dir/shtool"; then
3008     ac_aux_dir=$ac_dir
3009     ac_install_sh="$ac_aux_dir/shtool install -c"
3010     break
3011   fi
3012 done
3013 if test -z "$ac_aux_dir"; then
3014   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3015 fi
3016 
3017 # These three variables are undocumented and unsupported,
3018 # and are intended to be withdrawn in a future Autoconf release.
3019 # They can cause serious problems if a builder's source tree is in a directory
3020 # whose full name contains unusual characters.
3021 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3022 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3023 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3024 
3025 
3026 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3027 
3028 #
3029 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3030 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3031 #
3032 # This code is free software; you can redistribute it and/or modify it
3033 # under the terms of the GNU General Public License version 2 only, as
3034 # published by the Free Software Foundation.  Oracle designates this
3035 # particular file as subject to the "Classpath" exception as provided
3036 # by Oracle in the LICENSE file that accompanied this code.
3037 #
3038 # This code is distributed in the hope that it will be useful, but WITHOUT
3039 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3040 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3041 # version 2 for more details (a copy is included in the LICENSE file that
3042 # accompanied this code).
3043 #
3044 # You should have received a copy of the GNU General Public License version
3045 # 2 along with this work; if not, write to the Free Software Foundation,
3046 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3047 #
3048 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3049 # or visit www.oracle.com if you need additional information or have any
3050 # questions.
3051 #
3052 
3053 #
3054 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3055 #
3056 # This program is free software; you can redistribute it and/or modify
3057 # it under the terms of the GNU General Public License as published by
3058 # the Free Software Foundation; either version 2 of the License, or
3059 # (at your option) any later version.
3060 #
3061 # This program is distributed in the hope that it will be useful, but
3062 # WITHOUT ANY WARRANTY; without even the implied warranty of
3063 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3064 # General Public License for more details.
3065 #
3066 # You should have received a copy of the GNU General Public License
3067 # along with this program; if not, write to the Free Software
3068 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3069 #
3070 # As a special exception to the GNU General Public License, if you
3071 # distribute this file as part of a program that contains a
3072 # configuration script generated by Autoconf, you may include it under
3073 # the same distribution terms that you use for the rest of that program.
3074 
3075 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3076 # ----------------------------------
3077 # PKG_PROG_PKG_CONFIG
3078 
3079 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3080 #
3081 # Check to see whether a particular set of modules exists.  Similar
3082 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3083 #
3084 #
3085 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3086 # this or PKG_CHECK_MODULES is called, or make sure to call
3087 # PKG_CHECK_EXISTS manually
3088 # --------------------------------------------------------------
3089 
3090 
3091 
3092 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3093 # ---------------------------------------------
3094 # _PKG_CONFIG
3095 
3096 # _PKG_SHORT_ERRORS_SUPPORTED
3097 # -----------------------------
3098 # _PKG_SHORT_ERRORS_SUPPORTED
3099 
3100 
3101 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3102 # [ACTION-IF-NOT-FOUND])
3103 #
3104 #
3105 # Note that if there is a possibility the first call to
3106 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3107 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3108 #
3109 #
3110 # --------------------------------------------------------------
3111 # PKG_CHECK_MODULES
3112 
3113 
3114 # Include these first...
3115 #
3116 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3117 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3118 #
3119 # This code is free software; you can redistribute it and/or modify it
3120 # under the terms of the GNU General Public License version 2 only, as
3121 # published by the Free Software Foundation.  Oracle designates this
3122 # particular file as subject to the "Classpath" exception as provided
3123 # by Oracle in the LICENSE file that accompanied this code.
3124 #
3125 # This code is distributed in the hope that it will be useful, but WITHOUT
3126 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3127 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3128 # version 2 for more details (a copy is included in the LICENSE file that
3129 # accompanied this code).
3130 #
3131 # You should have received a copy of the GNU General Public License version
3132 # 2 along with this work; if not, write to the Free Software Foundation,
3133 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3134 #
3135 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3136 # or visit www.oracle.com if you need additional information or have any
3137 # questions.
3138 #
3139 
3140 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3141 # If so, then append $1 to $2 \
3142 # Also set JVM_ARG_OK to true/false depending on outcome.
3143 
3144 
3145 # Appends a string to a path variable, only adding the : when needed.
3146 
3147 
3148 # This will make sure the given variable points to a full and proper
3149 # path. This means:
3150 # 1) There will be no spaces in the path. On posix platforms,
3151 #    spaces in the path will result in an error. On Windows,
3152 #    the path will be rewritten using short-style to be space-free.
3153 # 2) The path will be absolute, and it will be in unix-style (on
3154 #     cygwin).
3155 # $1: The name of the variable to fix
3156 
3157 
3158 # This will make sure the given variable points to a executable
3159 # with a full and proper path. This means:
3160 # 1) There will be no spaces in the path. On posix platforms,
3161 #    spaces in the path will result in an error. On Windows,
3162 #    the path will be rewritten using short-style to be space-free.
3163 # 2) The path will be absolute, and it will be in unix-style (on
3164 #     cygwin).
3165 # Any arguments given to the executable is preserved.
3166 # If the input variable does not have a directory specification, then
3167 # it need to be in the PATH.
3168 # $1: The name of the variable to fix
3169 
3170 
3171 
3172 
3173 # Register a --with argument but mark it as deprecated
3174 # $1: The name of the with argument to deprecate, not including --with-
3175 
3176 
3177 # Register a --enable argument but mark it as deprecated
3178 # $1: The name of the with argument to deprecate, not including --enable-
3179 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3180 
3181 
3182 
3183 
3184 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3185 # $1: variable to check
3186 # $2: executable name to print in warning (optional)
3187 
3188 
3189 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3190 # Arguments as AC_PATH_PROG:
3191 # $1: variable to set
3192 # $2: executable name to look for
3193 
3194 
3195 # Setup the most fundamental tools that relies on not much else to set up,
3196 # but is used by much of the early bootstrap code.
3197 
3198 
3199 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3200 
3201 
3202 
3203 
3204 
3205 
3206 
3207 #%%% Simple tools %%%
3208 
3209 # Check if we have found a usable version of make
3210 # $1: the path to a potential make binary (or empty)
3211 # $2: the description on how we found this
3212 
3213 
3214 # Goes looking for a usable version of GNU make.
3215 
3216 
3217 
3218 
3219 
3220 
3221 # Check if build directory is on local disk. If not possible to determine,
3222 # we prefer to claim it's local.
3223 # Argument 1: directory to test
3224 # Argument 2: what to do if it is on local disk
3225 # Argument 3: what to do otherwise (remote disk or failure)
3226 
3227 
3228 # Check that source files have basic read permissions set. This might
3229 # not be the case in cygwin in certain conditions.
3230 
3231 
3232 
3233 
3234 #
3235 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3236 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3237 #
3238 # This code is free software; you can redistribute it and/or modify it
3239 # under the terms of the GNU General Public License version 2 only, as
3240 # published by the Free Software Foundation.  Oracle designates this
3241 # particular file as subject to the "Classpath" exception as provided
3242 # by Oracle in the LICENSE file that accompanied this code.
3243 #
3244 # This code is distributed in the hope that it will be useful, but WITHOUT
3245 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3246 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3247 # version 2 for more details (a copy is included in the LICENSE file that
3248 # accompanied this code).
3249 #
3250 # You should have received a copy of the GNU General Public License version
3251 # 2 along with this work; if not, write to the Free Software Foundation,
3252 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3253 #
3254 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3255 # or visit www.oracle.com if you need additional information or have any
3256 # questions.
3257 #
3258 
3259 
3260 
3261 
3262 
3263 # Helper function which possibly converts a path using DOS-style short mode.
3264 # If so, the updated path is stored in $new_path.
3265 # $1: The path to check
3266 
3267 
3268 # Helper function which possibly converts a path using DOS-style short mode.
3269 # If so, the updated path is stored in $new_path.
3270 # $1: The path to check
3271 
3272 
3273 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3274 # and could probably be heavily simplified. However, all changes in this
3275 # area tend to need lot of testing in different scenarios, and in lack of
3276 # proper unit testing, cleaning this up has not been deemed worth the effort
3277 # at the moment.
3278 
3279 
3280 
3281 
3282 
3283 
3284 
3285 
3286 
3287 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3288 
3289 
3290 
3291 
3292 #
3293 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3294 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3295 #
3296 # This code is free software; you can redistribute it and/or modify it
3297 # under the terms of the GNU General Public License version 2 only, as
3298 # published by the Free Software Foundation.  Oracle designates this
3299 # particular file as subject to the "Classpath" exception as provided
3300 # by Oracle in the LICENSE file that accompanied this code.
3301 #
3302 # This code is distributed in the hope that it will be useful, but WITHOUT
3303 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3304 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3305 # version 2 for more details (a copy is included in the LICENSE file that
3306 # accompanied this code).
3307 #
3308 # You should have received a copy of the GNU General Public License version
3309 # 2 along with this work; if not, write to the Free Software Foundation,
3310 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3311 #
3312 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3313 # or visit www.oracle.com if you need additional information or have any
3314 # questions.
3315 #
3316 
3317 
3318 
3319 
3320 
3321 
3322 
3323 
3324 
3325 
3326 
3327 # ... then the rest
3328 #
3329 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3330 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3331 #
3332 # This code is free software; you can redistribute it and/or modify it
3333 # under the terms of the GNU General Public License version 2 only, as
3334 # published by the Free Software Foundation.  Oracle designates this
3335 # particular file as subject to the "Classpath" exception as provided
3336 # by Oracle in the LICENSE file that accompanied this code.
3337 #
3338 # This code is distributed in the hope that it will be useful, but WITHOUT
3339 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3340 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3341 # version 2 for more details (a copy is included in the LICENSE file that
3342 # accompanied this code).
3343 #
3344 # You should have received a copy of the GNU General Public License version
3345 # 2 along with this work; if not, write to the Free Software Foundation,
3346 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3347 #
3348 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3349 # or visit www.oracle.com if you need additional information or have any
3350 # questions.
3351 #
3352 
3353 # Execute the check given as argument, and verify the result
3354 # If the Boot JDK was previously found, do nothing
3355 # $1 A command line (typically autoconf macro) to execute
3356 
3357 
3358 # Test: Is bootjdk explicitely set by command line arguments?
3359 
3360 
3361 # Test: Is bootjdk available from builddeps?
3362 
3363 
3364 # Test: Is $JAVA_HOME set?
3365 
3366 
3367 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3368 
3369 
3370 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3371 
3372 
3373 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3374 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3375 # $1 = Path to directory containing jdk installations.
3376 # $2 = String to append to the found JDK directory to get the proper JDK home
3377 
3378 
3379 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3380 # environmental variable as base for where to look.
3381 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3382 
3383 
3384 # Test: Is there a JDK installed in default, well-known locations?
3385 
3386 
3387 # Check that a command-line tool in the Boot JDK is correct
3388 # $1 = name of variable to assign
3389 # $2 = name of binary
3390 
3391 
3392 ###############################################################################
3393 #
3394 # We need a Boot JDK to bootstrap the build.
3395 #
3396 
3397 
3398 
3399 
3400 
3401 #
3402 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3403 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3404 #
3405 # This code is free software; you can redistribute it and/or modify it
3406 # under the terms of the GNU General Public License version 2 only, as
3407 # published by the Free Software Foundation.  Oracle designates this
3408 # particular file as subject to the "Classpath" exception as provided
3409 # by Oracle in the LICENSE file that accompanied this code.
3410 #
3411 # This code is distributed in the hope that it will be useful, but WITHOUT
3412 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3413 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3414 # version 2 for more details (a copy is included in the LICENSE file that
3415 # accompanied this code).
3416 #
3417 # You should have received a copy of the GNU General Public License version
3418 # 2 along with this work; if not, write to the Free Software Foundation,
3419 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3420 #
3421 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3422 # or visit www.oracle.com if you need additional information or have any
3423 # questions.
3424 #
3425 
3426 
3427 
3428 
3429 
3430 
3431 
3432 
3433 
3434 
3435 
3436 
3437 
3438 
3439 
3440 
3441 
3442 
3443 
3444 
3445 #
3446 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3447 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3448 #
3449 # This code is free software; you can redistribute it and/or modify it
3450 # under the terms of the GNU General Public License version 2 only, as
3451 # published by the Free Software Foundation.  Oracle designates this
3452 # particular file as subject to the "Classpath" exception as provided
3453 # by Oracle in the LICENSE file that accompanied this code.
3454 #
3455 # This code is distributed in the hope that it will be useful, but WITHOUT
3456 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3457 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3458 # version 2 for more details (a copy is included in the LICENSE file that
3459 # accompanied this code).
3460 #
3461 # You should have received a copy of the GNU General Public License version
3462 # 2 along with this work; if not, write to the Free Software Foundation,
3463 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3464 #
3465 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3466 # or visit www.oracle.com if you need additional information or have any
3467 # questions.
3468 #
3469 
3470 
3471 
3472 
3473 
3474 cygwin_help() {
3475   case $1 in
3476     unzip)
3477       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3478       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3479       ;;
3480     zip)
3481       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3482       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3483       ;;
3484     make)
3485       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3486       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3487       ;;
3488     freetype)
3489       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3490         HELP_MSG="To install freetype, run:
3491 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3492 chmod +x /tmp/freetype-setup.exe
3493 /tmp/freetype-setup.exe
3494 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3495 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3496       else
3497         HELP_MSG="You need to build a 64-bit version of freetype.
3498 This is not readily available.
3499 You can find source code and build instructions on
3500 http://www.freetype.org/
3501 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3502       fi
3503       ;;
3504   esac
3505 }
3506 
3507 msys_help() {
3508   PKGHANDLER_COMMAND=""
3509 }
3510 
3511 apt_help() {
3512   case $1 in
3513     devkit)
3514       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3515     openjdk)
3516       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3517     alsa)
3518       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3519     cups)
3520       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3521     freetype)
3522       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3523     pulse)
3524       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3525     x11)
3526       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3527     ccache)
3528       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3529   esac
3530 }
3531 
3532 yum_help() {
3533   case $1 in
3534     devkit)
3535       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3536     openjdk)
3537       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3538     alsa)
3539       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3540     cups)
3541       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3542     freetype)
3543       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3544     pulse)
3545       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3546     x11)
3547       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3548     ccache)
3549       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3550   esac
3551 }
3552 
3553 port_help() {
3554   PKGHANDLER_COMMAND=""
3555 }
3556 
3557 pkgutil_help() {
3558   PKGHANDLER_COMMAND=""
3559 }
3560 
3561 pkgadd_help() {
3562   PKGHANDLER_COMMAND=""
3563 }
3564 
3565 
3566 
3567 #
3568 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3569 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3570 #
3571 # This code is free software; you can redistribute it and/or modify it
3572 # under the terms of the GNU General Public License version 2 only, as
3573 # published by the Free Software Foundation.  Oracle designates this
3574 # particular file as subject to the "Classpath" exception as provided
3575 # by Oracle in the LICENSE file that accompanied this code.
3576 #
3577 # This code is distributed in the hope that it will be useful, but WITHOUT
3578 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3579 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3580 # version 2 for more details (a copy is included in the LICENSE file that
3581 # accompanied this code).
3582 #
3583 # You should have received a copy of the GNU General Public License version
3584 # 2 along with this work; if not, write to the Free Software Foundation,
3585 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3586 #
3587 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3588 # or visit www.oracle.com if you need additional information or have any
3589 # questions.
3590 #
3591 
3592 
3593 
3594 
3595 
3596 
3597 
3598 
3599 
3600 
3601 ###############################################################################
3602 #
3603 # Should we build only OpenJDK even if closed sources are present?
3604 #
3605 
3606 
3607 
3608 
3609 ###############################################################################
3610 #
3611 # Setup version numbers
3612 #
3613 
3614 
3615 
3616 
3617 
3618 
3619 # Support for customization of the build process. Some build files
3620 # will include counterparts from this location, if they exist. This allows
3621 # for a degree of customization of the build targets and the rules/recipes
3622 # to create them
3623 
3624 # Check whether --with-custom-make-dir was given.
3625 if test "${with_custom_make_dir+set}" = set; then :
3626   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3627 fi
3628 
3629 
3630 
3631 #
3632 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3633 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3634 #
3635 # This code is free software; you can redistribute it and/or modify it
3636 # under the terms of the GNU General Public License version 2 only, as
3637 # published by the Free Software Foundation.  Oracle designates this
3638 # particular file as subject to the "Classpath" exception as provided
3639 # by Oracle in the LICENSE file that accompanied this code.
3640 #
3641 # This code is distributed in the hope that it will be useful, but WITHOUT
3642 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3643 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3644 # version 2 for more details (a copy is included in the LICENSE file that
3645 # accompanied this code).
3646 #
3647 # You should have received a copy of the GNU General Public License version
3648 # 2 along with this work; if not, write to the Free Software Foundation,
3649 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3650 #
3651 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3652 # or visit www.oracle.com if you need additional information or have any
3653 # questions.
3654 #
3655 
3656 
3657 
3658 
3659 
3660 
3661 
3662 
3663 
3664 
3665 
3666 
3667 
3668 
3669 
3670 
3671 
3672 #
3673 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3674 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3675 #
3676 # This code is free software; you can redistribute it and/or modify it
3677 # under the terms of the GNU General Public License version 2 only, as
3678 # published by the Free Software Foundation.  Oracle designates this
3679 # particular file as subject to the "Classpath" exception as provided
3680 # by Oracle in the LICENSE file that accompanied this code.
3681 #
3682 # This code is distributed in the hope that it will be useful, but WITHOUT
3683 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3684 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3685 # version 2 for more details (a copy is included in the LICENSE file that
3686 # accompanied this code).
3687 #
3688 # You should have received a copy of the GNU General Public License version
3689 # 2 along with this work; if not, write to the Free Software Foundation,
3690 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3691 #
3692 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3693 # or visit www.oracle.com if you need additional information or have any
3694 # questions.
3695 #
3696 
3697 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3698 # Converts autoconf style CPU name to OpenJDK style, into
3699 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3700 
3701 
3702 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3703 # Converts autoconf style OS name to OpenJDK style, into
3704 # VAR_OS and VAR_OS_API.
3705 
3706 
3707 # Expects $host_os $host_cpu $build_os and $build_cpu
3708 # and $with_target_bits to have been setup!
3709 #
3710 # Translate the standard triplet(quadruplet) definition
3711 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3712 # OPENJDK_BUILD_OS, etc.
3713 
3714 
3715 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3716 # accordingly. Must be done after setting up build and target system, but before
3717 # doing anything else with these values.
3718 
3719 
3720 # Setup the legacy variables, for controlling the old makefiles.
3721 #
3722 
3723 
3724 
3725 
3726 #%%% Build and target systems %%%
3727 
3728 
3729 
3730 
3731 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3732 # Add -mX to various FLAGS variables.
3733 
3734 
3735 
3736 
3737 
3738 
3739 #
3740 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742 #
3743 # This code is free software; you can redistribute it and/or modify it
3744 # under the terms of the GNU General Public License version 2 only, as
3745 # published by the Free Software Foundation.  Oracle designates this
3746 # particular file as subject to the "Classpath" exception as provided
3747 # by Oracle in the LICENSE file that accompanied this code.
3748 #
3749 # This code is distributed in the hope that it will be useful, but WITHOUT
3750 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752 # version 2 for more details (a copy is included in the LICENSE file that
3753 # accompanied this code).
3754 #
3755 # You should have received a copy of the GNU General Public License version
3756 # 2 along with this work; if not, write to the Free Software Foundation,
3757 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758 #
3759 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760 # or visit www.oracle.com if you need additional information or have any
3761 # questions.
3762 #
3763 
3764 
3765 
3766 
3767 
3768 
3769 
3770 
3771 #
3772 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3773 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3774 #
3775 # This code is free software; you can redistribute it and/or modify it
3776 # under the terms of the GNU General Public License version 2 only, as
3777 # published by the Free Software Foundation.  Oracle designates this
3778 # particular file as subject to the "Classpath" exception as provided
3779 # by Oracle in the LICENSE file that accompanied this code.
3780 #
3781 # This code is distributed in the hope that it will be useful, but WITHOUT
3782 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3783 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3784 # version 2 for more details (a copy is included in the LICENSE file that
3785 # accompanied this code).
3786 #
3787 # You should have received a copy of the GNU General Public License version
3788 # 2 along with this work; if not, write to the Free Software Foundation,
3789 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3790 #
3791 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3792 # or visit www.oracle.com if you need additional information or have any
3793 # questions.
3794 #
3795 
3796 # $1 = compiler to test (CC or CXX)
3797 # $2 = human readable name of compiler (C or C++)
3798 
3799 
3800 
3801 
3802 
3803 # $1 = compiler to test (CC or CXX)
3804 # $2 = human readable name of compiler (C or C++)
3805 # $3 = list of compiler names to search for
3806 
3807 
3808 
3809 
3810 
3811 
3812 
3813 
3814 
3815 
3816 
3817 
3818 
3819 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3820 #                                   [RUN-IF-FALSE])
3821 # ------------------------------------------------------------
3822 # Check that the c and c++ compilers support an argument
3823 
3824 
3825 
3826 
3827 # Setup the JTREG paths
3828 
3829 
3830 #
3831 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3832 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3833 #
3834 # This code is free software; you can redistribute it and/or modify it
3835 # under the terms of the GNU General Public License version 2 only, as
3836 # published by the Free Software Foundation.  Oracle designates this
3837 # particular file as subject to the "Classpath" exception as provided
3838 # by Oracle in the LICENSE file that accompanied this code.
3839 #
3840 # This code is distributed in the hope that it will be useful, but WITHOUT
3841 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3842 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3843 # version 2 for more details (a copy is included in the LICENSE file that
3844 # accompanied this code).
3845 #
3846 # You should have received a copy of the GNU General Public License version
3847 # 2 along with this work; if not, write to the Free Software Foundation,
3848 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3849 #
3850 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3851 # or visit www.oracle.com if you need additional information or have any
3852 # questions.
3853 #
3854 
3855 
3856 
3857 
3858 
3859 
3860 
3861 # Check if the VS env variables were setup prior to running configure.
3862 # If not, then find vcvarsall.bat and run it automatically, and integrate
3863 # the set env variables into the spec file.
3864 
3865 
3866 
3867 
3868 
3869 
3870 
3871 
3872 
3873 
3874 # This line needs to be here, verbatim, after all includes and the dummy hook
3875 # definitions. It is replaced with custom functionality when building
3876 # custom sources.
3877 #CUSTOM_AUTOCONF_INCLUDE
3878 
3879 # Do not change or remove the following line, it is needed for consistency checks:
3880 DATE_WHEN_GENERATED=1421450260
3881 
3882 ###############################################################################
3883 #
3884 # Initialization / Boot-strapping
3885 #
3886 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3887 # thus it jumps back and forth, each time gaining something needed later on.
3888 #
3889 ###############################################################################
3890 
3891 # Basic initialization that must happen first of all
3892 
3893   # Save the original command line. This is passed to us by the wrapper configure script.
3894 
3895   DATE_WHEN_CONFIGURED=`LANG=C date`
3896 
3897   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3898 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3899   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3900 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3901 
3902 
3903 
3904   # Start with tools that do not need have cross compilation support
3905   # and can be expected to be found in the default PATH. These tools are
3906   # used by configure. Nor are these tools expected to be found in the
3907   # devkit from the builddeps server either, since they are
3908   # needed to download the devkit.
3909 
3910   # First are all the simple required tools.
3911 
3912   for ac_prog in basename
3913 do
3914   # Extract the first word of "$ac_prog", so it can be a program name with args.
3915 set dummy $ac_prog; ac_word=$2
3916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3917 $as_echo_n "checking for $ac_word... " >&6; }
3918 if ${ac_cv_path_BASENAME+:} false; then :
3919   $as_echo_n "(cached) " >&6
3920 else
3921   case $BASENAME in
3922   [\\/]* | ?:[\\/]*)
3923   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3924   ;;
3925   *)
3926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927 for as_dir in $PATH
3928 do
3929   IFS=$as_save_IFS
3930   test -z "$as_dir" && as_dir=.
3931     for ac_exec_ext in '' $ac_executable_extensions; do
3932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935     break 2
3936   fi
3937 done
3938   done
3939 IFS=$as_save_IFS
3940 
3941   ;;
3942 esac
3943 fi
3944 BASENAME=$ac_cv_path_BASENAME
3945 if test -n "$BASENAME"; then
3946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3947 $as_echo "$BASENAME" >&6; }
3948 else
3949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3950 $as_echo "no" >&6; }
3951 fi
3952 
3953 
3954   test -n "$BASENAME" && break
3955 done
3956 
3957 
3958   if test "x$BASENAME" = x; then
3959     if test "xbasename" = x; then
3960       PROG_NAME=basename
3961     else
3962       PROG_NAME=basename
3963     fi
3964     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3965 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3966     as_fn_error $? "Cannot continue" "$LINENO" 5
3967   fi
3968 
3969 
3970 
3971   for ac_prog in bash
3972 do
3973   # Extract the first word of "$ac_prog", so it can be a program name with args.
3974 set dummy $ac_prog; ac_word=$2
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3976 $as_echo_n "checking for $ac_word... " >&6; }
3977 if ${ac_cv_path_BASH+:} false; then :
3978   $as_echo_n "(cached) " >&6
3979 else
3980   case $BASH in
3981   [\\/]* | ?:[\\/]*)
3982   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3983   ;;
3984   *)
3985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3986 for as_dir in $PATH
3987 do
3988   IFS=$as_save_IFS
3989   test -z "$as_dir" && as_dir=.
3990     for ac_exec_ext in '' $ac_executable_extensions; do
3991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3992     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3994     break 2
3995   fi
3996 done
3997   done
3998 IFS=$as_save_IFS
3999 
4000   ;;
4001 esac
4002 fi
4003 BASH=$ac_cv_path_BASH
4004 if test -n "$BASH"; then
4005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4006 $as_echo "$BASH" >&6; }
4007 else
4008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009 $as_echo "no" >&6; }
4010 fi
4011 
4012 
4013   test -n "$BASH" && break
4014 done
4015 
4016 
4017   if test "x$BASH" = x; then
4018     if test "xbash" = x; then
4019       PROG_NAME=bash
4020     else
4021       PROG_NAME=bash
4022     fi
4023     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4024 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4025     as_fn_error $? "Cannot continue" "$LINENO" 5
4026   fi
4027 
4028 
4029 
4030   for ac_prog in cat
4031 do
4032   # Extract the first word of "$ac_prog", so it can be a program name with args.
4033 set dummy $ac_prog; ac_word=$2
4034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4035 $as_echo_n "checking for $ac_word... " >&6; }
4036 if ${ac_cv_path_CAT+:} false; then :
4037   $as_echo_n "(cached) " >&6
4038 else
4039   case $CAT in
4040   [\\/]* | ?:[\\/]*)
4041   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4042   ;;
4043   *)
4044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4045 for as_dir in $PATH
4046 do
4047   IFS=$as_save_IFS
4048   test -z "$as_dir" && as_dir=.
4049     for ac_exec_ext in '' $ac_executable_extensions; do
4050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4051     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4053     break 2
4054   fi
4055 done
4056   done
4057 IFS=$as_save_IFS
4058 
4059   ;;
4060 esac
4061 fi
4062 CAT=$ac_cv_path_CAT
4063 if test -n "$CAT"; then
4064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4065 $as_echo "$CAT" >&6; }
4066 else
4067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4068 $as_echo "no" >&6; }
4069 fi
4070 
4071 
4072   test -n "$CAT" && break
4073 done
4074 
4075 
4076   if test "x$CAT" = x; then
4077     if test "xcat" = x; then
4078       PROG_NAME=cat
4079     else
4080       PROG_NAME=cat
4081     fi
4082     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4083 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4084     as_fn_error $? "Cannot continue" "$LINENO" 5
4085   fi
4086 
4087 
4088 
4089   for ac_prog in chmod
4090 do
4091   # Extract the first word of "$ac_prog", so it can be a program name with args.
4092 set dummy $ac_prog; ac_word=$2
4093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4094 $as_echo_n "checking for $ac_word... " >&6; }
4095 if ${ac_cv_path_CHMOD+:} false; then :
4096   $as_echo_n "(cached) " >&6
4097 else
4098   case $CHMOD in
4099   [\\/]* | ?:[\\/]*)
4100   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4101   ;;
4102   *)
4103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104 for as_dir in $PATH
4105 do
4106   IFS=$as_save_IFS
4107   test -z "$as_dir" && as_dir=.
4108     for ac_exec_ext in '' $ac_executable_extensions; do
4109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4110     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4112     break 2
4113   fi
4114 done
4115   done
4116 IFS=$as_save_IFS
4117 
4118   ;;
4119 esac
4120 fi
4121 CHMOD=$ac_cv_path_CHMOD
4122 if test -n "$CHMOD"; then
4123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4124 $as_echo "$CHMOD" >&6; }
4125 else
4126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127 $as_echo "no" >&6; }
4128 fi
4129 
4130 
4131   test -n "$CHMOD" && break
4132 done
4133 
4134 
4135   if test "x$CHMOD" = x; then
4136     if test "xchmod" = x; then
4137       PROG_NAME=chmod
4138     else
4139       PROG_NAME=chmod
4140     fi
4141     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4142 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4143     as_fn_error $? "Cannot continue" "$LINENO" 5
4144   fi
4145 
4146 
4147 
4148   for ac_prog in cmp
4149 do
4150   # Extract the first word of "$ac_prog", so it can be a program name with args.
4151 set dummy $ac_prog; ac_word=$2
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4153 $as_echo_n "checking for $ac_word... " >&6; }
4154 if ${ac_cv_path_CMP+:} false; then :
4155   $as_echo_n "(cached) " >&6
4156 else
4157   case $CMP in
4158   [\\/]* | ?:[\\/]*)
4159   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4160   ;;
4161   *)
4162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163 for as_dir in $PATH
4164 do
4165   IFS=$as_save_IFS
4166   test -z "$as_dir" && as_dir=.
4167     for ac_exec_ext in '' $ac_executable_extensions; do
4168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171     break 2
4172   fi
4173 done
4174   done
4175 IFS=$as_save_IFS
4176 
4177   ;;
4178 esac
4179 fi
4180 CMP=$ac_cv_path_CMP
4181 if test -n "$CMP"; then
4182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4183 $as_echo "$CMP" >&6; }
4184 else
4185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4186 $as_echo "no" >&6; }
4187 fi
4188 
4189 
4190   test -n "$CMP" && break
4191 done
4192 
4193 
4194   if test "x$CMP" = x; then
4195     if test "xcmp" = x; then
4196       PROG_NAME=cmp
4197     else
4198       PROG_NAME=cmp
4199     fi
4200     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4201 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4202     as_fn_error $? "Cannot continue" "$LINENO" 5
4203   fi
4204 
4205 
4206 
4207   for ac_prog in comm
4208 do
4209   # Extract the first word of "$ac_prog", so it can be a program name with args.
4210 set dummy $ac_prog; ac_word=$2
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4212 $as_echo_n "checking for $ac_word... " >&6; }
4213 if ${ac_cv_path_COMM+:} false; then :
4214   $as_echo_n "(cached) " >&6
4215 else
4216   case $COMM in
4217   [\\/]* | ?:[\\/]*)
4218   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4219   ;;
4220   *)
4221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222 for as_dir in $PATH
4223 do
4224   IFS=$as_save_IFS
4225   test -z "$as_dir" && as_dir=.
4226     for ac_exec_ext in '' $ac_executable_extensions; do
4227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4228     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4230     break 2
4231   fi
4232 done
4233   done
4234 IFS=$as_save_IFS
4235 
4236   ;;
4237 esac
4238 fi
4239 COMM=$ac_cv_path_COMM
4240 if test -n "$COMM"; then
4241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4242 $as_echo "$COMM" >&6; }
4243 else
4244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4245 $as_echo "no" >&6; }
4246 fi
4247 
4248 
4249   test -n "$COMM" && break
4250 done
4251 
4252 
4253   if test "x$COMM" = x; then
4254     if test "xcomm" = x; then
4255       PROG_NAME=comm
4256     else
4257       PROG_NAME=comm
4258     fi
4259     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4260 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4261     as_fn_error $? "Cannot continue" "$LINENO" 5
4262   fi
4263 
4264 
4265 
4266   for ac_prog in cp
4267 do
4268   # Extract the first word of "$ac_prog", so it can be a program name with args.
4269 set dummy $ac_prog; ac_word=$2
4270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4271 $as_echo_n "checking for $ac_word... " >&6; }
4272 if ${ac_cv_path_CP+:} false; then :
4273   $as_echo_n "(cached) " >&6
4274 else
4275   case $CP in
4276   [\\/]* | ?:[\\/]*)
4277   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4278   ;;
4279   *)
4280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281 for as_dir in $PATH
4282 do
4283   IFS=$as_save_IFS
4284   test -z "$as_dir" && as_dir=.
4285     for ac_exec_ext in '' $ac_executable_extensions; do
4286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4287     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4289     break 2
4290   fi
4291 done
4292   done
4293 IFS=$as_save_IFS
4294 
4295   ;;
4296 esac
4297 fi
4298 CP=$ac_cv_path_CP
4299 if test -n "$CP"; then
4300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4301 $as_echo "$CP" >&6; }
4302 else
4303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4304 $as_echo "no" >&6; }
4305 fi
4306 
4307 
4308   test -n "$CP" && break
4309 done
4310 
4311 
4312   if test "x$CP" = x; then
4313     if test "xcp" = x; then
4314       PROG_NAME=cp
4315     else
4316       PROG_NAME=cp
4317     fi
4318     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4319 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4320     as_fn_error $? "Cannot continue" "$LINENO" 5
4321   fi
4322 
4323 
4324 
4325   for ac_prog in cpio
4326 do
4327   # Extract the first word of "$ac_prog", so it can be a program name with args.
4328 set dummy $ac_prog; ac_word=$2
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4330 $as_echo_n "checking for $ac_word... " >&6; }
4331 if ${ac_cv_path_CPIO+:} false; then :
4332   $as_echo_n "(cached) " >&6
4333 else
4334   case $CPIO in
4335   [\\/]* | ?:[\\/]*)
4336   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4337   ;;
4338   *)
4339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340 for as_dir in $PATH
4341 do
4342   IFS=$as_save_IFS
4343   test -z "$as_dir" && as_dir=.
4344     for ac_exec_ext in '' $ac_executable_extensions; do
4345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4346     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4348     break 2
4349   fi
4350 done
4351   done
4352 IFS=$as_save_IFS
4353 
4354   ;;
4355 esac
4356 fi
4357 CPIO=$ac_cv_path_CPIO
4358 if test -n "$CPIO"; then
4359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4360 $as_echo "$CPIO" >&6; }
4361 else
4362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4363 $as_echo "no" >&6; }
4364 fi
4365 
4366 
4367   test -n "$CPIO" && break
4368 done
4369 
4370 
4371   if test "x$CPIO" = x; then
4372     if test "xcpio" = x; then
4373       PROG_NAME=cpio
4374     else
4375       PROG_NAME=cpio
4376     fi
4377     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4378 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4379     as_fn_error $? "Cannot continue" "$LINENO" 5
4380   fi
4381 
4382 
4383 
4384   for ac_prog in cut
4385 do
4386   # Extract the first word of "$ac_prog", so it can be a program name with args.
4387 set dummy $ac_prog; ac_word=$2
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389 $as_echo_n "checking for $ac_word... " >&6; }
4390 if ${ac_cv_path_CUT+:} false; then :
4391   $as_echo_n "(cached) " >&6
4392 else
4393   case $CUT in
4394   [\\/]* | ?:[\\/]*)
4395   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4396   ;;
4397   *)
4398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399 for as_dir in $PATH
4400 do
4401   IFS=$as_save_IFS
4402   test -z "$as_dir" && as_dir=.
4403     for ac_exec_ext in '' $ac_executable_extensions; do
4404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407     break 2
4408   fi
4409 done
4410   done
4411 IFS=$as_save_IFS
4412 
4413   ;;
4414 esac
4415 fi
4416 CUT=$ac_cv_path_CUT
4417 if test -n "$CUT"; then
4418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4419 $as_echo "$CUT" >&6; }
4420 else
4421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422 $as_echo "no" >&6; }
4423 fi
4424 
4425 
4426   test -n "$CUT" && break
4427 done
4428 
4429 
4430   if test "x$CUT" = x; then
4431     if test "xcut" = x; then
4432       PROG_NAME=cut
4433     else
4434       PROG_NAME=cut
4435     fi
4436     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4437 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4438     as_fn_error $? "Cannot continue" "$LINENO" 5
4439   fi
4440 
4441 
4442 
4443   for ac_prog in date
4444 do
4445   # Extract the first word of "$ac_prog", so it can be a program name with args.
4446 set dummy $ac_prog; ac_word=$2
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448 $as_echo_n "checking for $ac_word... " >&6; }
4449 if ${ac_cv_path_DATE+:} false; then :
4450   $as_echo_n "(cached) " >&6
4451 else
4452   case $DATE in
4453   [\\/]* | ?:[\\/]*)
4454   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4455   ;;
4456   *)
4457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458 for as_dir in $PATH
4459 do
4460   IFS=$as_save_IFS
4461   test -z "$as_dir" && as_dir=.
4462     for ac_exec_ext in '' $ac_executable_extensions; do
4463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4464     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4466     break 2
4467   fi
4468 done
4469   done
4470 IFS=$as_save_IFS
4471 
4472   ;;
4473 esac
4474 fi
4475 DATE=$ac_cv_path_DATE
4476 if test -n "$DATE"; then
4477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4478 $as_echo "$DATE" >&6; }
4479 else
4480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481 $as_echo "no" >&6; }
4482 fi
4483 
4484 
4485   test -n "$DATE" && break
4486 done
4487 
4488 
4489   if test "x$DATE" = x; then
4490     if test "xdate" = x; then
4491       PROG_NAME=date
4492     else
4493       PROG_NAME=date
4494     fi
4495     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4496 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4497     as_fn_error $? "Cannot continue" "$LINENO" 5
4498   fi
4499 
4500 
4501 
4502   for ac_prog in gdiff diff
4503 do
4504   # Extract the first word of "$ac_prog", so it can be a program name with args.
4505 set dummy $ac_prog; ac_word=$2
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507 $as_echo_n "checking for $ac_word... " >&6; }
4508 if ${ac_cv_path_DIFF+:} false; then :
4509   $as_echo_n "(cached) " >&6
4510 else
4511   case $DIFF in
4512   [\\/]* | ?:[\\/]*)
4513   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4514   ;;
4515   *)
4516   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517 for as_dir in $PATH
4518 do
4519   IFS=$as_save_IFS
4520   test -z "$as_dir" && as_dir=.
4521     for ac_exec_ext in '' $ac_executable_extensions; do
4522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4525     break 2
4526   fi
4527 done
4528   done
4529 IFS=$as_save_IFS
4530 
4531   ;;
4532 esac
4533 fi
4534 DIFF=$ac_cv_path_DIFF
4535 if test -n "$DIFF"; then
4536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4537 $as_echo "$DIFF" >&6; }
4538 else
4539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540 $as_echo "no" >&6; }
4541 fi
4542 
4543 
4544   test -n "$DIFF" && break
4545 done
4546 
4547 
4548   if test "x$DIFF" = x; then
4549     if test "xgdiff diff" = x; then
4550       PROG_NAME=diff
4551     else
4552       PROG_NAME=gdiff diff
4553     fi
4554     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4555 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4556     as_fn_error $? "Cannot continue" "$LINENO" 5
4557   fi
4558 
4559 
4560 
4561   for ac_prog in dirname
4562 do
4563   # Extract the first word of "$ac_prog", so it can be a program name with args.
4564 set dummy $ac_prog; ac_word=$2
4565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4566 $as_echo_n "checking for $ac_word... " >&6; }
4567 if ${ac_cv_path_DIRNAME+:} false; then :
4568   $as_echo_n "(cached) " >&6
4569 else
4570   case $DIRNAME in
4571   [\\/]* | ?:[\\/]*)
4572   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4573   ;;
4574   *)
4575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576 for as_dir in $PATH
4577 do
4578   IFS=$as_save_IFS
4579   test -z "$as_dir" && as_dir=.
4580     for ac_exec_ext in '' $ac_executable_extensions; do
4581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4584     break 2
4585   fi
4586 done
4587   done
4588 IFS=$as_save_IFS
4589 
4590   ;;
4591 esac
4592 fi
4593 DIRNAME=$ac_cv_path_DIRNAME
4594 if test -n "$DIRNAME"; then
4595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4596 $as_echo "$DIRNAME" >&6; }
4597 else
4598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599 $as_echo "no" >&6; }
4600 fi
4601 
4602 
4603   test -n "$DIRNAME" && break
4604 done
4605 
4606 
4607   if test "x$DIRNAME" = x; then
4608     if test "xdirname" = x; then
4609       PROG_NAME=dirname
4610     else
4611       PROG_NAME=dirname
4612     fi
4613     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4614 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4615     as_fn_error $? "Cannot continue" "$LINENO" 5
4616   fi
4617 
4618 
4619 
4620   for ac_prog in echo
4621 do
4622   # Extract the first word of "$ac_prog", so it can be a program name with args.
4623 set dummy $ac_prog; ac_word=$2
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625 $as_echo_n "checking for $ac_word... " >&6; }
4626 if ${ac_cv_path_ECHO+:} false; then :
4627   $as_echo_n "(cached) " >&6
4628 else
4629   case $ECHO in
4630   [\\/]* | ?:[\\/]*)
4631   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4632   ;;
4633   *)
4634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635 for as_dir in $PATH
4636 do
4637   IFS=$as_save_IFS
4638   test -z "$as_dir" && as_dir=.
4639     for ac_exec_ext in '' $ac_executable_extensions; do
4640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643     break 2
4644   fi
4645 done
4646   done
4647 IFS=$as_save_IFS
4648 
4649   ;;
4650 esac
4651 fi
4652 ECHO=$ac_cv_path_ECHO
4653 if test -n "$ECHO"; then
4654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4655 $as_echo "$ECHO" >&6; }
4656 else
4657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658 $as_echo "no" >&6; }
4659 fi
4660 
4661 
4662   test -n "$ECHO" && break
4663 done
4664 
4665 
4666   if test "x$ECHO" = x; then
4667     if test "xecho" = x; then
4668       PROG_NAME=echo
4669     else
4670       PROG_NAME=echo
4671     fi
4672     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4673 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4674     as_fn_error $? "Cannot continue" "$LINENO" 5
4675   fi
4676 
4677 
4678 
4679   for ac_prog in expr
4680 do
4681   # Extract the first word of "$ac_prog", so it can be a program name with args.
4682 set dummy $ac_prog; ac_word=$2
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684 $as_echo_n "checking for $ac_word... " >&6; }
4685 if ${ac_cv_path_EXPR+:} false; then :
4686   $as_echo_n "(cached) " >&6
4687 else
4688   case $EXPR in
4689   [\\/]* | ?:[\\/]*)
4690   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4691   ;;
4692   *)
4693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694 for as_dir in $PATH
4695 do
4696   IFS=$as_save_IFS
4697   test -z "$as_dir" && as_dir=.
4698     for ac_exec_ext in '' $ac_executable_extensions; do
4699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702     break 2
4703   fi
4704 done
4705   done
4706 IFS=$as_save_IFS
4707 
4708   ;;
4709 esac
4710 fi
4711 EXPR=$ac_cv_path_EXPR
4712 if test -n "$EXPR"; then
4713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4714 $as_echo "$EXPR" >&6; }
4715 else
4716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717 $as_echo "no" >&6; }
4718 fi
4719 
4720 
4721   test -n "$EXPR" && break
4722 done
4723 
4724 
4725   if test "x$EXPR" = x; then
4726     if test "xexpr" = x; then
4727       PROG_NAME=expr
4728     else
4729       PROG_NAME=expr
4730     fi
4731     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4732 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4733     as_fn_error $? "Cannot continue" "$LINENO" 5
4734   fi
4735 
4736 
4737 
4738   for ac_prog in file
4739 do
4740   # Extract the first word of "$ac_prog", so it can be a program name with args.
4741 set dummy $ac_prog; ac_word=$2
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743 $as_echo_n "checking for $ac_word... " >&6; }
4744 if ${ac_cv_path_FILE+:} false; then :
4745   $as_echo_n "(cached) " >&6
4746 else
4747   case $FILE in
4748   [\\/]* | ?:[\\/]*)
4749   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4750   ;;
4751   *)
4752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753 for as_dir in $PATH
4754 do
4755   IFS=$as_save_IFS
4756   test -z "$as_dir" && as_dir=.
4757     for ac_exec_ext in '' $ac_executable_extensions; do
4758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4759     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4761     break 2
4762   fi
4763 done
4764   done
4765 IFS=$as_save_IFS
4766 
4767   ;;
4768 esac
4769 fi
4770 FILE=$ac_cv_path_FILE
4771 if test -n "$FILE"; then
4772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4773 $as_echo "$FILE" >&6; }
4774 else
4775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776 $as_echo "no" >&6; }
4777 fi
4778 
4779 
4780   test -n "$FILE" && break
4781 done
4782 
4783 
4784   if test "x$FILE" = x; then
4785     if test "xfile" = x; then
4786       PROG_NAME=file
4787     else
4788       PROG_NAME=file
4789     fi
4790     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4791 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4792     as_fn_error $? "Cannot continue" "$LINENO" 5
4793   fi
4794 
4795 
4796 
4797   for ac_prog in find
4798 do
4799   # Extract the first word of "$ac_prog", so it can be a program name with args.
4800 set dummy $ac_prog; ac_word=$2
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802 $as_echo_n "checking for $ac_word... " >&6; }
4803 if ${ac_cv_path_FIND+:} false; then :
4804   $as_echo_n "(cached) " >&6
4805 else
4806   case $FIND in
4807   [\\/]* | ?:[\\/]*)
4808   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4809   ;;
4810   *)
4811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812 for as_dir in $PATH
4813 do
4814   IFS=$as_save_IFS
4815   test -z "$as_dir" && as_dir=.
4816     for ac_exec_ext in '' $ac_executable_extensions; do
4817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820     break 2
4821   fi
4822 done
4823   done
4824 IFS=$as_save_IFS
4825 
4826   ;;
4827 esac
4828 fi
4829 FIND=$ac_cv_path_FIND
4830 if test -n "$FIND"; then
4831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4832 $as_echo "$FIND" >&6; }
4833 else
4834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835 $as_echo "no" >&6; }
4836 fi
4837 
4838 
4839   test -n "$FIND" && break
4840 done
4841 
4842 
4843   if test "x$FIND" = x; then
4844     if test "xfind" = x; then
4845       PROG_NAME=find
4846     else
4847       PROG_NAME=find
4848     fi
4849     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4850 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4851     as_fn_error $? "Cannot continue" "$LINENO" 5
4852   fi
4853 
4854 
4855 
4856   for ac_prog in head
4857 do
4858   # Extract the first word of "$ac_prog", so it can be a program name with args.
4859 set dummy $ac_prog; ac_word=$2
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861 $as_echo_n "checking for $ac_word... " >&6; }
4862 if ${ac_cv_path_HEAD+:} false; then :
4863   $as_echo_n "(cached) " >&6
4864 else
4865   case $HEAD in
4866   [\\/]* | ?:[\\/]*)
4867   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4868   ;;
4869   *)
4870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871 for as_dir in $PATH
4872 do
4873   IFS=$as_save_IFS
4874   test -z "$as_dir" && as_dir=.
4875     for ac_exec_ext in '' $ac_executable_extensions; do
4876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4877     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879     break 2
4880   fi
4881 done
4882   done
4883 IFS=$as_save_IFS
4884 
4885   ;;
4886 esac
4887 fi
4888 HEAD=$ac_cv_path_HEAD
4889 if test -n "$HEAD"; then
4890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4891 $as_echo "$HEAD" >&6; }
4892 else
4893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894 $as_echo "no" >&6; }
4895 fi
4896 
4897 
4898   test -n "$HEAD" && break
4899 done
4900 
4901 
4902   if test "x$HEAD" = x; then
4903     if test "xhead" = x; then
4904       PROG_NAME=head
4905     else
4906       PROG_NAME=head
4907     fi
4908     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4909 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4910     as_fn_error $? "Cannot continue" "$LINENO" 5
4911   fi
4912 
4913 
4914 
4915   for ac_prog in ln
4916 do
4917   # Extract the first word of "$ac_prog", so it can be a program name with args.
4918 set dummy $ac_prog; ac_word=$2
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920 $as_echo_n "checking for $ac_word... " >&6; }
4921 if ${ac_cv_path_LN+:} false; then :
4922   $as_echo_n "(cached) " >&6
4923 else
4924   case $LN in
4925   [\\/]* | ?:[\\/]*)
4926   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4927   ;;
4928   *)
4929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930 for as_dir in $PATH
4931 do
4932   IFS=$as_save_IFS
4933   test -z "$as_dir" && as_dir=.
4934     for ac_exec_ext in '' $ac_executable_extensions; do
4935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938     break 2
4939   fi
4940 done
4941   done
4942 IFS=$as_save_IFS
4943 
4944   ;;
4945 esac
4946 fi
4947 LN=$ac_cv_path_LN
4948 if test -n "$LN"; then
4949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4950 $as_echo "$LN" >&6; }
4951 else
4952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953 $as_echo "no" >&6; }
4954 fi
4955 
4956 
4957   test -n "$LN" && break
4958 done
4959 
4960 
4961   if test "x$LN" = x; then
4962     if test "xln" = x; then
4963       PROG_NAME=ln
4964     else
4965       PROG_NAME=ln
4966     fi
4967     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4968 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4969     as_fn_error $? "Cannot continue" "$LINENO" 5
4970   fi
4971 
4972 
4973 
4974   for ac_prog in ls
4975 do
4976   # Extract the first word of "$ac_prog", so it can be a program name with args.
4977 set dummy $ac_prog; ac_word=$2
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979 $as_echo_n "checking for $ac_word... " >&6; }
4980 if ${ac_cv_path_LS+:} false; then :
4981   $as_echo_n "(cached) " >&6
4982 else
4983   case $LS in
4984   [\\/]* | ?:[\\/]*)
4985   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4986   ;;
4987   *)
4988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989 for as_dir in $PATH
4990 do
4991   IFS=$as_save_IFS
4992   test -z "$as_dir" && as_dir=.
4993     for ac_exec_ext in '' $ac_executable_extensions; do
4994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997     break 2
4998   fi
4999 done
5000   done
5001 IFS=$as_save_IFS
5002 
5003   ;;
5004 esac
5005 fi
5006 LS=$ac_cv_path_LS
5007 if test -n "$LS"; then
5008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5009 $as_echo "$LS" >&6; }
5010 else
5011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012 $as_echo "no" >&6; }
5013 fi
5014 
5015 
5016   test -n "$LS" && break
5017 done
5018 
5019 
5020   if test "x$LS" = x; then
5021     if test "xls" = x; then
5022       PROG_NAME=ls
5023     else
5024       PROG_NAME=ls
5025     fi
5026     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5027 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5028     as_fn_error $? "Cannot continue" "$LINENO" 5
5029   fi
5030 
5031 
5032 
5033   for ac_prog in mkdir
5034 do
5035   # Extract the first word of "$ac_prog", so it can be a program name with args.
5036 set dummy $ac_prog; ac_word=$2
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038 $as_echo_n "checking for $ac_word... " >&6; }
5039 if ${ac_cv_path_MKDIR+:} false; then :
5040   $as_echo_n "(cached) " >&6
5041 else
5042   case $MKDIR in
5043   [\\/]* | ?:[\\/]*)
5044   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5045   ;;
5046   *)
5047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048 for as_dir in $PATH
5049 do
5050   IFS=$as_save_IFS
5051   test -z "$as_dir" && as_dir=.
5052     for ac_exec_ext in '' $ac_executable_extensions; do
5053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056     break 2
5057   fi
5058 done
5059   done
5060 IFS=$as_save_IFS
5061 
5062   ;;
5063 esac
5064 fi
5065 MKDIR=$ac_cv_path_MKDIR
5066 if test -n "$MKDIR"; then
5067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5068 $as_echo "$MKDIR" >&6; }
5069 else
5070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071 $as_echo "no" >&6; }
5072 fi
5073 
5074 
5075   test -n "$MKDIR" && break
5076 done
5077 
5078 
5079   if test "x$MKDIR" = x; then
5080     if test "xmkdir" = x; then
5081       PROG_NAME=mkdir
5082     else
5083       PROG_NAME=mkdir
5084     fi
5085     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5086 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5087     as_fn_error $? "Cannot continue" "$LINENO" 5
5088   fi
5089 
5090 
5091 
5092   for ac_prog in mktemp
5093 do
5094   # Extract the first word of "$ac_prog", so it can be a program name with args.
5095 set dummy $ac_prog; ac_word=$2
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097 $as_echo_n "checking for $ac_word... " >&6; }
5098 if ${ac_cv_path_MKTEMP+:} false; then :
5099   $as_echo_n "(cached) " >&6
5100 else
5101   case $MKTEMP in
5102   [\\/]* | ?:[\\/]*)
5103   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5104   ;;
5105   *)
5106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107 for as_dir in $PATH
5108 do
5109   IFS=$as_save_IFS
5110   test -z "$as_dir" && as_dir=.
5111     for ac_exec_ext in '' $ac_executable_extensions; do
5112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115     break 2
5116   fi
5117 done
5118   done
5119 IFS=$as_save_IFS
5120 
5121   ;;
5122 esac
5123 fi
5124 MKTEMP=$ac_cv_path_MKTEMP
5125 if test -n "$MKTEMP"; then
5126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5127 $as_echo "$MKTEMP" >&6; }
5128 else
5129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130 $as_echo "no" >&6; }
5131 fi
5132 
5133 
5134   test -n "$MKTEMP" && break
5135 done
5136 
5137 
5138   if test "x$MKTEMP" = x; then
5139     if test "xmktemp" = x; then
5140       PROG_NAME=mktemp
5141     else
5142       PROG_NAME=mktemp
5143     fi
5144     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5145 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5146     as_fn_error $? "Cannot continue" "$LINENO" 5
5147   fi
5148 
5149 
5150 
5151   for ac_prog in mv
5152 do
5153   # Extract the first word of "$ac_prog", so it can be a program name with args.
5154 set dummy $ac_prog; ac_word=$2
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156 $as_echo_n "checking for $ac_word... " >&6; }
5157 if ${ac_cv_path_MV+:} false; then :
5158   $as_echo_n "(cached) " >&6
5159 else
5160   case $MV in
5161   [\\/]* | ?:[\\/]*)
5162   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5163   ;;
5164   *)
5165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166 for as_dir in $PATH
5167 do
5168   IFS=$as_save_IFS
5169   test -z "$as_dir" && as_dir=.
5170     for ac_exec_ext in '' $ac_executable_extensions; do
5171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174     break 2
5175   fi
5176 done
5177   done
5178 IFS=$as_save_IFS
5179 
5180   ;;
5181 esac
5182 fi
5183 MV=$ac_cv_path_MV
5184 if test -n "$MV"; then
5185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5186 $as_echo "$MV" >&6; }
5187 else
5188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189 $as_echo "no" >&6; }
5190 fi
5191 
5192 
5193   test -n "$MV" && break
5194 done
5195 
5196 
5197   if test "x$MV" = x; then
5198     if test "xmv" = x; then
5199       PROG_NAME=mv
5200     else
5201       PROG_NAME=mv
5202     fi
5203     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5204 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5205     as_fn_error $? "Cannot continue" "$LINENO" 5
5206   fi
5207 
5208 
5209 
5210   for ac_prog in printf
5211 do
5212   # Extract the first word of "$ac_prog", so it can be a program name with args.
5213 set dummy $ac_prog; ac_word=$2
5214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215 $as_echo_n "checking for $ac_word... " >&6; }
5216 if ${ac_cv_path_PRINTF+:} false; then :
5217   $as_echo_n "(cached) " >&6
5218 else
5219   case $PRINTF in
5220   [\\/]* | ?:[\\/]*)
5221   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5222   ;;
5223   *)
5224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225 for as_dir in $PATH
5226 do
5227   IFS=$as_save_IFS
5228   test -z "$as_dir" && as_dir=.
5229     for ac_exec_ext in '' $ac_executable_extensions; do
5230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233     break 2
5234   fi
5235 done
5236   done
5237 IFS=$as_save_IFS
5238 
5239   ;;
5240 esac
5241 fi
5242 PRINTF=$ac_cv_path_PRINTF
5243 if test -n "$PRINTF"; then
5244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5245 $as_echo "$PRINTF" >&6; }
5246 else
5247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248 $as_echo "no" >&6; }
5249 fi
5250 
5251 
5252   test -n "$PRINTF" && break
5253 done
5254 
5255 
5256   if test "x$PRINTF" = x; then
5257     if test "xprintf" = x; then
5258       PROG_NAME=printf
5259     else
5260       PROG_NAME=printf
5261     fi
5262     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5263 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5264     as_fn_error $? "Cannot continue" "$LINENO" 5
5265   fi
5266 
5267 
5268 
5269   for ac_prog in rm
5270 do
5271   # Extract the first word of "$ac_prog", so it can be a program name with args.
5272 set dummy $ac_prog; ac_word=$2
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274 $as_echo_n "checking for $ac_word... " >&6; }
5275 if ${ac_cv_path_RM+:} false; then :
5276   $as_echo_n "(cached) " >&6
5277 else
5278   case $RM in
5279   [\\/]* | ?:[\\/]*)
5280   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5281   ;;
5282   *)
5283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284 for as_dir in $PATH
5285 do
5286   IFS=$as_save_IFS
5287   test -z "$as_dir" && as_dir=.
5288     for ac_exec_ext in '' $ac_executable_extensions; do
5289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292     break 2
5293   fi
5294 done
5295   done
5296 IFS=$as_save_IFS
5297 
5298   ;;
5299 esac
5300 fi
5301 RM=$ac_cv_path_RM
5302 if test -n "$RM"; then
5303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5304 $as_echo "$RM" >&6; }
5305 else
5306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307 $as_echo "no" >&6; }
5308 fi
5309 
5310 
5311   test -n "$RM" && break
5312 done
5313 
5314 
5315   if test "x$RM" = x; then
5316     if test "xrm" = x; then
5317       PROG_NAME=rm
5318     else
5319       PROG_NAME=rm
5320     fi
5321     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5322 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5323     as_fn_error $? "Cannot continue" "$LINENO" 5
5324   fi
5325 
5326 
5327 
5328   for ac_prog in sh
5329 do
5330   # Extract the first word of "$ac_prog", so it can be a program name with args.
5331 set dummy $ac_prog; ac_word=$2
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333 $as_echo_n "checking for $ac_word... " >&6; }
5334 if ${ac_cv_path_SH+:} false; then :
5335   $as_echo_n "(cached) " >&6
5336 else
5337   case $SH in
5338   [\\/]* | ?:[\\/]*)
5339   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5340   ;;
5341   *)
5342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343 for as_dir in $PATH
5344 do
5345   IFS=$as_save_IFS
5346   test -z "$as_dir" && as_dir=.
5347     for ac_exec_ext in '' $ac_executable_extensions; do
5348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351     break 2
5352   fi
5353 done
5354   done
5355 IFS=$as_save_IFS
5356 
5357   ;;
5358 esac
5359 fi
5360 SH=$ac_cv_path_SH
5361 if test -n "$SH"; then
5362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5363 $as_echo "$SH" >&6; }
5364 else
5365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366 $as_echo "no" >&6; }
5367 fi
5368 
5369 
5370   test -n "$SH" && break
5371 done
5372 
5373 
5374   if test "x$SH" = x; then
5375     if test "xsh" = x; then
5376       PROG_NAME=sh
5377     else
5378       PROG_NAME=sh
5379     fi
5380     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5381 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5382     as_fn_error $? "Cannot continue" "$LINENO" 5
5383   fi
5384 
5385 
5386 
5387   for ac_prog in sort
5388 do
5389   # Extract the first word of "$ac_prog", so it can be a program name with args.
5390 set dummy $ac_prog; ac_word=$2
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392 $as_echo_n "checking for $ac_word... " >&6; }
5393 if ${ac_cv_path_SORT+:} false; then :
5394   $as_echo_n "(cached) " >&6
5395 else
5396   case $SORT in
5397   [\\/]* | ?:[\\/]*)
5398   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5399   ;;
5400   *)
5401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402 for as_dir in $PATH
5403 do
5404   IFS=$as_save_IFS
5405   test -z "$as_dir" && as_dir=.
5406     for ac_exec_ext in '' $ac_executable_extensions; do
5407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410     break 2
5411   fi
5412 done
5413   done
5414 IFS=$as_save_IFS
5415 
5416   ;;
5417 esac
5418 fi
5419 SORT=$ac_cv_path_SORT
5420 if test -n "$SORT"; then
5421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5422 $as_echo "$SORT" >&6; }
5423 else
5424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425 $as_echo "no" >&6; }
5426 fi
5427 
5428 
5429   test -n "$SORT" && break
5430 done
5431 
5432 
5433   if test "x$SORT" = x; then
5434     if test "xsort" = x; then
5435       PROG_NAME=sort
5436     else
5437       PROG_NAME=sort
5438     fi
5439     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5440 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5441     as_fn_error $? "Cannot continue" "$LINENO" 5
5442   fi
5443 
5444 
5445 
5446   for ac_prog in tail
5447 do
5448   # Extract the first word of "$ac_prog", so it can be a program name with args.
5449 set dummy $ac_prog; ac_word=$2
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5451 $as_echo_n "checking for $ac_word... " >&6; }
5452 if ${ac_cv_path_TAIL+:} false; then :
5453   $as_echo_n "(cached) " >&6
5454 else
5455   case $TAIL in
5456   [\\/]* | ?:[\\/]*)
5457   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5458   ;;
5459   *)
5460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5461 for as_dir in $PATH
5462 do
5463   IFS=$as_save_IFS
5464   test -z "$as_dir" && as_dir=.
5465     for ac_exec_ext in '' $ac_executable_extensions; do
5466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5467     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5469     break 2
5470   fi
5471 done
5472   done
5473 IFS=$as_save_IFS
5474 
5475   ;;
5476 esac
5477 fi
5478 TAIL=$ac_cv_path_TAIL
5479 if test -n "$TAIL"; then
5480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5481 $as_echo "$TAIL" >&6; }
5482 else
5483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5484 $as_echo "no" >&6; }
5485 fi
5486 
5487 
5488   test -n "$TAIL" && break
5489 done
5490 
5491 
5492   if test "x$TAIL" = x; then
5493     if test "xtail" = x; then
5494       PROG_NAME=tail
5495     else
5496       PROG_NAME=tail
5497     fi
5498     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5499 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5500     as_fn_error $? "Cannot continue" "$LINENO" 5
5501   fi
5502 
5503 
5504 
5505   for ac_prog in tar
5506 do
5507   # Extract the first word of "$ac_prog", so it can be a program name with args.
5508 set dummy $ac_prog; ac_word=$2
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510 $as_echo_n "checking for $ac_word... " >&6; }
5511 if ${ac_cv_path_TAR+:} false; then :
5512   $as_echo_n "(cached) " >&6
5513 else
5514   case $TAR in
5515   [\\/]* | ?:[\\/]*)
5516   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5517   ;;
5518   *)
5519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520 for as_dir in $PATH
5521 do
5522   IFS=$as_save_IFS
5523   test -z "$as_dir" && as_dir=.
5524     for ac_exec_ext in '' $ac_executable_extensions; do
5525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528     break 2
5529   fi
5530 done
5531   done
5532 IFS=$as_save_IFS
5533 
5534   ;;
5535 esac
5536 fi
5537 TAR=$ac_cv_path_TAR
5538 if test -n "$TAR"; then
5539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5540 $as_echo "$TAR" >&6; }
5541 else
5542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543 $as_echo "no" >&6; }
5544 fi
5545 
5546 
5547   test -n "$TAR" && break
5548 done
5549 
5550 
5551   if test "x$TAR" = x; then
5552     if test "xtar" = x; then
5553       PROG_NAME=tar
5554     else
5555       PROG_NAME=tar
5556     fi
5557     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5558 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5559     as_fn_error $? "Cannot continue" "$LINENO" 5
5560   fi
5561 
5562 
5563 
5564   for ac_prog in tee
5565 do
5566   # Extract the first word of "$ac_prog", so it can be a program name with args.
5567 set dummy $ac_prog; ac_word=$2
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5569 $as_echo_n "checking for $ac_word... " >&6; }
5570 if ${ac_cv_path_TEE+:} false; then :
5571   $as_echo_n "(cached) " >&6
5572 else
5573   case $TEE in
5574   [\\/]* | ?:[\\/]*)
5575   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5576   ;;
5577   *)
5578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579 for as_dir in $PATH
5580 do
5581   IFS=$as_save_IFS
5582   test -z "$as_dir" && as_dir=.
5583     for ac_exec_ext in '' $ac_executable_extensions; do
5584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5585     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5587     break 2
5588   fi
5589 done
5590   done
5591 IFS=$as_save_IFS
5592 
5593   ;;
5594 esac
5595 fi
5596 TEE=$ac_cv_path_TEE
5597 if test -n "$TEE"; then
5598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5599 $as_echo "$TEE" >&6; }
5600 else
5601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5602 $as_echo "no" >&6; }
5603 fi
5604 
5605 
5606   test -n "$TEE" && break
5607 done
5608 
5609 
5610   if test "x$TEE" = x; then
5611     if test "xtee" = x; then
5612       PROG_NAME=tee
5613     else
5614       PROG_NAME=tee
5615     fi
5616     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5617 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5618     as_fn_error $? "Cannot continue" "$LINENO" 5
5619   fi
5620 
5621 
5622 
5623   for ac_prog in touch
5624 do
5625   # Extract the first word of "$ac_prog", so it can be a program name with args.
5626 set dummy $ac_prog; ac_word=$2
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5628 $as_echo_n "checking for $ac_word... " >&6; }
5629 if ${ac_cv_path_TOUCH+:} false; then :
5630   $as_echo_n "(cached) " >&6
5631 else
5632   case $TOUCH in
5633   [\\/]* | ?:[\\/]*)
5634   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5635   ;;
5636   *)
5637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638 for as_dir in $PATH
5639 do
5640   IFS=$as_save_IFS
5641   test -z "$as_dir" && as_dir=.
5642     for ac_exec_ext in '' $ac_executable_extensions; do
5643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5644     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5646     break 2
5647   fi
5648 done
5649   done
5650 IFS=$as_save_IFS
5651 
5652   ;;
5653 esac
5654 fi
5655 TOUCH=$ac_cv_path_TOUCH
5656 if test -n "$TOUCH"; then
5657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5658 $as_echo "$TOUCH" >&6; }
5659 else
5660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661 $as_echo "no" >&6; }
5662 fi
5663 
5664 
5665   test -n "$TOUCH" && break
5666 done
5667 
5668 
5669   if test "x$TOUCH" = x; then
5670     if test "xtouch" = x; then
5671       PROG_NAME=touch
5672     else
5673       PROG_NAME=touch
5674     fi
5675     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5676 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5677     as_fn_error $? "Cannot continue" "$LINENO" 5
5678   fi
5679 
5680 
5681 
5682   for ac_prog in tr
5683 do
5684   # Extract the first word of "$ac_prog", so it can be a program name with args.
5685 set dummy $ac_prog; ac_word=$2
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687 $as_echo_n "checking for $ac_word... " >&6; }
5688 if ${ac_cv_path_TR+:} false; then :
5689   $as_echo_n "(cached) " >&6
5690 else
5691   case $TR in
5692   [\\/]* | ?:[\\/]*)
5693   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5694   ;;
5695   *)
5696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697 for as_dir in $PATH
5698 do
5699   IFS=$as_save_IFS
5700   test -z "$as_dir" && as_dir=.
5701     for ac_exec_ext in '' $ac_executable_extensions; do
5702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5703     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705     break 2
5706   fi
5707 done
5708   done
5709 IFS=$as_save_IFS
5710 
5711   ;;
5712 esac
5713 fi
5714 TR=$ac_cv_path_TR
5715 if test -n "$TR"; then
5716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5717 $as_echo "$TR" >&6; }
5718 else
5719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720 $as_echo "no" >&6; }
5721 fi
5722 
5723 
5724   test -n "$TR" && break
5725 done
5726 
5727 
5728   if test "x$TR" = x; then
5729     if test "xtr" = x; then
5730       PROG_NAME=tr
5731     else
5732       PROG_NAME=tr
5733     fi
5734     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5735 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5736     as_fn_error $? "Cannot continue" "$LINENO" 5
5737   fi
5738 
5739 
5740 
5741   for ac_prog in uname
5742 do
5743   # Extract the first word of "$ac_prog", so it can be a program name with args.
5744 set dummy $ac_prog; ac_word=$2
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5746 $as_echo_n "checking for $ac_word... " >&6; }
5747 if ${ac_cv_path_UNAME+:} false; then :
5748   $as_echo_n "(cached) " >&6
5749 else
5750   case $UNAME in
5751   [\\/]* | ?:[\\/]*)
5752   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5753   ;;
5754   *)
5755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756 for as_dir in $PATH
5757 do
5758   IFS=$as_save_IFS
5759   test -z "$as_dir" && as_dir=.
5760     for ac_exec_ext in '' $ac_executable_extensions; do
5761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5762     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5764     break 2
5765   fi
5766 done
5767   done
5768 IFS=$as_save_IFS
5769 
5770   ;;
5771 esac
5772 fi
5773 UNAME=$ac_cv_path_UNAME
5774 if test -n "$UNAME"; then
5775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5776 $as_echo "$UNAME" >&6; }
5777 else
5778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779 $as_echo "no" >&6; }
5780 fi
5781 
5782 
5783   test -n "$UNAME" && break
5784 done
5785 
5786 
5787   if test "x$UNAME" = x; then
5788     if test "xuname" = x; then
5789       PROG_NAME=uname
5790     else
5791       PROG_NAME=uname
5792     fi
5793     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5794 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5795     as_fn_error $? "Cannot continue" "$LINENO" 5
5796   fi
5797 
5798 
5799 
5800   for ac_prog in uniq
5801 do
5802   # Extract the first word of "$ac_prog", so it can be a program name with args.
5803 set dummy $ac_prog; ac_word=$2
5804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5805 $as_echo_n "checking for $ac_word... " >&6; }
5806 if ${ac_cv_path_UNIQ+:} false; then :
5807   $as_echo_n "(cached) " >&6
5808 else
5809   case $UNIQ in
5810   [\\/]* | ?:[\\/]*)
5811   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5812   ;;
5813   *)
5814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815 for as_dir in $PATH
5816 do
5817   IFS=$as_save_IFS
5818   test -z "$as_dir" && as_dir=.
5819     for ac_exec_ext in '' $ac_executable_extensions; do
5820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5821     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5823     break 2
5824   fi
5825 done
5826   done
5827 IFS=$as_save_IFS
5828 
5829   ;;
5830 esac
5831 fi
5832 UNIQ=$ac_cv_path_UNIQ
5833 if test -n "$UNIQ"; then
5834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5835 $as_echo "$UNIQ" >&6; }
5836 else
5837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838 $as_echo "no" >&6; }
5839 fi
5840 
5841 
5842   test -n "$UNIQ" && break
5843 done
5844 
5845 
5846   if test "x$UNIQ" = x; then
5847     if test "xuniq" = x; then
5848       PROG_NAME=uniq
5849     else
5850       PROG_NAME=uniq
5851     fi
5852     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5853 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5854     as_fn_error $? "Cannot continue" "$LINENO" 5
5855   fi
5856 
5857 
5858 
5859   for ac_prog in wc
5860 do
5861   # Extract the first word of "$ac_prog", so it can be a program name with args.
5862 set dummy $ac_prog; ac_word=$2
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864 $as_echo_n "checking for $ac_word... " >&6; }
5865 if ${ac_cv_path_WC+:} false; then :
5866   $as_echo_n "(cached) " >&6
5867 else
5868   case $WC in
5869   [\\/]* | ?:[\\/]*)
5870   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5871   ;;
5872   *)
5873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874 for as_dir in $PATH
5875 do
5876   IFS=$as_save_IFS
5877   test -z "$as_dir" && as_dir=.
5878     for ac_exec_ext in '' $ac_executable_extensions; do
5879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882     break 2
5883   fi
5884 done
5885   done
5886 IFS=$as_save_IFS
5887 
5888   ;;
5889 esac
5890 fi
5891 WC=$ac_cv_path_WC
5892 if test -n "$WC"; then
5893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5894 $as_echo "$WC" >&6; }
5895 else
5896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897 $as_echo "no" >&6; }
5898 fi
5899 
5900 
5901   test -n "$WC" && break
5902 done
5903 
5904 
5905   if test "x$WC" = x; then
5906     if test "xwc" = x; then
5907       PROG_NAME=wc
5908     else
5909       PROG_NAME=wc
5910     fi
5911     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5912 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5913     as_fn_error $? "Cannot continue" "$LINENO" 5
5914   fi
5915 
5916 
5917 
5918   for ac_prog in which
5919 do
5920   # Extract the first word of "$ac_prog", so it can be a program name with args.
5921 set dummy $ac_prog; ac_word=$2
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5923 $as_echo_n "checking for $ac_word... " >&6; }
5924 if ${ac_cv_path_WHICH+:} false; then :
5925   $as_echo_n "(cached) " >&6
5926 else
5927   case $WHICH in
5928   [\\/]* | ?:[\\/]*)
5929   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5930   ;;
5931   *)
5932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933 for as_dir in $PATH
5934 do
5935   IFS=$as_save_IFS
5936   test -z "$as_dir" && as_dir=.
5937     for ac_exec_ext in '' $ac_executable_extensions; do
5938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5939     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5941     break 2
5942   fi
5943 done
5944   done
5945 IFS=$as_save_IFS
5946 
5947   ;;
5948 esac
5949 fi
5950 WHICH=$ac_cv_path_WHICH
5951 if test -n "$WHICH"; then
5952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5953 $as_echo "$WHICH" >&6; }
5954 else
5955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956 $as_echo "no" >&6; }
5957 fi
5958 
5959 
5960   test -n "$WHICH" && break
5961 done
5962 
5963 
5964   if test "x$WHICH" = x; then
5965     if test "xwhich" = x; then
5966       PROG_NAME=which
5967     else
5968       PROG_NAME=which
5969     fi
5970     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5971 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5972     as_fn_error $? "Cannot continue" "$LINENO" 5
5973   fi
5974 
5975 
5976 
5977   for ac_prog in xargs
5978 do
5979   # Extract the first word of "$ac_prog", so it can be a program name with args.
5980 set dummy $ac_prog; ac_word=$2
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5982 $as_echo_n "checking for $ac_word... " >&6; }
5983 if ${ac_cv_path_XARGS+:} false; then :
5984   $as_echo_n "(cached) " >&6
5985 else
5986   case $XARGS in
5987   [\\/]* | ?:[\\/]*)
5988   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5989   ;;
5990   *)
5991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992 for as_dir in $PATH
5993 do
5994   IFS=$as_save_IFS
5995   test -z "$as_dir" && as_dir=.
5996     for ac_exec_ext in '' $ac_executable_extensions; do
5997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5998     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000     break 2
6001   fi
6002 done
6003   done
6004 IFS=$as_save_IFS
6005 
6006   ;;
6007 esac
6008 fi
6009 XARGS=$ac_cv_path_XARGS
6010 if test -n "$XARGS"; then
6011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6012 $as_echo "$XARGS" >&6; }
6013 else
6014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015 $as_echo "no" >&6; }
6016 fi
6017 
6018 
6019   test -n "$XARGS" && break
6020 done
6021 
6022 
6023   if test "x$XARGS" = x; then
6024     if test "xxargs" = x; then
6025       PROG_NAME=xargs
6026     else
6027       PROG_NAME=xargs
6028     fi
6029     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6030 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6031     as_fn_error $? "Cannot continue" "$LINENO" 5
6032   fi
6033 
6034 
6035 
6036   # Then required tools that require some special treatment.
6037   for ac_prog in gawk mawk nawk awk
6038 do
6039   # Extract the first word of "$ac_prog", so it can be a program name with args.
6040 set dummy $ac_prog; ac_word=$2
6041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042 $as_echo_n "checking for $ac_word... " >&6; }
6043 if ${ac_cv_prog_AWK+:} false; then :
6044   $as_echo_n "(cached) " >&6
6045 else
6046   if test -n "$AWK"; then
6047   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6048 else
6049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6050 for as_dir in $PATH
6051 do
6052   IFS=$as_save_IFS
6053   test -z "$as_dir" && as_dir=.
6054     for ac_exec_ext in '' $ac_executable_extensions; do
6055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6056     ac_cv_prog_AWK="$ac_prog"
6057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6058     break 2
6059   fi
6060 done
6061   done
6062 IFS=$as_save_IFS
6063 
6064 fi
6065 fi
6066 AWK=$ac_cv_prog_AWK
6067 if test -n "$AWK"; then
6068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6069 $as_echo "$AWK" >&6; }
6070 else
6071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6072 $as_echo "no" >&6; }
6073 fi
6074 
6075 
6076   test -n "$AWK" && break
6077 done
6078 
6079 
6080   if test "x$AWK" = x; then
6081     if test "x" = x; then
6082       PROG_NAME=awk
6083     else
6084       PROG_NAME=
6085     fi
6086     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6087 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6088     as_fn_error $? "Cannot continue" "$LINENO" 5
6089   fi
6090 
6091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6092 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6093 if ${ac_cv_path_GREP+:} false; then :
6094   $as_echo_n "(cached) " >&6
6095 else
6096   if test -z "$GREP"; then
6097   ac_path_GREP_found=false
6098   # Loop through the user's path and test for each of PROGNAME-LIST
6099   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6101 do
6102   IFS=$as_save_IFS
6103   test -z "$as_dir" && as_dir=.
6104     for ac_prog in grep ggrep; do
6105     for ac_exec_ext in '' $ac_executable_extensions; do
6106       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6107       as_fn_executable_p "$ac_path_GREP" || continue
6108 # Check for GNU ac_path_GREP and select it if it is found.
6109   # Check for GNU $ac_path_GREP
6110 case `"$ac_path_GREP" --version 2>&1` in
6111 *GNU*)
6112   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6113 *)
6114   ac_count=0
6115   $as_echo_n 0123456789 >"conftest.in"
6116   while :
6117   do
6118     cat "conftest.in" "conftest.in" >"conftest.tmp"
6119     mv "conftest.tmp" "conftest.in"
6120     cp "conftest.in" "conftest.nl"
6121     $as_echo 'GREP' >> "conftest.nl"
6122     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6123     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6124     as_fn_arith $ac_count + 1 && ac_count=$as_val
6125     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6126       # Best one so far, save it but keep looking for a better one
6127       ac_cv_path_GREP="$ac_path_GREP"
6128       ac_path_GREP_max=$ac_count
6129     fi
6130     # 10*(2^10) chars as input seems more than enough
6131     test $ac_count -gt 10 && break
6132   done
6133   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6134 esac
6135 
6136       $ac_path_GREP_found && break 3
6137     done
6138   done
6139   done
6140 IFS=$as_save_IFS
6141   if test -z "$ac_cv_path_GREP"; then
6142     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6143   fi
6144 else
6145   ac_cv_path_GREP=$GREP
6146 fi
6147 
6148 fi
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6150 $as_echo "$ac_cv_path_GREP" >&6; }
6151  GREP="$ac_cv_path_GREP"
6152 
6153 
6154 
6155   if test "x$GREP" = x; then
6156     if test "x" = x; then
6157       PROG_NAME=grep
6158     else
6159       PROG_NAME=
6160     fi
6161     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6162 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6163     as_fn_error $? "Cannot continue" "$LINENO" 5
6164   fi
6165 
6166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6167 $as_echo_n "checking for egrep... " >&6; }
6168 if ${ac_cv_path_EGREP+:} false; then :
6169   $as_echo_n "(cached) " >&6
6170 else
6171   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6172    then ac_cv_path_EGREP="$GREP -E"
6173    else
6174      if test -z "$EGREP"; then
6175   ac_path_EGREP_found=false
6176   # Loop through the user's path and test for each of PROGNAME-LIST
6177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6179 do
6180   IFS=$as_save_IFS
6181   test -z "$as_dir" && as_dir=.
6182     for ac_prog in egrep; do
6183     for ac_exec_ext in '' $ac_executable_extensions; do
6184       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6185       as_fn_executable_p "$ac_path_EGREP" || continue
6186 # Check for GNU ac_path_EGREP and select it if it is found.
6187   # Check for GNU $ac_path_EGREP
6188 case `"$ac_path_EGREP" --version 2>&1` in
6189 *GNU*)
6190   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6191 *)
6192   ac_count=0
6193   $as_echo_n 0123456789 >"conftest.in"
6194   while :
6195   do
6196     cat "conftest.in" "conftest.in" >"conftest.tmp"
6197     mv "conftest.tmp" "conftest.in"
6198     cp "conftest.in" "conftest.nl"
6199     $as_echo 'EGREP' >> "conftest.nl"
6200     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6201     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6202     as_fn_arith $ac_count + 1 && ac_count=$as_val
6203     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6204       # Best one so far, save it but keep looking for a better one
6205       ac_cv_path_EGREP="$ac_path_EGREP"
6206       ac_path_EGREP_max=$ac_count
6207     fi
6208     # 10*(2^10) chars as input seems more than enough
6209     test $ac_count -gt 10 && break
6210   done
6211   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6212 esac
6213 
6214       $ac_path_EGREP_found && break 3
6215     done
6216   done
6217   done
6218 IFS=$as_save_IFS
6219   if test -z "$ac_cv_path_EGREP"; then
6220     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6221   fi
6222 else
6223   ac_cv_path_EGREP=$EGREP
6224 fi
6225 
6226    fi
6227 fi
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6229 $as_echo "$ac_cv_path_EGREP" >&6; }
6230  EGREP="$ac_cv_path_EGREP"
6231 
6232 
6233 
6234   if test "x$EGREP" = x; then
6235     if test "x" = x; then
6236       PROG_NAME=egrep
6237     else
6238       PROG_NAME=
6239     fi
6240     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6241 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6242     as_fn_error $? "Cannot continue" "$LINENO" 5
6243   fi
6244 
6245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6246 $as_echo_n "checking for fgrep... " >&6; }
6247 if ${ac_cv_path_FGREP+:} false; then :
6248   $as_echo_n "(cached) " >&6
6249 else
6250   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6251    then ac_cv_path_FGREP="$GREP -F"
6252    else
6253      if test -z "$FGREP"; then
6254   ac_path_FGREP_found=false
6255   # Loop through the user's path and test for each of PROGNAME-LIST
6256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6258 do
6259   IFS=$as_save_IFS
6260   test -z "$as_dir" && as_dir=.
6261     for ac_prog in fgrep; do
6262     for ac_exec_ext in '' $ac_executable_extensions; do
6263       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6264       as_fn_executable_p "$ac_path_FGREP" || continue
6265 # Check for GNU ac_path_FGREP and select it if it is found.
6266   # Check for GNU $ac_path_FGREP
6267 case `"$ac_path_FGREP" --version 2>&1` in
6268 *GNU*)
6269   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6270 *)
6271   ac_count=0
6272   $as_echo_n 0123456789 >"conftest.in"
6273   while :
6274   do
6275     cat "conftest.in" "conftest.in" >"conftest.tmp"
6276     mv "conftest.tmp" "conftest.in"
6277     cp "conftest.in" "conftest.nl"
6278     $as_echo 'FGREP' >> "conftest.nl"
6279     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6280     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6281     as_fn_arith $ac_count + 1 && ac_count=$as_val
6282     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6283       # Best one so far, save it but keep looking for a better one
6284       ac_cv_path_FGREP="$ac_path_FGREP"
6285       ac_path_FGREP_max=$ac_count
6286     fi
6287     # 10*(2^10) chars as input seems more than enough
6288     test $ac_count -gt 10 && break
6289   done
6290   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6291 esac
6292 
6293       $ac_path_FGREP_found && break 3
6294     done
6295   done
6296   done
6297 IFS=$as_save_IFS
6298   if test -z "$ac_cv_path_FGREP"; then
6299     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6300   fi
6301 else
6302   ac_cv_path_FGREP=$FGREP
6303 fi
6304 
6305    fi
6306 fi
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6308 $as_echo "$ac_cv_path_FGREP" >&6; }
6309  FGREP="$ac_cv_path_FGREP"
6310 
6311 
6312 
6313   if test "x$FGREP" = x; then
6314     if test "x" = x; then
6315       PROG_NAME=fgrep
6316     else
6317       PROG_NAME=
6318     fi
6319     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6320 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6321     as_fn_error $? "Cannot continue" "$LINENO" 5
6322   fi
6323 
6324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6325 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6326 if ${ac_cv_path_SED+:} false; then :
6327   $as_echo_n "(cached) " >&6
6328 else
6329             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6330      for ac_i in 1 2 3 4 5 6 7; do
6331        ac_script="$ac_script$as_nl$ac_script"
6332      done
6333      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6334      { ac_script=; unset ac_script;}
6335      if test -z "$SED"; then
6336   ac_path_SED_found=false
6337   # Loop through the user's path and test for each of PROGNAME-LIST
6338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339 for as_dir in $PATH
6340 do
6341   IFS=$as_save_IFS
6342   test -z "$as_dir" && as_dir=.
6343     for ac_prog in sed gsed; do
6344     for ac_exec_ext in '' $ac_executable_extensions; do
6345       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6346       as_fn_executable_p "$ac_path_SED" || continue
6347 # Check for GNU ac_path_SED and select it if it is found.
6348   # Check for GNU $ac_path_SED
6349 case `"$ac_path_SED" --version 2>&1` in
6350 *GNU*)
6351   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6352 *)
6353   ac_count=0
6354   $as_echo_n 0123456789 >"conftest.in"
6355   while :
6356   do
6357     cat "conftest.in" "conftest.in" >"conftest.tmp"
6358     mv "conftest.tmp" "conftest.in"
6359     cp "conftest.in" "conftest.nl"
6360     $as_echo '' >> "conftest.nl"
6361     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6362     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6363     as_fn_arith $ac_count + 1 && ac_count=$as_val
6364     if test $ac_count -gt ${ac_path_SED_max-0}; then
6365       # Best one so far, save it but keep looking for a better one
6366       ac_cv_path_SED="$ac_path_SED"
6367       ac_path_SED_max=$ac_count
6368     fi
6369     # 10*(2^10) chars as input seems more than enough
6370     test $ac_count -gt 10 && break
6371   done
6372   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6373 esac
6374 
6375       $ac_path_SED_found && break 3
6376     done
6377   done
6378   done
6379 IFS=$as_save_IFS
6380   if test -z "$ac_cv_path_SED"; then
6381     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6382   fi
6383 else
6384   ac_cv_path_SED=$SED
6385 fi
6386 
6387 fi
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6389 $as_echo "$ac_cv_path_SED" >&6; }
6390  SED="$ac_cv_path_SED"
6391   rm -f conftest.sed
6392 
6393 
6394   if test "x$SED" = x; then
6395     if test "x" = x; then
6396       PROG_NAME=sed
6397     else
6398       PROG_NAME=
6399     fi
6400     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6401 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6402     as_fn_error $? "Cannot continue" "$LINENO" 5
6403   fi
6404 
6405 
6406   for ac_prog in nawk gawk awk
6407 do
6408   # Extract the first word of "$ac_prog", so it can be a program name with args.
6409 set dummy $ac_prog; ac_word=$2
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6411 $as_echo_n "checking for $ac_word... " >&6; }
6412 if ${ac_cv_path_NAWK+:} false; then :
6413   $as_echo_n "(cached) " >&6
6414 else
6415   case $NAWK in
6416   [\\/]* | ?:[\\/]*)
6417   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6418   ;;
6419   *)
6420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6421 for as_dir in $PATH
6422 do
6423   IFS=$as_save_IFS
6424   test -z "$as_dir" && as_dir=.
6425     for ac_exec_ext in '' $ac_executable_extensions; do
6426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6427     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6429     break 2
6430   fi
6431 done
6432   done
6433 IFS=$as_save_IFS
6434 
6435   ;;
6436 esac
6437 fi
6438 NAWK=$ac_cv_path_NAWK
6439 if test -n "$NAWK"; then
6440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6441 $as_echo "$NAWK" >&6; }
6442 else
6443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6444 $as_echo "no" >&6; }
6445 fi
6446 
6447 
6448   test -n "$NAWK" && break
6449 done
6450 
6451 
6452   if test "x$NAWK" = x; then
6453     if test "x" = x; then
6454       PROG_NAME=nawk
6455     else
6456       PROG_NAME=
6457     fi
6458     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6459 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6460     as_fn_error $? "Cannot continue" "$LINENO" 5
6461   fi
6462 
6463 
6464   # Always force rm.
6465   RM="$RM -f"
6466 
6467   # pwd behaves differently on various platforms and some don't support the -L flag.
6468   # Always use the bash builtin pwd to get uniform behavior.
6469   THEPWDCMD=pwd
6470 
6471   # These are not required on all platforms
6472   # Extract the first word of "cygpath", so it can be a program name with args.
6473 set dummy cygpath; ac_word=$2
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475 $as_echo_n "checking for $ac_word... " >&6; }
6476 if ${ac_cv_path_CYGPATH+:} false; then :
6477   $as_echo_n "(cached) " >&6
6478 else
6479   case $CYGPATH in
6480   [\\/]* | ?:[\\/]*)
6481   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6482   ;;
6483   *)
6484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485 for as_dir in $PATH
6486 do
6487   IFS=$as_save_IFS
6488   test -z "$as_dir" && as_dir=.
6489     for ac_exec_ext in '' $ac_executable_extensions; do
6490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6491     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493     break 2
6494   fi
6495 done
6496   done
6497 IFS=$as_save_IFS
6498 
6499   ;;
6500 esac
6501 fi
6502 CYGPATH=$ac_cv_path_CYGPATH
6503 if test -n "$CYGPATH"; then
6504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6505 $as_echo "$CYGPATH" >&6; }
6506 else
6507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508 $as_echo "no" >&6; }
6509 fi
6510 
6511 
6512   # Extract the first word of "readlink", so it can be a program name with args.
6513 set dummy readlink; ac_word=$2
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515 $as_echo_n "checking for $ac_word... " >&6; }
6516 if ${ac_cv_path_READLINK+:} false; then :
6517   $as_echo_n "(cached) " >&6
6518 else
6519   case $READLINK in
6520   [\\/]* | ?:[\\/]*)
6521   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6522   ;;
6523   *)
6524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525 for as_dir in $PATH
6526 do
6527   IFS=$as_save_IFS
6528   test -z "$as_dir" && as_dir=.
6529     for ac_exec_ext in '' $ac_executable_extensions; do
6530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6531     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533     break 2
6534   fi
6535 done
6536   done
6537 IFS=$as_save_IFS
6538 
6539   ;;
6540 esac
6541 fi
6542 READLINK=$ac_cv_path_READLINK
6543 if test -n "$READLINK"; then
6544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6545 $as_echo "$READLINK" >&6; }
6546 else
6547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548 $as_echo "no" >&6; }
6549 fi
6550 
6551 
6552   # Extract the first word of "df", so it can be a program name with args.
6553 set dummy df; ac_word=$2
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6555 $as_echo_n "checking for $ac_word... " >&6; }
6556 if ${ac_cv_path_DF+:} false; then :
6557   $as_echo_n "(cached) " >&6
6558 else
6559   case $DF in
6560   [\\/]* | ?:[\\/]*)
6561   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6562   ;;
6563   *)
6564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6565 for as_dir in $PATH
6566 do
6567   IFS=$as_save_IFS
6568   test -z "$as_dir" && as_dir=.
6569     for ac_exec_ext in '' $ac_executable_extensions; do
6570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6571     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6573     break 2
6574   fi
6575 done
6576   done
6577 IFS=$as_save_IFS
6578 
6579   ;;
6580 esac
6581 fi
6582 DF=$ac_cv_path_DF
6583 if test -n "$DF"; then
6584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6585 $as_echo "$DF" >&6; }
6586 else
6587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588 $as_echo "no" >&6; }
6589 fi
6590 
6591 
6592   # Extract the first word of "SetFile", so it can be a program name with args.
6593 set dummy SetFile; ac_word=$2
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6595 $as_echo_n "checking for $ac_word... " >&6; }
6596 if ${ac_cv_path_SETFILE+:} false; then :
6597   $as_echo_n "(cached) " >&6
6598 else
6599   case $SETFILE in
6600   [\\/]* | ?:[\\/]*)
6601   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6602   ;;
6603   *)
6604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605 for as_dir in $PATH
6606 do
6607   IFS=$as_save_IFS
6608   test -z "$as_dir" && as_dir=.
6609     for ac_exec_ext in '' $ac_executable_extensions; do
6610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6611     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6613     break 2
6614   fi
6615 done
6616   done
6617 IFS=$as_save_IFS
6618 
6619   ;;
6620 esac
6621 fi
6622 SETFILE=$ac_cv_path_SETFILE
6623 if test -n "$SETFILE"; then
6624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6625 $as_echo "$SETFILE" >&6; }
6626 else
6627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628 $as_echo "no" >&6; }
6629 fi
6630 
6631 
6632 
6633 
6634 # Now we can determine OpenJDK build and target platforms. This is required to
6635 # have early on.
6636 # Make sure we can run config.sub.
6637 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6638   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6639 
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6641 $as_echo_n "checking build system type... " >&6; }
6642 if ${ac_cv_build+:} false; then :
6643   $as_echo_n "(cached) " >&6
6644 else
6645   ac_build_alias=$build_alias
6646 test "x$ac_build_alias" = x &&
6647   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6648 test "x$ac_build_alias" = x &&
6649   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6650 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6651   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6652 
6653 fi
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6655 $as_echo "$ac_cv_build" >&6; }
6656 case $ac_cv_build in
6657 *-*-*) ;;
6658 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6659 esac
6660 build=$ac_cv_build
6661 ac_save_IFS=$IFS; IFS='-'
6662 set x $ac_cv_build
6663 shift
6664 build_cpu=$1
6665 build_vendor=$2
6666 shift; shift
6667 # Remember, the first character of IFS is used to create $*,
6668 # except with old shells:
6669 build_os=$*
6670 IFS=$ac_save_IFS
6671 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6672 
6673 
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6675 $as_echo_n "checking host system type... " >&6; }
6676 if ${ac_cv_host+:} false; then :
6677   $as_echo_n "(cached) " >&6
6678 else
6679   if test "x$host_alias" = x; then
6680   ac_cv_host=$ac_cv_build
6681 else
6682   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6683     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6684 fi
6685 
6686 fi
6687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6688 $as_echo "$ac_cv_host" >&6; }
6689 case $ac_cv_host in
6690 *-*-*) ;;
6691 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6692 esac
6693 host=$ac_cv_host
6694 ac_save_IFS=$IFS; IFS='-'
6695 set x $ac_cv_host
6696 shift
6697 host_cpu=$1
6698 host_vendor=$2
6699 shift; shift
6700 # Remember, the first character of IFS is used to create $*,
6701 # except with old shells:
6702 host_os=$*
6703 IFS=$ac_save_IFS
6704 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6705 
6706 
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6708 $as_echo_n "checking target system type... " >&6; }
6709 if ${ac_cv_target+:} false; then :
6710   $as_echo_n "(cached) " >&6
6711 else
6712   if test "x$target_alias" = x; then
6713   ac_cv_target=$ac_cv_host
6714 else
6715   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6716     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6717 fi
6718 
6719 fi
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6721 $as_echo "$ac_cv_target" >&6; }
6722 case $ac_cv_target in
6723 *-*-*) ;;
6724 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6725 esac
6726 target=$ac_cv_target
6727 ac_save_IFS=$IFS; IFS='-'
6728 set x $ac_cv_target
6729 shift
6730 target_cpu=$1
6731 target_vendor=$2
6732 shift; shift
6733 # Remember, the first character of IFS is used to create $*,
6734 # except with old shells:
6735 target_os=$*
6736 IFS=$ac_save_IFS
6737 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6738 
6739 
6740 # The aliases save the names the user supplied, while $host etc.
6741 # will get canonicalized.
6742 test -n "$target_alias" &&
6743   test "$program_prefix$program_suffix$program_transform_name" = \
6744     NONENONEs,x,x, &&
6745   program_prefix=${target_alias}-
6746 
6747   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6748   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6749   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6750   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6751   # to use the configure naming style.
6752 
6753 
6754 
6755 
6756 
6757   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6758   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6759   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6760   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6761   OPENJDK_TARGET_AUTOCONF_NAME="$host"
6762   OPENJDK_BUILD_AUTOCONF_NAME="$build"
6763 
6764 
6765 
6766   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6767 
6768   case "$build_os" in
6769     *linux*)
6770       VAR_OS=linux
6771       VAR_OS_API=posix
6772       VAR_OS_ENV=linux
6773       ;;
6774     *solaris*)
6775       VAR_OS=solaris
6776       VAR_OS_API=posix
6777       VAR_OS_ENV=solaris
6778       ;;
6779     *darwin*)
6780       VAR_OS=macosx
6781       VAR_OS_API=posix
6782       VAR_OS_ENV=macosx
6783       ;;
6784     *bsd*)
6785       VAR_OS=bsd
6786       VAR_OS_API=posix
6787       VAR_OS_ENV=bsd
6788       ;;
6789     *cygwin*)
6790       VAR_OS=windows
6791       VAR_OS_API=winapi
6792       VAR_OS_ENV=windows.cygwin
6793       ;;
6794     *mingw*)
6795       VAR_OS=windows
6796       VAR_OS_API=winapi
6797       VAR_OS_ENV=windows.msys
6798       ;;
6799     *aix*)
6800       VAR_OS=aix
6801       VAR_OS_API=posix
6802       VAR_OS_ENV=aix
6803       ;;
6804     *)
6805       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6806       ;;
6807   esac
6808 
6809 
6810   # First argument is the cpu name from the trip/quad
6811   case "$build_cpu" in
6812     x86_64)
6813       VAR_CPU=x86_64
6814       VAR_CPU_ARCH=x86
6815       VAR_CPU_BITS=64
6816       VAR_CPU_ENDIAN=little
6817       ;;
6818     i?86)
6819       VAR_CPU=x86
6820       VAR_CPU_ARCH=x86
6821       VAR_CPU_BITS=32
6822       VAR_CPU_ENDIAN=little
6823       ;;
6824     arm*)
6825       VAR_CPU=arm
6826       VAR_CPU_ARCH=arm
6827       VAR_CPU_BITS=32
6828       VAR_CPU_ENDIAN=little
6829       ;;
6830     powerpc)
6831       VAR_CPU=ppc
6832       VAR_CPU_ARCH=ppc
6833       VAR_CPU_BITS=32
6834       VAR_CPU_ENDIAN=big
6835       ;;
6836     powerpc64)
6837       VAR_CPU=ppc64
6838       VAR_CPU_ARCH=ppc
6839       VAR_CPU_BITS=64
6840       VAR_CPU_ENDIAN=big
6841       ;;
6842     powerpc64le)
6843       VAR_CPU=ppc64
6844       VAR_CPU_ARCH=ppc
6845       VAR_CPU_BITS=64
6846       VAR_CPU_ENDIAN=little
6847       ;;
6848     s390)
6849       VAR_CPU=s390
6850       VAR_CPU_ARCH=s390
6851       VAR_CPU_BITS=32
6852       VAR_CPU_ENDIAN=big
6853       ;;
6854     s390x)
6855       VAR_CPU=s390x
6856       VAR_CPU_ARCH=s390
6857       VAR_CPU_BITS=64
6858       VAR_CPU_ENDIAN=big
6859       ;;
6860     sparc)
6861       VAR_CPU=sparc
6862       VAR_CPU_ARCH=sparc
6863       VAR_CPU_BITS=32
6864       VAR_CPU_ENDIAN=big
6865       ;;
6866     sparcv9)
6867       VAR_CPU=sparcv9
6868       VAR_CPU_ARCH=sparc
6869       VAR_CPU_BITS=64
6870       VAR_CPU_ENDIAN=big
6871       ;;
6872     *)
6873       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6874       ;;
6875   esac
6876 
6877   # ..and setup our own variables. (Do this explicitely to facilitate searching)
6878   OPENJDK_BUILD_OS="$VAR_OS"
6879   OPENJDK_BUILD_OS_API="$VAR_OS_API"
6880   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6881   OPENJDK_BUILD_CPU="$VAR_CPU"
6882   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6883   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6884   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6885 
6886 
6887 
6888 
6889 
6890 
6891 
6892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6893 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6895 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6896 
6897   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6898 
6899   case "$host_os" in
6900     *linux*)
6901       VAR_OS=linux
6902       VAR_OS_API=posix
6903       VAR_OS_ENV=linux
6904       ;;
6905     *solaris*)
6906       VAR_OS=solaris
6907       VAR_OS_API=posix
6908       VAR_OS_ENV=solaris
6909       ;;
6910     *darwin*)
6911       VAR_OS=macosx
6912       VAR_OS_API=posix
6913       VAR_OS_ENV=macosx
6914       ;;
6915     *bsd*)
6916       VAR_OS=bsd
6917       VAR_OS_API=posix
6918       VAR_OS_ENV=bsd
6919       ;;
6920     *cygwin*)
6921       VAR_OS=windows
6922       VAR_OS_API=winapi
6923       VAR_OS_ENV=windows.cygwin
6924       ;;
6925     *mingw*)
6926       VAR_OS=windows
6927       VAR_OS_API=winapi
6928       VAR_OS_ENV=windows.msys
6929       ;;
6930     *aix*)
6931       VAR_OS=aix
6932       VAR_OS_API=posix
6933       VAR_OS_ENV=aix
6934       ;;
6935     *)
6936       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6937       ;;
6938   esac
6939 
6940 
6941   # First argument is the cpu name from the trip/quad
6942   case "$host_cpu" in
6943     x86_64)
6944       VAR_CPU=x86_64
6945       VAR_CPU_ARCH=x86
6946       VAR_CPU_BITS=64
6947       VAR_CPU_ENDIAN=little
6948       ;;
6949     i?86)
6950       VAR_CPU=x86
6951       VAR_CPU_ARCH=x86
6952       VAR_CPU_BITS=32
6953       VAR_CPU_ENDIAN=little
6954       ;;
6955     arm*)
6956       VAR_CPU=arm
6957       VAR_CPU_ARCH=arm
6958       VAR_CPU_BITS=32
6959       VAR_CPU_ENDIAN=little
6960       ;;
6961     powerpc)
6962       VAR_CPU=ppc
6963       VAR_CPU_ARCH=ppc
6964       VAR_CPU_BITS=32
6965       VAR_CPU_ENDIAN=big
6966       ;;
6967     powerpc64)
6968       VAR_CPU=ppc64
6969       VAR_CPU_ARCH=ppc
6970       VAR_CPU_BITS=64
6971       VAR_CPU_ENDIAN=big
6972       ;;
6973     powerpc64le)
6974       VAR_CPU=ppc64
6975       VAR_CPU_ARCH=ppc
6976       VAR_CPU_BITS=64
6977       VAR_CPU_ENDIAN=little
6978       ;;
6979     s390)
6980       VAR_CPU=s390
6981       VAR_CPU_ARCH=s390
6982       VAR_CPU_BITS=32
6983       VAR_CPU_ENDIAN=big
6984       ;;
6985     s390x)
6986       VAR_CPU=s390x
6987       VAR_CPU_ARCH=s390
6988       VAR_CPU_BITS=64
6989       VAR_CPU_ENDIAN=big
6990       ;;
6991     sparc)
6992       VAR_CPU=sparc
6993       VAR_CPU_ARCH=sparc
6994       VAR_CPU_BITS=32
6995       VAR_CPU_ENDIAN=big
6996       ;;
6997     sparcv9)
6998       VAR_CPU=sparcv9
6999       VAR_CPU_ARCH=sparc
7000       VAR_CPU_BITS=64
7001       VAR_CPU_ENDIAN=big
7002       ;;
7003     *)
7004       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
7005       ;;
7006   esac
7007 
7008   # ... and setup our own variables. (Do this explicitely to facilitate searching)
7009   OPENJDK_TARGET_OS="$VAR_OS"
7010   OPENJDK_TARGET_OS_API="$VAR_OS_API"
7011   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
7012   OPENJDK_TARGET_CPU="$VAR_CPU"
7013   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
7014   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
7015   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
7016 
7017 
7018 
7019 
7020 
7021 
7022 
7023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7024 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
7025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7026 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7027 
7028 
7029 
7030 # Check whether --with-target-bits was given.
7031 if test "${with_target_bits+set}" = set; then :
7032   withval=$with_target_bits;
7033 fi
7034 
7035 
7036   # We have three types of compiles:
7037   # native  == normal compilation, target system == build system
7038   # cross   == traditional cross compilation, target system != build system; special toolchain needed
7039   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7040   #
7041   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7042     # We're doing a proper cross-compilation
7043     COMPILE_TYPE="cross"
7044   else
7045     COMPILE_TYPE="native"
7046   fi
7047 
7048   if test "x$with_target_bits" != x; then
7049     if test "x$COMPILE_TYPE" = "xcross"; then
7050       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7051     fi
7052 
7053     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7054       # A reduced build is requested
7055       COMPILE_TYPE="reduced"
7056       OPENJDK_TARGET_CPU_BITS=32
7057       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7058         OPENJDK_TARGET_CPU=x86
7059       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7060         OPENJDK_TARGET_CPU=sparc
7061       else
7062         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7063       fi
7064     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7065       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
7066     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7067       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7068 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7069     else
7070       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7071     fi
7072   fi
7073 
7074 
7075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7076 $as_echo_n "checking compilation type... " >&6; }
7077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7078 $as_echo "$COMPILE_TYPE" >&6; }
7079 
7080 
7081   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7082     REQUIRED_OS_NAME=SunOS
7083     REQUIRED_OS_VERSION=5.10
7084   fi
7085   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7086     REQUIRED_OS_NAME=Linux
7087     REQUIRED_OS_VERSION=2.6
7088   fi
7089   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7090     REQUIRED_OS_NAME=Windows
7091     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7092       REQUIRED_OS_VERSION=5.2
7093     else
7094       REQUIRED_OS_VERSION=5.1
7095     fi
7096   fi
7097   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7098     REQUIRED_OS_NAME=Darwin
7099     REQUIRED_OS_VERSION=11.2
7100   fi
7101 
7102 
7103 
7104 
7105 
7106   # Also store the legacy naming of the cpu.
7107   # Ie i586 and amd64 instead of x86 and x86_64
7108   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7109   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7110     OPENJDK_TARGET_CPU_LEGACY="i586"
7111   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7112     # On all platforms except MacOSX replace x86_64 with amd64.
7113     OPENJDK_TARGET_CPU_LEGACY="amd64"
7114   fi
7115 
7116 
7117   # And the second legacy naming of the cpu.
7118   # Ie i386 and amd64 instead of x86 and x86_64.
7119   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7120   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7121     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7122   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7123     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7124   fi
7125 
7126 
7127   # This is the name of the cpu (but using i386 and amd64 instead of
7128   # x86 and x86_64, respectively), preceeded by a /, to be used when
7129   # locating libraries. On macosx, it's empty, though.
7130   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7131   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7132     OPENJDK_TARGET_CPU_LIBDIR=""
7133   fi
7134 
7135 
7136   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7137   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7138   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7139   OPENJDK_TARGET_CPU_ISADIR=""
7140   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7141     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7142       OPENJDK_TARGET_CPU_ISADIR="/amd64"
7143     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7144       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7145     fi
7146   fi
7147 
7148 
7149   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7150   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7151   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7152     # On linux only, we replace x86 with i386.
7153     OPENJDK_TARGET_CPU_OSARCH="i386"
7154   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7155     # On all platforms except macosx, we replace x86_64 with amd64.
7156     OPENJDK_TARGET_CPU_OSARCH="amd64"
7157   fi
7158 
7159 
7160   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7161   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7162     OPENJDK_TARGET_CPU_JLI="i386"
7163   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7164     # On all platforms except macosx, we replace x86_64 with amd64.
7165     OPENJDK_TARGET_CPU_JLI="amd64"
7166   fi
7167   # Now setup the -D flags for building libjli.
7168   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7169   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7170     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7171       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7172     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7173       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7174     fi
7175   fi
7176 
7177 
7178   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7179   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7180     OPENJDK_TARGET_OS_API_DIR="solaris"
7181   fi
7182   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7183     OPENJDK_TARGET_OS_API_DIR="windows"
7184   fi
7185 
7186 
7187   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7188       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7189   else
7190       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7191   fi
7192 
7193 
7194   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7195     A_LP64="LP64:="
7196     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7197     # unpack200.exe
7198     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7199       ADD_LP64="-D_LP64=1"
7200     fi
7201   fi
7202   LP64=$A_LP64
7203 
7204 
7205   if test "x$COMPILE_TYPE" = "xcross"; then
7206     # FIXME: ... or should this include reduced builds..?
7207     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7208   else
7209     DEFINE_CROSS_COMPILE_ARCH=""
7210   fi
7211 
7212 
7213   # ZERO_ARCHDEF is used to enable architecture-specific code
7214   case "${OPENJDK_TARGET_CPU}" in
7215     ppc*)    ZERO_ARCHDEF=PPC   ;;
7216     s390*)   ZERO_ARCHDEF=S390  ;;
7217     sparc*)  ZERO_ARCHDEF=SPARC ;;
7218     x86_64*) ZERO_ARCHDEF=AMD64 ;;
7219     x86)     ZERO_ARCHDEF=IA32  ;;
7220     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7221   esac
7222 
7223 
7224 
7225 
7226 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7227 
7228   # Locate the directory of this script.
7229   SCRIPT="$0"
7230   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7231 
7232   # Where is the source? It is located two levels above the configure script.
7233   CURDIR="$PWD"
7234   cd "$AUTOCONF_DIR/../.."
7235   SRC_ROOT="`$THEPWDCMD -L`"
7236 
7237   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7238     PATH_SEP=";"
7239 
7240   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7241   if test $SRC_ROOT_LENGTH -gt 100; then
7242     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7243   fi
7244 
7245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7247 $as_echo_n "checking cygwin release... " >&6; }
7248     CYGWIN_VERSION=`$UNAME -r`
7249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7250 $as_echo "$CYGWIN_VERSION" >&6; }
7251     WINDOWS_ENV_VENDOR='cygwin'
7252     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7253 
7254     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7255     if test "x$CYGWIN_VERSION_OK" = x; then
7256       { $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
7257 $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;}
7258       as_fn_error $? "Cannot continue" "$LINENO" 5
7259     fi
7260     if test "x$CYGPATH" = x; then
7261       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7262     fi
7263     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7264 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7265     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7266     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7267     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7268     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7269     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7270 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7271     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7272     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7273     if test "x$test_cygdrive_prefix" = x; then
7274       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7275     fi
7276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7278 $as_echo_n "checking msys release... " >&6; }
7279     MSYS_VERSION=`$UNAME -r`
7280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7281 $as_echo "$MSYS_VERSION" >&6; }
7282 
7283     WINDOWS_ENV_VENDOR='msys'
7284     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7285 
7286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7287 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7288     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7289     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7290 
7291   windows_path="$MSYS_ROOT_PATH"
7292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7293     unix_path=`$CYGPATH -u "$windows_path"`
7294     MSYS_ROOT_PATH="$unix_path"
7295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7296     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7297     MSYS_ROOT_PATH="$unix_path"
7298   fi
7299 
7300     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7301 $as_echo "$MSYS_ROOT_PATH" >&6; }
7302     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7303   else
7304     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7305   fi
7306 
7307   # Test if windows or unix (cygwin/msys) find is first in path.
7308   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7309 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7310   FIND_BINARY_OUTPUT=`find --version 2>&1`
7311   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7312     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7313 $as_echo "unix style" >&6; }
7314   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7316 $as_echo "Windows" >&6; }
7317     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7318 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7319     { $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
7320 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7321     as_fn_error $? "Cannot continue" "$LINENO" 5
7322   else
7323     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7324 $as_echo "unknown" >&6; }
7325     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7326 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7327   fi
7328 
7329   else
7330     PATH_SEP=":"
7331   fi
7332 
7333 
7334 
7335   cd "$CURDIR"
7336 
7337 
7338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7339 
7340   # Input might be given as Windows format, start by converting to
7341   # unix format.
7342   path="$SRC_ROOT"
7343   new_path=`$CYGPATH -u "$path"`
7344 
7345   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7346   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7347   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7348   # "foo.exe" is OK but "foo" is an error.
7349   #
7350   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7351   # It is also a way to make sure we got the proper file name for the real test later on.
7352   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7353   if test "x$test_shortpath" = x; then
7354     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7355 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7356     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7357   fi
7358 
7359   # Call helper function which possibly converts this using DOS-style short mode.
7360   # If so, the updated path is stored in $new_path.
7361 
7362   input_path="$new_path"
7363   # Check if we need to convert this using DOS-style short mode. If the path
7364   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7365   # take no chances and rewrite it.
7366   # Note: m4 eats our [], so we need to use [ and ] instead.
7367   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7368   if test "x$has_forbidden_chars" != x; then
7369     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7370     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7371     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7372     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7373       # Going to short mode and back again did indeed matter. Since short mode is
7374       # case insensitive, let's make it lowercase to improve readability.
7375       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7376       # Now convert it back to Unix-stile (cygpath)
7377       input_path=`$CYGPATH -u "$shortmode_path"`
7378       new_path="$input_path"
7379     fi
7380   fi
7381 
7382   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7383   if test "x$test_cygdrive_prefix" = x; then
7384     # As a simple fix, exclude /usr/bin since it's not a real path.
7385     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7386       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7387       # a path prefixed by /cygdrive for fixpath to work.
7388       new_path="$CYGWIN_ROOT_PATH$input_path"
7389     fi
7390   fi
7391 
7392 
7393   if test "x$path" != "x$new_path"; then
7394     SRC_ROOT="$new_path"
7395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7396 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7397   fi
7398 
7399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7400 
7401   path="$SRC_ROOT"
7402   has_colon=`$ECHO $path | $GREP ^.:`
7403   new_path="$path"
7404   if test "x$has_colon" = x; then
7405     # Not in mixed or Windows style, start by that.
7406     new_path=`cmd //c echo $path`
7407   fi
7408 
7409 
7410   input_path="$new_path"
7411   # Check if we need to convert this using DOS-style short mode. If the path
7412   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7413   # take no chances and rewrite it.
7414   # Note: m4 eats our [], so we need to use [ and ] instead.
7415   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7416   if test "x$has_forbidden_chars" != x; then
7417     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7418     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7419   fi
7420 
7421 
7422   windows_path="$new_path"
7423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7424     unix_path=`$CYGPATH -u "$windows_path"`
7425     new_path="$unix_path"
7426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7428     new_path="$unix_path"
7429   fi
7430 
7431   if test "x$path" != "x$new_path"; then
7432     SRC_ROOT="$new_path"
7433     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7434 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7435   fi
7436 
7437   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7438   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7439 
7440   else
7441     # We're on a posix platform. Hooray! :)
7442     path="$SRC_ROOT"
7443     has_space=`$ECHO "$path" | $GREP " "`
7444     if test "x$has_space" != x; then
7445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7446 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7447       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7448     fi
7449 
7450     # Use eval to expand a potential ~
7451     eval path="$path"
7452     if test ! -f "$path" && test ! -d "$path"; then
7453       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7454     fi
7455 
7456     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7457   fi
7458 
7459 
7460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7461 
7462   # Input might be given as Windows format, start by converting to
7463   # unix format.
7464   path="$CURDIR"
7465   new_path=`$CYGPATH -u "$path"`
7466 
7467   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7468   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7469   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7470   # "foo.exe" is OK but "foo" is an error.
7471   #
7472   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7473   # It is also a way to make sure we got the proper file name for the real test later on.
7474   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7475   if test "x$test_shortpath" = x; then
7476     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7477 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7478     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7479   fi
7480 
7481   # Call helper function which possibly converts this using DOS-style short mode.
7482   # If so, the updated path is stored in $new_path.
7483 
7484   input_path="$new_path"
7485   # Check if we need to convert this using DOS-style short mode. If the path
7486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7487   # take no chances and rewrite it.
7488   # Note: m4 eats our [], so we need to use [ and ] instead.
7489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7490   if test "x$has_forbidden_chars" != x; then
7491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7492     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7493     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7494     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7495       # Going to short mode and back again did indeed matter. Since short mode is
7496       # case insensitive, let's make it lowercase to improve readability.
7497       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7498       # Now convert it back to Unix-stile (cygpath)
7499       input_path=`$CYGPATH -u "$shortmode_path"`
7500       new_path="$input_path"
7501     fi
7502   fi
7503 
7504   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7505   if test "x$test_cygdrive_prefix" = x; then
7506     # As a simple fix, exclude /usr/bin since it's not a real path.
7507     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7508       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7509       # a path prefixed by /cygdrive for fixpath to work.
7510       new_path="$CYGWIN_ROOT_PATH$input_path"
7511     fi
7512   fi
7513 
7514 
7515   if test "x$path" != "x$new_path"; then
7516     CURDIR="$new_path"
7517     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7518 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7519   fi
7520 
7521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7522 
7523   path="$CURDIR"
7524   has_colon=`$ECHO $path | $GREP ^.:`
7525   new_path="$path"
7526   if test "x$has_colon" = x; then
7527     # Not in mixed or Windows style, start by that.
7528     new_path=`cmd //c echo $path`
7529   fi
7530 
7531 
7532   input_path="$new_path"
7533   # Check if we need to convert this using DOS-style short mode. If the path
7534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7535   # take no chances and rewrite it.
7536   # Note: m4 eats our [], so we need to use [ and ] instead.
7537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7538   if test "x$has_forbidden_chars" != x; then
7539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7540     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7541   fi
7542 
7543 
7544   windows_path="$new_path"
7545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7546     unix_path=`$CYGPATH -u "$windows_path"`
7547     new_path="$unix_path"
7548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7550     new_path="$unix_path"
7551   fi
7552 
7553   if test "x$path" != "x$new_path"; then
7554     CURDIR="$new_path"
7555     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7556 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7557   fi
7558 
7559   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7560   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7561 
7562   else
7563     # We're on a posix platform. Hooray! :)
7564     path="$CURDIR"
7565     has_space=`$ECHO "$path" | $GREP " "`
7566     if test "x$has_space" != x; then
7567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7568 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7569       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7570     fi
7571 
7572     # Use eval to expand a potential ~
7573     eval path="$path"
7574     if test ! -f "$path" && test ! -d "$path"; then
7575       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7576     fi
7577 
7578     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7579   fi
7580 
7581 
7582   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7583     # Add extra search paths on solaris for utilities like ar and as etc...
7584     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7585   fi
7586 
7587   # You can force the sys-root if the sys-root encoded into the cross compiler tools
7588   # is not correct.
7589 
7590 # Check whether --with-sys-root was given.
7591 if test "${with_sys_root+set}" = set; then :
7592   withval=$with_sys_root;
7593 fi
7594 
7595 
7596   if test "x$with_sys_root" != x; then
7597     SYS_ROOT=$with_sys_root
7598   else
7599     SYS_ROOT=/
7600   fi
7601 
7602 
7603 
7604 # Check whether --with-tools-dir was given.
7605 if test "${with_tools_dir+set}" = set; then :
7606   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7607 
7608 fi
7609 
7610 
7611   # Xcode version will be validated later
7612 
7613 # Check whether --with-xcode-path was given.
7614 if test "${with_xcode_path+set}" = set; then :
7615   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
7616 
7617 fi
7618 
7619 
7620 
7621 # Check whether --with-devkit was given.
7622 if test "${with_devkit+set}" = set; then :
7623   withval=$with_devkit;
7624         if test "x$with_sys_root" != x; then
7625           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7626         fi
7627 
7628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7629 
7630   # Input might be given as Windows format, start by converting to
7631   # unix format.
7632   path="$with_devkit"
7633   new_path=`$CYGPATH -u "$path"`
7634 
7635   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7636   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7637   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7638   # "foo.exe" is OK but "foo" is an error.
7639   #
7640   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7641   # It is also a way to make sure we got the proper file name for the real test later on.
7642   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7643   if test "x$test_shortpath" = x; then
7644     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7645 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7646     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7647   fi
7648 
7649   # Call helper function which possibly converts this using DOS-style short mode.
7650   # If so, the updated path is stored in $new_path.
7651 
7652   input_path="$new_path"
7653   # Check if we need to convert this using DOS-style short mode. If the path
7654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7655   # take no chances and rewrite it.
7656   # Note: m4 eats our [], so we need to use [ and ] instead.
7657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7658   if test "x$has_forbidden_chars" != x; then
7659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7663       # Going to short mode and back again did indeed matter. Since short mode is
7664       # case insensitive, let's make it lowercase to improve readability.
7665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7666       # Now convert it back to Unix-stile (cygpath)
7667       input_path=`$CYGPATH -u "$shortmode_path"`
7668       new_path="$input_path"
7669     fi
7670   fi
7671 
7672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7673   if test "x$test_cygdrive_prefix" = x; then
7674     # As a simple fix, exclude /usr/bin since it's not a real path.
7675     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7677       # a path prefixed by /cygdrive for fixpath to work.
7678       new_path="$CYGWIN_ROOT_PATH$input_path"
7679     fi
7680   fi
7681 
7682 
7683   if test "x$path" != "x$new_path"; then
7684     with_devkit="$new_path"
7685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7686 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7687   fi
7688 
7689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7690 
7691   path="$with_devkit"
7692   has_colon=`$ECHO $path | $GREP ^.:`
7693   new_path="$path"
7694   if test "x$has_colon" = x; then
7695     # Not in mixed or Windows style, start by that.
7696     new_path=`cmd //c echo $path`
7697   fi
7698 
7699 
7700   input_path="$new_path"
7701   # Check if we need to convert this using DOS-style short mode. If the path
7702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7703   # take no chances and rewrite it.
7704   # Note: m4 eats our [], so we need to use [ and ] instead.
7705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7706   if test "x$has_forbidden_chars" != x; then
7707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7708     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7709   fi
7710 
7711 
7712   windows_path="$new_path"
7713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7714     unix_path=`$CYGPATH -u "$windows_path"`
7715     new_path="$unix_path"
7716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7718     new_path="$unix_path"
7719   fi
7720 
7721   if test "x$path" != "x$new_path"; then
7722     with_devkit="$new_path"
7723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7724 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7725   fi
7726 
7727   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7728   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7729 
7730   else
7731     # We're on a posix platform. Hooray! :)
7732     path="$with_devkit"
7733     has_space=`$ECHO "$path" | $GREP " "`
7734     if test "x$has_space" != x; then
7735       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7736 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7737       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7738     fi
7739 
7740     # Use eval to expand a potential ~
7741     eval path="$path"
7742     if test ! -f "$path" && test ! -d "$path"; then
7743       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7744     fi
7745 
7746     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7747   fi
7748 
7749 
7750   if test "x$TOOLS_DIR" = x; then
7751     TOOLS_DIR="$with_devkit/bin"
7752   else
7753     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7754   fi
7755 
7756         if test -d "$with_devkit/$host_alias/libc"; then
7757           SYS_ROOT=$with_devkit/$host_alias/libc
7758         elif test -d "$with_devkit/$host/sys-root"; then
7759           SYS_ROOT=$with_devkit/$host/sys-root
7760         fi
7761 
7762 fi
7763 
7764 
7765 
7766   # Setup default logging of stdout and stderr to build.log in the output root.
7767   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7768   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7769   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7770 
7771 
7772 
7773 
7774 
7775 # Check if it's a pure open build or if custom sources are to be used.
7776 
7777   # Check whether --enable-openjdk-only was given.
7778 if test "${enable_openjdk_only+set}" = set; then :
7779   enableval=$enable_openjdk_only;
7780 else
7781   enable_openjdk_only="no"
7782 fi
7783 
7784 
7785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7786 $as_echo_n "checking for presence of closed sources... " >&6; }
7787   if test -d "$SRC_ROOT/jdk/src/closed"; then
7788     CLOSED_SOURCE_PRESENT=yes
7789   else
7790     CLOSED_SOURCE_PRESENT=no
7791   fi
7792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7793 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7794 
7795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7796 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7797   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7799 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7800 
7801   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7802     OPENJDK=true
7803     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7804       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7805 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7806     fi
7807   else
7808     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7809       OPENJDK=true
7810     else
7811       OPENJDK=false
7812     fi
7813   fi
7814 
7815   if test "x$OPENJDK" = "xtrue"; then
7816     SET_OPENJDK="OPENJDK=true"
7817   fi
7818 
7819 
7820 
7821 
7822 # These are needed to be able to create a configuration name (and thus the output directory)
7823 
7824   ###############################################################################
7825   #
7826   # Check which variant of the JDK that we want to build.
7827   # Currently we have:
7828   #    normal:   standard edition
7829   # but the custom make system may add other variants
7830   #
7831   # Effectively the JDK variant gives a name to a specific set of
7832   # modules to compile into the JDK. In the future, these modules
7833   # might even be Jigsaw modules.
7834   #
7835   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7836 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7837 
7838 # Check whether --with-jdk-variant was given.
7839 if test "${with_jdk_variant+set}" = set; then :
7840   withval=$with_jdk_variant;
7841 fi
7842 
7843 
7844   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7845     JDK_VARIANT="normal"
7846   else
7847     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7848   fi
7849 
7850 
7851 
7852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7853 $as_echo "$JDK_VARIANT" >&6; }
7854 
7855 
7856 ###############################################################################
7857 #
7858 # Check which interpreter of the JVM we want to build.
7859 # Currently we have:
7860 #    template: Template interpreter (the default)
7861 #    cpp     : C++ interpreter
7862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7863 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7864 
7865 # Check whether --with-jvm-interpreter was given.
7866 if test "${with_jvm_interpreter+set}" = set; then :
7867   withval=$with_jvm_interpreter;
7868 fi
7869 
7870 
7871 if test "x$with_jvm_interpreter" = x; then
7872      with_jvm_interpreter="template"
7873 fi
7874 
7875 JVM_INTERPRETER="$with_jvm_interpreter"
7876 
7877 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7878    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7879 fi
7880 
7881 
7882 
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7884 $as_echo "$with_jvm_interpreter" >&6; }
7885 
7886 
7887 
7888   ###############################################################################
7889   #
7890   # Check which variants of the JVM that we want to build.
7891   # Currently we have:
7892   #    server: normal interpreter and a tiered C1/C2 compiler
7893   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7894   #    minimal1: reduced form of client with optional VM services and features stripped out
7895   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7896   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7897   #    zero: no machine code interpreter, no compiler
7898   #    zeroshark: zero interpreter and shark/llvm compiler backend
7899 #    core: interpreter only, no compiler (only works on some platforms)
7900   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7901 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7902 
7903 # Check whether --with-jvm-variants was given.
7904 if test "${with_jvm_variants+set}" = set; then :
7905   withval=$with_jvm_variants;
7906 fi
7907 
7908 
7909   if test "x$with_jvm_variants" = x; then
7910     with_jvm_variants="server"
7911   fi
7912 
7913   JVM_VARIANTS=",$with_jvm_variants,"
7914   TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7915 
7916   if test "x$TEST_VARIANTS" != "x,"; then
7917      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7918   fi
7919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7920 $as_echo "$with_jvm_variants" >&6; }
7921 
7922   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7923   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7924   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7925   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7926   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7927   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7928   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7929 
7930   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7931     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7932       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7933     fi
7934   fi
7935   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7936     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7937       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7938     fi
7939   fi
7940   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7941     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7942       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7943     fi
7944   fi
7945 
7946   # Replace the commas with AND for use in the build directory name.
7947   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
7948   COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
7949   if test "x$COUNT_VARIANTS" != "x,1"; then
7950     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7951   else
7952     BUILDING_MULTIPLE_JVM_VARIANTS=no
7953   fi
7954 
7955 
7956 
7957 
7958 
7959 
7960 
7961 
7962 
7963 
7964   INCLUDE_SA=true
7965   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7966     INCLUDE_SA=false
7967   fi
7968   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7969     INCLUDE_SA=false
7970   fi
7971   if test "x$VAR_CPU" = xppc64 ; then
7972     INCLUDE_SA=false
7973   fi
7974 
7975 
7976   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7977     MACOSX_UNIVERSAL="false"
7978   fi
7979 
7980 
7981 
7982 
7983   ###############################################################################
7984   #
7985   # Set the debug level
7986   #    release: no debug information, all optimizations, no asserts.
7987   #    fastdebug: debug information (-g), all optimizations, all asserts
7988   #    slowdebug: debug information (-g), no optimizations, all asserts
7989   #
7990   DEBUG_LEVEL="release"
7991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7992 $as_echo_n "checking which debug level to use... " >&6; }
7993   # Check whether --enable-debug was given.
7994 if test "${enable_debug+set}" = set; then :
7995   enableval=$enable_debug;
7996         ENABLE_DEBUG="${enableval}"
7997         DEBUG_LEVEL="fastdebug"
7998 
7999 else
8000   ENABLE_DEBUG="no"
8001 fi
8002 
8003 
8004 
8005 # Check whether --with-debug-level was given.
8006 if test "${with_debug_level+set}" = set; then :
8007   withval=$with_debug_level;
8008         DEBUG_LEVEL="${withval}"
8009         if test "x$ENABLE_DEBUG" = xyes; then
8010           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
8011         fi
8012 
8013 fi
8014 
8015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8016 $as_echo "$DEBUG_LEVEL" >&6; }
8017 
8018   if test "x$DEBUG_LEVEL" != xrelease && \
8019       test "x$DEBUG_LEVEL" != xfastdebug && \
8020       test "x$DEBUG_LEVEL" != xslowdebug; then
8021     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8022   fi
8023 
8024 
8025   ###############################################################################
8026   #
8027   # Setup legacy vars/targets and new vars to deal with different debug levels.
8028   #
8029 
8030   case $DEBUG_LEVEL in
8031     release )
8032       VARIANT="OPT"
8033       FASTDEBUG="false"
8034       DEBUG_CLASSFILES="false"
8035       BUILD_VARIANT_RELEASE=""
8036       HOTSPOT_DEBUG_LEVEL="product"
8037       HOTSPOT_EXPORT="product"
8038       ;;
8039     fastdebug )
8040       VARIANT="DBG"
8041       FASTDEBUG="true"
8042       DEBUG_CLASSFILES="true"
8043       BUILD_VARIANT_RELEASE="-fastdebug"
8044       HOTSPOT_DEBUG_LEVEL="fastdebug"
8045       HOTSPOT_EXPORT="fastdebug"
8046       ;;
8047     slowdebug )
8048       VARIANT="DBG"
8049       FASTDEBUG="false"
8050       DEBUG_CLASSFILES="true"
8051       BUILD_VARIANT_RELEASE="-debug"
8052       HOTSPOT_DEBUG_LEVEL="jvmg"
8053       HOTSPOT_EXPORT="debug"
8054       ;;
8055   esac
8056 
8057   #####
8058   # Generate the legacy makefile targets for hotspot.
8059   # The hotspot api for selecting the build artifacts, really, needs to be improved.
8060   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8061   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8062   # But until then ...
8063   HOTSPOT_TARGET=""
8064 
8065   if test "x$JVM_VARIANT_SERVER" = xtrue; then
8066     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8067   fi
8068 
8069   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8070     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8071   fi
8072 
8073   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8074     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8075   fi
8076 
8077   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8078     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8079   fi
8080 
8081   if test "x$JVM_VARIANT_ZERO" = xtrue; then
8082     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8083   fi
8084 
8085   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8086     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8087   fi
8088 
8089   if test "x$JVM_VARIANT_CORE" = xtrue; then
8090     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8091   fi
8092 
8093   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8094 
8095   # On Macosx universal binaries are produced, but they only contain
8096   # 64 bit intel. This invalidates control of which jvms are built
8097   # from configure, but only server is valid anyway. Fix this
8098   # when hotspot makefiles are rewritten.
8099   if test "x$MACOSX_UNIVERSAL" = xtrue; then
8100     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8101   fi
8102 
8103   #####
8104 
8105 
8106 
8107 
8108 
8109 
8110 
8111 
8112 # With basic setup done, call the custom early hook.
8113 
8114 
8115 # To properly create a configuration name, we need to have the OpenJDK target
8116 # and options (variants and debug level) parsed.
8117 
8118 
8119 
8120 # Check whether --with-conf-name was given.
8121 if test "${with_conf_name+set}" = set; then :
8122   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8123 fi
8124 
8125 
8126   # Test from where we are running configure, in or outside of src root.
8127   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8128       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8129       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8130     # We are running configure from the src root.
8131     # Create a default ./build/target-variant-debuglevel output root.
8132     if test "x${CONF_NAME}" = x; then
8133       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8134     fi
8135     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8136     $MKDIR -p "$OUTPUT_ROOT"
8137     if test ! -d "$OUTPUT_ROOT"; then
8138       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8139     fi
8140   else
8141     # We are running configure from outside of the src dir.
8142     # Then use the current directory as output dir!
8143     # If configuration is situated in normal build directory, just use the build
8144     # directory name as configuration name, otherwise use the complete path.
8145     if test "x${CONF_NAME}" = x; then
8146       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8147     fi
8148     OUTPUT_ROOT="$CURDIR"
8149 
8150     # WARNING: This might be a bad thing to do. You need to be sure you want to
8151     # have a configuration in this directory. Do some sanity checks!
8152 
8153     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8154       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8155       # other files
8156       files_present=`$LS $OUTPUT_ROOT`
8157       # Configure has already touched config.log and confdefs.h in the current dir when this check
8158       # is performed.
8159       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8160       | $TR -d '\n'`
8161       if test "x$filtered_files" != x; then
8162         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8163 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8164         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8165 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8166         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8167 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8168         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8169 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8170         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8171 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8172         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8173 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8174         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8175 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8176         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8177       fi
8178     fi
8179   fi
8180   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8181 $as_echo_n "checking what configuration name to use... " >&6; }
8182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8183 $as_echo "$CONF_NAME" >&6; }
8184 
8185 
8186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8187 
8188   # Input might be given as Windows format, start by converting to
8189   # unix format.
8190   path="$OUTPUT_ROOT"
8191   new_path=`$CYGPATH -u "$path"`
8192 
8193   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8194   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8195   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8196   # "foo.exe" is OK but "foo" is an error.
8197   #
8198   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8199   # It is also a way to make sure we got the proper file name for the real test later on.
8200   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8201   if test "x$test_shortpath" = x; then
8202     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8203 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8204     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8205   fi
8206 
8207   # Call helper function which possibly converts this using DOS-style short mode.
8208   # If so, the updated path is stored in $new_path.
8209 
8210   input_path="$new_path"
8211   # Check if we need to convert this using DOS-style short mode. If the path
8212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8213   # take no chances and rewrite it.
8214   # Note: m4 eats our [], so we need to use [ and ] instead.
8215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8216   if test "x$has_forbidden_chars" != x; then
8217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8218     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8219     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8220     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8221       # Going to short mode and back again did indeed matter. Since short mode is
8222       # case insensitive, let's make it lowercase to improve readability.
8223       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8224       # Now convert it back to Unix-stile (cygpath)
8225       input_path=`$CYGPATH -u "$shortmode_path"`
8226       new_path="$input_path"
8227     fi
8228   fi
8229 
8230   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8231   if test "x$test_cygdrive_prefix" = x; then
8232     # As a simple fix, exclude /usr/bin since it's not a real path.
8233     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8234       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8235       # a path prefixed by /cygdrive for fixpath to work.
8236       new_path="$CYGWIN_ROOT_PATH$input_path"
8237     fi
8238   fi
8239 
8240 
8241   if test "x$path" != "x$new_path"; then
8242     OUTPUT_ROOT="$new_path"
8243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8244 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8245   fi
8246 
8247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8248 
8249   path="$OUTPUT_ROOT"
8250   has_colon=`$ECHO $path | $GREP ^.:`
8251   new_path="$path"
8252   if test "x$has_colon" = x; then
8253     # Not in mixed or Windows style, start by that.
8254     new_path=`cmd //c echo $path`
8255   fi
8256 
8257 
8258   input_path="$new_path"
8259   # Check if we need to convert this using DOS-style short mode. If the path
8260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8261   # take no chances and rewrite it.
8262   # Note: m4 eats our [], so we need to use [ and ] instead.
8263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8264   if test "x$has_forbidden_chars" != x; then
8265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8266     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8267   fi
8268 
8269 
8270   windows_path="$new_path"
8271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8272     unix_path=`$CYGPATH -u "$windows_path"`
8273     new_path="$unix_path"
8274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8276     new_path="$unix_path"
8277   fi
8278 
8279   if test "x$path" != "x$new_path"; then
8280     OUTPUT_ROOT="$new_path"
8281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8282 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8283   fi
8284 
8285   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8286   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8287 
8288   else
8289     # We're on a posix platform. Hooray! :)
8290     path="$OUTPUT_ROOT"
8291     has_space=`$ECHO "$path" | $GREP " "`
8292     if test "x$has_space" != x; then
8293       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8294 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8295       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8296     fi
8297 
8298     # Use eval to expand a potential ~
8299     eval path="$path"
8300     if test ! -f "$path" && test ! -d "$path"; then
8301       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8302     fi
8303 
8304     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8305   fi
8306 
8307 
8308   SPEC=$OUTPUT_ROOT/spec.gmk
8309 
8310   CONF_NAME=$CONF_NAME
8311 
8312   OUTPUT_ROOT=$OUTPUT_ROOT
8313 
8314 
8315   # Most of the probed defines are put into config.h
8316   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8317 
8318   # The spec.gmk file contains all variables for the make system.
8319   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8320 
8321   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8322   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8323 
8324   # The bootcycle-spec.gmk file contains support for boot cycle builds.
8325   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8326 
8327   # The compare.sh is used to compare the build output to other builds.
8328   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8329 
8330   # Spec.sh is currently used by compare-objects.sh
8331   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8332 
8333   # The generated Makefile knows where the spec.gmk is and where the source is.
8334   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8335   # which will look for generated configurations
8336   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8337 
8338 
8339   # Save the arguments given to us
8340   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8341 
8342 
8343 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8344 
8345   for ac_prog in apt-get yum port pkgutil pkgadd
8346 do
8347   # Extract the first word of "$ac_prog", so it can be a program name with args.
8348 set dummy $ac_prog; ac_word=$2
8349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8350 $as_echo_n "checking for $ac_word... " >&6; }
8351 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8352   $as_echo_n "(cached) " >&6
8353 else
8354   if test -n "$PKGHANDLER"; then
8355   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8356 else
8357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8358 for as_dir in $PATH
8359 do
8360   IFS=$as_save_IFS
8361   test -z "$as_dir" && as_dir=.
8362     for ac_exec_ext in '' $ac_executable_extensions; do
8363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8364     ac_cv_prog_PKGHANDLER="$ac_prog"
8365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8366     break 2
8367   fi
8368 done
8369   done
8370 IFS=$as_save_IFS
8371 
8372 fi
8373 fi
8374 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8375 if test -n "$PKGHANDLER"; then
8376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8377 $as_echo "$PKGHANDLER" >&6; }
8378 else
8379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380 $as_echo "no" >&6; }
8381 fi
8382 
8383 
8384   test -n "$PKGHANDLER" && break
8385 done
8386 
8387 
8388 
8389 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8390 
8391 
8392   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8393   if test "x$MAKE" != x; then
8394     # User has supplied a make, test it.
8395     if test ! -f "$MAKE"; then
8396       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8397     fi
8398 
8399   MAKE_CANDIDATE=""$MAKE""
8400   DESCRIPTION="user supplied MAKE=$MAKE"
8401   if test "x$MAKE_CANDIDATE" != x; then
8402     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8403 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8404     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8405     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8406     if test "x$IS_GNU_MAKE" = x; then
8407       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8408 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8409     else
8410       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8411       if test "x$IS_MODERN_MAKE" = x; then
8412         { $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
8413 $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;}
8414       else
8415         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8416           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8417             MAKE_EXPECTED_ENV='cygwin'
8418           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8419             MAKE_EXPECTED_ENV='msys'
8420           else
8421             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8422           fi
8423           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8424           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8425         else
8426           # Not relevant for non-Windows
8427           IS_MAKE_CORRECT_ENV=true
8428         fi
8429         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8430           { $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
8431 $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;}
8432         else
8433           FOUND_MAKE=$MAKE_CANDIDATE
8434 
8435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8436 
8437   # First separate the path from the arguments. This will split at the first
8438   # space.
8439   complete="$FOUND_MAKE"
8440   path="${complete%% *}"
8441   tmp="$complete EOL"
8442   arguments="${tmp#* }"
8443 
8444   # Input might be given as Windows format, start by converting to
8445   # unix format.
8446   new_path=`$CYGPATH -u "$path"`
8447 
8448   # Now try to locate executable using which
8449   new_path=`$WHICH "$new_path" 2> /dev/null`
8450   # bat and cmd files are not always considered executable in cygwin causing which
8451   # to not find them
8452   if test "x$new_path" = x \
8453       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8454       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8455     new_path=`$CYGPATH -u "$path"`
8456   fi
8457   if test "x$new_path" = x; then
8458     # Oops. Which didn't find the executable.
8459     # The splitting of arguments from the executable at a space might have been incorrect,
8460     # since paths with space are more likely in Windows. Give it another try with the whole
8461     # argument.
8462     path="$complete"
8463     arguments="EOL"
8464     new_path=`$CYGPATH -u "$path"`
8465     new_path=`$WHICH "$new_path" 2> /dev/null`
8466     # bat and cmd files are not always considered executable in cygwin causing which
8467     # to not find them
8468     if test "x$new_path" = x \
8469         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8470         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8471       new_path=`$CYGPATH -u "$path"`
8472     fi
8473     if test "x$new_path" = x; then
8474       # It's still not found. Now this is an unrecoverable error.
8475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8476 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8477       has_space=`$ECHO "$complete" | $GREP " "`
8478       if test "x$has_space" != x; then
8479         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8480 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8481       fi
8482       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8483     fi
8484   fi
8485 
8486   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8487   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8488   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8489   # "foo.exe" is OK but "foo" is an error.
8490   #
8491   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8492   # It is also a way to make sure we got the proper file name for the real test later on.
8493   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8494   if test "x$test_shortpath" = x; then
8495     # Short path failed, file does not exist as specified.
8496     # Try adding .exe or .cmd
8497     if test -f "${new_path}.exe"; then
8498       input_to_shortpath="${new_path}.exe"
8499     elif test -f "${new_path}.cmd"; then
8500       input_to_shortpath="${new_path}.cmd"
8501     else
8502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8503 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8504       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8505 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8506       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8507     fi
8508   else
8509     input_to_shortpath="$new_path"
8510   fi
8511 
8512   # Call helper function which possibly converts this using DOS-style short mode.
8513   # If so, the updated path is stored in $new_path.
8514   new_path="$input_to_shortpath"
8515 
8516   input_path="$input_to_shortpath"
8517   # Check if we need to convert this using DOS-style short mode. If the path
8518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8519   # take no chances and rewrite it.
8520   # Note: m4 eats our [], so we need to use [ and ] instead.
8521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8522   if test "x$has_forbidden_chars" != x; then
8523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8524     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8525     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8526     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8527       # Going to short mode and back again did indeed matter. Since short mode is
8528       # case insensitive, let's make it lowercase to improve readability.
8529       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8530       # Now convert it back to Unix-stile (cygpath)
8531       input_path=`$CYGPATH -u "$shortmode_path"`
8532       new_path="$input_path"
8533     fi
8534   fi
8535 
8536   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8537   if test "x$test_cygdrive_prefix" = x; then
8538     # As a simple fix, exclude /usr/bin since it's not a real path.
8539     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8540       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8541       # a path prefixed by /cygdrive for fixpath to work.
8542       new_path="$CYGWIN_ROOT_PATH$input_path"
8543     fi
8544   fi
8545 
8546   # remove trailing .exe if any
8547   new_path="${new_path/%.exe/}"
8548 
8549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8550 
8551   # First separate the path from the arguments. This will split at the first
8552   # space.
8553   complete="$FOUND_MAKE"
8554   path="${complete%% *}"
8555   tmp="$complete EOL"
8556   arguments="${tmp#* }"
8557 
8558   # Input might be given as Windows format, start by converting to
8559   # unix format.
8560   new_path="$path"
8561 
8562   windows_path="$new_path"
8563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8564     unix_path=`$CYGPATH -u "$windows_path"`
8565     new_path="$unix_path"
8566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8568     new_path="$unix_path"
8569   fi
8570 
8571 
8572   # Now try to locate executable using which
8573   new_path=`$WHICH "$new_path" 2> /dev/null`
8574 
8575   if test "x$new_path" = x; then
8576     # Oops. Which didn't find the executable.
8577     # The splitting of arguments from the executable at a space might have been incorrect,
8578     # since paths with space are more likely in Windows. Give it another try with the whole
8579     # argument.
8580     path="$complete"
8581     arguments="EOL"
8582     new_path="$path"
8583 
8584   windows_path="$new_path"
8585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8586     unix_path=`$CYGPATH -u "$windows_path"`
8587     new_path="$unix_path"
8588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8590     new_path="$unix_path"
8591   fi
8592 
8593 
8594     new_path=`$WHICH "$new_path" 2> /dev/null`
8595 
8596     if test "x$new_path" = x; then
8597       # It's still not found. Now this is an unrecoverable error.
8598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8599 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8600       has_space=`$ECHO "$complete" | $GREP " "`
8601       if test "x$has_space" != x; then
8602         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8603 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8604       fi
8605       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8606     fi
8607   fi
8608 
8609   # Now new_path has a complete unix path to the binary
8610   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8611     # Keep paths in /bin as-is, but remove trailing .exe if any
8612     new_path="${new_path/%.exe/}"
8613     # Do not save /bin paths to all_fixpath_prefixes!
8614   else
8615     # Not in mixed or Windows style, start by that.
8616     new_path=`cmd //c echo $new_path`
8617 
8618   input_path="$new_path"
8619   # Check if we need to convert this using DOS-style short mode. If the path
8620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8621   # take no chances and rewrite it.
8622   # Note: m4 eats our [], so we need to use [ and ] instead.
8623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8624   if test "x$has_forbidden_chars" != x; then
8625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8626     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8627   fi
8628 
8629     # Output is in $new_path
8630 
8631   windows_path="$new_path"
8632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8633     unix_path=`$CYGPATH -u "$windows_path"`
8634     new_path="$unix_path"
8635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8637     new_path="$unix_path"
8638   fi
8639 
8640     # remove trailing .exe if any
8641     new_path="${new_path/%.exe/}"
8642 
8643     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8644     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8645   fi
8646 
8647   else
8648     # We're on a posix platform. Hooray! :)
8649     # First separate the path from the arguments. This will split at the first
8650     # space.
8651     complete="$FOUND_MAKE"
8652     path="${complete%% *}"
8653     tmp="$complete EOL"
8654     arguments="${tmp#* }"
8655 
8656     # Cannot rely on the command "which" here since it doesn't always work.
8657     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8658     if test -z "$is_absolute_path"; then
8659       # Path to executable is not absolute. Find it.
8660       IFS_save="$IFS"
8661       IFS=:
8662       for p in $PATH; do
8663         if test -f "$p/$path" && test -x "$p/$path"; then
8664           new_path="$p/$path"
8665           break
8666         fi
8667       done
8668       IFS="$IFS_save"
8669     else
8670       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8671 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8672       new_path="$path"
8673     fi
8674 
8675     if test "x$new_path" = x; then
8676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8677 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8678       has_space=`$ECHO "$complete" | $GREP " "`
8679       if test "x$has_space" != x; then
8680         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8681 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8682       fi
8683       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8684     fi
8685   fi
8686 
8687   # Now join together the path and the arguments once again
8688   if test "x$arguments" != xEOL; then
8689     new_complete="$new_path ${arguments% *}"
8690   else
8691     new_complete="$new_path"
8692   fi
8693 
8694   if test "x$complete" != "x$new_complete"; then
8695     FOUND_MAKE="$new_complete"
8696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8697 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8698   fi
8699 
8700         fi
8701       fi
8702     fi
8703   fi
8704 
8705     if test "x$FOUND_MAKE" = x; then
8706       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8707     fi
8708   else
8709     # Try our hardest to locate a correct version of GNU make
8710     for ac_prog in gmake
8711 do
8712   # Extract the first word of "$ac_prog", so it can be a program name with args.
8713 set dummy $ac_prog; ac_word=$2
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8715 $as_echo_n "checking for $ac_word... " >&6; }
8716 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8717   $as_echo_n "(cached) " >&6
8718 else
8719   case $CHECK_GMAKE in
8720   [\\/]* | ?:[\\/]*)
8721   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8722   ;;
8723   *)
8724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8725 for as_dir in $PATH
8726 do
8727   IFS=$as_save_IFS
8728   test -z "$as_dir" && as_dir=.
8729     for ac_exec_ext in '' $ac_executable_extensions; do
8730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8731     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8733     break 2
8734   fi
8735 done
8736   done
8737 IFS=$as_save_IFS
8738 
8739   ;;
8740 esac
8741 fi
8742 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8743 if test -n "$CHECK_GMAKE"; then
8744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8745 $as_echo "$CHECK_GMAKE" >&6; }
8746 else
8747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8748 $as_echo "no" >&6; }
8749 fi
8750 
8751 
8752   test -n "$CHECK_GMAKE" && break
8753 done
8754 
8755 
8756   MAKE_CANDIDATE=""$CHECK_GMAKE""
8757   DESCRIPTION="gmake in PATH"
8758   if test "x$MAKE_CANDIDATE" != x; then
8759     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8760 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8761     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8762     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8763     if test "x$IS_GNU_MAKE" = x; then
8764       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8765 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8766     else
8767       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8768       if test "x$IS_MODERN_MAKE" = x; then
8769         { $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
8770 $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;}
8771       else
8772         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8773           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8774             MAKE_EXPECTED_ENV='cygwin'
8775           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8776             MAKE_EXPECTED_ENV='msys'
8777           else
8778             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8779           fi
8780           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8781           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8782         else
8783           # Not relevant for non-Windows
8784           IS_MAKE_CORRECT_ENV=true
8785         fi
8786         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8787           { $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
8788 $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;}
8789         else
8790           FOUND_MAKE=$MAKE_CANDIDATE
8791 
8792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8793 
8794   # First separate the path from the arguments. This will split at the first
8795   # space.
8796   complete="$FOUND_MAKE"
8797   path="${complete%% *}"
8798   tmp="$complete EOL"
8799   arguments="${tmp#* }"
8800 
8801   # Input might be given as Windows format, start by converting to
8802   # unix format.
8803   new_path=`$CYGPATH -u "$path"`
8804 
8805   # Now try to locate executable using which
8806   new_path=`$WHICH "$new_path" 2> /dev/null`
8807   # bat and cmd files are not always considered executable in cygwin causing which
8808   # to not find them
8809   if test "x$new_path" = x \
8810       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8811       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8812     new_path=`$CYGPATH -u "$path"`
8813   fi
8814   if test "x$new_path" = x; then
8815     # Oops. Which didn't find the executable.
8816     # The splitting of arguments from the executable at a space might have been incorrect,
8817     # since paths with space are more likely in Windows. Give it another try with the whole
8818     # argument.
8819     path="$complete"
8820     arguments="EOL"
8821     new_path=`$CYGPATH -u "$path"`
8822     new_path=`$WHICH "$new_path" 2> /dev/null`
8823     # bat and cmd files are not always considered executable in cygwin causing which
8824     # to not find them
8825     if test "x$new_path" = x \
8826         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8827         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8828       new_path=`$CYGPATH -u "$path"`
8829     fi
8830     if test "x$new_path" = x; then
8831       # It's still not found. Now this is an unrecoverable error.
8832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8833 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8834       has_space=`$ECHO "$complete" | $GREP " "`
8835       if test "x$has_space" != x; then
8836         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8838       fi
8839       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8840     fi
8841   fi
8842 
8843   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8844   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8845   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8846   # "foo.exe" is OK but "foo" is an error.
8847   #
8848   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8849   # It is also a way to make sure we got the proper file name for the real test later on.
8850   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8851   if test "x$test_shortpath" = x; then
8852     # Short path failed, file does not exist as specified.
8853     # Try adding .exe or .cmd
8854     if test -f "${new_path}.exe"; then
8855       input_to_shortpath="${new_path}.exe"
8856     elif test -f "${new_path}.cmd"; then
8857       input_to_shortpath="${new_path}.cmd"
8858     else
8859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8860 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8861       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8862 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8863       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8864     fi
8865   else
8866     input_to_shortpath="$new_path"
8867   fi
8868 
8869   # Call helper function which possibly converts this using DOS-style short mode.
8870   # If so, the updated path is stored in $new_path.
8871   new_path="$input_to_shortpath"
8872 
8873   input_path="$input_to_shortpath"
8874   # Check if we need to convert this using DOS-style short mode. If the path
8875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8876   # take no chances and rewrite it.
8877   # Note: m4 eats our [], so we need to use [ and ] instead.
8878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8879   if test "x$has_forbidden_chars" != x; then
8880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8881     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8882     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8883     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8884       # Going to short mode and back again did indeed matter. Since short mode is
8885       # case insensitive, let's make it lowercase to improve readability.
8886       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8887       # Now convert it back to Unix-stile (cygpath)
8888       input_path=`$CYGPATH -u "$shortmode_path"`
8889       new_path="$input_path"
8890     fi
8891   fi
8892 
8893   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8894   if test "x$test_cygdrive_prefix" = x; then
8895     # As a simple fix, exclude /usr/bin since it's not a real path.
8896     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8897       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8898       # a path prefixed by /cygdrive for fixpath to work.
8899       new_path="$CYGWIN_ROOT_PATH$input_path"
8900     fi
8901   fi
8902 
8903   # remove trailing .exe if any
8904   new_path="${new_path/%.exe/}"
8905 
8906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8907 
8908   # First separate the path from the arguments. This will split at the first
8909   # space.
8910   complete="$FOUND_MAKE"
8911   path="${complete%% *}"
8912   tmp="$complete EOL"
8913   arguments="${tmp#* }"
8914 
8915   # Input might be given as Windows format, start by converting to
8916   # unix format.
8917   new_path="$path"
8918 
8919   windows_path="$new_path"
8920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8921     unix_path=`$CYGPATH -u "$windows_path"`
8922     new_path="$unix_path"
8923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8925     new_path="$unix_path"
8926   fi
8927 
8928 
8929   # Now try to locate executable using which
8930   new_path=`$WHICH "$new_path" 2> /dev/null`
8931 
8932   if test "x$new_path" = x; then
8933     # Oops. Which didn't find the executable.
8934     # The splitting of arguments from the executable at a space might have been incorrect,
8935     # since paths with space are more likely in Windows. Give it another try with the whole
8936     # argument.
8937     path="$complete"
8938     arguments="EOL"
8939     new_path="$path"
8940 
8941   windows_path="$new_path"
8942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8943     unix_path=`$CYGPATH -u "$windows_path"`
8944     new_path="$unix_path"
8945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8947     new_path="$unix_path"
8948   fi
8949 
8950 
8951     new_path=`$WHICH "$new_path" 2> /dev/null`
8952 
8953     if test "x$new_path" = x; then
8954       # It's still not found. Now this is an unrecoverable error.
8955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8956 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8957       has_space=`$ECHO "$complete" | $GREP " "`
8958       if test "x$has_space" != x; then
8959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8961       fi
8962       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8963     fi
8964   fi
8965 
8966   # Now new_path has a complete unix path to the binary
8967   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8968     # Keep paths in /bin as-is, but remove trailing .exe if any
8969     new_path="${new_path/%.exe/}"
8970     # Do not save /bin paths to all_fixpath_prefixes!
8971   else
8972     # Not in mixed or Windows style, start by that.
8973     new_path=`cmd //c echo $new_path`
8974 
8975   input_path="$new_path"
8976   # Check if we need to convert this using DOS-style short mode. If the path
8977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8978   # take no chances and rewrite it.
8979   # Note: m4 eats our [], so we need to use [ and ] instead.
8980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8981   if test "x$has_forbidden_chars" != x; then
8982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8983     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8984   fi
8985 
8986     # Output is in $new_path
8987 
8988   windows_path="$new_path"
8989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8990     unix_path=`$CYGPATH -u "$windows_path"`
8991     new_path="$unix_path"
8992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8994     new_path="$unix_path"
8995   fi
8996 
8997     # remove trailing .exe if any
8998     new_path="${new_path/%.exe/}"
8999 
9000     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9001     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9002   fi
9003 
9004   else
9005     # We're on a posix platform. Hooray! :)
9006     # First separate the path from the arguments. This will split at the first
9007     # space.
9008     complete="$FOUND_MAKE"
9009     path="${complete%% *}"
9010     tmp="$complete EOL"
9011     arguments="${tmp#* }"
9012 
9013     # Cannot rely on the command "which" here since it doesn't always work.
9014     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9015     if test -z "$is_absolute_path"; then
9016       # Path to executable is not absolute. Find it.
9017       IFS_save="$IFS"
9018       IFS=:
9019       for p in $PATH; do
9020         if test -f "$p/$path" && test -x "$p/$path"; then
9021           new_path="$p/$path"
9022           break
9023         fi
9024       done
9025       IFS="$IFS_save"
9026     else
9027       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9028 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9029       new_path="$path"
9030     fi
9031 
9032     if test "x$new_path" = x; then
9033       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9034 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9035       has_space=`$ECHO "$complete" | $GREP " "`
9036       if test "x$has_space" != x; then
9037         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9038 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9039       fi
9040       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9041     fi
9042   fi
9043 
9044   # Now join together the path and the arguments once again
9045   if test "x$arguments" != xEOL; then
9046     new_complete="$new_path ${arguments% *}"
9047   else
9048     new_complete="$new_path"
9049   fi
9050 
9051   if test "x$complete" != "x$new_complete"; then
9052     FOUND_MAKE="$new_complete"
9053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9054 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9055   fi
9056 
9057         fi
9058       fi
9059     fi
9060   fi
9061 
9062 
9063     if test "x$FOUND_MAKE" = x; then
9064       for ac_prog in make
9065 do
9066   # Extract the first word of "$ac_prog", so it can be a program name with args.
9067 set dummy $ac_prog; ac_word=$2
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9069 $as_echo_n "checking for $ac_word... " >&6; }
9070 if ${ac_cv_path_CHECK_MAKE+:} false; then :
9071   $as_echo_n "(cached) " >&6
9072 else
9073   case $CHECK_MAKE in
9074   [\\/]* | ?:[\\/]*)
9075   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9076   ;;
9077   *)
9078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9079 for as_dir in $PATH
9080 do
9081   IFS=$as_save_IFS
9082   test -z "$as_dir" && as_dir=.
9083     for ac_exec_ext in '' $ac_executable_extensions; do
9084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9085     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9087     break 2
9088   fi
9089 done
9090   done
9091 IFS=$as_save_IFS
9092 
9093   ;;
9094 esac
9095 fi
9096 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9097 if test -n "$CHECK_MAKE"; then
9098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9099 $as_echo "$CHECK_MAKE" >&6; }
9100 else
9101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9102 $as_echo "no" >&6; }
9103 fi
9104 
9105 
9106   test -n "$CHECK_MAKE" && break
9107 done
9108 
9109 
9110   MAKE_CANDIDATE=""$CHECK_MAKE""
9111   DESCRIPTION="make in PATH"
9112   if test "x$MAKE_CANDIDATE" != x; then
9113     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9114 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9115     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9116     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9117     if test "x$IS_GNU_MAKE" = x; then
9118       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9119 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9120     else
9121       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9122       if test "x$IS_MODERN_MAKE" = x; then
9123         { $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
9124 $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;}
9125       else
9126         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9127           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9128             MAKE_EXPECTED_ENV='cygwin'
9129           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9130             MAKE_EXPECTED_ENV='msys'
9131           else
9132             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9133           fi
9134           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9135           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9136         else
9137           # Not relevant for non-Windows
9138           IS_MAKE_CORRECT_ENV=true
9139         fi
9140         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9141           { $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
9142 $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;}
9143         else
9144           FOUND_MAKE=$MAKE_CANDIDATE
9145 
9146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9147 
9148   # First separate the path from the arguments. This will split at the first
9149   # space.
9150   complete="$FOUND_MAKE"
9151   path="${complete%% *}"
9152   tmp="$complete EOL"
9153   arguments="${tmp#* }"
9154 
9155   # Input might be given as Windows format, start by converting to
9156   # unix format.
9157   new_path=`$CYGPATH -u "$path"`
9158 
9159   # Now try to locate executable using which
9160   new_path=`$WHICH "$new_path" 2> /dev/null`
9161   # bat and cmd files are not always considered executable in cygwin causing which
9162   # to not find them
9163   if test "x$new_path" = x \
9164       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9165       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9166     new_path=`$CYGPATH -u "$path"`
9167   fi
9168   if test "x$new_path" = x; then
9169     # Oops. Which didn't find the executable.
9170     # The splitting of arguments from the executable at a space might have been incorrect,
9171     # since paths with space are more likely in Windows. Give it another try with the whole
9172     # argument.
9173     path="$complete"
9174     arguments="EOL"
9175     new_path=`$CYGPATH -u "$path"`
9176     new_path=`$WHICH "$new_path" 2> /dev/null`
9177     # bat and cmd files are not always considered executable in cygwin causing which
9178     # to not find them
9179     if test "x$new_path" = x \
9180         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9181         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9182       new_path=`$CYGPATH -u "$path"`
9183     fi
9184     if test "x$new_path" = x; then
9185       # It's still not found. Now this is an unrecoverable error.
9186       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9187 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9188       has_space=`$ECHO "$complete" | $GREP " "`
9189       if test "x$has_space" != x; then
9190         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9191 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9192       fi
9193       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9194     fi
9195   fi
9196 
9197   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9198   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9199   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9200   # "foo.exe" is OK but "foo" is an error.
9201   #
9202   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9203   # It is also a way to make sure we got the proper file name for the real test later on.
9204   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9205   if test "x$test_shortpath" = x; then
9206     # Short path failed, file does not exist as specified.
9207     # Try adding .exe or .cmd
9208     if test -f "${new_path}.exe"; then
9209       input_to_shortpath="${new_path}.exe"
9210     elif test -f "${new_path}.cmd"; then
9211       input_to_shortpath="${new_path}.cmd"
9212     else
9213       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9214 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9215       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9216 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9217       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9218     fi
9219   else
9220     input_to_shortpath="$new_path"
9221   fi
9222 
9223   # Call helper function which possibly converts this using DOS-style short mode.
9224   # If so, the updated path is stored in $new_path.
9225   new_path="$input_to_shortpath"
9226 
9227   input_path="$input_to_shortpath"
9228   # Check if we need to convert this using DOS-style short mode. If the path
9229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9230   # take no chances and rewrite it.
9231   # Note: m4 eats our [], so we need to use [ and ] instead.
9232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9233   if test "x$has_forbidden_chars" != x; then
9234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9238       # Going to short mode and back again did indeed matter. Since short mode is
9239       # case insensitive, let's make it lowercase to improve readability.
9240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9241       # Now convert it back to Unix-stile (cygpath)
9242       input_path=`$CYGPATH -u "$shortmode_path"`
9243       new_path="$input_path"
9244     fi
9245   fi
9246 
9247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9248   if test "x$test_cygdrive_prefix" = x; then
9249     # As a simple fix, exclude /usr/bin since it's not a real path.
9250     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9252       # a path prefixed by /cygdrive for fixpath to work.
9253       new_path="$CYGWIN_ROOT_PATH$input_path"
9254     fi
9255   fi
9256 
9257   # remove trailing .exe if any
9258   new_path="${new_path/%.exe/}"
9259 
9260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9261 
9262   # First separate the path from the arguments. This will split at the first
9263   # space.
9264   complete="$FOUND_MAKE"
9265   path="${complete%% *}"
9266   tmp="$complete EOL"
9267   arguments="${tmp#* }"
9268 
9269   # Input might be given as Windows format, start by converting to
9270   # unix format.
9271   new_path="$path"
9272 
9273   windows_path="$new_path"
9274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9275     unix_path=`$CYGPATH -u "$windows_path"`
9276     new_path="$unix_path"
9277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9279     new_path="$unix_path"
9280   fi
9281 
9282 
9283   # Now try to locate executable using which
9284   new_path=`$WHICH "$new_path" 2> /dev/null`
9285 
9286   if test "x$new_path" = x; then
9287     # Oops. Which didn't find the executable.
9288     # The splitting of arguments from the executable at a space might have been incorrect,
9289     # since paths with space are more likely in Windows. Give it another try with the whole
9290     # argument.
9291     path="$complete"
9292     arguments="EOL"
9293     new_path="$path"
9294 
9295   windows_path="$new_path"
9296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9297     unix_path=`$CYGPATH -u "$windows_path"`
9298     new_path="$unix_path"
9299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9301     new_path="$unix_path"
9302   fi
9303 
9304 
9305     new_path=`$WHICH "$new_path" 2> /dev/null`
9306 
9307     if test "x$new_path" = x; then
9308       # It's still not found. Now this is an unrecoverable error.
9309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9310 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9311       has_space=`$ECHO "$complete" | $GREP " "`
9312       if test "x$has_space" != x; then
9313         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9314 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9315       fi
9316       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9317     fi
9318   fi
9319 
9320   # Now new_path has a complete unix path to the binary
9321   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9322     # Keep paths in /bin as-is, but remove trailing .exe if any
9323     new_path="${new_path/%.exe/}"
9324     # Do not save /bin paths to all_fixpath_prefixes!
9325   else
9326     # Not in mixed or Windows style, start by that.
9327     new_path=`cmd //c echo $new_path`
9328 
9329   input_path="$new_path"
9330   # Check if we need to convert this using DOS-style short mode. If the path
9331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9332   # take no chances and rewrite it.
9333   # Note: m4 eats our [], so we need to use [ and ] instead.
9334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9335   if test "x$has_forbidden_chars" != x; then
9336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9337     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9338   fi
9339 
9340     # Output is in $new_path
9341 
9342   windows_path="$new_path"
9343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9344     unix_path=`$CYGPATH -u "$windows_path"`
9345     new_path="$unix_path"
9346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9348     new_path="$unix_path"
9349   fi
9350 
9351     # remove trailing .exe if any
9352     new_path="${new_path/%.exe/}"
9353 
9354     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9355     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9356   fi
9357 
9358   else
9359     # We're on a posix platform. Hooray! :)
9360     # First separate the path from the arguments. This will split at the first
9361     # space.
9362     complete="$FOUND_MAKE"
9363     path="${complete%% *}"
9364     tmp="$complete EOL"
9365     arguments="${tmp#* }"
9366 
9367     # Cannot rely on the command "which" here since it doesn't always work.
9368     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9369     if test -z "$is_absolute_path"; then
9370       # Path to executable is not absolute. Find it.
9371       IFS_save="$IFS"
9372       IFS=:
9373       for p in $PATH; do
9374         if test -f "$p/$path" && test -x "$p/$path"; then
9375           new_path="$p/$path"
9376           break
9377         fi
9378       done
9379       IFS="$IFS_save"
9380     else
9381       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9382 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9383       new_path="$path"
9384     fi
9385 
9386     if test "x$new_path" = x; then
9387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9388 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9389       has_space=`$ECHO "$complete" | $GREP " "`
9390       if test "x$has_space" != x; then
9391         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9392 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9393       fi
9394       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9395     fi
9396   fi
9397 
9398   # Now join together the path and the arguments once again
9399   if test "x$arguments" != xEOL; then
9400     new_complete="$new_path ${arguments% *}"
9401   else
9402     new_complete="$new_path"
9403   fi
9404 
9405   if test "x$complete" != "x$new_complete"; then
9406     FOUND_MAKE="$new_complete"
9407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9408 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9409   fi
9410 
9411         fi
9412       fi
9413     fi
9414   fi
9415 
9416     fi
9417 
9418     if test "x$FOUND_MAKE" = x; then
9419       if test "x$TOOLS_DIR" != x; then
9420         # We have a tools-dir, check that as well before giving up.
9421         OLD_PATH=$PATH
9422         PATH=$TOOLS_DIR:$PATH
9423         for ac_prog in gmake
9424 do
9425   # Extract the first word of "$ac_prog", so it can be a program name with args.
9426 set dummy $ac_prog; ac_word=$2
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9428 $as_echo_n "checking for $ac_word... " >&6; }
9429 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9430   $as_echo_n "(cached) " >&6
9431 else
9432   case $CHECK_TOOLSDIR_GMAKE in
9433   [\\/]* | ?:[\\/]*)
9434   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9435   ;;
9436   *)
9437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9438 for as_dir in $PATH
9439 do
9440   IFS=$as_save_IFS
9441   test -z "$as_dir" && as_dir=.
9442     for ac_exec_ext in '' $ac_executable_extensions; do
9443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9444     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9446     break 2
9447   fi
9448 done
9449   done
9450 IFS=$as_save_IFS
9451 
9452   ;;
9453 esac
9454 fi
9455 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9456 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9458 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9459 else
9460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461 $as_echo "no" >&6; }
9462 fi
9463 
9464 
9465   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9466 done
9467 
9468 
9469   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9470   DESCRIPTION="gmake in tools-dir"
9471   if test "x$MAKE_CANDIDATE" != x; then
9472     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9473 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9474     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9475     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9476     if test "x$IS_GNU_MAKE" = x; then
9477       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9478 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9479     else
9480       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9481       if test "x$IS_MODERN_MAKE" = x; then
9482         { $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
9483 $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;}
9484       else
9485         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9486           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9487             MAKE_EXPECTED_ENV='cygwin'
9488           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9489             MAKE_EXPECTED_ENV='msys'
9490           else
9491             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9492           fi
9493           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9494           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9495         else
9496           # Not relevant for non-Windows
9497           IS_MAKE_CORRECT_ENV=true
9498         fi
9499         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9500           { $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
9501 $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;}
9502         else
9503           FOUND_MAKE=$MAKE_CANDIDATE
9504 
9505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9506 
9507   # First separate the path from the arguments. This will split at the first
9508   # space.
9509   complete="$FOUND_MAKE"
9510   path="${complete%% *}"
9511   tmp="$complete EOL"
9512   arguments="${tmp#* }"
9513 
9514   # Input might be given as Windows format, start by converting to
9515   # unix format.
9516   new_path=`$CYGPATH -u "$path"`
9517 
9518   # Now try to locate executable using which
9519   new_path=`$WHICH "$new_path" 2> /dev/null`
9520   # bat and cmd files are not always considered executable in cygwin causing which
9521   # to not find them
9522   if test "x$new_path" = x \
9523       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9524       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9525     new_path=`$CYGPATH -u "$path"`
9526   fi
9527   if test "x$new_path" = x; then
9528     # Oops. Which didn't find the executable.
9529     # The splitting of arguments from the executable at a space might have been incorrect,
9530     # since paths with space are more likely in Windows. Give it another try with the whole
9531     # argument.
9532     path="$complete"
9533     arguments="EOL"
9534     new_path=`$CYGPATH -u "$path"`
9535     new_path=`$WHICH "$new_path" 2> /dev/null`
9536     # bat and cmd files are not always considered executable in cygwin causing which
9537     # to not find them
9538     if test "x$new_path" = x \
9539         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9540         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9541       new_path=`$CYGPATH -u "$path"`
9542     fi
9543     if test "x$new_path" = x; then
9544       # It's still not found. Now this is an unrecoverable error.
9545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9546 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9547       has_space=`$ECHO "$complete" | $GREP " "`
9548       if test "x$has_space" != x; then
9549         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9550 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9551       fi
9552       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9553     fi
9554   fi
9555 
9556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9559   # "foo.exe" is OK but "foo" is an error.
9560   #
9561   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9562   # It is also a way to make sure we got the proper file name for the real test later on.
9563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9564   if test "x$test_shortpath" = x; then
9565     # Short path failed, file does not exist as specified.
9566     # Try adding .exe or .cmd
9567     if test -f "${new_path}.exe"; then
9568       input_to_shortpath="${new_path}.exe"
9569     elif test -f "${new_path}.cmd"; then
9570       input_to_shortpath="${new_path}.cmd"
9571     else
9572       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9573 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9574       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9575 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9576       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9577     fi
9578   else
9579     input_to_shortpath="$new_path"
9580   fi
9581 
9582   # Call helper function which possibly converts this using DOS-style short mode.
9583   # If so, the updated path is stored in $new_path.
9584   new_path="$input_to_shortpath"
9585 
9586   input_path="$input_to_shortpath"
9587   # Check if we need to convert this using DOS-style short mode. If the path
9588   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9589   # take no chances and rewrite it.
9590   # Note: m4 eats our [], so we need to use [ and ] instead.
9591   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9592   if test "x$has_forbidden_chars" != x; then
9593     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9594     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9595     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9596     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9597       # Going to short mode and back again did indeed matter. Since short mode is
9598       # case insensitive, let's make it lowercase to improve readability.
9599       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9600       # Now convert it back to Unix-stile (cygpath)
9601       input_path=`$CYGPATH -u "$shortmode_path"`
9602       new_path="$input_path"
9603     fi
9604   fi
9605 
9606   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9607   if test "x$test_cygdrive_prefix" = x; then
9608     # As a simple fix, exclude /usr/bin since it's not a real path.
9609     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9610       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9611       # a path prefixed by /cygdrive for fixpath to work.
9612       new_path="$CYGWIN_ROOT_PATH$input_path"
9613     fi
9614   fi
9615 
9616   # remove trailing .exe if any
9617   new_path="${new_path/%.exe/}"
9618 
9619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9620 
9621   # First separate the path from the arguments. This will split at the first
9622   # space.
9623   complete="$FOUND_MAKE"
9624   path="${complete%% *}"
9625   tmp="$complete EOL"
9626   arguments="${tmp#* }"
9627 
9628   # Input might be given as Windows format, start by converting to
9629   # unix format.
9630   new_path="$path"
9631 
9632   windows_path="$new_path"
9633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9634     unix_path=`$CYGPATH -u "$windows_path"`
9635     new_path="$unix_path"
9636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9638     new_path="$unix_path"
9639   fi
9640 
9641 
9642   # Now try to locate executable using which
9643   new_path=`$WHICH "$new_path" 2> /dev/null`
9644 
9645   if test "x$new_path" = x; then
9646     # Oops. Which didn't find the executable.
9647     # The splitting of arguments from the executable at a space might have been incorrect,
9648     # since paths with space are more likely in Windows. Give it another try with the whole
9649     # argument.
9650     path="$complete"
9651     arguments="EOL"
9652     new_path="$path"
9653 
9654   windows_path="$new_path"
9655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9656     unix_path=`$CYGPATH -u "$windows_path"`
9657     new_path="$unix_path"
9658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9660     new_path="$unix_path"
9661   fi
9662 
9663 
9664     new_path=`$WHICH "$new_path" 2> /dev/null`
9665 
9666     if test "x$new_path" = x; then
9667       # It's still not found. Now this is an unrecoverable error.
9668       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9669 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9670       has_space=`$ECHO "$complete" | $GREP " "`
9671       if test "x$has_space" != x; then
9672         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9673 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9674       fi
9675       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9676     fi
9677   fi
9678 
9679   # Now new_path has a complete unix path to the binary
9680   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9681     # Keep paths in /bin as-is, but remove trailing .exe if any
9682     new_path="${new_path/%.exe/}"
9683     # Do not save /bin paths to all_fixpath_prefixes!
9684   else
9685     # Not in mixed or Windows style, start by that.
9686     new_path=`cmd //c echo $new_path`
9687 
9688   input_path="$new_path"
9689   # Check if we need to convert this using DOS-style short mode. If the path
9690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9691   # take no chances and rewrite it.
9692   # Note: m4 eats our [], so we need to use [ and ] instead.
9693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9694   if test "x$has_forbidden_chars" != x; then
9695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9696     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9697   fi
9698 
9699     # Output is in $new_path
9700 
9701   windows_path="$new_path"
9702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9703     unix_path=`$CYGPATH -u "$windows_path"`
9704     new_path="$unix_path"
9705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9706     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9707     new_path="$unix_path"
9708   fi
9709 
9710     # remove trailing .exe if any
9711     new_path="${new_path/%.exe/}"
9712 
9713     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9714     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9715   fi
9716 
9717   else
9718     # We're on a posix platform. Hooray! :)
9719     # First separate the path from the arguments. This will split at the first
9720     # space.
9721     complete="$FOUND_MAKE"
9722     path="${complete%% *}"
9723     tmp="$complete EOL"
9724     arguments="${tmp#* }"
9725 
9726     # Cannot rely on the command "which" here since it doesn't always work.
9727     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9728     if test -z "$is_absolute_path"; then
9729       # Path to executable is not absolute. Find it.
9730       IFS_save="$IFS"
9731       IFS=:
9732       for p in $PATH; do
9733         if test -f "$p/$path" && test -x "$p/$path"; then
9734           new_path="$p/$path"
9735           break
9736         fi
9737       done
9738       IFS="$IFS_save"
9739     else
9740       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9741 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9742       new_path="$path"
9743     fi
9744 
9745     if test "x$new_path" = x; then
9746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9747 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9748       has_space=`$ECHO "$complete" | $GREP " "`
9749       if test "x$has_space" != x; then
9750         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9751 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9752       fi
9753       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9754     fi
9755   fi
9756 
9757   # Now join together the path and the arguments once again
9758   if test "x$arguments" != xEOL; then
9759     new_complete="$new_path ${arguments% *}"
9760   else
9761     new_complete="$new_path"
9762   fi
9763 
9764   if test "x$complete" != "x$new_complete"; then
9765     FOUND_MAKE="$new_complete"
9766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9767 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9768   fi
9769 
9770         fi
9771       fi
9772     fi
9773   fi
9774 
9775         if test "x$FOUND_MAKE" = x; then
9776           for ac_prog in make
9777 do
9778   # Extract the first word of "$ac_prog", so it can be a program name with args.
9779 set dummy $ac_prog; ac_word=$2
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781 $as_echo_n "checking for $ac_word... " >&6; }
9782 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9783   $as_echo_n "(cached) " >&6
9784 else
9785   case $CHECK_TOOLSDIR_MAKE in
9786   [\\/]* | ?:[\\/]*)
9787   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9788   ;;
9789   *)
9790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791 for as_dir in $PATH
9792 do
9793   IFS=$as_save_IFS
9794   test -z "$as_dir" && as_dir=.
9795     for ac_exec_ext in '' $ac_executable_extensions; do
9796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799     break 2
9800   fi
9801 done
9802   done
9803 IFS=$as_save_IFS
9804 
9805   ;;
9806 esac
9807 fi
9808 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9809 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9811 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9812 else
9813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814 $as_echo "no" >&6; }
9815 fi
9816 
9817 
9818   test -n "$CHECK_TOOLSDIR_MAKE" && break
9819 done
9820 
9821 
9822   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9823   DESCRIPTION="make in tools-dir"
9824   if test "x$MAKE_CANDIDATE" != x; then
9825     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9826 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9827     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9828     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9829     if test "x$IS_GNU_MAKE" = x; then
9830       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9831 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9832     else
9833       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9834       if test "x$IS_MODERN_MAKE" = x; then
9835         { $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
9836 $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;}
9837       else
9838         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9839           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9840             MAKE_EXPECTED_ENV='cygwin'
9841           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9842             MAKE_EXPECTED_ENV='msys'
9843           else
9844             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9845           fi
9846           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9847           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9848         else
9849           # Not relevant for non-Windows
9850           IS_MAKE_CORRECT_ENV=true
9851         fi
9852         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9853           { $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
9854 $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;}
9855         else
9856           FOUND_MAKE=$MAKE_CANDIDATE
9857 
9858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9859 
9860   # First separate the path from the arguments. This will split at the first
9861   # space.
9862   complete="$FOUND_MAKE"
9863   path="${complete%% *}"
9864   tmp="$complete EOL"
9865   arguments="${tmp#* }"
9866 
9867   # Input might be given as Windows format, start by converting to
9868   # unix format.
9869   new_path=`$CYGPATH -u "$path"`
9870 
9871   # Now try to locate executable using which
9872   new_path=`$WHICH "$new_path" 2> /dev/null`
9873   # bat and cmd files are not always considered executable in cygwin causing which
9874   # to not find them
9875   if test "x$new_path" = x \
9876       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9877       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9878     new_path=`$CYGPATH -u "$path"`
9879   fi
9880   if test "x$new_path" = x; then
9881     # Oops. Which didn't find the executable.
9882     # The splitting of arguments from the executable at a space might have been incorrect,
9883     # since paths with space are more likely in Windows. Give it another try with the whole
9884     # argument.
9885     path="$complete"
9886     arguments="EOL"
9887     new_path=`$CYGPATH -u "$path"`
9888     new_path=`$WHICH "$new_path" 2> /dev/null`
9889     # bat and cmd files are not always considered executable in cygwin causing which
9890     # to not find them
9891     if test "x$new_path" = x \
9892         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9893         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9894       new_path=`$CYGPATH -u "$path"`
9895     fi
9896     if test "x$new_path" = x; then
9897       # It's still not found. Now this is an unrecoverable error.
9898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9899 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9900       has_space=`$ECHO "$complete" | $GREP " "`
9901       if test "x$has_space" != x; then
9902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9904       fi
9905       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9906     fi
9907   fi
9908 
9909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9912   # "foo.exe" is OK but "foo" is an error.
9913   #
9914   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9915   # It is also a way to make sure we got the proper file name for the real test later on.
9916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9917   if test "x$test_shortpath" = x; then
9918     # Short path failed, file does not exist as specified.
9919     # Try adding .exe or .cmd
9920     if test -f "${new_path}.exe"; then
9921       input_to_shortpath="${new_path}.exe"
9922     elif test -f "${new_path}.cmd"; then
9923       input_to_shortpath="${new_path}.cmd"
9924     else
9925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9926 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9927       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9928 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9929       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9930     fi
9931   else
9932     input_to_shortpath="$new_path"
9933   fi
9934 
9935   # Call helper function which possibly converts this using DOS-style short mode.
9936   # If so, the updated path is stored in $new_path.
9937   new_path="$input_to_shortpath"
9938 
9939   input_path="$input_to_shortpath"
9940   # Check if we need to convert this using DOS-style short mode. If the path
9941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9942   # take no chances and rewrite it.
9943   # Note: m4 eats our [], so we need to use [ and ] instead.
9944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9945   if test "x$has_forbidden_chars" != x; then
9946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9947     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9948     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9949     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9950       # Going to short mode and back again did indeed matter. Since short mode is
9951       # case insensitive, let's make it lowercase to improve readability.
9952       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9953       # Now convert it back to Unix-stile (cygpath)
9954       input_path=`$CYGPATH -u "$shortmode_path"`
9955       new_path="$input_path"
9956     fi
9957   fi
9958 
9959   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9960   if test "x$test_cygdrive_prefix" = x; then
9961     # As a simple fix, exclude /usr/bin since it's not a real path.
9962     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9963       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9964       # a path prefixed by /cygdrive for fixpath to work.
9965       new_path="$CYGWIN_ROOT_PATH$input_path"
9966     fi
9967   fi
9968 
9969   # remove trailing .exe if any
9970   new_path="${new_path/%.exe/}"
9971 
9972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9973 
9974   # First separate the path from the arguments. This will split at the first
9975   # space.
9976   complete="$FOUND_MAKE"
9977   path="${complete%% *}"
9978   tmp="$complete EOL"
9979   arguments="${tmp#* }"
9980 
9981   # Input might be given as Windows format, start by converting to
9982   # unix format.
9983   new_path="$path"
9984 
9985   windows_path="$new_path"
9986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9987     unix_path=`$CYGPATH -u "$windows_path"`
9988     new_path="$unix_path"
9989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9990     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9991     new_path="$unix_path"
9992   fi
9993 
9994 
9995   # Now try to locate executable using which
9996   new_path=`$WHICH "$new_path" 2> /dev/null`
9997 
9998   if test "x$new_path" = x; then
9999     # Oops. Which didn't find the executable.
10000     # The splitting of arguments from the executable at a space might have been incorrect,
10001     # since paths with space are more likely in Windows. Give it another try with the whole
10002     # argument.
10003     path="$complete"
10004     arguments="EOL"
10005     new_path="$path"
10006 
10007   windows_path="$new_path"
10008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10009     unix_path=`$CYGPATH -u "$windows_path"`
10010     new_path="$unix_path"
10011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10013     new_path="$unix_path"
10014   fi
10015 
10016 
10017     new_path=`$WHICH "$new_path" 2> /dev/null`
10018 
10019     if test "x$new_path" = x; then
10020       # It's still not found. Now this is an unrecoverable error.
10021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10022 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10023       has_space=`$ECHO "$complete" | $GREP " "`
10024       if test "x$has_space" != x; then
10025         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10026 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10027       fi
10028       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10029     fi
10030   fi
10031 
10032   # Now new_path has a complete unix path to the binary
10033   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10034     # Keep paths in /bin as-is, but remove trailing .exe if any
10035     new_path="${new_path/%.exe/}"
10036     # Do not save /bin paths to all_fixpath_prefixes!
10037   else
10038     # Not in mixed or Windows style, start by that.
10039     new_path=`cmd //c echo $new_path`
10040 
10041   input_path="$new_path"
10042   # Check if we need to convert this using DOS-style short mode. If the path
10043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10044   # take no chances and rewrite it.
10045   # Note: m4 eats our [], so we need to use [ and ] instead.
10046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10047   if test "x$has_forbidden_chars" != x; then
10048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10049     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10050   fi
10051 
10052     # Output is in $new_path
10053 
10054   windows_path="$new_path"
10055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10056     unix_path=`$CYGPATH -u "$windows_path"`
10057     new_path="$unix_path"
10058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10060     new_path="$unix_path"
10061   fi
10062 
10063     # remove trailing .exe if any
10064     new_path="${new_path/%.exe/}"
10065 
10066     # Save the first 10 bytes of this path to the storage, so fixpath can work.
10067     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10068   fi
10069 
10070   else
10071     # We're on a posix platform. Hooray! :)
10072     # First separate the path from the arguments. This will split at the first
10073     # space.
10074     complete="$FOUND_MAKE"
10075     path="${complete%% *}"
10076     tmp="$complete EOL"
10077     arguments="${tmp#* }"
10078 
10079     # Cannot rely on the command "which" here since it doesn't always work.
10080     is_absolute_path=`$ECHO "$path" | $GREP ^/`
10081     if test -z "$is_absolute_path"; then
10082       # Path to executable is not absolute. Find it.
10083       IFS_save="$IFS"
10084       IFS=:
10085       for p in $PATH; do
10086         if test -f "$p/$path" && test -x "$p/$path"; then
10087           new_path="$p/$path"
10088           break
10089         fi
10090       done
10091       IFS="$IFS_save"
10092     else
10093       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10094 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10095       new_path="$path"
10096     fi
10097 
10098     if test "x$new_path" = x; then
10099       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10100 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10101       has_space=`$ECHO "$complete" | $GREP " "`
10102       if test "x$has_space" != x; then
10103         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10104 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10105       fi
10106       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10107     fi
10108   fi
10109 
10110   # Now join together the path and the arguments once again
10111   if test "x$arguments" != xEOL; then
10112     new_complete="$new_path ${arguments% *}"
10113   else
10114     new_complete="$new_path"
10115   fi
10116 
10117   if test "x$complete" != "x$new_complete"; then
10118     FOUND_MAKE="$new_complete"
10119     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10120 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10121   fi
10122 
10123         fi
10124       fi
10125     fi
10126   fi
10127 
10128         fi
10129         PATH=$OLD_PATH
10130       fi
10131     fi
10132 
10133     if test "x$FOUND_MAKE" = x; then
10134       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
10135     fi
10136   fi
10137 
10138   MAKE=$FOUND_MAKE
10139 
10140   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10141 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10142 
10143 
10144 
10145   # Test if find supports -delete
10146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10147 $as_echo_n "checking if find supports -delete... " >&6; }
10148   FIND_DELETE="-delete"
10149 
10150   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10151 
10152   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10153 
10154   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10155   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10156     # No, it does not.
10157     rm $DELETEDIR/TestIfFindSupportsDelete
10158     FIND_DELETE="-exec rm \{\} \+"
10159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10160 $as_echo "no" >&6; }
10161   else
10162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10163 $as_echo "yes" >&6; }
10164   fi
10165   rmdir $DELETEDIR
10166 
10167 
10168 
10169   # These tools might not be installed by default,
10170   # need hint on how to install them.
10171 
10172   for ac_prog in unzip
10173 do
10174   # Extract the first word of "$ac_prog", so it can be a program name with args.
10175 set dummy $ac_prog; ac_word=$2
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10177 $as_echo_n "checking for $ac_word... " >&6; }
10178 if ${ac_cv_path_UNZIP+:} false; then :
10179   $as_echo_n "(cached) " >&6
10180 else
10181   case $UNZIP in
10182   [\\/]* | ?:[\\/]*)
10183   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10184   ;;
10185   *)
10186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10187 for as_dir in $PATH
10188 do
10189   IFS=$as_save_IFS
10190   test -z "$as_dir" && as_dir=.
10191     for ac_exec_ext in '' $ac_executable_extensions; do
10192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10193     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10195     break 2
10196   fi
10197 done
10198   done
10199 IFS=$as_save_IFS
10200 
10201   ;;
10202 esac
10203 fi
10204 UNZIP=$ac_cv_path_UNZIP
10205 if test -n "$UNZIP"; then
10206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10207 $as_echo "$UNZIP" >&6; }
10208 else
10209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210 $as_echo "no" >&6; }
10211 fi
10212 
10213 
10214   test -n "$UNZIP" && break
10215 done
10216 
10217 
10218   if test "x$UNZIP" = x; then
10219     if test "xunzip" = x; then
10220       PROG_NAME=unzip
10221     else
10222       PROG_NAME=unzip
10223     fi
10224     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10225 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10226     as_fn_error $? "Cannot continue" "$LINENO" 5
10227   fi
10228 
10229 
10230 
10231   for ac_prog in zip
10232 do
10233   # Extract the first word of "$ac_prog", so it can be a program name with args.
10234 set dummy $ac_prog; ac_word=$2
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10236 $as_echo_n "checking for $ac_word... " >&6; }
10237 if ${ac_cv_path_ZIP+:} false; then :
10238   $as_echo_n "(cached) " >&6
10239 else
10240   case $ZIP in
10241   [\\/]* | ?:[\\/]*)
10242   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10243   ;;
10244   *)
10245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10246 for as_dir in $PATH
10247 do
10248   IFS=$as_save_IFS
10249   test -z "$as_dir" && as_dir=.
10250     for ac_exec_ext in '' $ac_executable_extensions; do
10251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10252     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10254     break 2
10255   fi
10256 done
10257   done
10258 IFS=$as_save_IFS
10259 
10260   ;;
10261 esac
10262 fi
10263 ZIP=$ac_cv_path_ZIP
10264 if test -n "$ZIP"; then
10265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10266 $as_echo "$ZIP" >&6; }
10267 else
10268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269 $as_echo "no" >&6; }
10270 fi
10271 
10272 
10273   test -n "$ZIP" && break
10274 done
10275 
10276 
10277   if test "x$ZIP" = x; then
10278     if test "xzip" = x; then
10279       PROG_NAME=zip
10280     else
10281       PROG_NAME=zip
10282     fi
10283     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10284 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10285     as_fn_error $? "Cannot continue" "$LINENO" 5
10286   fi
10287 
10288 
10289 
10290   # Non-required basic tools
10291 
10292   # Extract the first word of "ldd", so it can be a program name with args.
10293 set dummy ldd; ac_word=$2
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295 $as_echo_n "checking for $ac_word... " >&6; }
10296 if ${ac_cv_path_LDD+:} false; then :
10297   $as_echo_n "(cached) " >&6
10298 else
10299   case $LDD in
10300   [\\/]* | ?:[\\/]*)
10301   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10302   ;;
10303   *)
10304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305 for as_dir in $PATH
10306 do
10307   IFS=$as_save_IFS
10308   test -z "$as_dir" && as_dir=.
10309     for ac_exec_ext in '' $ac_executable_extensions; do
10310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313     break 2
10314   fi
10315 done
10316   done
10317 IFS=$as_save_IFS
10318 
10319   ;;
10320 esac
10321 fi
10322 LDD=$ac_cv_path_LDD
10323 if test -n "$LDD"; then
10324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10325 $as_echo "$LDD" >&6; }
10326 else
10327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328 $as_echo "no" >&6; }
10329 fi
10330 
10331 
10332   if test "x$LDD" = "x"; then
10333     # List shared lib dependencies is used for
10334     # debug output and checking for forbidden dependencies.
10335     # We can build without it.
10336     LDD="true"
10337   fi
10338   for ac_prog in readelf greadelf
10339 do
10340   # Extract the first word of "$ac_prog", so it can be a program name with args.
10341 set dummy $ac_prog; ac_word=$2
10342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10343 $as_echo_n "checking for $ac_word... " >&6; }
10344 if ${ac_cv_path_READELF+:} false; then :
10345   $as_echo_n "(cached) " >&6
10346 else
10347   case $READELF in
10348   [\\/]* | ?:[\\/]*)
10349   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10350   ;;
10351   *)
10352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10353 for as_dir in $PATH
10354 do
10355   IFS=$as_save_IFS
10356   test -z "$as_dir" && as_dir=.
10357     for ac_exec_ext in '' $ac_executable_extensions; do
10358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10359     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10361     break 2
10362   fi
10363 done
10364   done
10365 IFS=$as_save_IFS
10366 
10367   ;;
10368 esac
10369 fi
10370 READELF=$ac_cv_path_READELF
10371 if test -n "$READELF"; then
10372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10373 $as_echo "$READELF" >&6; }
10374 else
10375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376 $as_echo "no" >&6; }
10377 fi
10378 
10379 
10380   test -n "$READELF" && break
10381 done
10382 
10383   # Extract the first word of "hg", so it can be a program name with args.
10384 set dummy hg; ac_word=$2
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10386 $as_echo_n "checking for $ac_word... " >&6; }
10387 if ${ac_cv_path_HG+:} false; then :
10388   $as_echo_n "(cached) " >&6
10389 else
10390   case $HG in
10391   [\\/]* | ?:[\\/]*)
10392   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10393   ;;
10394   *)
10395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10396 for as_dir in $PATH
10397 do
10398   IFS=$as_save_IFS
10399   test -z "$as_dir" && as_dir=.
10400     for ac_exec_ext in '' $ac_executable_extensions; do
10401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10402     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10404     break 2
10405   fi
10406 done
10407   done
10408 IFS=$as_save_IFS
10409 
10410   ;;
10411 esac
10412 fi
10413 HG=$ac_cv_path_HG
10414 if test -n "$HG"; then
10415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10416 $as_echo "$HG" >&6; }
10417 else
10418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419 $as_echo "no" >&6; }
10420 fi
10421 
10422 
10423   # Extract the first word of "stat", so it can be a program name with args.
10424 set dummy stat; ac_word=$2
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426 $as_echo_n "checking for $ac_word... " >&6; }
10427 if ${ac_cv_path_STAT+:} false; then :
10428   $as_echo_n "(cached) " >&6
10429 else
10430   case $STAT in
10431   [\\/]* | ?:[\\/]*)
10432   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10433   ;;
10434   *)
10435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436 for as_dir in $PATH
10437 do
10438   IFS=$as_save_IFS
10439   test -z "$as_dir" && as_dir=.
10440     for ac_exec_ext in '' $ac_executable_extensions; do
10441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444     break 2
10445   fi
10446 done
10447   done
10448 IFS=$as_save_IFS
10449 
10450   ;;
10451 esac
10452 fi
10453 STAT=$ac_cv_path_STAT
10454 if test -n "$STAT"; then
10455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10456 $as_echo "$STAT" >&6; }
10457 else
10458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459 $as_echo "no" >&6; }
10460 fi
10461 
10462 
10463   # Extract the first word of "time", so it can be a program name with args.
10464 set dummy time; ac_word=$2
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10466 $as_echo_n "checking for $ac_word... " >&6; }
10467 if ${ac_cv_path_TIME+:} false; then :
10468   $as_echo_n "(cached) " >&6
10469 else
10470   case $TIME in
10471   [\\/]* | ?:[\\/]*)
10472   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10473   ;;
10474   *)
10475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10476 for as_dir in $PATH
10477 do
10478   IFS=$as_save_IFS
10479   test -z "$as_dir" && as_dir=.
10480     for ac_exec_ext in '' $ac_executable_extensions; do
10481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10482     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10484     break 2
10485   fi
10486 done
10487   done
10488 IFS=$as_save_IFS
10489 
10490   ;;
10491 esac
10492 fi
10493 TIME=$ac_cv_path_TIME
10494 if test -n "$TIME"; then
10495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10496 $as_echo "$TIME" >&6; }
10497 else
10498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499 $as_echo "no" >&6; }
10500 fi
10501 
10502 
10503   # Check if it's GNU time
10504   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10505   if test "x$IS_GNU_TIME" != x; then
10506     IS_GNU_TIME=yes
10507   else
10508     IS_GNU_TIME=no
10509   fi
10510 
10511 
10512   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10513 
10514   for ac_prog in comm
10515 do
10516   # Extract the first word of "$ac_prog", so it can be a program name with args.
10517 set dummy $ac_prog; ac_word=$2
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10519 $as_echo_n "checking for $ac_word... " >&6; }
10520 if ${ac_cv_path_COMM+:} false; then :
10521   $as_echo_n "(cached) " >&6
10522 else
10523   case $COMM in
10524   [\\/]* | ?:[\\/]*)
10525   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10526   ;;
10527   *)
10528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10529 for as_dir in $PATH
10530 do
10531   IFS=$as_save_IFS
10532   test -z "$as_dir" && as_dir=.
10533     for ac_exec_ext in '' $ac_executable_extensions; do
10534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10535     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10537     break 2
10538   fi
10539 done
10540   done
10541 IFS=$as_save_IFS
10542 
10543   ;;
10544 esac
10545 fi
10546 COMM=$ac_cv_path_COMM
10547 if test -n "$COMM"; then
10548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10549 $as_echo "$COMM" >&6; }
10550 else
10551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10552 $as_echo "no" >&6; }
10553 fi
10554 
10555 
10556   test -n "$COMM" && break
10557 done
10558 
10559 
10560   if test "x$COMM" = x; then
10561     if test "xcomm" = x; then
10562       PROG_NAME=comm
10563     else
10564       PROG_NAME=comm
10565     fi
10566     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10567 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10568     as_fn_error $? "Cannot continue" "$LINENO" 5
10569   fi
10570 
10571 
10572   fi
10573 
10574   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10575 
10576   for ac_prog in dsymutil
10577 do
10578   # Extract the first word of "$ac_prog", so it can be a program name with args.
10579 set dummy $ac_prog; ac_word=$2
10580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10581 $as_echo_n "checking for $ac_word... " >&6; }
10582 if ${ac_cv_path_DSYMUTIL+:} false; then :
10583   $as_echo_n "(cached) " >&6
10584 else
10585   case $DSYMUTIL in
10586   [\\/]* | ?:[\\/]*)
10587   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10588   ;;
10589   *)
10590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10591 for as_dir in $PATH
10592 do
10593   IFS=$as_save_IFS
10594   test -z "$as_dir" && as_dir=.
10595     for ac_exec_ext in '' $ac_executable_extensions; do
10596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10597     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10599     break 2
10600   fi
10601 done
10602   done
10603 IFS=$as_save_IFS
10604 
10605   ;;
10606 esac
10607 fi
10608 DSYMUTIL=$ac_cv_path_DSYMUTIL
10609 if test -n "$DSYMUTIL"; then
10610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10611 $as_echo "$DSYMUTIL" >&6; }
10612 else
10613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614 $as_echo "no" >&6; }
10615 fi
10616 
10617 
10618   test -n "$DSYMUTIL" && break
10619 done
10620 
10621 
10622   if test "x$DSYMUTIL" = x; then
10623     if test "xdsymutil" = x; then
10624       PROG_NAME=dsymutil
10625     else
10626       PROG_NAME=dsymutil
10627     fi
10628     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10629 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10630     as_fn_error $? "Cannot continue" "$LINENO" 5
10631   fi
10632 
10633 
10634 
10635   for ac_prog in xattr
10636 do
10637   # Extract the first word of "$ac_prog", so it can be a program name with args.
10638 set dummy $ac_prog; ac_word=$2
10639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10640 $as_echo_n "checking for $ac_word... " >&6; }
10641 if ${ac_cv_path_XATTR+:} false; then :
10642   $as_echo_n "(cached) " >&6
10643 else
10644   case $XATTR in
10645   [\\/]* | ?:[\\/]*)
10646   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10647   ;;
10648   *)
10649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10650 for as_dir in $PATH
10651 do
10652   IFS=$as_save_IFS
10653   test -z "$as_dir" && as_dir=.
10654     for ac_exec_ext in '' $ac_executable_extensions; do
10655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10656     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10658     break 2
10659   fi
10660 done
10661   done
10662 IFS=$as_save_IFS
10663 
10664   ;;
10665 esac
10666 fi
10667 XATTR=$ac_cv_path_XATTR
10668 if test -n "$XATTR"; then
10669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10670 $as_echo "$XATTR" >&6; }
10671 else
10672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10673 $as_echo "no" >&6; }
10674 fi
10675 
10676 
10677   test -n "$XATTR" && break
10678 done
10679 
10680 
10681   if test "x$XATTR" = x; then
10682     if test "xxattr" = x; then
10683       PROG_NAME=xattr
10684     else
10685       PROG_NAME=xattr
10686     fi
10687     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10688 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10689     as_fn_error $? "Cannot continue" "$LINENO" 5
10690   fi
10691 
10692 
10693     # Extract the first word of "codesign", so it can be a program name with args.
10694 set dummy codesign; ac_word=$2
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10696 $as_echo_n "checking for $ac_word... " >&6; }
10697 if ${ac_cv_path_CODESIGN+:} false; then :
10698   $as_echo_n "(cached) " >&6
10699 else
10700   case $CODESIGN in
10701   [\\/]* | ?:[\\/]*)
10702   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10703   ;;
10704   *)
10705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706 for as_dir in $PATH
10707 do
10708   IFS=$as_save_IFS
10709   test -z "$as_dir" && as_dir=.
10710     for ac_exec_ext in '' $ac_executable_extensions; do
10711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10712     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10714     break 2
10715   fi
10716 done
10717   done
10718 IFS=$as_save_IFS
10719 
10720   ;;
10721 esac
10722 fi
10723 CODESIGN=$ac_cv_path_CODESIGN
10724 if test -n "$CODESIGN"; then
10725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10726 $as_echo "$CODESIGN" >&6; }
10727 else
10728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729 $as_echo "no" >&6; }
10730 fi
10731 
10732 
10733     if test "x$CODESIGN" != "x"; then
10734       # Verify that the openjdk_codesign certificate is present
10735       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10736 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10737       rm -f codesign-testfile
10738       touch codesign-testfile
10739       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10740       rm -f codesign-testfile
10741       if test "x$CODESIGN" = x; then
10742         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743 $as_echo "no" >&6; }
10744       else
10745         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10746 $as_echo "yes" >&6; }
10747       fi
10748     fi
10749   fi
10750 
10751 
10752 # Check if pkg-config is available.
10753 
10754 
10755 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10756         if test -n "$ac_tool_prefix"; then
10757   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10758 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10760 $as_echo_n "checking for $ac_word... " >&6; }
10761 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10762   $as_echo_n "(cached) " >&6
10763 else
10764   case $PKG_CONFIG in
10765   [\\/]* | ?:[\\/]*)
10766   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10767   ;;
10768   *)
10769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10770 for as_dir in $PATH
10771 do
10772   IFS=$as_save_IFS
10773   test -z "$as_dir" && as_dir=.
10774     for ac_exec_ext in '' $ac_executable_extensions; do
10775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10776     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10778     break 2
10779   fi
10780 done
10781   done
10782 IFS=$as_save_IFS
10783 
10784   ;;
10785 esac
10786 fi
10787 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10788 if test -n "$PKG_CONFIG"; then
10789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10790 $as_echo "$PKG_CONFIG" >&6; }
10791 else
10792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10793 $as_echo "no" >&6; }
10794 fi
10795 
10796 
10797 fi
10798 if test -z "$ac_cv_path_PKG_CONFIG"; then
10799   ac_pt_PKG_CONFIG=$PKG_CONFIG
10800   # Extract the first word of "pkg-config", so it can be a program name with args.
10801 set dummy pkg-config; ac_word=$2
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10803 $as_echo_n "checking for $ac_word... " >&6; }
10804 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10805   $as_echo_n "(cached) " >&6
10806 else
10807   case $ac_pt_PKG_CONFIG in
10808   [\\/]* | ?:[\\/]*)
10809   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10810   ;;
10811   *)
10812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10813 for as_dir in $PATH
10814 do
10815   IFS=$as_save_IFS
10816   test -z "$as_dir" && as_dir=.
10817     for ac_exec_ext in '' $ac_executable_extensions; do
10818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10819     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10821     break 2
10822   fi
10823 done
10824   done
10825 IFS=$as_save_IFS
10826 
10827   ;;
10828 esac
10829 fi
10830 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10831 if test -n "$ac_pt_PKG_CONFIG"; then
10832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10833 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10834 else
10835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10836 $as_echo "no" >&6; }
10837 fi
10838 
10839   if test "x$ac_pt_PKG_CONFIG" = x; then
10840     PKG_CONFIG=""
10841   else
10842     case $cross_compiling:$ac_tool_warned in
10843 yes:)
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10845 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10846 ac_tool_warned=yes ;;
10847 esac
10848     PKG_CONFIG=$ac_pt_PKG_CONFIG
10849   fi
10850 else
10851   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10852 fi
10853 
10854 fi
10855 if test -n "$PKG_CONFIG"; then
10856         _pkg_min_version=0.9.0
10857         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10858 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10859         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10860                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10861 $as_echo "yes" >&6; }
10862         else
10863                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10864 $as_echo "no" >&6; }
10865                 PKG_CONFIG=""
10866         fi
10867 
10868 fi
10869 
10870 # After basic tools have been setup, we can check build os specific details.
10871 
10872   ###############################################################################
10873 
10874   # Note that this is the build platform OS version!
10875 
10876   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10877   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10878   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10879   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10880 
10881 
10882 
10883 
10884 
10885 # Setup builddeps, for automatic downloading of tools we need.
10886 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10887 # boot-jdk setup, but we need to have basic tools setup first.
10888 
10889 
10890 # Check whether --with-builddeps-conf was given.
10891 if test "${with_builddeps_conf+set}" = set; then :
10892   withval=$with_builddeps_conf;
10893 fi
10894 
10895 
10896 
10897 # Check whether --with-builddeps-server was given.
10898 if test "${with_builddeps_server+set}" = set; then :
10899   withval=$with_builddeps_server;
10900 fi
10901 
10902 
10903 
10904 # Check whether --with-builddeps-dir was given.
10905 if test "${with_builddeps_dir+set}" = set; then :
10906   withval=$with_builddeps_dir;
10907 else
10908   with_builddeps_dir=/localhome/builddeps
10909 fi
10910 
10911 
10912 
10913 # Check whether --with-builddeps-group was given.
10914 if test "${with_builddeps_group+set}" = set; then :
10915   withval=$with_builddeps_group;
10916 fi
10917 
10918 
10919 
10920 
10921   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10922     if test "x$with_builddeps_conf" != x; then
10923       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10924 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10925       builddepsfile=$with_builddeps_conf
10926       if test -s $builddepsfile; then
10927         . $builddepsfile
10928         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10929 $as_echo "loaded!" >&6; }
10930       else
10931         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10932       fi
10933     else
10934       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10935 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10936       builddepsfile=`mktemp`
10937       touch $builddepsfile
10938       # Put all found confs into a single file.
10939       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10940       # Source the file to acquire the variables
10941       if test -s $builddepsfile; then
10942         . $builddepsfile
10943         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10944 $as_echo "found at least one!" >&6; }
10945       else
10946         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10947       fi
10948     fi
10949     # Create build and target names that use _ instead of "-" and ".".
10950     # This is necessary to use them in variable names.
10951     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10952     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10953     # Extract rewrite information for build and target
10954     eval rewritten_build=\${REWRITE_${build_var}}
10955     if test "x$rewritten_build" = x; then
10956       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10957       echo Build stays the same $rewritten_build
10958     else
10959       echo Rewriting build for builddeps into $rewritten_build
10960     fi
10961     eval rewritten_target=\${REWRITE_${target_var}}
10962     if test "x$rewritten_target" = x; then
10963       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10964       echo Target stays the same $rewritten_target
10965     else
10966       echo Rewriting target for builddeps into $rewritten_target
10967     fi
10968     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10969     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10970   fi
10971   for ac_prog in 7z unzip
10972 do
10973   # Extract the first word of "$ac_prog", so it can be a program name with args.
10974 set dummy $ac_prog; ac_word=$2
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10976 $as_echo_n "checking for $ac_word... " >&6; }
10977 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10978   $as_echo_n "(cached) " >&6
10979 else
10980   if test -n "$BDEPS_UNZIP"; then
10981   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10982 else
10983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10984 for as_dir in $PATH
10985 do
10986   IFS=$as_save_IFS
10987   test -z "$as_dir" && as_dir=.
10988     for ac_exec_ext in '' $ac_executable_extensions; do
10989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10990     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10992     break 2
10993   fi
10994 done
10995   done
10996 IFS=$as_save_IFS
10997 
10998 fi
10999 fi
11000 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11001 if test -n "$BDEPS_UNZIP"; then
11002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11003 $as_echo "$BDEPS_UNZIP" >&6; }
11004 else
11005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11006 $as_echo "no" >&6; }
11007 fi
11008 
11009 
11010   test -n "$BDEPS_UNZIP" && break
11011 done
11012 
11013   if test "x$BDEPS_UNZIP" = x7z; then
11014     BDEPS_UNZIP="7z x"
11015   fi
11016 
11017   for ac_prog in wget lftp ftp
11018 do
11019   # Extract the first word of "$ac_prog", so it can be a program name with args.
11020 set dummy $ac_prog; ac_word=$2
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11022 $as_echo_n "checking for $ac_word... " >&6; }
11023 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11024   $as_echo_n "(cached) " >&6
11025 else
11026   if test -n "$BDEPS_FTP"; then
11027   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11028 else
11029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11030 for as_dir in $PATH
11031 do
11032   IFS=$as_save_IFS
11033   test -z "$as_dir" && as_dir=.
11034     for ac_exec_ext in '' $ac_executable_extensions; do
11035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11036     ac_cv_prog_BDEPS_FTP="$ac_prog"
11037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11038     break 2
11039   fi
11040 done
11041   done
11042 IFS=$as_save_IFS
11043 
11044 fi
11045 fi
11046 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11047 if test -n "$BDEPS_FTP"; then
11048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11049 $as_echo "$BDEPS_FTP" >&6; }
11050 else
11051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11052 $as_echo "no" >&6; }
11053 fi
11054 
11055 
11056   test -n "$BDEPS_FTP" && break
11057 done
11058 
11059 
11060 
11061 ###############################################################################
11062 #
11063 # Determine OpenJDK variants, options and version numbers.
11064 #
11065 ###############################################################################
11066 
11067 # We need build & target for this.
11068 
11069 
11070   ###############################################################################
11071   #
11072   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11073   # We always build headless support.
11074   #
11075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11076 $as_echo_n "checking headful support... " >&6; }
11077   # Check whether --enable-headful was given.
11078 if test "${enable_headful+set}" = set; then :
11079   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11080 else
11081   SUPPORT_HEADFUL=yes
11082 fi
11083 
11084 
11085   SUPPORT_HEADLESS=yes
11086   BUILD_HEADLESS="BUILD_HEADLESS:=true"
11087 
11088   if test "x$SUPPORT_HEADFUL" = xyes; then
11089     # We are building both headful and headless.
11090     headful_msg="include support for both headful and headless"
11091   fi
11092 
11093   if test "x$SUPPORT_HEADFUL" = xno; then
11094     # Thus we are building headless only.
11095     BUILD_HEADLESS="BUILD_HEADLESS:=true"
11096     headful_msg="headless only"
11097   fi
11098 
11099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11100 $as_echo "$headful_msg" >&6; }
11101 
11102 
11103 
11104 
11105 
11106   # Control wether Hotspot runs Queens test after build.
11107   # Check whether --enable-hotspot-test-in-build was given.
11108 if test "${enable_hotspot_test_in_build+set}" = set; then :
11109   enableval=$enable_hotspot_test_in_build;
11110 else
11111   enable_hotspot_test_in_build=no
11112 fi
11113 
11114   if test "x$enable_hotspot_test_in_build" = "xyes"; then
11115     TEST_IN_BUILD=true
11116   else
11117     TEST_IN_BUILD=false
11118   fi
11119 
11120 
11121   ###############################################################################
11122   #
11123   # Choose cacerts source file
11124   #
11125 
11126 # Check whether --with-cacerts-file was given.
11127 if test "${with_cacerts_file+set}" = set; then :
11128   withval=$with_cacerts_file;
11129 fi
11130 
11131   if test "x$with_cacerts_file" != x; then
11132     CACERTS_FILE=$with_cacerts_file
11133   else
11134     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11135   fi
11136 
11137 
11138   ###############################################################################
11139   #
11140   # Enable or disable unlimited crypto
11141   #
11142   # Check whether --enable-unlimited-crypto was given.
11143 if test "${enable_unlimited_crypto+set}" = set; then :
11144   enableval=$enable_unlimited_crypto;
11145 else
11146   enable_unlimited_crypto=no
11147 fi
11148 
11149   if test "x$enable_unlimited_crypto" = "xyes"; then
11150     UNLIMITED_CRYPTO=true
11151   else
11152     UNLIMITED_CRYPTO=false
11153   fi
11154 
11155 
11156   ###############################################################################
11157   #
11158   # Enable or disable the elliptic curve crypto implementation
11159   #
11160 
11161 
11162   ###############################################################################
11163   #
11164   # Compress jars
11165   #
11166   COMPRESS_JARS=false
11167 
11168 
11169 
11170 
11171   # Source the version numbers
11172   . $AUTOCONF_DIR/version-numbers
11173 
11174   # Get the settings from parameters
11175 
11176 # Check whether --with-milestone was given.
11177 if test "${with_milestone+set}" = set; then :
11178   withval=$with_milestone;
11179 fi
11180 
11181   if test "x$with_milestone" = xyes; then
11182     as_fn_error $? "Milestone must have a value" "$LINENO" 5
11183   elif test "x$with_milestone" != x; then
11184     MILESTONE="$with_milestone"
11185   fi
11186   if test "x$MILESTONE" = x; then
11187     MILESTONE=internal
11188   fi
11189 
11190 
11191 # Check whether --with-update-version was given.
11192 if test "${with_update_version+set}" = set; then :
11193   withval=$with_update_version;
11194 fi
11195 
11196   if test "x$with_update_version" = xyes; then
11197     as_fn_error $? "Update version must have a value" "$LINENO" 5
11198   elif test "x$with_update_version" != x; then
11199     JDK_UPDATE_VERSION="$with_update_version"
11200     # On macosx 10.7, it's not possible to set --with-update-version=0X due
11201     # to a bug in expr (which reduces it to just X). To work around this, we
11202     # always add a 0 to one digit update versions.
11203     if test "${#JDK_UPDATE_VERSION}" = "1"; then
11204       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11205     fi
11206   fi
11207 
11208 
11209 # Check whether --with-user-release-suffix was given.
11210 if test "${with_user_release_suffix+set}" = set; then :
11211   withval=$with_user_release_suffix;
11212 fi
11213 
11214   if test "x$with_user_release_suffix" = xyes; then
11215     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11216   elif test "x$with_user_release_suffix" != x; then
11217     USER_RELEASE_SUFFIX="$with_user_release_suffix"
11218   fi
11219 
11220 
11221 # Check whether --with-build-number was given.
11222 if test "${with_build_number+set}" = set; then :
11223   withval=$with_build_number;
11224 fi
11225 
11226   if test "x$with_build_number" = xyes; then
11227     as_fn_error $? "Build number must have a value" "$LINENO" 5
11228   elif test "x$with_build_number" != x; then
11229     JDK_BUILD_NUMBER="$with_build_number"
11230   fi
11231   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11232   if test "x$JDK_BUILD_NUMBER" = x; then
11233     JDK_BUILD_NUMBER=b00
11234     if test "x$USER_RELEASE_SUFFIX" = x; then
11235       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11236       # Avoid [:alnum:] since it depends on the locale.
11237       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11238       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11239     fi
11240   fi
11241 
11242   # Now set the JDK version, milestone, build number etc.
11243 
11244 
11245 
11246 
11247 
11248 
11249 
11250 
11251 
11252 
11253 
11254 
11255 
11256 
11257 
11258 
11259 # Check whether --with-copyright-year was given.
11260 if test "${with_copyright_year+set}" = set; then :
11261   withval=$with_copyright_year;
11262 fi
11263 
11264   if test "x$with_copyright_year" = xyes; then
11265     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
11266   elif test "x$with_copyright_year" != x; then
11267     COPYRIGHT_YEAR="$with_copyright_year"
11268   else
11269     COPYRIGHT_YEAR=`date +'%Y'`
11270   fi
11271 
11272 
11273   if test "x$JDK_UPDATE_VERSION" != x; then
11274     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11275   else
11276     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11277   fi
11278 
11279 
11280   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11281 
11282 
11283 
11284 ###############################################################################
11285 #
11286 # Setup BootJDK, used to bootstrap the build.
11287 #
11288 ###############################################################################
11289 
11290 
11291   BOOT_JDK_FOUND=no
11292 
11293 # Check whether --with-boot-jdk was given.
11294 if test "${with_boot_jdk+set}" = set; then :
11295   withval=$with_boot_jdk;
11296 fi
11297 
11298 
11299   # We look for the Boot JDK through various means, going from more certain to
11300   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11301   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11302   # must check if this is indeed valid; otherwise we'll continue looking.
11303 
11304   # Test: Is bootjdk explicitely set by command line arguments?
11305 
11306   if test "x$BOOT_JDK_FOUND" = xno; then
11307     # Now execute the test
11308 
11309   if test "x$with_boot_jdk" != x; then
11310     BOOT_JDK=$with_boot_jdk
11311     BOOT_JDK_FOUND=maybe
11312     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11313 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11314   fi
11315 
11316 
11317     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11318     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11319       # Do we have a bin/java?
11320       if test ! -x "$BOOT_JDK/bin/java"; then
11321         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11322 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11323         BOOT_JDK_FOUND=no
11324       else
11325         # Do we have a bin/javac?
11326         if test ! -x "$BOOT_JDK/bin/javac"; then
11327           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11328 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11329           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11330 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11331           BOOT_JDK_FOUND=no
11332         else
11333           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11334           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11335             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11336 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11337             BOOT_JDK_FOUND=no
11338           else
11339             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11340             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11341 
11342             # Extra M4 quote needed to protect [] in grep expression.
11343             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11344             if test "x$FOUND_VERSION_78" = x; then
11345               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11346 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11347               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11348 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11349               BOOT_JDK_FOUND=no
11350             else
11351               # We're done! :-)
11352               BOOT_JDK_FOUND=yes
11353 
11354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11355 
11356   # Input might be given as Windows format, start by converting to
11357   # unix format.
11358   path="$BOOT_JDK"
11359   new_path=`$CYGPATH -u "$path"`
11360 
11361   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11362   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11363   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11364   # "foo.exe" is OK but "foo" is an error.
11365   #
11366   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11367   # It is also a way to make sure we got the proper file name for the real test later on.
11368   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11369   if test "x$test_shortpath" = x; then
11370     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11371 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11372     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11373   fi
11374 
11375   # Call helper function which possibly converts this using DOS-style short mode.
11376   # If so, the updated path is stored in $new_path.
11377 
11378   input_path="$new_path"
11379   # Check if we need to convert this using DOS-style short mode. If the path
11380   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11381   # take no chances and rewrite it.
11382   # Note: m4 eats our [], so we need to use [ and ] instead.
11383   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11384   if test "x$has_forbidden_chars" != x; then
11385     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11386     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11387     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11388     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11389       # Going to short mode and back again did indeed matter. Since short mode is
11390       # case insensitive, let's make it lowercase to improve readability.
11391       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11392       # Now convert it back to Unix-stile (cygpath)
11393       input_path=`$CYGPATH -u "$shortmode_path"`
11394       new_path="$input_path"
11395     fi
11396   fi
11397 
11398   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11399   if test "x$test_cygdrive_prefix" = x; then
11400     # As a simple fix, exclude /usr/bin since it's not a real path.
11401     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11402       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11403       # a path prefixed by /cygdrive for fixpath to work.
11404       new_path="$CYGWIN_ROOT_PATH$input_path"
11405     fi
11406   fi
11407 
11408 
11409   if test "x$path" != "x$new_path"; then
11410     BOOT_JDK="$new_path"
11411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11412 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11413   fi
11414 
11415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11416 
11417   path="$BOOT_JDK"
11418   has_colon=`$ECHO $path | $GREP ^.:`
11419   new_path="$path"
11420   if test "x$has_colon" = x; then
11421     # Not in mixed or Windows style, start by that.
11422     new_path=`cmd //c echo $path`
11423   fi
11424 
11425 
11426   input_path="$new_path"
11427   # Check if we need to convert this using DOS-style short mode. If the path
11428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11429   # take no chances and rewrite it.
11430   # Note: m4 eats our [], so we need to use [ and ] instead.
11431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11432   if test "x$has_forbidden_chars" != x; then
11433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11434     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11435   fi
11436 
11437 
11438   windows_path="$new_path"
11439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11440     unix_path=`$CYGPATH -u "$windows_path"`
11441     new_path="$unix_path"
11442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11444     new_path="$unix_path"
11445   fi
11446 
11447   if test "x$path" != "x$new_path"; then
11448     BOOT_JDK="$new_path"
11449     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11450 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11451   fi
11452 
11453   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11454   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11455 
11456   else
11457     # We're on a posix platform. Hooray! :)
11458     path="$BOOT_JDK"
11459     has_space=`$ECHO "$path" | $GREP " "`
11460     if test "x$has_space" != x; then
11461       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11462 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11463       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11464     fi
11465 
11466     # Use eval to expand a potential ~
11467     eval path="$path"
11468     if test ! -f "$path" && test ! -d "$path"; then
11469       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11470     fi
11471 
11472     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11473   fi
11474 
11475               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11476 $as_echo_n "checking for Boot JDK... " >&6; }
11477               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11478 $as_echo "$BOOT_JDK" >&6; }
11479               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11480 $as_echo_n "checking Boot JDK version... " >&6; }
11481               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11482               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11483 $as_echo "$BOOT_JDK_VERSION" >&6; }
11484             fi # end check jdk version
11485           fi # end check rt.jar
11486         fi # end check javac
11487       fi # end check java
11488     fi # end check boot jdk found
11489   fi
11490 
11491   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11492     # Having specified an argument which is incorrect will produce an instant failure;
11493     # we should not go on looking
11494     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11495   fi
11496 
11497   # Test: Is bootjdk available from builddeps?
11498 
11499   if test "x$BOOT_JDK_FOUND" = xno; then
11500     # Now execute the test
11501 
11502 
11503 
11504   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11505     # Source the builddeps file again, to make sure it uses the latest variables!
11506     . $builddepsfile
11507     # Look for a target and build machine specific resource!
11508     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11509     if test "x$resource" = x; then
11510       # Ok, lets instead look for a target specific resource
11511       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11512     fi
11513     if test "x$resource" = x; then
11514       # Ok, lets instead look for a build specific resource
11515       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11516     fi
11517     if test "x$resource" = x; then
11518       # Ok, lets instead look for a generic resource
11519       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11520       resource=${builddep_bootjdk}
11521     fi
11522     if test "x$resource" != x; then
11523       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11524 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11525       # If the resource in the builddeps.conf file is an existing directory,
11526       # for example /java/linux/cups
11527       if test -d ${resource}; then
11528         depdir=${resource}
11529       else
11530 
11531   # bootjdk is for example mymodule
11532   # $resource is for example libs/general/libmymod_1_2_3.zip
11533   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11534   # $with_builddeps_dir is for example /localhome/builddeps
11535   # depdir is the name of the variable into which we store the depdir, eg MYMOD
11536   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11537   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11538   filename=`basename $resource`
11539   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11540   filebase=${filename%%.*}
11541   extension=${filename#*.}
11542   installdir=$with_builddeps_dir/$filebase
11543   if test ! -f $installdir/$filename.unpacked; then
11544     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11545 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11546     if test ! -d $installdir; then
11547       mkdir -p $installdir
11548     fi
11549     if test ! -d $installdir; then
11550       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11551     fi
11552     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11553     touch $tmpfile
11554     if test ! -f $tmpfile; then
11555       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11556     fi
11557 
11558   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11559   # $tmpfile is the local file name for the downloaded file.
11560   VALID_TOOL=no
11561   if test "x$BDEPS_FTP" = xwget; then
11562     VALID_TOOL=yes
11563     wget -O $tmpfile $with_builddeps_server/$resource
11564   fi
11565   if test "x$BDEPS_FTP" = xlftp; then
11566     VALID_TOOL=yes
11567     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11568   fi
11569   if test "x$BDEPS_FTP" = xftp; then
11570     VALID_TOOL=yes
11571     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11572     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11573     FTPUSERPWD=${FTPSERVER%%@*}
11574     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11575       FTPUSER=${userpwd%%:*}
11576       FTPPWD=${userpwd#*@}
11577       FTPSERVER=${FTPSERVER#*@}
11578     else
11579       FTPUSER=ftp
11580       FTPPWD=ftp
11581     fi
11582     # the "pass" command does not work on some
11583     # ftp clients (read ftp.exe) but if it works,
11584     # passive mode is better!
11585     ( \
11586         echo "user $FTPUSER $FTPPWD"        ; \
11587         echo "pass"                         ; \
11588         echo "bin"                          ; \
11589         echo "get $FTPPATH $tmpfile"              ; \
11590     ) | ftp -in $FTPSERVER
11591   fi
11592   if test "x$VALID_TOOL" != xyes; then
11593     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11594   fi
11595 
11596     mv $tmpfile $installdir/$filename
11597     if test ! -s $installdir/$filename; then
11598       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11599     fi
11600     case "$extension" in
11601       zip)  echo "Unzipping $installdir/$filename..."
11602         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11603         ;;
11604       tar.gz) echo "Untaring $installdir/$filename..."
11605         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11606         ;;
11607       tgz) echo "Untaring $installdir/$filename..."
11608         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11609         ;;
11610       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11611         ;;
11612     esac
11613   fi
11614   if test -f $installdir/$filename.unpacked; then
11615     depdir=$installdir
11616   fi
11617 
11618       fi
11619       # Source the builddeps file again, because in the previous command, the depdir
11620       # was updated to point at the current build dependency install directory.
11621       . $builddepsfile
11622       # Now extract variables from the builddeps.conf files.
11623       theroot=${builddep_bootjdk_ROOT}
11624       thecflags=${builddep_bootjdk_CFLAGS}
11625       thelibs=${builddep_bootjdk_LIBS}
11626       if test "x$depdir" = x; then
11627         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11628       fi
11629       BOOT_JDK=$depdir
11630       if test "x$theroot" != x; then
11631         BOOT_JDK="$theroot"
11632       fi
11633       if test "x$thecflags" != x; then
11634         BOOT_JDK_CFLAGS="$thecflags"
11635       fi
11636       if test "x$thelibs" != x; then
11637         BOOT_JDK_LIBS="$thelibs"
11638       fi
11639       BOOT_JDK_FOUND=maybe
11640       else BOOT_JDK_FOUND=no
11641 
11642     fi
11643     else BOOT_JDK_FOUND=no
11644 
11645   fi
11646 
11647 
11648 
11649     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11650     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11651       # Do we have a bin/java?
11652       if test ! -x "$BOOT_JDK/bin/java"; then
11653         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11654 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11655         BOOT_JDK_FOUND=no
11656       else
11657         # Do we have a bin/javac?
11658         if test ! -x "$BOOT_JDK/bin/javac"; then
11659           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11660 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11661           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11662 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11663           BOOT_JDK_FOUND=no
11664         else
11665           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11666           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11667             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11669             BOOT_JDK_FOUND=no
11670           else
11671             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11672             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11673 
11674             # Extra M4 quote needed to protect [] in grep expression.
11675             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11676             if test "x$FOUND_VERSION_78" = x; then
11677               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11678 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11679               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11680 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11681               BOOT_JDK_FOUND=no
11682             else
11683               # We're done! :-)
11684               BOOT_JDK_FOUND=yes
11685 
11686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11687 
11688   # Input might be given as Windows format, start by converting to
11689   # unix format.
11690   path="$BOOT_JDK"
11691   new_path=`$CYGPATH -u "$path"`
11692 
11693   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11694   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11695   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11696   # "foo.exe" is OK but "foo" is an error.
11697   #
11698   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11699   # It is also a way to make sure we got the proper file name for the real test later on.
11700   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11701   if test "x$test_shortpath" = x; then
11702     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11703 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11704     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11705   fi
11706 
11707   # Call helper function which possibly converts this using DOS-style short mode.
11708   # If so, the updated path is stored in $new_path.
11709 
11710   input_path="$new_path"
11711   # Check if we need to convert this using DOS-style short mode. If the path
11712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11713   # take no chances and rewrite it.
11714   # Note: m4 eats our [], so we need to use [ and ] instead.
11715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11716   if test "x$has_forbidden_chars" != x; then
11717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11718     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11719     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11720     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11721       # Going to short mode and back again did indeed matter. Since short mode is
11722       # case insensitive, let's make it lowercase to improve readability.
11723       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11724       # Now convert it back to Unix-stile (cygpath)
11725       input_path=`$CYGPATH -u "$shortmode_path"`
11726       new_path="$input_path"
11727     fi
11728   fi
11729 
11730   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11731   if test "x$test_cygdrive_prefix" = x; then
11732     # As a simple fix, exclude /usr/bin since it's not a real path.
11733     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11734       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11735       # a path prefixed by /cygdrive for fixpath to work.
11736       new_path="$CYGWIN_ROOT_PATH$input_path"
11737     fi
11738   fi
11739 
11740 
11741   if test "x$path" != "x$new_path"; then
11742     BOOT_JDK="$new_path"
11743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11745   fi
11746 
11747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11748 
11749   path="$BOOT_JDK"
11750   has_colon=`$ECHO $path | $GREP ^.:`
11751   new_path="$path"
11752   if test "x$has_colon" = x; then
11753     # Not in mixed or Windows style, start by that.
11754     new_path=`cmd //c echo $path`
11755   fi
11756 
11757 
11758   input_path="$new_path"
11759   # Check if we need to convert this using DOS-style short mode. If the path
11760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11761   # take no chances and rewrite it.
11762   # Note: m4 eats our [], so we need to use [ and ] instead.
11763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11764   if test "x$has_forbidden_chars" != x; then
11765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11766     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11767   fi
11768 
11769 
11770   windows_path="$new_path"
11771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11772     unix_path=`$CYGPATH -u "$windows_path"`
11773     new_path="$unix_path"
11774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11776     new_path="$unix_path"
11777   fi
11778 
11779   if test "x$path" != "x$new_path"; then
11780     BOOT_JDK="$new_path"
11781     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11782 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11783   fi
11784 
11785   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11786   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11787 
11788   else
11789     # We're on a posix platform. Hooray! :)
11790     path="$BOOT_JDK"
11791     has_space=`$ECHO "$path" | $GREP " "`
11792     if test "x$has_space" != x; then
11793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11794 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11795       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11796     fi
11797 
11798     # Use eval to expand a potential ~
11799     eval path="$path"
11800     if test ! -f "$path" && test ! -d "$path"; then
11801       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11802     fi
11803 
11804     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11805   fi
11806 
11807               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11808 $as_echo_n "checking for Boot JDK... " >&6; }
11809               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11810 $as_echo "$BOOT_JDK" >&6; }
11811               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11812 $as_echo_n "checking Boot JDK version... " >&6; }
11813               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11814               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11815 $as_echo "$BOOT_JDK_VERSION" >&6; }
11816             fi # end check jdk version
11817           fi # end check rt.jar
11818         fi # end check javac
11819       fi # end check java
11820     fi # end check boot jdk found
11821   fi
11822 
11823 
11824   # Test: Is $JAVA_HOME set?
11825 
11826   if test "x$BOOT_JDK_FOUND" = xno; then
11827     # Now execute the test
11828 
11829   if test "x$JAVA_HOME" != x; then
11830     JAVA_HOME_PROCESSED="$JAVA_HOME"
11831 
11832   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11833 
11834   # Input might be given as Windows format, start by converting to
11835   # unix format.
11836   path="$JAVA_HOME_PROCESSED"
11837   new_path=`$CYGPATH -u "$path"`
11838 
11839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11842   # "foo.exe" is OK but "foo" is an error.
11843   #
11844   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11845   # It is also a way to make sure we got the proper file name for the real test later on.
11846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11847   if test "x$test_shortpath" = x; then
11848     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11849 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11850     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11851   fi
11852 
11853   # Call helper function which possibly converts this using DOS-style short mode.
11854   # If so, the updated path is stored in $new_path.
11855 
11856   input_path="$new_path"
11857   # Check if we need to convert this using DOS-style short mode. If the path
11858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11859   # take no chances and rewrite it.
11860   # Note: m4 eats our [], so we need to use [ and ] instead.
11861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11862   if test "x$has_forbidden_chars" != x; then
11863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11867       # Going to short mode and back again did indeed matter. Since short mode is
11868       # case insensitive, let's make it lowercase to improve readability.
11869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11870       # Now convert it back to Unix-stile (cygpath)
11871       input_path=`$CYGPATH -u "$shortmode_path"`
11872       new_path="$input_path"
11873     fi
11874   fi
11875 
11876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11877   if test "x$test_cygdrive_prefix" = x; then
11878     # As a simple fix, exclude /usr/bin since it's not a real path.
11879     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11881       # a path prefixed by /cygdrive for fixpath to work.
11882       new_path="$CYGWIN_ROOT_PATH$input_path"
11883     fi
11884   fi
11885 
11886 
11887   if test "x$path" != "x$new_path"; then
11888     JAVA_HOME_PROCESSED="$new_path"
11889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11890 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11891   fi
11892 
11893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11894 
11895   path="$JAVA_HOME_PROCESSED"
11896   has_colon=`$ECHO $path | $GREP ^.:`
11897   new_path="$path"
11898   if test "x$has_colon" = x; then
11899     # Not in mixed or Windows style, start by that.
11900     new_path=`cmd //c echo $path`
11901   fi
11902 
11903 
11904   input_path="$new_path"
11905   # Check if we need to convert this using DOS-style short mode. If the path
11906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11907   # take no chances and rewrite it.
11908   # Note: m4 eats our [], so we need to use [ and ] instead.
11909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11910   if test "x$has_forbidden_chars" != x; then
11911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11912     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11913   fi
11914 
11915 
11916   windows_path="$new_path"
11917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11918     unix_path=`$CYGPATH -u "$windows_path"`
11919     new_path="$unix_path"
11920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11922     new_path="$unix_path"
11923   fi
11924 
11925   if test "x$path" != "x$new_path"; then
11926     JAVA_HOME_PROCESSED="$new_path"
11927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11928 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11929   fi
11930 
11931   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11932   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11933 
11934   else
11935     # We're on a posix platform. Hooray! :)
11936     path="$JAVA_HOME_PROCESSED"
11937     has_space=`$ECHO "$path" | $GREP " "`
11938     if test "x$has_space" != x; then
11939       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11940 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11941       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11942     fi
11943 
11944     # Use eval to expand a potential ~
11945     eval path="$path"
11946     if test ! -f "$path" && test ! -d "$path"; then
11947       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11948     fi
11949 
11950     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11951   fi
11952 
11953     if test ! -d "$JAVA_HOME_PROCESSED"; then
11954       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11955 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11956     else
11957       # Aha, the user has set a JAVA_HOME
11958       # let us use that as the Boot JDK.
11959       BOOT_JDK="$JAVA_HOME_PROCESSED"
11960       BOOT_JDK_FOUND=maybe
11961       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11962 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11963     fi
11964   fi
11965 
11966 
11967     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11968     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11969       # Do we have a bin/java?
11970       if test ! -x "$BOOT_JDK/bin/java"; then
11971         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11972 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11973         BOOT_JDK_FOUND=no
11974       else
11975         # Do we have a bin/javac?
11976         if test ! -x "$BOOT_JDK/bin/javac"; then
11977           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11978 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11979           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11980 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11981           BOOT_JDK_FOUND=no
11982         else
11983           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11984           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11985             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11986 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11987             BOOT_JDK_FOUND=no
11988           else
11989             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11990             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11991 
11992             # Extra M4 quote needed to protect [] in grep expression.
11993             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11994             if test "x$FOUND_VERSION_78" = x; then
11995               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11997               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11998 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11999               BOOT_JDK_FOUND=no
12000             else
12001               # We're done! :-)
12002               BOOT_JDK_FOUND=yes
12003 
12004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12005 
12006   # Input might be given as Windows format, start by converting to
12007   # unix format.
12008   path="$BOOT_JDK"
12009   new_path=`$CYGPATH -u "$path"`
12010 
12011   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12012   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12013   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12014   # "foo.exe" is OK but "foo" is an error.
12015   #
12016   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12017   # It is also a way to make sure we got the proper file name for the real test later on.
12018   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12019   if test "x$test_shortpath" = x; then
12020     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12021 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12022     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12023   fi
12024 
12025   # Call helper function which possibly converts this using DOS-style short mode.
12026   # If so, the updated path is stored in $new_path.
12027 
12028   input_path="$new_path"
12029   # Check if we need to convert this using DOS-style short mode. If the path
12030   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12031   # take no chances and rewrite it.
12032   # Note: m4 eats our [], so we need to use [ and ] instead.
12033   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12034   if test "x$has_forbidden_chars" != x; then
12035     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12036     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12037     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12038     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12039       # Going to short mode and back again did indeed matter. Since short mode is
12040       # case insensitive, let's make it lowercase to improve readability.
12041       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12042       # Now convert it back to Unix-stile (cygpath)
12043       input_path=`$CYGPATH -u "$shortmode_path"`
12044       new_path="$input_path"
12045     fi
12046   fi
12047 
12048   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12049   if test "x$test_cygdrive_prefix" = x; then
12050     # As a simple fix, exclude /usr/bin since it's not a real path.
12051     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12052       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12053       # a path prefixed by /cygdrive for fixpath to work.
12054       new_path="$CYGWIN_ROOT_PATH$input_path"
12055     fi
12056   fi
12057 
12058 
12059   if test "x$path" != "x$new_path"; then
12060     BOOT_JDK="$new_path"
12061     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12062 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12063   fi
12064 
12065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12066 
12067   path="$BOOT_JDK"
12068   has_colon=`$ECHO $path | $GREP ^.:`
12069   new_path="$path"
12070   if test "x$has_colon" = x; then
12071     # Not in mixed or Windows style, start by that.
12072     new_path=`cmd //c echo $path`
12073   fi
12074 
12075 
12076   input_path="$new_path"
12077   # Check if we need to convert this using DOS-style short mode. If the path
12078   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12079   # take no chances and rewrite it.
12080   # Note: m4 eats our [], so we need to use [ and ] instead.
12081   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12082   if test "x$has_forbidden_chars" != x; then
12083     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12084     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12085   fi
12086 
12087 
12088   windows_path="$new_path"
12089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12090     unix_path=`$CYGPATH -u "$windows_path"`
12091     new_path="$unix_path"
12092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12094     new_path="$unix_path"
12095   fi
12096 
12097   if test "x$path" != "x$new_path"; then
12098     BOOT_JDK="$new_path"
12099     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12100 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12101   fi
12102 
12103   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12104   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12105 
12106   else
12107     # We're on a posix platform. Hooray! :)
12108     path="$BOOT_JDK"
12109     has_space=`$ECHO "$path" | $GREP " "`
12110     if test "x$has_space" != x; then
12111       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12112 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12113       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12114     fi
12115 
12116     # Use eval to expand a potential ~
12117     eval path="$path"
12118     if test ! -f "$path" && test ! -d "$path"; then
12119       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12120     fi
12121 
12122     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12123   fi
12124 
12125               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12126 $as_echo_n "checking for Boot JDK... " >&6; }
12127               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12128 $as_echo "$BOOT_JDK" >&6; }
12129               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12130 $as_echo_n "checking Boot JDK version... " >&6; }
12131               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12132               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12133 $as_echo "$BOOT_JDK_VERSION" >&6; }
12134             fi # end check jdk version
12135           fi # end check rt.jar
12136         fi # end check javac
12137       fi # end check java
12138     fi # end check boot jdk found
12139   fi
12140 
12141 
12142   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12143 
12144   if test "x$BOOT_JDK_FOUND" = xno; then
12145     # Now execute the test
12146 
12147   if test -x /usr/libexec/java_home; then
12148     BOOT_JDK=`/usr/libexec/java_home`
12149     BOOT_JDK_FOUND=maybe
12150     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12151 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12152   fi
12153 
12154 
12155     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12156     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12157       # Do we have a bin/java?
12158       if test ! -x "$BOOT_JDK/bin/java"; then
12159         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12161         BOOT_JDK_FOUND=no
12162       else
12163         # Do we have a bin/javac?
12164         if test ! -x "$BOOT_JDK/bin/javac"; then
12165           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12167           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12168 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12169           BOOT_JDK_FOUND=no
12170         else
12171           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12172           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12173             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12174 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12175             BOOT_JDK_FOUND=no
12176           else
12177             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12178             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12179 
12180             # Extra M4 quote needed to protect [] in grep expression.
12181             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12182             if test "x$FOUND_VERSION_78" = x; then
12183               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12185               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12186 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12187               BOOT_JDK_FOUND=no
12188             else
12189               # We're done! :-)
12190               BOOT_JDK_FOUND=yes
12191 
12192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12193 
12194   # Input might be given as Windows format, start by converting to
12195   # unix format.
12196   path="$BOOT_JDK"
12197   new_path=`$CYGPATH -u "$path"`
12198 
12199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12202   # "foo.exe" is OK but "foo" is an error.
12203   #
12204   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12205   # It is also a way to make sure we got the proper file name for the real test later on.
12206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12207   if test "x$test_shortpath" = x; then
12208     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12209 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12210     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12211   fi
12212 
12213   # Call helper function which possibly converts this using DOS-style short mode.
12214   # If so, the updated path is stored in $new_path.
12215 
12216   input_path="$new_path"
12217   # Check if we need to convert this using DOS-style short mode. If the path
12218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12219   # take no chances and rewrite it.
12220   # Note: m4 eats our [], so we need to use [ and ] instead.
12221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12222   if test "x$has_forbidden_chars" != x; then
12223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12224     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12225     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12226     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12227       # Going to short mode and back again did indeed matter. Since short mode is
12228       # case insensitive, let's make it lowercase to improve readability.
12229       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12230       # Now convert it back to Unix-stile (cygpath)
12231       input_path=`$CYGPATH -u "$shortmode_path"`
12232       new_path="$input_path"
12233     fi
12234   fi
12235 
12236   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12237   if test "x$test_cygdrive_prefix" = x; then
12238     # As a simple fix, exclude /usr/bin since it's not a real path.
12239     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12240       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12241       # a path prefixed by /cygdrive for fixpath to work.
12242       new_path="$CYGWIN_ROOT_PATH$input_path"
12243     fi
12244   fi
12245 
12246 
12247   if test "x$path" != "x$new_path"; then
12248     BOOT_JDK="$new_path"
12249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12250 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12251   fi
12252 
12253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12254 
12255   path="$BOOT_JDK"
12256   has_colon=`$ECHO $path | $GREP ^.:`
12257   new_path="$path"
12258   if test "x$has_colon" = x; then
12259     # Not in mixed or Windows style, start by that.
12260     new_path=`cmd //c echo $path`
12261   fi
12262 
12263 
12264   input_path="$new_path"
12265   # Check if we need to convert this using DOS-style short mode. If the path
12266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12267   # take no chances and rewrite it.
12268   # Note: m4 eats our [], so we need to use [ and ] instead.
12269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12270   if test "x$has_forbidden_chars" != x; then
12271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12272     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12273   fi
12274 
12275 
12276   windows_path="$new_path"
12277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12278     unix_path=`$CYGPATH -u "$windows_path"`
12279     new_path="$unix_path"
12280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12282     new_path="$unix_path"
12283   fi
12284 
12285   if test "x$path" != "x$new_path"; then
12286     BOOT_JDK="$new_path"
12287     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12288 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12289   fi
12290 
12291   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12292   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12293 
12294   else
12295     # We're on a posix platform. Hooray! :)
12296     path="$BOOT_JDK"
12297     has_space=`$ECHO "$path" | $GREP " "`
12298     if test "x$has_space" != x; then
12299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12301       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12302     fi
12303 
12304     # Use eval to expand a potential ~
12305     eval path="$path"
12306     if test ! -f "$path" && test ! -d "$path"; then
12307       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12308     fi
12309 
12310     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12311   fi
12312 
12313               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12314 $as_echo_n "checking for Boot JDK... " >&6; }
12315               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12316 $as_echo "$BOOT_JDK" >&6; }
12317               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12318 $as_echo_n "checking Boot JDK version... " >&6; }
12319               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12320               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12321 $as_echo "$BOOT_JDK_VERSION" >&6; }
12322             fi # end check jdk version
12323           fi # end check rt.jar
12324         fi # end check javac
12325       fi # end check java
12326     fi # end check boot jdk found
12327   fi
12328 
12329 
12330   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12331 
12332   if test "x$BOOT_JDK_FOUND" = xno; then
12333     # Now execute the test
12334 
12335   # Extract the first word of "javac", so it can be a program name with args.
12336 set dummy javac; ac_word=$2
12337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12338 $as_echo_n "checking for $ac_word... " >&6; }
12339 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12340   $as_echo_n "(cached) " >&6
12341 else
12342   case $JAVAC_CHECK in
12343   [\\/]* | ?:[\\/]*)
12344   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12345   ;;
12346   *)
12347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12348 for as_dir in $PATH
12349 do
12350   IFS=$as_save_IFS
12351   test -z "$as_dir" && as_dir=.
12352     for ac_exec_ext in '' $ac_executable_extensions; do
12353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12354     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12356     break 2
12357   fi
12358 done
12359   done
12360 IFS=$as_save_IFS
12361 
12362   ;;
12363 esac
12364 fi
12365 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12366 if test -n "$JAVAC_CHECK"; then
12367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12368 $as_echo "$JAVAC_CHECK" >&6; }
12369 else
12370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12371 $as_echo "no" >&6; }
12372 fi
12373 
12374 
12375   # Extract the first word of "java", so it can be a program name with args.
12376 set dummy java; ac_word=$2
12377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12378 $as_echo_n "checking for $ac_word... " >&6; }
12379 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12380   $as_echo_n "(cached) " >&6
12381 else
12382   case $JAVA_CHECK in
12383   [\\/]* | ?:[\\/]*)
12384   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12385   ;;
12386   *)
12387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12388 for as_dir in $PATH
12389 do
12390   IFS=$as_save_IFS
12391   test -z "$as_dir" && as_dir=.
12392     for ac_exec_ext in '' $ac_executable_extensions; do
12393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12394     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12396     break 2
12397   fi
12398 done
12399   done
12400 IFS=$as_save_IFS
12401 
12402   ;;
12403 esac
12404 fi
12405 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12406 if test -n "$JAVA_CHECK"; then
12407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12408 $as_echo "$JAVA_CHECK" >&6; }
12409 else
12410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411 $as_echo "no" >&6; }
12412 fi
12413 
12414 
12415   BINARY="$JAVAC_CHECK"
12416   if test "x$JAVAC_CHECK" = x; then
12417     BINARY="$JAVA_CHECK"
12418   fi
12419   if test "x$BINARY" != x; then
12420     # So there is a java(c) binary, it might be part of a JDK.
12421     # Lets find the JDK/JRE directory by following symbolic links.
12422     # Linux/GNU systems often have links from /usr/bin/java to
12423     # /etc/alternatives/java to the real JDK binary.
12424 
12425   if test "x$OPENJDK_BUILD_OS" != xwindows; then
12426     # Follow a chain of symbolic links. Use readlink
12427     # where it exists, else fall back to horribly
12428     # complicated shell code.
12429     if test "x$READLINK_TESTED" != yes; then
12430       # On MacOSX there is a readlink tool with a different
12431       # purpose than the GNU readlink tool. Check the found readlink.
12432       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12433       if test "x$ISGNU" = x; then
12434         # A readlink that we do not know how to use.
12435         # Are there other non-GNU readlinks out there?
12436         READLINK_TESTED=yes
12437         READLINK=
12438       fi
12439     fi
12440 
12441     if test "x$READLINK" != x; then
12442       BINARY=`$READLINK -f $BINARY`
12443     else
12444       # Save the current directory for restoring afterwards
12445       STARTDIR=$PWD
12446       COUNTER=0
12447       sym_link_dir=`$DIRNAME $BINARY`
12448       sym_link_file=`$BASENAME $BINARY`
12449       cd $sym_link_dir
12450       # Use -P flag to resolve symlinks in directories.
12451       cd `$THEPWDCMD -P`
12452       sym_link_dir=`$THEPWDCMD -P`
12453       # Resolve file symlinks
12454       while test $COUNTER -lt 20; do
12455         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12456         if test "x$ISLINK" == x; then
12457           # This is not a symbolic link! We are done!
12458           break
12459         fi
12460         # Again resolve directory symlinks since the target of the just found
12461         # link could be in a different directory
12462         cd `$DIRNAME $ISLINK`
12463         sym_link_dir=`$THEPWDCMD -P`
12464         sym_link_file=`$BASENAME $ISLINK`
12465         let COUNTER=COUNTER+1
12466       done
12467       cd $STARTDIR
12468       BINARY=$sym_link_dir/$sym_link_file
12469     fi
12470   fi
12471 
12472     BOOT_JDK=`dirname "$BINARY"`
12473     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12474     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12475       # Looks like we found ourselves an JDK
12476       BOOT_JDK_FOUND=maybe
12477       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12478 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12479     fi
12480   fi
12481 
12482 
12483     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12484     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12485       # Do we have a bin/java?
12486       if test ! -x "$BOOT_JDK/bin/java"; then
12487         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12489         BOOT_JDK_FOUND=no
12490       else
12491         # Do we have a bin/javac?
12492         if test ! -x "$BOOT_JDK/bin/javac"; then
12493           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12494 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12495           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12496 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12497           BOOT_JDK_FOUND=no
12498         else
12499           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12500           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12501             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12502 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12503             BOOT_JDK_FOUND=no
12504           else
12505             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12506             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12507 
12508             # Extra M4 quote needed to protect [] in grep expression.
12509             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12510             if test "x$FOUND_VERSION_78" = x; then
12511               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12512 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12513               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12514 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12515               BOOT_JDK_FOUND=no
12516             else
12517               # We're done! :-)
12518               BOOT_JDK_FOUND=yes
12519 
12520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12521 
12522   # Input might be given as Windows format, start by converting to
12523   # unix format.
12524   path="$BOOT_JDK"
12525   new_path=`$CYGPATH -u "$path"`
12526 
12527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12530   # "foo.exe" is OK but "foo" is an error.
12531   #
12532   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12533   # It is also a way to make sure we got the proper file name for the real test later on.
12534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12535   if test "x$test_shortpath" = x; then
12536     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12537 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12538     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12539   fi
12540 
12541   # Call helper function which possibly converts this using DOS-style short mode.
12542   # If so, the updated path is stored in $new_path.
12543 
12544   input_path="$new_path"
12545   # Check if we need to convert this using DOS-style short mode. If the path
12546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12547   # take no chances and rewrite it.
12548   # Note: m4 eats our [], so we need to use [ and ] instead.
12549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12550   if test "x$has_forbidden_chars" != x; then
12551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12552     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12553     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12554     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12555       # Going to short mode and back again did indeed matter. Since short mode is
12556       # case insensitive, let's make it lowercase to improve readability.
12557       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12558       # Now convert it back to Unix-stile (cygpath)
12559       input_path=`$CYGPATH -u "$shortmode_path"`
12560       new_path="$input_path"
12561     fi
12562   fi
12563 
12564   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12565   if test "x$test_cygdrive_prefix" = x; then
12566     # As a simple fix, exclude /usr/bin since it's not a real path.
12567     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12568       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12569       # a path prefixed by /cygdrive for fixpath to work.
12570       new_path="$CYGWIN_ROOT_PATH$input_path"
12571     fi
12572   fi
12573 
12574 
12575   if test "x$path" != "x$new_path"; then
12576     BOOT_JDK="$new_path"
12577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12579   fi
12580 
12581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12582 
12583   path="$BOOT_JDK"
12584   has_colon=`$ECHO $path | $GREP ^.:`
12585   new_path="$path"
12586   if test "x$has_colon" = x; then
12587     # Not in mixed or Windows style, start by that.
12588     new_path=`cmd //c echo $path`
12589   fi
12590 
12591 
12592   input_path="$new_path"
12593   # Check if we need to convert this using DOS-style short mode. If the path
12594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12595   # take no chances and rewrite it.
12596   # Note: m4 eats our [], so we need to use [ and ] instead.
12597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12598   if test "x$has_forbidden_chars" != x; then
12599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12600     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12601   fi
12602 
12603 
12604   windows_path="$new_path"
12605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12606     unix_path=`$CYGPATH -u "$windows_path"`
12607     new_path="$unix_path"
12608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12610     new_path="$unix_path"
12611   fi
12612 
12613   if test "x$path" != "x$new_path"; then
12614     BOOT_JDK="$new_path"
12615     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12616 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12617   fi
12618 
12619   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12620   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12621 
12622   else
12623     # We're on a posix platform. Hooray! :)
12624     path="$BOOT_JDK"
12625     has_space=`$ECHO "$path" | $GREP " "`
12626     if test "x$has_space" != x; then
12627       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12628 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12629       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12630     fi
12631 
12632     # Use eval to expand a potential ~
12633     eval path="$path"
12634     if test ! -f "$path" && test ! -d "$path"; then
12635       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12636     fi
12637 
12638     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12639   fi
12640 
12641               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12642 $as_echo_n "checking for Boot JDK... " >&6; }
12643               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12644 $as_echo "$BOOT_JDK" >&6; }
12645               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12646 $as_echo_n "checking Boot JDK version... " >&6; }
12647               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12648               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12649 $as_echo "$BOOT_JDK_VERSION" >&6; }
12650             fi # end check jdk version
12651           fi # end check rt.jar
12652         fi # end check javac
12653       fi # end check java
12654     fi # end check boot jdk found
12655   fi
12656 
12657 
12658   # Test: Is there a JDK installed in default, well-known locations?
12659 
12660   if test "x$BOOT_JDK_FOUND" = xno; then
12661     # Now execute the test
12662 
12663   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12664 
12665   if test "x$BOOT_JDK_FOUND" = xno; then
12666     # Now execute the test
12667 
12668   if test "x$ProgramW6432" != x; then
12669     VIRTUAL_DIR="$ProgramW6432/Java"
12670 
12671   windows_path="$VIRTUAL_DIR"
12672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12673     unix_path=`$CYGPATH -u "$windows_path"`
12674     VIRTUAL_DIR="$unix_path"
12675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12677     VIRTUAL_DIR="$unix_path"
12678   fi
12679 
12680 
12681   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12682   BOOT_JDK_SUFFIX=""
12683   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12684   if test "x$ALL_JDKS_FOUND" != x; then
12685     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12686 
12687   if test "x$BOOT_JDK_FOUND" = xno; then
12688     # Now execute the test
12689 
12690         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12691         if test -d "$BOOT_JDK"; then
12692           BOOT_JDK_FOUND=maybe
12693           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12694 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12695         fi
12696 
12697 
12698     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12699     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12700       # Do we have a bin/java?
12701       if test ! -x "$BOOT_JDK/bin/java"; then
12702         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12704         BOOT_JDK_FOUND=no
12705       else
12706         # Do we have a bin/javac?
12707         if test ! -x "$BOOT_JDK/bin/javac"; then
12708           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12710           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12711 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12712           BOOT_JDK_FOUND=no
12713         else
12714           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12715           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12716             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12718             BOOT_JDK_FOUND=no
12719           else
12720             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12721             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12722 
12723             # Extra M4 quote needed to protect [] in grep expression.
12724             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12725             if test "x$FOUND_VERSION_78" = x; then
12726               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12728               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12729 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12730               BOOT_JDK_FOUND=no
12731             else
12732               # We're done! :-)
12733               BOOT_JDK_FOUND=yes
12734 
12735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12736 
12737   # Input might be given as Windows format, start by converting to
12738   # unix format.
12739   path="$BOOT_JDK"
12740   new_path=`$CYGPATH -u "$path"`
12741 
12742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12745   # "foo.exe" is OK but "foo" is an error.
12746   #
12747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12748   # It is also a way to make sure we got the proper file name for the real test later on.
12749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12750   if test "x$test_shortpath" = x; then
12751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12753     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12754   fi
12755 
12756   # Call helper function which possibly converts this using DOS-style short mode.
12757   # If so, the updated path is stored in $new_path.
12758 
12759   input_path="$new_path"
12760   # Check if we need to convert this using DOS-style short mode. If the path
12761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12762   # take no chances and rewrite it.
12763   # Note: m4 eats our [], so we need to use [ and ] instead.
12764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12765   if test "x$has_forbidden_chars" != x; then
12766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12770       # Going to short mode and back again did indeed matter. Since short mode is
12771       # case insensitive, let's make it lowercase to improve readability.
12772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12773       # Now convert it back to Unix-stile (cygpath)
12774       input_path=`$CYGPATH -u "$shortmode_path"`
12775       new_path="$input_path"
12776     fi
12777   fi
12778 
12779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12780   if test "x$test_cygdrive_prefix" = x; then
12781     # As a simple fix, exclude /usr/bin since it's not a real path.
12782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12784       # a path prefixed by /cygdrive for fixpath to work.
12785       new_path="$CYGWIN_ROOT_PATH$input_path"
12786     fi
12787   fi
12788 
12789 
12790   if test "x$path" != "x$new_path"; then
12791     BOOT_JDK="$new_path"
12792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12793 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12794   fi
12795 
12796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12797 
12798   path="$BOOT_JDK"
12799   has_colon=`$ECHO $path | $GREP ^.:`
12800   new_path="$path"
12801   if test "x$has_colon" = x; then
12802     # Not in mixed or Windows style, start by that.
12803     new_path=`cmd //c echo $path`
12804   fi
12805 
12806 
12807   input_path="$new_path"
12808   # Check if we need to convert this using DOS-style short mode. If the path
12809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12810   # take no chances and rewrite it.
12811   # Note: m4 eats our [], so we need to use [ and ] instead.
12812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12813   if test "x$has_forbidden_chars" != x; then
12814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12816   fi
12817 
12818 
12819   windows_path="$new_path"
12820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12821     unix_path=`$CYGPATH -u "$windows_path"`
12822     new_path="$unix_path"
12823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12825     new_path="$unix_path"
12826   fi
12827 
12828   if test "x$path" != "x$new_path"; then
12829     BOOT_JDK="$new_path"
12830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12831 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12832   fi
12833 
12834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12836 
12837   else
12838     # We're on a posix platform. Hooray! :)
12839     path="$BOOT_JDK"
12840     has_space=`$ECHO "$path" | $GREP " "`
12841     if test "x$has_space" != x; then
12842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12844       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12845     fi
12846 
12847     # Use eval to expand a potential ~
12848     eval path="$path"
12849     if test ! -f "$path" && test ! -d "$path"; then
12850       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12851     fi
12852 
12853     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12854   fi
12855 
12856               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12857 $as_echo_n "checking for Boot JDK... " >&6; }
12858               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12859 $as_echo "$BOOT_JDK" >&6; }
12860               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12861 $as_echo_n "checking Boot JDK version... " >&6; }
12862               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12863               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12864 $as_echo "$BOOT_JDK_VERSION" >&6; }
12865             fi # end check jdk version
12866           fi # end check rt.jar
12867         fi # end check javac
12868       fi # end check java
12869     fi # end check boot jdk found
12870   fi
12871 
12872     done
12873   fi
12874 
12875   fi
12876 
12877 
12878     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12879     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12880       # Do we have a bin/java?
12881       if test ! -x "$BOOT_JDK/bin/java"; then
12882         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12883 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12884         BOOT_JDK_FOUND=no
12885       else
12886         # Do we have a bin/javac?
12887         if test ! -x "$BOOT_JDK/bin/javac"; then
12888           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12889 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12890           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12891 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12892           BOOT_JDK_FOUND=no
12893         else
12894           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12895           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12896             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12897 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12898             BOOT_JDK_FOUND=no
12899           else
12900             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12901             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12902 
12903             # Extra M4 quote needed to protect [] in grep expression.
12904             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12905             if test "x$FOUND_VERSION_78" = x; then
12906               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12907 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12908               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12909 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12910               BOOT_JDK_FOUND=no
12911             else
12912               # We're done! :-)
12913               BOOT_JDK_FOUND=yes
12914 
12915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12916 
12917   # Input might be given as Windows format, start by converting to
12918   # unix format.
12919   path="$BOOT_JDK"
12920   new_path=`$CYGPATH -u "$path"`
12921 
12922   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12923   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12924   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12925   # "foo.exe" is OK but "foo" is an error.
12926   #
12927   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12928   # It is also a way to make sure we got the proper file name for the real test later on.
12929   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12930   if test "x$test_shortpath" = x; then
12931     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12932 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12933     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12934   fi
12935 
12936   # Call helper function which possibly converts this using DOS-style short mode.
12937   # If so, the updated path is stored in $new_path.
12938 
12939   input_path="$new_path"
12940   # Check if we need to convert this using DOS-style short mode. If the path
12941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12942   # take no chances and rewrite it.
12943   # Note: m4 eats our [], so we need to use [ and ] instead.
12944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12945   if test "x$has_forbidden_chars" != x; then
12946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12947     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12948     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12949     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12950       # Going to short mode and back again did indeed matter. Since short mode is
12951       # case insensitive, let's make it lowercase to improve readability.
12952       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12953       # Now convert it back to Unix-stile (cygpath)
12954       input_path=`$CYGPATH -u "$shortmode_path"`
12955       new_path="$input_path"
12956     fi
12957   fi
12958 
12959   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12960   if test "x$test_cygdrive_prefix" = x; then
12961     # As a simple fix, exclude /usr/bin since it's not a real path.
12962     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12963       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12964       # a path prefixed by /cygdrive for fixpath to work.
12965       new_path="$CYGWIN_ROOT_PATH$input_path"
12966     fi
12967   fi
12968 
12969 
12970   if test "x$path" != "x$new_path"; then
12971     BOOT_JDK="$new_path"
12972     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12973 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12974   fi
12975 
12976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12977 
12978   path="$BOOT_JDK"
12979   has_colon=`$ECHO $path | $GREP ^.:`
12980   new_path="$path"
12981   if test "x$has_colon" = x; then
12982     # Not in mixed or Windows style, start by that.
12983     new_path=`cmd //c echo $path`
12984   fi
12985 
12986 
12987   input_path="$new_path"
12988   # Check if we need to convert this using DOS-style short mode. If the path
12989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12990   # take no chances and rewrite it.
12991   # Note: m4 eats our [], so we need to use [ and ] instead.
12992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12993   if test "x$has_forbidden_chars" != x; then
12994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12995     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12996   fi
12997 
12998 
12999   windows_path="$new_path"
13000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13001     unix_path=`$CYGPATH -u "$windows_path"`
13002     new_path="$unix_path"
13003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13005     new_path="$unix_path"
13006   fi
13007 
13008   if test "x$path" != "x$new_path"; then
13009     BOOT_JDK="$new_path"
13010     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13011 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13012   fi
13013 
13014   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13015   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13016 
13017   else
13018     # We're on a posix platform. Hooray! :)
13019     path="$BOOT_JDK"
13020     has_space=`$ECHO "$path" | $GREP " "`
13021     if test "x$has_space" != x; then
13022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13023 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13024       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13025     fi
13026 
13027     # Use eval to expand a potential ~
13028     eval path="$path"
13029     if test ! -f "$path" && test ! -d "$path"; then
13030       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13031     fi
13032 
13033     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13034   fi
13035 
13036               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13037 $as_echo_n "checking for Boot JDK... " >&6; }
13038               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13039 $as_echo "$BOOT_JDK" >&6; }
13040               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13041 $as_echo_n "checking Boot JDK version... " >&6; }
13042               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13043               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13044 $as_echo "$BOOT_JDK_VERSION" >&6; }
13045             fi # end check jdk version
13046           fi # end check rt.jar
13047         fi # end check javac
13048       fi # end check java
13049     fi # end check boot jdk found
13050   fi
13051 
13052 
13053   if test "x$BOOT_JDK_FOUND" = xno; then
13054     # Now execute the test
13055 
13056   if test "x$PROGRAMW6432" != x; then
13057     VIRTUAL_DIR="$PROGRAMW6432/Java"
13058 
13059   windows_path="$VIRTUAL_DIR"
13060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13061     unix_path=`$CYGPATH -u "$windows_path"`
13062     VIRTUAL_DIR="$unix_path"
13063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13065     VIRTUAL_DIR="$unix_path"
13066   fi
13067 
13068 
13069   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13070   BOOT_JDK_SUFFIX=""
13071   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13072   if test "x$ALL_JDKS_FOUND" != x; then
13073     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13074 
13075   if test "x$BOOT_JDK_FOUND" = xno; then
13076     # Now execute the test
13077 
13078         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13079         if test -d "$BOOT_JDK"; then
13080           BOOT_JDK_FOUND=maybe
13081           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13082 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13083         fi
13084 
13085 
13086     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13087     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13088       # Do we have a bin/java?
13089       if test ! -x "$BOOT_JDK/bin/java"; then
13090         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13091 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13092         BOOT_JDK_FOUND=no
13093       else
13094         # Do we have a bin/javac?
13095         if test ! -x "$BOOT_JDK/bin/javac"; then
13096           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13097 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13098           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13099 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13100           BOOT_JDK_FOUND=no
13101         else
13102           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13103           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13104             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13105 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13106             BOOT_JDK_FOUND=no
13107           else
13108             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13109             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13110 
13111             # Extra M4 quote needed to protect [] in grep expression.
13112             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13113             if test "x$FOUND_VERSION_78" = x; then
13114               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13115 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13116               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13117 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13118               BOOT_JDK_FOUND=no
13119             else
13120               # We're done! :-)
13121               BOOT_JDK_FOUND=yes
13122 
13123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13124 
13125   # Input might be given as Windows format, start by converting to
13126   # unix format.
13127   path="$BOOT_JDK"
13128   new_path=`$CYGPATH -u "$path"`
13129 
13130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13133   # "foo.exe" is OK but "foo" is an error.
13134   #
13135   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13136   # It is also a way to make sure we got the proper file name for the real test later on.
13137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13138   if test "x$test_shortpath" = x; then
13139     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13140 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13141     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13142   fi
13143 
13144   # Call helper function which possibly converts this using DOS-style short mode.
13145   # If so, the updated path is stored in $new_path.
13146 
13147   input_path="$new_path"
13148   # Check if we need to convert this using DOS-style short mode. If the path
13149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13150   # take no chances and rewrite it.
13151   # Note: m4 eats our [], so we need to use [ and ] instead.
13152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13153   if test "x$has_forbidden_chars" != x; then
13154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13155     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13156     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13157     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13158       # Going to short mode and back again did indeed matter. Since short mode is
13159       # case insensitive, let's make it lowercase to improve readability.
13160       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13161       # Now convert it back to Unix-stile (cygpath)
13162       input_path=`$CYGPATH -u "$shortmode_path"`
13163       new_path="$input_path"
13164     fi
13165   fi
13166 
13167   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13168   if test "x$test_cygdrive_prefix" = x; then
13169     # As a simple fix, exclude /usr/bin since it's not a real path.
13170     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13171       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13172       # a path prefixed by /cygdrive for fixpath to work.
13173       new_path="$CYGWIN_ROOT_PATH$input_path"
13174     fi
13175   fi
13176 
13177 
13178   if test "x$path" != "x$new_path"; then
13179     BOOT_JDK="$new_path"
13180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13181 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13182   fi
13183 
13184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13185 
13186   path="$BOOT_JDK"
13187   has_colon=`$ECHO $path | $GREP ^.:`
13188   new_path="$path"
13189   if test "x$has_colon" = x; then
13190     # Not in mixed or Windows style, start by that.
13191     new_path=`cmd //c echo $path`
13192   fi
13193 
13194 
13195   input_path="$new_path"
13196   # Check if we need to convert this using DOS-style short mode. If the path
13197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13198   # take no chances and rewrite it.
13199   # Note: m4 eats our [], so we need to use [ and ] instead.
13200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13201   if test "x$has_forbidden_chars" != x; then
13202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13203     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13204   fi
13205 
13206 
13207   windows_path="$new_path"
13208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13209     unix_path=`$CYGPATH -u "$windows_path"`
13210     new_path="$unix_path"
13211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13213     new_path="$unix_path"
13214   fi
13215 
13216   if test "x$path" != "x$new_path"; then
13217     BOOT_JDK="$new_path"
13218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13219 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13220   fi
13221 
13222   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13223   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13224 
13225   else
13226     # We're on a posix platform. Hooray! :)
13227     path="$BOOT_JDK"
13228     has_space=`$ECHO "$path" | $GREP " "`
13229     if test "x$has_space" != x; then
13230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13231 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13232       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13233     fi
13234 
13235     # Use eval to expand a potential ~
13236     eval path="$path"
13237     if test ! -f "$path" && test ! -d "$path"; then
13238       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13239     fi
13240 
13241     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13242   fi
13243 
13244               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13245 $as_echo_n "checking for Boot JDK... " >&6; }
13246               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13247 $as_echo "$BOOT_JDK" >&6; }
13248               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13249 $as_echo_n "checking Boot JDK version... " >&6; }
13250               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13251               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13252 $as_echo "$BOOT_JDK_VERSION" >&6; }
13253             fi # end check jdk version
13254           fi # end check rt.jar
13255         fi # end check javac
13256       fi # end check java
13257     fi # end check boot jdk found
13258   fi
13259 
13260     done
13261   fi
13262 
13263   fi
13264 
13265 
13266     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13267     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13268       # Do we have a bin/java?
13269       if test ! -x "$BOOT_JDK/bin/java"; then
13270         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13272         BOOT_JDK_FOUND=no
13273       else
13274         # Do we have a bin/javac?
13275         if test ! -x "$BOOT_JDK/bin/javac"; then
13276           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13278           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13279 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13280           BOOT_JDK_FOUND=no
13281         else
13282           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13283           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13284             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13286             BOOT_JDK_FOUND=no
13287           else
13288             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13289             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13290 
13291             # Extra M4 quote needed to protect [] in grep expression.
13292             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13293             if test "x$FOUND_VERSION_78" = x; then
13294               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13296               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13297 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13298               BOOT_JDK_FOUND=no
13299             else
13300               # We're done! :-)
13301               BOOT_JDK_FOUND=yes
13302 
13303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13304 
13305   # Input might be given as Windows format, start by converting to
13306   # unix format.
13307   path="$BOOT_JDK"
13308   new_path=`$CYGPATH -u "$path"`
13309 
13310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13313   # "foo.exe" is OK but "foo" is an error.
13314   #
13315   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13316   # It is also a way to make sure we got the proper file name for the real test later on.
13317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13318   if test "x$test_shortpath" = x; then
13319     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13320 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13321     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13322   fi
13323 
13324   # Call helper function which possibly converts this using DOS-style short mode.
13325   # If so, the updated path is stored in $new_path.
13326 
13327   input_path="$new_path"
13328   # Check if we need to convert this using DOS-style short mode. If the path
13329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13330   # take no chances and rewrite it.
13331   # Note: m4 eats our [], so we need to use [ and ] instead.
13332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13333   if test "x$has_forbidden_chars" != x; then
13334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13338       # Going to short mode and back again did indeed matter. Since short mode is
13339       # case insensitive, let's make it lowercase to improve readability.
13340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13341       # Now convert it back to Unix-stile (cygpath)
13342       input_path=`$CYGPATH -u "$shortmode_path"`
13343       new_path="$input_path"
13344     fi
13345   fi
13346 
13347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13348   if test "x$test_cygdrive_prefix" = x; then
13349     # As a simple fix, exclude /usr/bin since it's not a real path.
13350     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13352       # a path prefixed by /cygdrive for fixpath to work.
13353       new_path="$CYGWIN_ROOT_PATH$input_path"
13354     fi
13355   fi
13356 
13357 
13358   if test "x$path" != "x$new_path"; then
13359     BOOT_JDK="$new_path"
13360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13362   fi
13363 
13364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13365 
13366   path="$BOOT_JDK"
13367   has_colon=`$ECHO $path | $GREP ^.:`
13368   new_path="$path"
13369   if test "x$has_colon" = x; then
13370     # Not in mixed or Windows style, start by that.
13371     new_path=`cmd //c echo $path`
13372   fi
13373 
13374 
13375   input_path="$new_path"
13376   # Check if we need to convert this using DOS-style short mode. If the path
13377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13378   # take no chances and rewrite it.
13379   # Note: m4 eats our [], so we need to use [ and ] instead.
13380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13381   if test "x$has_forbidden_chars" != x; then
13382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13384   fi
13385 
13386 
13387   windows_path="$new_path"
13388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13389     unix_path=`$CYGPATH -u "$windows_path"`
13390     new_path="$unix_path"
13391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13393     new_path="$unix_path"
13394   fi
13395 
13396   if test "x$path" != "x$new_path"; then
13397     BOOT_JDK="$new_path"
13398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13399 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13400   fi
13401 
13402   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13403   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13404 
13405   else
13406     # We're on a posix platform. Hooray! :)
13407     path="$BOOT_JDK"
13408     has_space=`$ECHO "$path" | $GREP " "`
13409     if test "x$has_space" != x; then
13410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13411 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13412       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13413     fi
13414 
13415     # Use eval to expand a potential ~
13416     eval path="$path"
13417     if test ! -f "$path" && test ! -d "$path"; then
13418       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13419     fi
13420 
13421     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13422   fi
13423 
13424               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13425 $as_echo_n "checking for Boot JDK... " >&6; }
13426               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13427 $as_echo "$BOOT_JDK" >&6; }
13428               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13429 $as_echo_n "checking Boot JDK version... " >&6; }
13430               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13431               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13432 $as_echo "$BOOT_JDK_VERSION" >&6; }
13433             fi # end check jdk version
13434           fi # end check rt.jar
13435         fi # end check javac
13436       fi # end check java
13437     fi # end check boot jdk found
13438   fi
13439 
13440 
13441   if test "x$BOOT_JDK_FOUND" = xno; then
13442     # Now execute the test
13443 
13444   if test "x$PROGRAMFILES" != x; then
13445     VIRTUAL_DIR="$PROGRAMFILES/Java"
13446 
13447   windows_path="$VIRTUAL_DIR"
13448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13449     unix_path=`$CYGPATH -u "$windows_path"`
13450     VIRTUAL_DIR="$unix_path"
13451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13453     VIRTUAL_DIR="$unix_path"
13454   fi
13455 
13456 
13457   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13458   BOOT_JDK_SUFFIX=""
13459   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13460   if test "x$ALL_JDKS_FOUND" != x; then
13461     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13462 
13463   if test "x$BOOT_JDK_FOUND" = xno; then
13464     # Now execute the test
13465 
13466         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13467         if test -d "$BOOT_JDK"; then
13468           BOOT_JDK_FOUND=maybe
13469           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13470 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13471         fi
13472 
13473 
13474     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13475     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13476       # Do we have a bin/java?
13477       if test ! -x "$BOOT_JDK/bin/java"; then
13478         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13479 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13480         BOOT_JDK_FOUND=no
13481       else
13482         # Do we have a bin/javac?
13483         if test ! -x "$BOOT_JDK/bin/javac"; then
13484           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13485 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13486           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13487 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13488           BOOT_JDK_FOUND=no
13489         else
13490           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13491           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13492             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13493 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13494             BOOT_JDK_FOUND=no
13495           else
13496             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13497             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13498 
13499             # Extra M4 quote needed to protect [] in grep expression.
13500             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13501             if test "x$FOUND_VERSION_78" = x; then
13502               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13503 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13504               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13505 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13506               BOOT_JDK_FOUND=no
13507             else
13508               # We're done! :-)
13509               BOOT_JDK_FOUND=yes
13510 
13511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13512 
13513   # Input might be given as Windows format, start by converting to
13514   # unix format.
13515   path="$BOOT_JDK"
13516   new_path=`$CYGPATH -u "$path"`
13517 
13518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13521   # "foo.exe" is OK but "foo" is an error.
13522   #
13523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13524   # It is also a way to make sure we got the proper file name for the real test later on.
13525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13526   if test "x$test_shortpath" = x; then
13527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13528 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13529     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13530   fi
13531 
13532   # Call helper function which possibly converts this using DOS-style short mode.
13533   # If so, the updated path is stored in $new_path.
13534 
13535   input_path="$new_path"
13536   # Check if we need to convert this using DOS-style short mode. If the path
13537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13538   # take no chances and rewrite it.
13539   # Note: m4 eats our [], so we need to use [ and ] instead.
13540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13541   if test "x$has_forbidden_chars" != x; then
13542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13546       # Going to short mode and back again did indeed matter. Since short mode is
13547       # case insensitive, let's make it lowercase to improve readability.
13548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13549       # Now convert it back to Unix-stile (cygpath)
13550       input_path=`$CYGPATH -u "$shortmode_path"`
13551       new_path="$input_path"
13552     fi
13553   fi
13554 
13555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13556   if test "x$test_cygdrive_prefix" = x; then
13557     # As a simple fix, exclude /usr/bin since it's not a real path.
13558     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13560       # a path prefixed by /cygdrive for fixpath to work.
13561       new_path="$CYGWIN_ROOT_PATH$input_path"
13562     fi
13563   fi
13564 
13565 
13566   if test "x$path" != "x$new_path"; then
13567     BOOT_JDK="$new_path"
13568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13569 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13570   fi
13571 
13572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13573 
13574   path="$BOOT_JDK"
13575   has_colon=`$ECHO $path | $GREP ^.:`
13576   new_path="$path"
13577   if test "x$has_colon" = x; then
13578     # Not in mixed or Windows style, start by that.
13579     new_path=`cmd //c echo $path`
13580   fi
13581 
13582 
13583   input_path="$new_path"
13584   # Check if we need to convert this using DOS-style short mode. If the path
13585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13586   # take no chances and rewrite it.
13587   # Note: m4 eats our [], so we need to use [ and ] instead.
13588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13589   if test "x$has_forbidden_chars" != x; then
13590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13592   fi
13593 
13594 
13595   windows_path="$new_path"
13596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13597     unix_path=`$CYGPATH -u "$windows_path"`
13598     new_path="$unix_path"
13599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13601     new_path="$unix_path"
13602   fi
13603 
13604   if test "x$path" != "x$new_path"; then
13605     BOOT_JDK="$new_path"
13606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13607 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13608   fi
13609 
13610   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13611   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13612 
13613   else
13614     # We're on a posix platform. Hooray! :)
13615     path="$BOOT_JDK"
13616     has_space=`$ECHO "$path" | $GREP " "`
13617     if test "x$has_space" != x; then
13618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13619 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13620       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13621     fi
13622 
13623     # Use eval to expand a potential ~
13624     eval path="$path"
13625     if test ! -f "$path" && test ! -d "$path"; then
13626       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13627     fi
13628 
13629     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13630   fi
13631 
13632               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13633 $as_echo_n "checking for Boot JDK... " >&6; }
13634               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13635 $as_echo "$BOOT_JDK" >&6; }
13636               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13637 $as_echo_n "checking Boot JDK version... " >&6; }
13638               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13639               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13640 $as_echo "$BOOT_JDK_VERSION" >&6; }
13641             fi # end check jdk version
13642           fi # end check rt.jar
13643         fi # end check javac
13644       fi # end check java
13645     fi # end check boot jdk found
13646   fi
13647 
13648     done
13649   fi
13650 
13651   fi
13652 
13653 
13654     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13655     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13656       # Do we have a bin/java?
13657       if test ! -x "$BOOT_JDK/bin/java"; then
13658         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13660         BOOT_JDK_FOUND=no
13661       else
13662         # Do we have a bin/javac?
13663         if test ! -x "$BOOT_JDK/bin/javac"; then
13664           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13665 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13666           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13667 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13668           BOOT_JDK_FOUND=no
13669         else
13670           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13671           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13672             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13673 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13674             BOOT_JDK_FOUND=no
13675           else
13676             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13677             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13678 
13679             # Extra M4 quote needed to protect [] in grep expression.
13680             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13681             if test "x$FOUND_VERSION_78" = x; then
13682               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13683 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13684               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13685 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13686               BOOT_JDK_FOUND=no
13687             else
13688               # We're done! :-)
13689               BOOT_JDK_FOUND=yes
13690 
13691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13692 
13693   # Input might be given as Windows format, start by converting to
13694   # unix format.
13695   path="$BOOT_JDK"
13696   new_path=`$CYGPATH -u "$path"`
13697 
13698   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13699   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13700   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13701   # "foo.exe" is OK but "foo" is an error.
13702   #
13703   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13704   # It is also a way to make sure we got the proper file name for the real test later on.
13705   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13706   if test "x$test_shortpath" = x; then
13707     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13708 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13709     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13710   fi
13711 
13712   # Call helper function which possibly converts this using DOS-style short mode.
13713   # If so, the updated path is stored in $new_path.
13714 
13715   input_path="$new_path"
13716   # Check if we need to convert this using DOS-style short mode. If the path
13717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13718   # take no chances and rewrite it.
13719   # Note: m4 eats our [], so we need to use [ and ] instead.
13720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13721   if test "x$has_forbidden_chars" != x; then
13722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13723     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13724     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13725     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13726       # Going to short mode and back again did indeed matter. Since short mode is
13727       # case insensitive, let's make it lowercase to improve readability.
13728       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13729       # Now convert it back to Unix-stile (cygpath)
13730       input_path=`$CYGPATH -u "$shortmode_path"`
13731       new_path="$input_path"
13732     fi
13733   fi
13734 
13735   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13736   if test "x$test_cygdrive_prefix" = x; then
13737     # As a simple fix, exclude /usr/bin since it's not a real path.
13738     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13739       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13740       # a path prefixed by /cygdrive for fixpath to work.
13741       new_path="$CYGWIN_ROOT_PATH$input_path"
13742     fi
13743   fi
13744 
13745 
13746   if test "x$path" != "x$new_path"; then
13747     BOOT_JDK="$new_path"
13748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13749 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13750   fi
13751 
13752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13753 
13754   path="$BOOT_JDK"
13755   has_colon=`$ECHO $path | $GREP ^.:`
13756   new_path="$path"
13757   if test "x$has_colon" = x; then
13758     # Not in mixed or Windows style, start by that.
13759     new_path=`cmd //c echo $path`
13760   fi
13761 
13762 
13763   input_path="$new_path"
13764   # Check if we need to convert this using DOS-style short mode. If the path
13765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13766   # take no chances and rewrite it.
13767   # Note: m4 eats our [], so we need to use [ and ] instead.
13768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13769   if test "x$has_forbidden_chars" != x; then
13770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13771     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13772   fi
13773 
13774 
13775   windows_path="$new_path"
13776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13777     unix_path=`$CYGPATH -u "$windows_path"`
13778     new_path="$unix_path"
13779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13781     new_path="$unix_path"
13782   fi
13783 
13784   if test "x$path" != "x$new_path"; then
13785     BOOT_JDK="$new_path"
13786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13787 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13788   fi
13789 
13790   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13791   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13792 
13793   else
13794     # We're on a posix platform. Hooray! :)
13795     path="$BOOT_JDK"
13796     has_space=`$ECHO "$path" | $GREP " "`
13797     if test "x$has_space" != x; then
13798       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13799 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13800       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13801     fi
13802 
13803     # Use eval to expand a potential ~
13804     eval path="$path"
13805     if test ! -f "$path" && test ! -d "$path"; then
13806       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13807     fi
13808 
13809     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13810   fi
13811 
13812               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13813 $as_echo_n "checking for Boot JDK... " >&6; }
13814               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13815 $as_echo "$BOOT_JDK" >&6; }
13816               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13817 $as_echo_n "checking Boot JDK version... " >&6; }
13818               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13819               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13820 $as_echo "$BOOT_JDK_VERSION" >&6; }
13821             fi # end check jdk version
13822           fi # end check rt.jar
13823         fi # end check javac
13824       fi # end check java
13825     fi # end check boot jdk found
13826   fi
13827 
13828 
13829   if test "x$BOOT_JDK_FOUND" = xno; then
13830     # Now execute the test
13831 
13832   if test "x$ProgramFiles" != x; then
13833     VIRTUAL_DIR="$ProgramFiles/Java"
13834 
13835   windows_path="$VIRTUAL_DIR"
13836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13837     unix_path=`$CYGPATH -u "$windows_path"`
13838     VIRTUAL_DIR="$unix_path"
13839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13841     VIRTUAL_DIR="$unix_path"
13842   fi
13843 
13844 
13845   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13846   BOOT_JDK_SUFFIX=""
13847   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13848   if test "x$ALL_JDKS_FOUND" != x; then
13849     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13850 
13851   if test "x$BOOT_JDK_FOUND" = xno; then
13852     # Now execute the test
13853 
13854         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13855         if test -d "$BOOT_JDK"; then
13856           BOOT_JDK_FOUND=maybe
13857           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13858 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13859         fi
13860 
13861 
13862     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13863     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13864       # Do we have a bin/java?
13865       if test ! -x "$BOOT_JDK/bin/java"; then
13866         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13868         BOOT_JDK_FOUND=no
13869       else
13870         # Do we have a bin/javac?
13871         if test ! -x "$BOOT_JDK/bin/javac"; then
13872           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13873 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13874           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13875 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13876           BOOT_JDK_FOUND=no
13877         else
13878           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13879           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13880             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13881 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13882             BOOT_JDK_FOUND=no
13883           else
13884             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13885             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13886 
13887             # Extra M4 quote needed to protect [] in grep expression.
13888             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13889             if test "x$FOUND_VERSION_78" = x; then
13890               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13892               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13893 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13894               BOOT_JDK_FOUND=no
13895             else
13896               # We're done! :-)
13897               BOOT_JDK_FOUND=yes
13898 
13899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13900 
13901   # Input might be given as Windows format, start by converting to
13902   # unix format.
13903   path="$BOOT_JDK"
13904   new_path=`$CYGPATH -u "$path"`
13905 
13906   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13907   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13908   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13909   # "foo.exe" is OK but "foo" is an error.
13910   #
13911   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13912   # It is also a way to make sure we got the proper file name for the real test later on.
13913   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13914   if test "x$test_shortpath" = x; then
13915     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13916 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13917     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13918   fi
13919 
13920   # Call helper function which possibly converts this using DOS-style short mode.
13921   # If so, the updated path is stored in $new_path.
13922 
13923   input_path="$new_path"
13924   # Check if we need to convert this using DOS-style short mode. If the path
13925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13926   # take no chances and rewrite it.
13927   # Note: m4 eats our [], so we need to use [ and ] instead.
13928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13929   if test "x$has_forbidden_chars" != x; then
13930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13934       # Going to short mode and back again did indeed matter. Since short mode is
13935       # case insensitive, let's make it lowercase to improve readability.
13936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13937       # Now convert it back to Unix-stile (cygpath)
13938       input_path=`$CYGPATH -u "$shortmode_path"`
13939       new_path="$input_path"
13940     fi
13941   fi
13942 
13943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13944   if test "x$test_cygdrive_prefix" = x; then
13945     # As a simple fix, exclude /usr/bin since it's not a real path.
13946     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13948       # a path prefixed by /cygdrive for fixpath to work.
13949       new_path="$CYGWIN_ROOT_PATH$input_path"
13950     fi
13951   fi
13952 
13953 
13954   if test "x$path" != "x$new_path"; then
13955     BOOT_JDK="$new_path"
13956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13957 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13958   fi
13959 
13960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13961 
13962   path="$BOOT_JDK"
13963   has_colon=`$ECHO $path | $GREP ^.:`
13964   new_path="$path"
13965   if test "x$has_colon" = x; then
13966     # Not in mixed or Windows style, start by that.
13967     new_path=`cmd //c echo $path`
13968   fi
13969 
13970 
13971   input_path="$new_path"
13972   # Check if we need to convert this using DOS-style short mode. If the path
13973   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13974   # take no chances and rewrite it.
13975   # Note: m4 eats our [], so we need to use [ and ] instead.
13976   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13977   if test "x$has_forbidden_chars" != x; then
13978     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13979     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13980   fi
13981 
13982 
13983   windows_path="$new_path"
13984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13985     unix_path=`$CYGPATH -u "$windows_path"`
13986     new_path="$unix_path"
13987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13989     new_path="$unix_path"
13990   fi
13991 
13992   if test "x$path" != "x$new_path"; then
13993     BOOT_JDK="$new_path"
13994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13995 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13996   fi
13997 
13998   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13999   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14000 
14001   else
14002     # We're on a posix platform. Hooray! :)
14003     path="$BOOT_JDK"
14004     has_space=`$ECHO "$path" | $GREP " "`
14005     if test "x$has_space" != x; then
14006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14007 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14008       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14009     fi
14010 
14011     # Use eval to expand a potential ~
14012     eval path="$path"
14013     if test ! -f "$path" && test ! -d "$path"; then
14014       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14015     fi
14016 
14017     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14018   fi
14019 
14020               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14021 $as_echo_n "checking for Boot JDK... " >&6; }
14022               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14023 $as_echo "$BOOT_JDK" >&6; }
14024               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14025 $as_echo_n "checking Boot JDK version... " >&6; }
14026               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14027               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14028 $as_echo "$BOOT_JDK_VERSION" >&6; }
14029             fi # end check jdk version
14030           fi # end check rt.jar
14031         fi # end check javac
14032       fi # end check java
14033     fi # end check boot jdk found
14034   fi
14035 
14036     done
14037   fi
14038 
14039   fi
14040 
14041 
14042     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14043     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14044       # Do we have a bin/java?
14045       if test ! -x "$BOOT_JDK/bin/java"; then
14046         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14047 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14048         BOOT_JDK_FOUND=no
14049       else
14050         # Do we have a bin/javac?
14051         if test ! -x "$BOOT_JDK/bin/javac"; then
14052           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14053 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14054           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14055 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14056           BOOT_JDK_FOUND=no
14057         else
14058           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14059           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14060             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14061 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14062             BOOT_JDK_FOUND=no
14063           else
14064             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14065             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14066 
14067             # Extra M4 quote needed to protect [] in grep expression.
14068             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14069             if test "x$FOUND_VERSION_78" = x; then
14070               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14071 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14072               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14073 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14074               BOOT_JDK_FOUND=no
14075             else
14076               # We're done! :-)
14077               BOOT_JDK_FOUND=yes
14078 
14079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14080 
14081   # Input might be given as Windows format, start by converting to
14082   # unix format.
14083   path="$BOOT_JDK"
14084   new_path=`$CYGPATH -u "$path"`
14085 
14086   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14087   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14088   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14089   # "foo.exe" is OK but "foo" is an error.
14090   #
14091   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14092   # It is also a way to make sure we got the proper file name for the real test later on.
14093   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14094   if test "x$test_shortpath" = x; then
14095     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14096 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14097     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14098   fi
14099 
14100   # Call helper function which possibly converts this using DOS-style short mode.
14101   # If so, the updated path is stored in $new_path.
14102 
14103   input_path="$new_path"
14104   # Check if we need to convert this using DOS-style short mode. If the path
14105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14106   # take no chances and rewrite it.
14107   # Note: m4 eats our [], so we need to use [ and ] instead.
14108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14109   if test "x$has_forbidden_chars" != x; then
14110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14111     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14112     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14113     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14114       # Going to short mode and back again did indeed matter. Since short mode is
14115       # case insensitive, let's make it lowercase to improve readability.
14116       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14117       # Now convert it back to Unix-stile (cygpath)
14118       input_path=`$CYGPATH -u "$shortmode_path"`
14119       new_path="$input_path"
14120     fi
14121   fi
14122 
14123   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14124   if test "x$test_cygdrive_prefix" = x; then
14125     # As a simple fix, exclude /usr/bin since it's not a real path.
14126     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14127       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14128       # a path prefixed by /cygdrive for fixpath to work.
14129       new_path="$CYGWIN_ROOT_PATH$input_path"
14130     fi
14131   fi
14132 
14133 
14134   if test "x$path" != "x$new_path"; then
14135     BOOT_JDK="$new_path"
14136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14137 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14138   fi
14139 
14140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14141 
14142   path="$BOOT_JDK"
14143   has_colon=`$ECHO $path | $GREP ^.:`
14144   new_path="$path"
14145   if test "x$has_colon" = x; then
14146     # Not in mixed or Windows style, start by that.
14147     new_path=`cmd //c echo $path`
14148   fi
14149 
14150 
14151   input_path="$new_path"
14152   # Check if we need to convert this using DOS-style short mode. If the path
14153   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14154   # take no chances and rewrite it.
14155   # Note: m4 eats our [], so we need to use [ and ] instead.
14156   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14157   if test "x$has_forbidden_chars" != x; then
14158     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14159     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14160   fi
14161 
14162 
14163   windows_path="$new_path"
14164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14165     unix_path=`$CYGPATH -u "$windows_path"`
14166     new_path="$unix_path"
14167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14169     new_path="$unix_path"
14170   fi
14171 
14172   if test "x$path" != "x$new_path"; then
14173     BOOT_JDK="$new_path"
14174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14175 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14176   fi
14177 
14178   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14179   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14180 
14181   else
14182     # We're on a posix platform. Hooray! :)
14183     path="$BOOT_JDK"
14184     has_space=`$ECHO "$path" | $GREP " "`
14185     if test "x$has_space" != x; then
14186       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14187 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14188       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14189     fi
14190 
14191     # Use eval to expand a potential ~
14192     eval path="$path"
14193     if test ! -f "$path" && test ! -d "$path"; then
14194       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14195     fi
14196 
14197     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14198   fi
14199 
14200               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14201 $as_echo_n "checking for Boot JDK... " >&6; }
14202               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14203 $as_echo "$BOOT_JDK" >&6; }
14204               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14205 $as_echo_n "checking Boot JDK version... " >&6; }
14206               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14207               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14208 $as_echo "$BOOT_JDK_VERSION" >&6; }
14209             fi # end check jdk version
14210           fi # end check rt.jar
14211         fi # end check javac
14212       fi # end check java
14213     fi # end check boot jdk found
14214   fi
14215 
14216 
14217   if test "x$BOOT_JDK_FOUND" = xno; then
14218     # Now execute the test
14219 
14220   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14221   BOOT_JDK_SUFFIX=""
14222   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14223   if test "x$ALL_JDKS_FOUND" != x; then
14224     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14225 
14226   if test "x$BOOT_JDK_FOUND" = xno; then
14227     # Now execute the test
14228 
14229         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14230         if test -d "$BOOT_JDK"; then
14231           BOOT_JDK_FOUND=maybe
14232           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14233 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14234         fi
14235 
14236 
14237     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14238     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14239       # Do we have a bin/java?
14240       if test ! -x "$BOOT_JDK/bin/java"; then
14241         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14242 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14243         BOOT_JDK_FOUND=no
14244       else
14245         # Do we have a bin/javac?
14246         if test ! -x "$BOOT_JDK/bin/javac"; then
14247           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14248 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14249           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14250 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14251           BOOT_JDK_FOUND=no
14252         else
14253           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14254           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14255             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14257             BOOT_JDK_FOUND=no
14258           else
14259             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14260             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14261 
14262             # Extra M4 quote needed to protect [] in grep expression.
14263             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14264             if test "x$FOUND_VERSION_78" = x; then
14265               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14266 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14267               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14268 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14269               BOOT_JDK_FOUND=no
14270             else
14271               # We're done! :-)
14272               BOOT_JDK_FOUND=yes
14273 
14274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14275 
14276   # Input might be given as Windows format, start by converting to
14277   # unix format.
14278   path="$BOOT_JDK"
14279   new_path=`$CYGPATH -u "$path"`
14280 
14281   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14282   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14283   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14284   # "foo.exe" is OK but "foo" is an error.
14285   #
14286   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14287   # It is also a way to make sure we got the proper file name for the real test later on.
14288   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14289   if test "x$test_shortpath" = x; then
14290     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14291 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14292     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14293   fi
14294 
14295   # Call helper function which possibly converts this using DOS-style short mode.
14296   # If so, the updated path is stored in $new_path.
14297 
14298   input_path="$new_path"
14299   # Check if we need to convert this using DOS-style short mode. If the path
14300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14301   # take no chances and rewrite it.
14302   # Note: m4 eats our [], so we need to use [ and ] instead.
14303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14304   if test "x$has_forbidden_chars" != x; then
14305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14306     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14307     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14308     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14309       # Going to short mode and back again did indeed matter. Since short mode is
14310       # case insensitive, let's make it lowercase to improve readability.
14311       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14312       # Now convert it back to Unix-stile (cygpath)
14313       input_path=`$CYGPATH -u "$shortmode_path"`
14314       new_path="$input_path"
14315     fi
14316   fi
14317 
14318   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14319   if test "x$test_cygdrive_prefix" = x; then
14320     # As a simple fix, exclude /usr/bin since it's not a real path.
14321     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14322       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14323       # a path prefixed by /cygdrive for fixpath to work.
14324       new_path="$CYGWIN_ROOT_PATH$input_path"
14325     fi
14326   fi
14327 
14328 
14329   if test "x$path" != "x$new_path"; then
14330     BOOT_JDK="$new_path"
14331     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14332 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14333   fi
14334 
14335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14336 
14337   path="$BOOT_JDK"
14338   has_colon=`$ECHO $path | $GREP ^.:`
14339   new_path="$path"
14340   if test "x$has_colon" = x; then
14341     # Not in mixed or Windows style, start by that.
14342     new_path=`cmd //c echo $path`
14343   fi
14344 
14345 
14346   input_path="$new_path"
14347   # Check if we need to convert this using DOS-style short mode. If the path
14348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14349   # take no chances and rewrite it.
14350   # Note: m4 eats our [], so we need to use [ and ] instead.
14351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14352   if test "x$has_forbidden_chars" != x; then
14353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14354     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14355   fi
14356 
14357 
14358   windows_path="$new_path"
14359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14360     unix_path=`$CYGPATH -u "$windows_path"`
14361     new_path="$unix_path"
14362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14364     new_path="$unix_path"
14365   fi
14366 
14367   if test "x$path" != "x$new_path"; then
14368     BOOT_JDK="$new_path"
14369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14370 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14371   fi
14372 
14373   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14374   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14375 
14376   else
14377     # We're on a posix platform. Hooray! :)
14378     path="$BOOT_JDK"
14379     has_space=`$ECHO "$path" | $GREP " "`
14380     if test "x$has_space" != x; then
14381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14382 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14383       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14384     fi
14385 
14386     # Use eval to expand a potential ~
14387     eval path="$path"
14388     if test ! -f "$path" && test ! -d "$path"; then
14389       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14390     fi
14391 
14392     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14393   fi
14394 
14395               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14396 $as_echo_n "checking for Boot JDK... " >&6; }
14397               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14398 $as_echo "$BOOT_JDK" >&6; }
14399               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14400 $as_echo_n "checking Boot JDK version... " >&6; }
14401               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14402               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14403 $as_echo "$BOOT_JDK_VERSION" >&6; }
14404             fi # end check jdk version
14405           fi # end check rt.jar
14406         fi # end check javac
14407       fi # end check java
14408     fi # end check boot jdk found
14409   fi
14410 
14411     done
14412   fi
14413 
14414 
14415     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14416     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14417       # Do we have a bin/java?
14418       if test ! -x "$BOOT_JDK/bin/java"; then
14419         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14420 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14421         BOOT_JDK_FOUND=no
14422       else
14423         # Do we have a bin/javac?
14424         if test ! -x "$BOOT_JDK/bin/javac"; then
14425           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14426 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14427           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14428 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14429           BOOT_JDK_FOUND=no
14430         else
14431           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14432           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14433             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14435             BOOT_JDK_FOUND=no
14436           else
14437             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14438             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14439 
14440             # Extra M4 quote needed to protect [] in grep expression.
14441             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14442             if test "x$FOUND_VERSION_78" = x; then
14443               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14445               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14446 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14447               BOOT_JDK_FOUND=no
14448             else
14449               # We're done! :-)
14450               BOOT_JDK_FOUND=yes
14451 
14452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14453 
14454   # Input might be given as Windows format, start by converting to
14455   # unix format.
14456   path="$BOOT_JDK"
14457   new_path=`$CYGPATH -u "$path"`
14458 
14459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14462   # "foo.exe" is OK but "foo" is an error.
14463   #
14464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14465   # It is also a way to make sure we got the proper file name for the real test later on.
14466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14467   if test "x$test_shortpath" = x; then
14468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14469 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14470     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14471   fi
14472 
14473   # Call helper function which possibly converts this using DOS-style short mode.
14474   # If so, the updated path is stored in $new_path.
14475 
14476   input_path="$new_path"
14477   # Check if we need to convert this using DOS-style short mode. If the path
14478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14479   # take no chances and rewrite it.
14480   # Note: m4 eats our [], so we need to use [ and ] instead.
14481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14482   if test "x$has_forbidden_chars" != x; then
14483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14487       # Going to short mode and back again did indeed matter. Since short mode is
14488       # case insensitive, let's make it lowercase to improve readability.
14489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14490       # Now convert it back to Unix-stile (cygpath)
14491       input_path=`$CYGPATH -u "$shortmode_path"`
14492       new_path="$input_path"
14493     fi
14494   fi
14495 
14496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14497   if test "x$test_cygdrive_prefix" = x; then
14498     # As a simple fix, exclude /usr/bin since it's not a real path.
14499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14501       # a path prefixed by /cygdrive for fixpath to work.
14502       new_path="$CYGWIN_ROOT_PATH$input_path"
14503     fi
14504   fi
14505 
14506 
14507   if test "x$path" != "x$new_path"; then
14508     BOOT_JDK="$new_path"
14509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14510 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14511   fi
14512 
14513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14514 
14515   path="$BOOT_JDK"
14516   has_colon=`$ECHO $path | $GREP ^.:`
14517   new_path="$path"
14518   if test "x$has_colon" = x; then
14519     # Not in mixed or Windows style, start by that.
14520     new_path=`cmd //c echo $path`
14521   fi
14522 
14523 
14524   input_path="$new_path"
14525   # Check if we need to convert this using DOS-style short mode. If the path
14526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14527   # take no chances and rewrite it.
14528   # Note: m4 eats our [], so we need to use [ and ] instead.
14529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14530   if test "x$has_forbidden_chars" != x; then
14531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14533   fi
14534 
14535 
14536   windows_path="$new_path"
14537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14538     unix_path=`$CYGPATH -u "$windows_path"`
14539     new_path="$unix_path"
14540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14542     new_path="$unix_path"
14543   fi
14544 
14545   if test "x$path" != "x$new_path"; then
14546     BOOT_JDK="$new_path"
14547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14549   fi
14550 
14551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14553 
14554   else
14555     # We're on a posix platform. Hooray! :)
14556     path="$BOOT_JDK"
14557     has_space=`$ECHO "$path" | $GREP " "`
14558     if test "x$has_space" != x; then
14559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14560 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14561       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14562     fi
14563 
14564     # Use eval to expand a potential ~
14565     eval path="$path"
14566     if test ! -f "$path" && test ! -d "$path"; then
14567       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14568     fi
14569 
14570     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14571   fi
14572 
14573               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14574 $as_echo_n "checking for Boot JDK... " >&6; }
14575               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14576 $as_echo "$BOOT_JDK" >&6; }
14577               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14578 $as_echo_n "checking Boot JDK version... " >&6; }
14579               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14580               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14581 $as_echo "$BOOT_JDK_VERSION" >&6; }
14582             fi # end check jdk version
14583           fi # end check rt.jar
14584         fi # end check javac
14585       fi # end check java
14586     fi # end check boot jdk found
14587   fi
14588 
14589   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14590 
14591   if test "x$BOOT_JDK_FOUND" = xno; then
14592     # Now execute the test
14593 
14594   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14595   BOOT_JDK_SUFFIX="/Contents/Home"
14596   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14597   if test "x$ALL_JDKS_FOUND" != x; then
14598     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14599 
14600   if test "x$BOOT_JDK_FOUND" = xno; then
14601     # Now execute the test
14602 
14603         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14604         if test -d "$BOOT_JDK"; then
14605           BOOT_JDK_FOUND=maybe
14606           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14607 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14608         fi
14609 
14610 
14611     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14612     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14613       # Do we have a bin/java?
14614       if test ! -x "$BOOT_JDK/bin/java"; then
14615         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14616 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14617         BOOT_JDK_FOUND=no
14618       else
14619         # Do we have a bin/javac?
14620         if test ! -x "$BOOT_JDK/bin/javac"; then
14621           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14623           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14624 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14625           BOOT_JDK_FOUND=no
14626         else
14627           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14628           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14629             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14631             BOOT_JDK_FOUND=no
14632           else
14633             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14634             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14635 
14636             # Extra M4 quote needed to protect [] in grep expression.
14637             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14638             if test "x$FOUND_VERSION_78" = x; then
14639               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14641               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14642 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14643               BOOT_JDK_FOUND=no
14644             else
14645               # We're done! :-)
14646               BOOT_JDK_FOUND=yes
14647 
14648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14649 
14650   # Input might be given as Windows format, start by converting to
14651   # unix format.
14652   path="$BOOT_JDK"
14653   new_path=`$CYGPATH -u "$path"`
14654 
14655   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14656   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14657   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14658   # "foo.exe" is OK but "foo" is an error.
14659   #
14660   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14661   # It is also a way to make sure we got the proper file name for the real test later on.
14662   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14663   if test "x$test_shortpath" = x; then
14664     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14665 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14666     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14667   fi
14668 
14669   # Call helper function which possibly converts this using DOS-style short mode.
14670   # If so, the updated path is stored in $new_path.
14671 
14672   input_path="$new_path"
14673   # Check if we need to convert this using DOS-style short mode. If the path
14674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14675   # take no chances and rewrite it.
14676   # Note: m4 eats our [], so we need to use [ and ] instead.
14677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14678   if test "x$has_forbidden_chars" != x; then
14679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14683       # Going to short mode and back again did indeed matter. Since short mode is
14684       # case insensitive, let's make it lowercase to improve readability.
14685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14686       # Now convert it back to Unix-stile (cygpath)
14687       input_path=`$CYGPATH -u "$shortmode_path"`
14688       new_path="$input_path"
14689     fi
14690   fi
14691 
14692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14693   if test "x$test_cygdrive_prefix" = x; then
14694     # As a simple fix, exclude /usr/bin since it's not a real path.
14695     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14697       # a path prefixed by /cygdrive for fixpath to work.
14698       new_path="$CYGWIN_ROOT_PATH$input_path"
14699     fi
14700   fi
14701 
14702 
14703   if test "x$path" != "x$new_path"; then
14704     BOOT_JDK="$new_path"
14705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14706 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14707   fi
14708 
14709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14710 
14711   path="$BOOT_JDK"
14712   has_colon=`$ECHO $path | $GREP ^.:`
14713   new_path="$path"
14714   if test "x$has_colon" = x; then
14715     # Not in mixed or Windows style, start by that.
14716     new_path=`cmd //c echo $path`
14717   fi
14718 
14719 
14720   input_path="$new_path"
14721   # Check if we need to convert this using DOS-style short mode. If the path
14722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14723   # take no chances and rewrite it.
14724   # Note: m4 eats our [], so we need to use [ and ] instead.
14725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14726   if test "x$has_forbidden_chars" != x; then
14727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14729   fi
14730 
14731 
14732   windows_path="$new_path"
14733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14734     unix_path=`$CYGPATH -u "$windows_path"`
14735     new_path="$unix_path"
14736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14738     new_path="$unix_path"
14739   fi
14740 
14741   if test "x$path" != "x$new_path"; then
14742     BOOT_JDK="$new_path"
14743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14745   fi
14746 
14747   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14748   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14749 
14750   else
14751     # We're on a posix platform. Hooray! :)
14752     path="$BOOT_JDK"
14753     has_space=`$ECHO "$path" | $GREP " "`
14754     if test "x$has_space" != x; then
14755       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14756 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14757       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14758     fi
14759 
14760     # Use eval to expand a potential ~
14761     eval path="$path"
14762     if test ! -f "$path" && test ! -d "$path"; then
14763       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14764     fi
14765 
14766     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14767   fi
14768 
14769               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14770 $as_echo_n "checking for Boot JDK... " >&6; }
14771               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14772 $as_echo "$BOOT_JDK" >&6; }
14773               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14774 $as_echo_n "checking Boot JDK version... " >&6; }
14775               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14776               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14777 $as_echo "$BOOT_JDK_VERSION" >&6; }
14778             fi # end check jdk version
14779           fi # end check rt.jar
14780         fi # end check javac
14781       fi # end check java
14782     fi # end check boot jdk found
14783   fi
14784 
14785     done
14786   fi
14787 
14788 
14789     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14790     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14791       # Do we have a bin/java?
14792       if test ! -x "$BOOT_JDK/bin/java"; then
14793         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14794 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14795         BOOT_JDK_FOUND=no
14796       else
14797         # Do we have a bin/javac?
14798         if test ! -x "$BOOT_JDK/bin/javac"; then
14799           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14801           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14802 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14803           BOOT_JDK_FOUND=no
14804         else
14805           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14806           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14807             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14809             BOOT_JDK_FOUND=no
14810           else
14811             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14812             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14813 
14814             # Extra M4 quote needed to protect [] in grep expression.
14815             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14816             if test "x$FOUND_VERSION_78" = x; then
14817               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14818 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14819               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14820 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14821               BOOT_JDK_FOUND=no
14822             else
14823               # We're done! :-)
14824               BOOT_JDK_FOUND=yes
14825 
14826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14827 
14828   # Input might be given as Windows format, start by converting to
14829   # unix format.
14830   path="$BOOT_JDK"
14831   new_path=`$CYGPATH -u "$path"`
14832 
14833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14836   # "foo.exe" is OK but "foo" is an error.
14837   #
14838   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14839   # It is also a way to make sure we got the proper file name for the real test later on.
14840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14841   if test "x$test_shortpath" = x; then
14842     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14844     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14845   fi
14846 
14847   # Call helper function which possibly converts this using DOS-style short mode.
14848   # If so, the updated path is stored in $new_path.
14849 
14850   input_path="$new_path"
14851   # Check if we need to convert this using DOS-style short mode. If the path
14852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14853   # take no chances and rewrite it.
14854   # Note: m4 eats our [], so we need to use [ and ] instead.
14855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14856   if test "x$has_forbidden_chars" != x; then
14857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14858     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14859     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14860     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14861       # Going to short mode and back again did indeed matter. Since short mode is
14862       # case insensitive, let's make it lowercase to improve readability.
14863       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14864       # Now convert it back to Unix-stile (cygpath)
14865       input_path=`$CYGPATH -u "$shortmode_path"`
14866       new_path="$input_path"
14867     fi
14868   fi
14869 
14870   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14871   if test "x$test_cygdrive_prefix" = x; then
14872     # As a simple fix, exclude /usr/bin since it's not a real path.
14873     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14874       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14875       # a path prefixed by /cygdrive for fixpath to work.
14876       new_path="$CYGWIN_ROOT_PATH$input_path"
14877     fi
14878   fi
14879 
14880 
14881   if test "x$path" != "x$new_path"; then
14882     BOOT_JDK="$new_path"
14883     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14884 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14885   fi
14886 
14887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14888 
14889   path="$BOOT_JDK"
14890   has_colon=`$ECHO $path | $GREP ^.:`
14891   new_path="$path"
14892   if test "x$has_colon" = x; then
14893     # Not in mixed or Windows style, start by that.
14894     new_path=`cmd //c echo $path`
14895   fi
14896 
14897 
14898   input_path="$new_path"
14899   # Check if we need to convert this using DOS-style short mode. If the path
14900   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14901   # take no chances and rewrite it.
14902   # Note: m4 eats our [], so we need to use [ and ] instead.
14903   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14904   if test "x$has_forbidden_chars" != x; then
14905     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14906     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14907   fi
14908 
14909 
14910   windows_path="$new_path"
14911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14912     unix_path=`$CYGPATH -u "$windows_path"`
14913     new_path="$unix_path"
14914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14916     new_path="$unix_path"
14917   fi
14918 
14919   if test "x$path" != "x$new_path"; then
14920     BOOT_JDK="$new_path"
14921     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14922 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14923   fi
14924 
14925   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14926   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14927 
14928   else
14929     # We're on a posix platform. Hooray! :)
14930     path="$BOOT_JDK"
14931     has_space=`$ECHO "$path" | $GREP " "`
14932     if test "x$has_space" != x; then
14933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14934 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14935       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14936     fi
14937 
14938     # Use eval to expand a potential ~
14939     eval path="$path"
14940     if test ! -f "$path" && test ! -d "$path"; then
14941       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14942     fi
14943 
14944     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14945   fi
14946 
14947               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14948 $as_echo_n "checking for Boot JDK... " >&6; }
14949               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14950 $as_echo "$BOOT_JDK" >&6; }
14951               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14952 $as_echo_n "checking Boot JDK version... " >&6; }
14953               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14954               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14955 $as_echo "$BOOT_JDK_VERSION" >&6; }
14956             fi # end check jdk version
14957           fi # end check rt.jar
14958         fi # end check javac
14959       fi # end check java
14960     fi # end check boot jdk found
14961   fi
14962 
14963 
14964   if test "x$BOOT_JDK_FOUND" = xno; then
14965     # Now execute the test
14966 
14967   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14968   BOOT_JDK_SUFFIX="/Contents/Home"
14969   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14970   if test "x$ALL_JDKS_FOUND" != x; then
14971     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14972 
14973   if test "x$BOOT_JDK_FOUND" = xno; then
14974     # Now execute the test
14975 
14976         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14977         if test -d "$BOOT_JDK"; then
14978           BOOT_JDK_FOUND=maybe
14979           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14980 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14981         fi
14982 
14983 
14984     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14985     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14986       # Do we have a bin/java?
14987       if test ! -x "$BOOT_JDK/bin/java"; then
14988         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14990         BOOT_JDK_FOUND=no
14991       else
14992         # Do we have a bin/javac?
14993         if test ! -x "$BOOT_JDK/bin/javac"; then
14994           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14995 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14996           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14997 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14998           BOOT_JDK_FOUND=no
14999         else
15000           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15001           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15002             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15004             BOOT_JDK_FOUND=no
15005           else
15006             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15007             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15008 
15009             # Extra M4 quote needed to protect [] in grep expression.
15010             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15011             if test "x$FOUND_VERSION_78" = x; then
15012               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15013 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15014               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15015 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15016               BOOT_JDK_FOUND=no
15017             else
15018               # We're done! :-)
15019               BOOT_JDK_FOUND=yes
15020 
15021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15022 
15023   # Input might be given as Windows format, start by converting to
15024   # unix format.
15025   path="$BOOT_JDK"
15026   new_path=`$CYGPATH -u "$path"`
15027 
15028   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15029   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15030   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15031   # "foo.exe" is OK but "foo" is an error.
15032   #
15033   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15034   # It is also a way to make sure we got the proper file name for the real test later on.
15035   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15036   if test "x$test_shortpath" = x; then
15037     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15038 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15039     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15040   fi
15041 
15042   # Call helper function which possibly converts this using DOS-style short mode.
15043   # If so, the updated path is stored in $new_path.
15044 
15045   input_path="$new_path"
15046   # Check if we need to convert this using DOS-style short mode. If the path
15047   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15048   # take no chances and rewrite it.
15049   # Note: m4 eats our [], so we need to use [ and ] instead.
15050   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15051   if test "x$has_forbidden_chars" != x; then
15052     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15053     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15054     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15055     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15056       # Going to short mode and back again did indeed matter. Since short mode is
15057       # case insensitive, let's make it lowercase to improve readability.
15058       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15059       # Now convert it back to Unix-stile (cygpath)
15060       input_path=`$CYGPATH -u "$shortmode_path"`
15061       new_path="$input_path"
15062     fi
15063   fi
15064 
15065   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15066   if test "x$test_cygdrive_prefix" = x; then
15067     # As a simple fix, exclude /usr/bin since it's not a real path.
15068     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15069       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15070       # a path prefixed by /cygdrive for fixpath to work.
15071       new_path="$CYGWIN_ROOT_PATH$input_path"
15072     fi
15073   fi
15074 
15075 
15076   if test "x$path" != "x$new_path"; then
15077     BOOT_JDK="$new_path"
15078     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15079 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15080   fi
15081 
15082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15083 
15084   path="$BOOT_JDK"
15085   has_colon=`$ECHO $path | $GREP ^.:`
15086   new_path="$path"
15087   if test "x$has_colon" = x; then
15088     # Not in mixed or Windows style, start by that.
15089     new_path=`cmd //c echo $path`
15090   fi
15091 
15092 
15093   input_path="$new_path"
15094   # Check if we need to convert this using DOS-style short mode. If the path
15095   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15096   # take no chances and rewrite it.
15097   # Note: m4 eats our [], so we need to use [ and ] instead.
15098   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15099   if test "x$has_forbidden_chars" != x; then
15100     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15101     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15102   fi
15103 
15104 
15105   windows_path="$new_path"
15106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15107     unix_path=`$CYGPATH -u "$windows_path"`
15108     new_path="$unix_path"
15109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15111     new_path="$unix_path"
15112   fi
15113 
15114   if test "x$path" != "x$new_path"; then
15115     BOOT_JDK="$new_path"
15116     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15117 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15118   fi
15119 
15120   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15121   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15122 
15123   else
15124     # We're on a posix platform. Hooray! :)
15125     path="$BOOT_JDK"
15126     has_space=`$ECHO "$path" | $GREP " "`
15127     if test "x$has_space" != x; then
15128       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15130       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15131     fi
15132 
15133     # Use eval to expand a potential ~
15134     eval path="$path"
15135     if test ! -f "$path" && test ! -d "$path"; then
15136       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15137     fi
15138 
15139     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15140   fi
15141 
15142               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15143 $as_echo_n "checking for Boot JDK... " >&6; }
15144               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15145 $as_echo "$BOOT_JDK" >&6; }
15146               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15147 $as_echo_n "checking Boot JDK version... " >&6; }
15148               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15149               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15150 $as_echo "$BOOT_JDK_VERSION" >&6; }
15151             fi # end check jdk version
15152           fi # end check rt.jar
15153         fi # end check javac
15154       fi # end check java
15155     fi # end check boot jdk found
15156   fi
15157 
15158     done
15159   fi
15160 
15161 
15162     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15163     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15164       # Do we have a bin/java?
15165       if test ! -x "$BOOT_JDK/bin/java"; then
15166         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15167 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15168         BOOT_JDK_FOUND=no
15169       else
15170         # Do we have a bin/javac?
15171         if test ! -x "$BOOT_JDK/bin/javac"; then
15172           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15173 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15174           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15175 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15176           BOOT_JDK_FOUND=no
15177         else
15178           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15179           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15180             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15182             BOOT_JDK_FOUND=no
15183           else
15184             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15185             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15186 
15187             # Extra M4 quote needed to protect [] in grep expression.
15188             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15189             if test "x$FOUND_VERSION_78" = x; then
15190               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15192               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15193 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15194               BOOT_JDK_FOUND=no
15195             else
15196               # We're done! :-)
15197               BOOT_JDK_FOUND=yes
15198 
15199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15200 
15201   # Input might be given as Windows format, start by converting to
15202   # unix format.
15203   path="$BOOT_JDK"
15204   new_path=`$CYGPATH -u "$path"`
15205 
15206   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15207   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15208   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15209   # "foo.exe" is OK but "foo" is an error.
15210   #
15211   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15212   # It is also a way to make sure we got the proper file name for the real test later on.
15213   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15214   if test "x$test_shortpath" = x; then
15215     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15217     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15218   fi
15219 
15220   # Call helper function which possibly converts this using DOS-style short mode.
15221   # If so, the updated path is stored in $new_path.
15222 
15223   input_path="$new_path"
15224   # Check if we need to convert this using DOS-style short mode. If the path
15225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15226   # take no chances and rewrite it.
15227   # Note: m4 eats our [], so we need to use [ and ] instead.
15228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15229   if test "x$has_forbidden_chars" != x; then
15230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15231     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15232     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15233     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15234       # Going to short mode and back again did indeed matter. Since short mode is
15235       # case insensitive, let's make it lowercase to improve readability.
15236       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15237       # Now convert it back to Unix-stile (cygpath)
15238       input_path=`$CYGPATH -u "$shortmode_path"`
15239       new_path="$input_path"
15240     fi
15241   fi
15242 
15243   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15244   if test "x$test_cygdrive_prefix" = x; then
15245     # As a simple fix, exclude /usr/bin since it's not a real path.
15246     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15247       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15248       # a path prefixed by /cygdrive for fixpath to work.
15249       new_path="$CYGWIN_ROOT_PATH$input_path"
15250     fi
15251   fi
15252 
15253 
15254   if test "x$path" != "x$new_path"; then
15255     BOOT_JDK="$new_path"
15256     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15257 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15258   fi
15259 
15260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15261 
15262   path="$BOOT_JDK"
15263   has_colon=`$ECHO $path | $GREP ^.:`
15264   new_path="$path"
15265   if test "x$has_colon" = x; then
15266     # Not in mixed or Windows style, start by that.
15267     new_path=`cmd //c echo $path`
15268   fi
15269 
15270 
15271   input_path="$new_path"
15272   # Check if we need to convert this using DOS-style short mode. If the path
15273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15274   # take no chances and rewrite it.
15275   # Note: m4 eats our [], so we need to use [ and ] instead.
15276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15277   if test "x$has_forbidden_chars" != x; then
15278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15279     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15280   fi
15281 
15282 
15283   windows_path="$new_path"
15284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15285     unix_path=`$CYGPATH -u "$windows_path"`
15286     new_path="$unix_path"
15287   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15288     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15289     new_path="$unix_path"
15290   fi
15291 
15292   if test "x$path" != "x$new_path"; then
15293     BOOT_JDK="$new_path"
15294     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15295 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15296   fi
15297 
15298   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15299   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15300 
15301   else
15302     # We're on a posix platform. Hooray! :)
15303     path="$BOOT_JDK"
15304     has_space=`$ECHO "$path" | $GREP " "`
15305     if test "x$has_space" != x; then
15306       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15307 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15308       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15309     fi
15310 
15311     # Use eval to expand a potential ~
15312     eval path="$path"
15313     if test ! -f "$path" && test ! -d "$path"; then
15314       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15315     fi
15316 
15317     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15318   fi
15319 
15320               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15321 $as_echo_n "checking for Boot JDK... " >&6; }
15322               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15323 $as_echo "$BOOT_JDK" >&6; }
15324               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15325 $as_echo_n "checking Boot JDK version... " >&6; }
15326               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15327               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15328 $as_echo "$BOOT_JDK_VERSION" >&6; }
15329             fi # end check jdk version
15330           fi # end check rt.jar
15331         fi # end check javac
15332       fi # end check java
15333     fi # end check boot jdk found
15334   fi
15335 
15336   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15337 
15338   if test "x$BOOT_JDK_FOUND" = xno; then
15339     # Now execute the test
15340 
15341   BOOT_JDK_PREFIX="/usr/lib/jvm"
15342   BOOT_JDK_SUFFIX=""
15343   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15344   if test "x$ALL_JDKS_FOUND" != x; then
15345     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15346 
15347   if test "x$BOOT_JDK_FOUND" = xno; then
15348     # Now execute the test
15349 
15350         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15351         if test -d "$BOOT_JDK"; then
15352           BOOT_JDK_FOUND=maybe
15353           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15354 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15355         fi
15356 
15357 
15358     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15359     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15360       # Do we have a bin/java?
15361       if test ! -x "$BOOT_JDK/bin/java"; then
15362         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15363 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15364         BOOT_JDK_FOUND=no
15365       else
15366         # Do we have a bin/javac?
15367         if test ! -x "$BOOT_JDK/bin/javac"; then
15368           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15370           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15371 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15372           BOOT_JDK_FOUND=no
15373         else
15374           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15375           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15376             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15377 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15378             BOOT_JDK_FOUND=no
15379           else
15380             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15381             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15382 
15383             # Extra M4 quote needed to protect [] in grep expression.
15384             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15385             if test "x$FOUND_VERSION_78" = x; then
15386               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15387 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15388               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15389 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15390               BOOT_JDK_FOUND=no
15391             else
15392               # We're done! :-)
15393               BOOT_JDK_FOUND=yes
15394 
15395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15396 
15397   # Input might be given as Windows format, start by converting to
15398   # unix format.
15399   path="$BOOT_JDK"
15400   new_path=`$CYGPATH -u "$path"`
15401 
15402   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15403   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15404   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15405   # "foo.exe" is OK but "foo" is an error.
15406   #
15407   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15408   # It is also a way to make sure we got the proper file name for the real test later on.
15409   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15410   if test "x$test_shortpath" = x; then
15411     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15412 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15413     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15414   fi
15415 
15416   # Call helper function which possibly converts this using DOS-style short mode.
15417   # If so, the updated path is stored in $new_path.
15418 
15419   input_path="$new_path"
15420   # Check if we need to convert this using DOS-style short mode. If the path
15421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15422   # take no chances and rewrite it.
15423   # Note: m4 eats our [], so we need to use [ and ] instead.
15424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15425   if test "x$has_forbidden_chars" != x; then
15426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15427     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15428     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15429     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15430       # Going to short mode and back again did indeed matter. Since short mode is
15431       # case insensitive, let's make it lowercase to improve readability.
15432       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15433       # Now convert it back to Unix-stile (cygpath)
15434       input_path=`$CYGPATH -u "$shortmode_path"`
15435       new_path="$input_path"
15436     fi
15437   fi
15438 
15439   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15440   if test "x$test_cygdrive_prefix" = x; then
15441     # As a simple fix, exclude /usr/bin since it's not a real path.
15442     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15443       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15444       # a path prefixed by /cygdrive for fixpath to work.
15445       new_path="$CYGWIN_ROOT_PATH$input_path"
15446     fi
15447   fi
15448 
15449 
15450   if test "x$path" != "x$new_path"; then
15451     BOOT_JDK="$new_path"
15452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15453 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15454   fi
15455 
15456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15457 
15458   path="$BOOT_JDK"
15459   has_colon=`$ECHO $path | $GREP ^.:`
15460   new_path="$path"
15461   if test "x$has_colon" = x; then
15462     # Not in mixed or Windows style, start by that.
15463     new_path=`cmd //c echo $path`
15464   fi
15465 
15466 
15467   input_path="$new_path"
15468   # Check if we need to convert this using DOS-style short mode. If the path
15469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15470   # take no chances and rewrite it.
15471   # Note: m4 eats our [], so we need to use [ and ] instead.
15472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15473   if test "x$has_forbidden_chars" != x; then
15474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15476   fi
15477 
15478 
15479   windows_path="$new_path"
15480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15481     unix_path=`$CYGPATH -u "$windows_path"`
15482     new_path="$unix_path"
15483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15484     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15485     new_path="$unix_path"
15486   fi
15487 
15488   if test "x$path" != "x$new_path"; then
15489     BOOT_JDK="$new_path"
15490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15491 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15492   fi
15493 
15494   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15495   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15496 
15497   else
15498     # We're on a posix platform. Hooray! :)
15499     path="$BOOT_JDK"
15500     has_space=`$ECHO "$path" | $GREP " "`
15501     if test "x$has_space" != x; then
15502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15503 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15504       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15505     fi
15506 
15507     # Use eval to expand a potential ~
15508     eval path="$path"
15509     if test ! -f "$path" && test ! -d "$path"; then
15510       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15511     fi
15512 
15513     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15514   fi
15515 
15516               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15517 $as_echo_n "checking for Boot JDK... " >&6; }
15518               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15519 $as_echo "$BOOT_JDK" >&6; }
15520               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15521 $as_echo_n "checking Boot JDK version... " >&6; }
15522               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15523               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15524 $as_echo "$BOOT_JDK_VERSION" >&6; }
15525             fi # end check jdk version
15526           fi # end check rt.jar
15527         fi # end check javac
15528       fi # end check java
15529     fi # end check boot jdk found
15530   fi
15531 
15532     done
15533   fi
15534 
15535 
15536     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15537     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15538       # Do we have a bin/java?
15539       if test ! -x "$BOOT_JDK/bin/java"; then
15540         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15541 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15542         BOOT_JDK_FOUND=no
15543       else
15544         # Do we have a bin/javac?
15545         if test ! -x "$BOOT_JDK/bin/javac"; then
15546           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15547 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15548           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15549 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15550           BOOT_JDK_FOUND=no
15551         else
15552           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15553           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15554             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15555 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15556             BOOT_JDK_FOUND=no
15557           else
15558             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15559             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15560 
15561             # Extra M4 quote needed to protect [] in grep expression.
15562             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15563             if test "x$FOUND_VERSION_78" = x; then
15564               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15565 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15566               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15567 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15568               BOOT_JDK_FOUND=no
15569             else
15570               # We're done! :-)
15571               BOOT_JDK_FOUND=yes
15572 
15573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15574 
15575   # Input might be given as Windows format, start by converting to
15576   # unix format.
15577   path="$BOOT_JDK"
15578   new_path=`$CYGPATH -u "$path"`
15579 
15580   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15581   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15582   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15583   # "foo.exe" is OK but "foo" is an error.
15584   #
15585   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15586   # It is also a way to make sure we got the proper file name for the real test later on.
15587   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15588   if test "x$test_shortpath" = x; then
15589     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15591     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15592   fi
15593 
15594   # Call helper function which possibly converts this using DOS-style short mode.
15595   # If so, the updated path is stored in $new_path.
15596 
15597   input_path="$new_path"
15598   # Check if we need to convert this using DOS-style short mode. If the path
15599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15600   # take no chances and rewrite it.
15601   # Note: m4 eats our [], so we need to use [ and ] instead.
15602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15603   if test "x$has_forbidden_chars" != x; then
15604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15605     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15606     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15607     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15608       # Going to short mode and back again did indeed matter. Since short mode is
15609       # case insensitive, let's make it lowercase to improve readability.
15610       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15611       # Now convert it back to Unix-stile (cygpath)
15612       input_path=`$CYGPATH -u "$shortmode_path"`
15613       new_path="$input_path"
15614     fi
15615   fi
15616 
15617   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15618   if test "x$test_cygdrive_prefix" = x; then
15619     # As a simple fix, exclude /usr/bin since it's not a real path.
15620     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15621       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15622       # a path prefixed by /cygdrive for fixpath to work.
15623       new_path="$CYGWIN_ROOT_PATH$input_path"
15624     fi
15625   fi
15626 
15627 
15628   if test "x$path" != "x$new_path"; then
15629     BOOT_JDK="$new_path"
15630     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15631 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15632   fi
15633 
15634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15635 
15636   path="$BOOT_JDK"
15637   has_colon=`$ECHO $path | $GREP ^.:`
15638   new_path="$path"
15639   if test "x$has_colon" = x; then
15640     # Not in mixed or Windows style, start by that.
15641     new_path=`cmd //c echo $path`
15642   fi
15643 
15644 
15645   input_path="$new_path"
15646   # Check if we need to convert this using DOS-style short mode. If the path
15647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15648   # take no chances and rewrite it.
15649   # Note: m4 eats our [], so we need to use [ and ] instead.
15650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15651   if test "x$has_forbidden_chars" != x; then
15652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15653     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15654   fi
15655 
15656 
15657   windows_path="$new_path"
15658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15659     unix_path=`$CYGPATH -u "$windows_path"`
15660     new_path="$unix_path"
15661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15663     new_path="$unix_path"
15664   fi
15665 
15666   if test "x$path" != "x$new_path"; then
15667     BOOT_JDK="$new_path"
15668     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15669 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15670   fi
15671 
15672   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15673   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15674 
15675   else
15676     # We're on a posix platform. Hooray! :)
15677     path="$BOOT_JDK"
15678     has_space=`$ECHO "$path" | $GREP " "`
15679     if test "x$has_space" != x; then
15680       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15681 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15682       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15683     fi
15684 
15685     # Use eval to expand a potential ~
15686     eval path="$path"
15687     if test ! -f "$path" && test ! -d "$path"; then
15688       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15689     fi
15690 
15691     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15692   fi
15693 
15694               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15695 $as_echo_n "checking for Boot JDK... " >&6; }
15696               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15697 $as_echo "$BOOT_JDK" >&6; }
15698               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15699 $as_echo_n "checking Boot JDK version... " >&6; }
15700               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15701               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15702 $as_echo "$BOOT_JDK_VERSION" >&6; }
15703             fi # end check jdk version
15704           fi # end check rt.jar
15705         fi # end check javac
15706       fi # end check java
15707     fi # end check boot jdk found
15708   fi
15709 
15710   fi
15711 
15712 
15713     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15714     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15715       # Do we have a bin/java?
15716       if test ! -x "$BOOT_JDK/bin/java"; then
15717         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15718 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15719         BOOT_JDK_FOUND=no
15720       else
15721         # Do we have a bin/javac?
15722         if test ! -x "$BOOT_JDK/bin/javac"; then
15723           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15724 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15725           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15726 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15727           BOOT_JDK_FOUND=no
15728         else
15729           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15730           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15731             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15733             BOOT_JDK_FOUND=no
15734           else
15735             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15736             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15737 
15738             # Extra M4 quote needed to protect [] in grep expression.
15739             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15740             if test "x$FOUND_VERSION_78" = x; then
15741               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15742 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15743               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15744 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15745               BOOT_JDK_FOUND=no
15746             else
15747               # We're done! :-)
15748               BOOT_JDK_FOUND=yes
15749 
15750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15751 
15752   # Input might be given as Windows format, start by converting to
15753   # unix format.
15754   path="$BOOT_JDK"
15755   new_path=`$CYGPATH -u "$path"`
15756 
15757   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15758   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15759   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15760   # "foo.exe" is OK but "foo" is an error.
15761   #
15762   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15763   # It is also a way to make sure we got the proper file name for the real test later on.
15764   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15765   if test "x$test_shortpath" = x; then
15766     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15767 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15768     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15769   fi
15770 
15771   # Call helper function which possibly converts this using DOS-style short mode.
15772   # If so, the updated path is stored in $new_path.
15773 
15774   input_path="$new_path"
15775   # Check if we need to convert this using DOS-style short mode. If the path
15776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15777   # take no chances and rewrite it.
15778   # Note: m4 eats our [], so we need to use [ and ] instead.
15779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15780   if test "x$has_forbidden_chars" != x; then
15781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15782     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15783     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15784     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15785       # Going to short mode and back again did indeed matter. Since short mode is
15786       # case insensitive, let's make it lowercase to improve readability.
15787       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15788       # Now convert it back to Unix-stile (cygpath)
15789       input_path=`$CYGPATH -u "$shortmode_path"`
15790       new_path="$input_path"
15791     fi
15792   fi
15793 
15794   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15795   if test "x$test_cygdrive_prefix" = x; then
15796     # As a simple fix, exclude /usr/bin since it's not a real path.
15797     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15798       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15799       # a path prefixed by /cygdrive for fixpath to work.
15800       new_path="$CYGWIN_ROOT_PATH$input_path"
15801     fi
15802   fi
15803 
15804 
15805   if test "x$path" != "x$new_path"; then
15806     BOOT_JDK="$new_path"
15807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15808 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15809   fi
15810 
15811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15812 
15813   path="$BOOT_JDK"
15814   has_colon=`$ECHO $path | $GREP ^.:`
15815   new_path="$path"
15816   if test "x$has_colon" = x; then
15817     # Not in mixed or Windows style, start by that.
15818     new_path=`cmd //c echo $path`
15819   fi
15820 
15821 
15822   input_path="$new_path"
15823   # Check if we need to convert this using DOS-style short mode. If the path
15824   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15825   # take no chances and rewrite it.
15826   # Note: m4 eats our [], so we need to use [ and ] instead.
15827   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15828   if test "x$has_forbidden_chars" != x; then
15829     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15830     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15831   fi
15832 
15833 
15834   windows_path="$new_path"
15835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15836     unix_path=`$CYGPATH -u "$windows_path"`
15837     new_path="$unix_path"
15838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15840     new_path="$unix_path"
15841   fi
15842 
15843   if test "x$path" != "x$new_path"; then
15844     BOOT_JDK="$new_path"
15845     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15846 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15847   fi
15848 
15849   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15850   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15851 
15852   else
15853     # We're on a posix platform. Hooray! :)
15854     path="$BOOT_JDK"
15855     has_space=`$ECHO "$path" | $GREP " "`
15856     if test "x$has_space" != x; then
15857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15858 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15859       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15860     fi
15861 
15862     # Use eval to expand a potential ~
15863     eval path="$path"
15864     if test ! -f "$path" && test ! -d "$path"; then
15865       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15866     fi
15867 
15868     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15869   fi
15870 
15871               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15872 $as_echo_n "checking for Boot JDK... " >&6; }
15873               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15874 $as_echo "$BOOT_JDK" >&6; }
15875               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15876 $as_echo_n "checking Boot JDK version... " >&6; }
15877               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15878               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15879 $as_echo "$BOOT_JDK_VERSION" >&6; }
15880             fi # end check jdk version
15881           fi # end check rt.jar
15882         fi # end check javac
15883       fi # end check java
15884     fi # end check boot jdk found
15885   fi
15886 
15887 
15888   # If we haven't found anything yet, we've truly lost. Give up.
15889   if test "x$BOOT_JDK_FOUND" = xno; then
15890 
15891   # Print a helpful message on how to acquire the necessary build dependency.
15892   # openjdk is the help tag: freetype, cups, pulse, alsa etc
15893   MISSING_DEPENDENCY=openjdk
15894 
15895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15896     cygwin_help $MISSING_DEPENDENCY
15897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15898     msys_help $MISSING_DEPENDENCY
15899   else
15900     PKGHANDLER_COMMAND=
15901 
15902     case $PKGHANDLER in
15903       apt-get)
15904         apt_help     $MISSING_DEPENDENCY ;;
15905       yum)
15906         yum_help     $MISSING_DEPENDENCY ;;
15907       port)
15908         port_help    $MISSING_DEPENDENCY ;;
15909       pkgutil)
15910         pkgutil_help $MISSING_DEPENDENCY ;;
15911       pkgadd)
15912         pkgadd_help  $MISSING_DEPENDENCY ;;
15913     esac
15914 
15915     if test "x$PKGHANDLER_COMMAND" != x; then
15916       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15917     fi
15918   fi
15919 
15920     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15921 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15922     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15923 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15924     as_fn_error $? "Cannot continue" "$LINENO" 5
15925   fi
15926 
15927   # Setup proper paths for what we found
15928   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15929   if test ! -f "$BOOT_RTJAR"; then
15930     # On MacOSX it is called classes.jar
15931     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15932     if test -f "$BOOT_RTJAR"; then
15933       # Remove the ..
15934       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15935     fi
15936   fi
15937   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15938   BOOT_JDK="$BOOT_JDK"
15939 
15940 
15941 
15942 
15943   # Setup tools from the Boot JDK.
15944 
15945   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15946 $as_echo_n "checking for java in Boot JDK... " >&6; }
15947   JAVA=$BOOT_JDK/bin/java
15948   if test ! -x $JAVA; then
15949     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15950 $as_echo "not found" >&6; }
15951     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15952 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15953     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15954   fi
15955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15956 $as_echo "ok" >&6; }
15957 
15958 
15959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15960 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15961   JAVAC=$BOOT_JDK/bin/javac
15962   if test ! -x $JAVAC; then
15963     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15964 $as_echo "not found" >&6; }
15965     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15966 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15967     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15968   fi
15969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15970 $as_echo "ok" >&6; }
15971 
15972 
15973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15974 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15975   JAVAH=$BOOT_JDK/bin/javah
15976   if test ! -x $JAVAH; then
15977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15978 $as_echo "not found" >&6; }
15979     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15980 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15981     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15982   fi
15983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15984 $as_echo "ok" >&6; }
15985 
15986 
15987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15988 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15989   JAVAP=$BOOT_JDK/bin/javap
15990   if test ! -x $JAVAP; then
15991     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15992 $as_echo "not found" >&6; }
15993     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15994 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15995     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15996   fi
15997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15998 $as_echo "ok" >&6; }
15999 
16000 
16001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16002 $as_echo_n "checking for jar in Boot JDK... " >&6; }
16003   JAR=$BOOT_JDK/bin/jar
16004   if test ! -x $JAR; then
16005     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16006 $as_echo "not found" >&6; }
16007     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16008 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16009     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16010   fi
16011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16012 $as_echo "ok" >&6; }
16013 
16014 
16015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16016 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16017   RMIC=$BOOT_JDK/bin/rmic
16018   if test ! -x $RMIC; then
16019     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16020 $as_echo "not found" >&6; }
16021     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16022 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16023     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16024   fi
16025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16026 $as_echo "ok" >&6; }
16027 
16028 
16029   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16030 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16031   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16032   if test ! -x $NATIVE2ASCII; then
16033     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16034 $as_echo "not found" >&6; }
16035     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16036 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16037     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16038   fi
16039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16040 $as_echo "ok" >&6; }
16041 
16042 
16043   # Finally, set some other options...
16044 
16045   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16046   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16047 
16048 
16049 
16050 
16051   ##############################################################################
16052   #
16053   # Specify options for anything that is run with the Boot JDK.
16054   #
16055 
16056 # Check whether --with-boot-jdk-jvmargs was given.
16057 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16058   withval=$with_boot_jdk_jvmargs;
16059 fi
16060 
16061 
16062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
16063 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
16064 
16065   # Disable special log output when a debug build is used as Boot JDK...
16066 
16067   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16068   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16069   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16070   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16071   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16072   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16073     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16074     JVM_ARG_OK=true
16075   else
16076     $ECHO "Arg failed:" >&5
16077     $ECHO "$OUTPUT" >&5
16078     JVM_ARG_OK=false
16079   fi
16080 
16081 
16082   # Apply user provided options.
16083 
16084   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
16085   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
16086   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
16087   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16088   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16089   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16090     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
16091     JVM_ARG_OK=true
16092   else
16093     $ECHO "Arg failed:" >&5
16094     $ECHO "$OUTPUT" >&5
16095     JVM_ARG_OK=false
16096   fi
16097 
16098 
16099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
16100 $as_echo "$boot_jdk_jvmargs" >&6; }
16101 
16102   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
16103   JAVA_FLAGS=$boot_jdk_jvmargs
16104 
16105 
16106 
16107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
16108 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
16109 
16110   # Starting amount of heap memory.
16111 
16112   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16113   $ECHO "Command: $JAVA -Xms64M -version" >&5
16114   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16115   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16116   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16117   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16118     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
16119     JVM_ARG_OK=true
16120   else
16121     $ECHO "Arg failed:" >&5
16122     $ECHO "$OUTPUT" >&5
16123     JVM_ARG_OK=false
16124   fi
16125 
16126 
16127   # Maximum amount of heap memory.
16128   # Maximum stack size.
16129   if test "x$BUILD_NUM_BITS" = x32; then
16130     JVM_MAX_HEAP=1100M
16131     STACK_SIZE=768
16132   else
16133     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
16134     # pointers are used. Apparently, we need to increase the heap and stack
16135     # space for the jvm. More specifically, when running javac to build huge
16136     # jdk batch
16137     JVM_MAX_HEAP=1600M
16138     STACK_SIZE=1536
16139   fi
16140 
16141   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
16142   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
16143   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
16144   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16145   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16146   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16147     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
16148     JVM_ARG_OK=true
16149   else
16150     $ECHO "Arg failed:" >&5
16151     $ECHO "$OUTPUT" >&5
16152     JVM_ARG_OK=false
16153   fi
16154 
16155 
16156   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16157   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16158   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16159   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16160   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16161   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16162     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
16163     JVM_ARG_OK=true
16164   else
16165     $ECHO "Arg failed:" >&5
16166     $ECHO "$OUTPUT" >&5
16167     JVM_ARG_OK=false
16168   fi
16169 
16170 
16171   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16172   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16173   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16174   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16175   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16176   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16177     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
16178     JVM_ARG_OK=true
16179   else
16180     $ECHO "Arg failed:" >&5
16181     $ECHO "$OUTPUT" >&5
16182     JVM_ARG_OK=false
16183   fi
16184 
16185 
16186   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16187   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16188   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16189   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16190   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16191   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16192     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
16193     JVM_ARG_OK=true
16194   else
16195     $ECHO "Arg failed:" >&5
16196     $ECHO "$OUTPUT" >&5
16197     JVM_ARG_OK=false
16198   fi
16199 
16200 
16201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
16202 $as_echo "$boot_jdk_jvmargs_big" >&6; }
16203 
16204   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
16205 
16206 
16207 
16208   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
16209 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
16210 
16211   # Use serial gc for small short lived tools if possible
16212 
16213   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
16214   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
16215   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
16216   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16217   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16218   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16219     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
16220     JVM_ARG_OK=true
16221   else
16222     $ECHO "Arg failed:" >&5
16223     $ECHO "$OUTPUT" >&5
16224     JVM_ARG_OK=false
16225   fi
16226 
16227 
16228   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
16229   $ECHO "Command: $JAVA -Xms32M -version" >&5
16230   OUTPUT=`$JAVA -Xms32M -version 2>&1`
16231   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16232   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16233   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16234     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
16235     JVM_ARG_OK=true
16236   else
16237     $ECHO "Arg failed:" >&5
16238     $ECHO "$OUTPUT" >&5
16239     JVM_ARG_OK=false
16240   fi
16241 
16242 
16243   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
16244   $ECHO "Command: $JAVA -Xmx512M -version" >&5
16245   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
16246   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16247   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16248   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16249     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
16250     JVM_ARG_OK=true
16251   else
16252     $ECHO "Arg failed:" >&5
16253     $ECHO "$OUTPUT" >&5
16254     JVM_ARG_OK=false
16255   fi
16256 
16257 
16258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
16259 $as_echo "$boot_jdk_jvmargs_small" >&6; }
16260 
16261   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
16262 
16263 
16264 
16265 ###############################################################################
16266 #
16267 # Configure the sources to use. We can add or override individual directories.
16268 #
16269 ###############################################################################
16270 
16271 
16272   # Where are the sources. Any of these can be overridden
16273   # using --with-override-corba and the likes.
16274   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16275   CORBA_TOPDIR="$SRC_ROOT/corba"
16276   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16277   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16278   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16279   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16280   JDK_TOPDIR="$SRC_ROOT/jdk"
16281 
16282 
16283 
16284 
16285 
16286 
16287 
16288 
16289 
16290 
16291   ###############################################################################
16292   #
16293   # Pickup additional source for a component from outside of the source root
16294   # or override source for a component.
16295   #
16296 
16297 # Check whether --with-add-source-root was given.
16298 if test "${with_add_source_root+set}" = set; then :
16299   withval=$with_add_source_root;
16300 fi
16301 
16302 
16303 
16304 # Check whether --with-override-source-root was given.
16305 if test "${with_override_source_root+set}" = set; then :
16306   withval=$with_override_source_root;
16307 fi
16308 
16309 
16310 
16311 # Check whether --with-adds-and-overrides was given.
16312 if test "${with_adds_and_overrides+set}" = set; then :
16313   withval=$with_adds_and_overrides;
16314 fi
16315 
16316 
16317   if test "x$with_adds_and_overrides" != x; then
16318     with_add_source_root="$with_adds_and_overrides/adds"
16319     with_override_source_root="$with_adds_and_overrides/overrides"
16320   fi
16321 
16322   if test "x$with_add_source_root" != x; then
16323     if ! test -d $with_add_source_root; then
16324       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16325     fi
16326     CURDIR="$PWD"
16327     cd "$with_add_source_root"
16328     ADD_SRC_ROOT="`pwd`"
16329     cd "$CURDIR"
16330     # Verify that the addon source root does not have any root makefiles.
16331     # If it does, then it is usually an error, prevent this.
16332     if test -f $with_add_source_root/langtools/make/Makefile; then
16333       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
16334     fi
16335     if test -f $with_add_source_root/corba/make/Makefile; then
16336       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
16337     fi
16338     if test -f $with_add_source_root/jaxp/make/Makefile; then
16339       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
16340     fi
16341     if test -f $with_add_source_root/jaxws/make/Makefile; then
16342       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
16343     fi
16344     if test -f $with_add_source_root/hotspot/make/Makefile; then
16345       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
16346     fi
16347     if test -f $with_add_source_root/nashorn/make/Makefile; then
16348       as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16349     fi
16350     if test -f $with_add_source_root/jdk/make/Makefile; then
16351       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
16352     fi
16353   fi
16354 
16355 
16356   if test "x$with_override_source_root" != x; then
16357     if ! test -d $with_override_source_root; then
16358       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16359     fi
16360     CURDIR="$PWD"
16361     cd "$with_override_source_root"
16362     OVERRIDE_SRC_ROOT="`pwd`"
16363     cd "$CURDIR"
16364     if test -f $with_override_source_root/langtools/make/Makefile; then
16365       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
16366     fi
16367     if test -f $with_override_source_root/corba/make/Makefile; then
16368       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
16369     fi
16370     if test -f $with_override_source_root/jaxp/make/Makefile; then
16371       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
16372     fi
16373     if test -f $with_override_source_root/jaxws/make/Makefile; then
16374       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
16375     fi
16376     if test -f $with_override_source_root/hotspot/make/Makefile; then
16377       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
16378     fi
16379     if test -f $with_override_source_root/nashorn/make/Makefile; then
16380       as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
16381     fi
16382     if test -f $with_override_source_root/jdk/make/Makefile; then
16383       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
16384     fi
16385   fi
16386 
16387 
16388   ###############################################################################
16389   #
16390   # Override a repo completely, this is used for example when you have 3 small
16391   # development sandboxes of the langtools sources and want to avoid having 3 full
16392   # OpenJDK sources checked out on disk.
16393   #
16394   # Assuming that the 3 langtools sandboxes are located here:
16395   # /home/fredrik/sandbox1/langtools
16396   # /home/fredrik/sandbox2/langtools
16397   # /home/fredrik/sandbox3/langtools
16398   #
16399   # From the source root you create build subdirs manually:
16400   #     mkdir -p build1 build2 build3
16401   # in each build directory run:
16402   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16403   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16404   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16405   #
16406 
16407 
16408 # Check whether --with-override-langtools was given.
16409 if test "${with_override_langtools+set}" = set; then :
16410   withval=$with_override_langtools;
16411 fi
16412 
16413 
16414 
16415 # Check whether --with-override-corba was given.
16416 if test "${with_override_corba+set}" = set; then :
16417   withval=$with_override_corba;
16418 fi
16419 
16420 
16421 
16422 # Check whether --with-override-jaxp was given.
16423 if test "${with_override_jaxp+set}" = set; then :
16424   withval=$with_override_jaxp;
16425 fi
16426 
16427 
16428 
16429 # Check whether --with-override-jaxws was given.
16430 if test "${with_override_jaxws+set}" = set; then :
16431   withval=$with_override_jaxws;
16432 fi
16433 
16434 
16435 
16436 # Check whether --with-override-hotspot was given.
16437 if test "${with_override_hotspot+set}" = set; then :
16438   withval=$with_override_hotspot;
16439 fi
16440 
16441 
16442 
16443 # Check whether --with-override-nashorn was given.
16444 if test "${with_override_nashorn+set}" = set; then :
16445   withval=$with_override_nashorn;
16446 fi
16447 
16448 
16449 
16450 # Check whether --with-override-jdk was given.
16451 if test "${with_override_jdk+set}" = set; then :
16452   withval=$with_override_jdk;
16453 fi
16454 
16455 
16456   if test "x$with_override_langtools" != x; then
16457     CURDIR="$PWD"
16458     cd "$with_override_langtools"
16459     LANGTOOLS_TOPDIR="`pwd`"
16460     cd "$CURDIR"
16461     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16462       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16463     fi
16464     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16465 $as_echo_n "checking if langtools should be overridden... " >&6; }
16466     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16467 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16468   fi
16469   if test "x$with_override_corba" != x; then
16470     CURDIR="$PWD"
16471     cd "$with_override_corba"
16472     CORBA_TOPDIR="`pwd`"
16473     cd "$CURDIR"
16474     if ! test -f $CORBA_TOPDIR/make/Makefile; then
16475       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16476     fi
16477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16478 $as_echo_n "checking if corba should be overridden... " >&6; }
16479     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16480 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16481   fi
16482   if test "x$with_override_jaxp" != x; then
16483     CURDIR="$PWD"
16484     cd "$with_override_jaxp"
16485     JAXP_TOPDIR="`pwd`"
16486     cd "$CURDIR"
16487     if ! test -f $JAXP_TOPDIR/make/Makefile; then
16488       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16489     fi
16490     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16491 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16492     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16493 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16494   fi
16495   if test "x$with_override_jaxws" != x; then
16496     CURDIR="$PWD"
16497     cd "$with_override_jaxws"
16498     JAXWS_TOPDIR="`pwd`"
16499     cd "$CURDIR"
16500     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16501       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16502     fi
16503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16504 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16506 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16507   fi
16508   if test "x$with_override_hotspot" != x; then
16509     CURDIR="$PWD"
16510     cd "$with_override_hotspot"
16511     HOTSPOT_TOPDIR="`pwd`"
16512     cd "$CURDIR"
16513     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16514       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16515     fi
16516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16517 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16518     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16519 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16520   fi
16521   if test "x$with_override_nashorn" != x; then
16522     CURDIR="$PWD"
16523     cd "$with_override_nashorn"
16524     NASHORN_TOPDIR="`pwd`"
16525     cd "$CURDIR"
16526     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16527       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16528     fi
16529     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16530 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16531     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16532 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16533   fi
16534   if test "x$with_override_jdk" != x; then
16535     CURDIR="$PWD"
16536     cd "$with_override_jdk"
16537     JDK_TOPDIR="`pwd`"
16538     cd "$CURDIR"
16539     if ! test -f $JDK_TOPDIR/make/Makefile; then
16540       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16541     fi
16542     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16543 $as_echo_n "checking if JDK should be overridden... " >&6; }
16544     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16545 $as_echo "yes with $JDK_TOPDIR" >&6; }
16546   fi
16547 
16548 
16549   BUILD_OUTPUT="$OUTPUT_ROOT"
16550 
16551 
16552   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16553   BUILD_HOTSPOT=true
16554 
16555 
16556 
16557 # Check whether --with-import-hotspot was given.
16558 if test "${with_import_hotspot+set}" = set; then :
16559   withval=$with_import_hotspot;
16560 fi
16561 
16562   if test "x$with_import_hotspot" != x; then
16563     CURDIR="$PWD"
16564     cd "$with_import_hotspot"
16565     HOTSPOT_DIST="`pwd`"
16566     cd "$CURDIR"
16567     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16568       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16569     fi
16570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16571 $as_echo_n "checking if hotspot should be imported... " >&6; }
16572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16573 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16574     BUILD_HOTSPOT=false
16575   fi
16576 
16577   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16578 
16579 
16580 ###############################################################################
16581 #
16582 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16583 # cross-compilation aware.
16584 #
16585 ###############################################################################
16586 
16587 
16588   ###############################################################################
16589   #
16590   # Configure the development tool paths and potential sysroot.
16591   #
16592   ac_ext=cpp
16593 ac_cpp='$CXXCPP $CPPFLAGS'
16594 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16595 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16596 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16597 
16598 
16599   # The option used to specify the target .o,.a or .so file.
16600   # When compiling, how to specify the to be created object file.
16601   CC_OUT_OPTION='-o$(SPACE)'
16602   # When linking, how to specify the to be created executable.
16603   EXE_OUT_OPTION='-o$(SPACE)'
16604   # When linking, how to specify the to be created dynamically linkable library.
16605   LD_OUT_OPTION='-o$(SPACE)'
16606   # When archiving, how to specify the to be create static archive for object files.
16607   AR_OUT_OPTION='rcs$(SPACE)'
16608 
16609 
16610 
16611 
16612 
16613 # Locate the actual tools
16614 
16615 
16616 # Check whether --with-jtreg was given.
16617 if test "${with_jtreg+set}" = set; then :
16618   withval=$with_jtreg;
16619 else
16620   with_jtreg=no
16621 fi
16622 
16623 
16624   if test "x$with_jtreg" = xno; then
16625     # jtreg disabled
16626     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16627 $as_echo_n "checking for jtreg... " >&6; }
16628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16629 $as_echo "no" >&6; }
16630   else
16631     if test "x$with_jtreg" != xyes; then
16632       # with path specified.
16633       JT_HOME="$with_jtreg"
16634     fi
16635 
16636     if test "x$JT_HOME" != x; then
16637       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16638 $as_echo_n "checking for jtreg... " >&6; }
16639 
16640       # use JT_HOME enviroment var.
16641 
16642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16643 
16644   # Input might be given as Windows format, start by converting to
16645   # unix format.
16646   path="$JT_HOME"
16647   new_path=`$CYGPATH -u "$path"`
16648 
16649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16652   # "foo.exe" is OK but "foo" is an error.
16653   #
16654   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16655   # It is also a way to make sure we got the proper file name for the real test later on.
16656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16657   if test "x$test_shortpath" = x; then
16658     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16659 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16660     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16661   fi
16662 
16663   # Call helper function which possibly converts this using DOS-style short mode.
16664   # If so, the updated path is stored in $new_path.
16665 
16666   input_path="$new_path"
16667   # Check if we need to convert this using DOS-style short mode. If the path
16668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16669   # take no chances and rewrite it.
16670   # Note: m4 eats our [], so we need to use [ and ] instead.
16671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16672   if test "x$has_forbidden_chars" != x; then
16673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16674     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16675     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16676     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16677       # Going to short mode and back again did indeed matter. Since short mode is
16678       # case insensitive, let's make it lowercase to improve readability.
16679       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16680       # Now convert it back to Unix-stile (cygpath)
16681       input_path=`$CYGPATH -u "$shortmode_path"`
16682       new_path="$input_path"
16683     fi
16684   fi
16685 
16686   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16687   if test "x$test_cygdrive_prefix" = x; then
16688     # As a simple fix, exclude /usr/bin since it's not a real path.
16689     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16690       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16691       # a path prefixed by /cygdrive for fixpath to work.
16692       new_path="$CYGWIN_ROOT_PATH$input_path"
16693     fi
16694   fi
16695 
16696 
16697   if test "x$path" != "x$new_path"; then
16698     JT_HOME="$new_path"
16699     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16700 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16701   fi
16702 
16703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16704 
16705   path="$JT_HOME"
16706   has_colon=`$ECHO $path | $GREP ^.:`
16707   new_path="$path"
16708   if test "x$has_colon" = x; then
16709     # Not in mixed or Windows style, start by that.
16710     new_path=`cmd //c echo $path`
16711   fi
16712 
16713 
16714   input_path="$new_path"
16715   # Check if we need to convert this using DOS-style short mode. If the path
16716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16717   # take no chances and rewrite it.
16718   # Note: m4 eats our [], so we need to use [ and ] instead.
16719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16720   if test "x$has_forbidden_chars" != x; then
16721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16722     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16723   fi
16724 
16725 
16726   windows_path="$new_path"
16727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16728     unix_path=`$CYGPATH -u "$windows_path"`
16729     new_path="$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     new_path="$unix_path"
16733   fi
16734 
16735   if test "x$path" != "x$new_path"; then
16736     JT_HOME="$new_path"
16737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16738 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16739   fi
16740 
16741   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16742   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16743 
16744   else
16745     # We're on a posix platform. Hooray! :)
16746     path="$JT_HOME"
16747     has_space=`$ECHO "$path" | $GREP " "`
16748     if test "x$has_space" != x; then
16749       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16750 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16751       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16752     fi
16753 
16754     # Use eval to expand a potential ~
16755     eval path="$path"
16756     if test ! -f "$path" && test ! -d "$path"; then
16757       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16758     fi
16759 
16760     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16761   fi
16762 
16763 
16764       # jtreg win32 script works for everybody
16765       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16766 
16767       if test ! -f "$JTREGEXE"; then
16768         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16769       fi
16770 
16771       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16772 $as_echo "$JTREGEXE" >&6; }
16773     else
16774       # try to find jtreg on path
16775 
16776   for ac_prog in jtreg
16777 do
16778   # Extract the first word of "$ac_prog", so it can be a program name with args.
16779 set dummy $ac_prog; ac_word=$2
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16781 $as_echo_n "checking for $ac_word... " >&6; }
16782 if ${ac_cv_path_JTREGEXE+:} false; then :
16783   $as_echo_n "(cached) " >&6
16784 else
16785   case $JTREGEXE in
16786   [\\/]* | ?:[\\/]*)
16787   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16788   ;;
16789   *)
16790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16791 for as_dir in $PATH
16792 do
16793   IFS=$as_save_IFS
16794   test -z "$as_dir" && as_dir=.
16795     for ac_exec_ext in '' $ac_executable_extensions; do
16796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16797     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16799     break 2
16800   fi
16801 done
16802   done
16803 IFS=$as_save_IFS
16804 
16805   ;;
16806 esac
16807 fi
16808 JTREGEXE=$ac_cv_path_JTREGEXE
16809 if test -n "$JTREGEXE"; then
16810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16811 $as_echo "$JTREGEXE" >&6; }
16812 else
16813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16814 $as_echo "no" >&6; }
16815 fi
16816 
16817 
16818   test -n "$JTREGEXE" && break
16819 done
16820 
16821 
16822   if test "x$JTREGEXE" = x; then
16823     if test "xjtreg" = x; then
16824       PROG_NAME=jtregexe
16825     else
16826       PROG_NAME=jtreg
16827     fi
16828     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16829 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16830     as_fn_error $? "Cannot continue" "$LINENO" 5
16831   fi
16832 
16833 
16834       JT_HOME="`$DIRNAME $JTREGEXE`"
16835     fi
16836   fi
16837 
16838 
16839 
16840 
16841 
16842   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16843 
16844   # Store path to cygwin link.exe to help excluding it when searching for
16845   # VS linker. This must be done before changing the PATH when looking for VS.
16846   # Extract the first word of "link", so it can be a program name with args.
16847 set dummy link; ac_word=$2
16848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16849 $as_echo_n "checking for $ac_word... " >&6; }
16850 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16851   $as_echo_n "(cached) " >&6
16852 else
16853   case $CYGWIN_LINK in
16854   [\\/]* | ?:[\\/]*)
16855   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16856   ;;
16857   *)
16858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16859 for as_dir in $PATH
16860 do
16861   IFS=$as_save_IFS
16862   test -z "$as_dir" && as_dir=.
16863     for ac_exec_ext in '' $ac_executable_extensions; do
16864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16865     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16867     break 2
16868   fi
16869 done
16870   done
16871 IFS=$as_save_IFS
16872 
16873   ;;
16874 esac
16875 fi
16876 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16877 if test -n "$CYGWIN_LINK"; then
16878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16879 $as_echo "$CYGWIN_LINK" >&6; }
16880 else
16881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16882 $as_echo "no" >&6; }
16883 fi
16884 
16885 
16886   if test "x$CYGWIN_LINK" != x; then
16887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16888 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16889     "$CYGWIN_LINK" --version > /dev/null
16890     if test $? -eq 0 ; then
16891       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16892 $as_echo "yes" >&6; }
16893     else
16894       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16895 $as_echo "no" >&6; }
16896       # This might be the VS linker. Don't exclude it later on.
16897       CYGWIN_LINK=""
16898     fi
16899   fi
16900 
16901   # First-hand choice is to locate and run the vsvars bat file.
16902 
16903   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16904     VCVARSFILE="vc/bin/vcvars32.bat"
16905   else
16906     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16907   fi
16908 
16909   VS_ENV_CMD=""
16910   VS_ENV_ARGS=""
16911   if test "x$with_toolsdir" != x; then
16912 
16913   if test "x$VS_ENV_CMD" = x; then
16914     VS100BASE="$with_toolsdir/../.."
16915     METHOD="--with-tools-dir"
16916 
16917   windows_path="$VS100BASE"
16918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16919     unix_path=`$CYGPATH -u "$windows_path"`
16920     VS100BASE="$unix_path"
16921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16923     VS100BASE="$unix_path"
16924   fi
16925 
16926     if test -d "$VS100BASE"; then
16927       if test -f "$VS100BASE/$VCVARSFILE"; then
16928         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16929 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16930         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16931       else
16932         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16933 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16934         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16935 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16936       fi
16937     fi
16938   fi
16939 
16940   fi
16941 
16942   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16943     # Having specified an argument which is incorrect will produce an instant failure;
16944     # we should not go on looking
16945     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16946 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16947     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16948 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16949     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16950   fi
16951 
16952   if test "x$VS100COMNTOOLS" != x; then
16953 
16954   if test "x$VS_ENV_CMD" = x; then
16955     VS100BASE="$VS100COMNTOOLS/../.."
16956     METHOD="VS100COMNTOOLS variable"
16957 
16958   windows_path="$VS100BASE"
16959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16960     unix_path=`$CYGPATH -u "$windows_path"`
16961     VS100BASE="$unix_path"
16962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16964     VS100BASE="$unix_path"
16965   fi
16966 
16967     if test -d "$VS100BASE"; then
16968       if test -f "$VS100BASE/$VCVARSFILE"; then
16969         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16970 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16971         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16972       else
16973         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16974 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16975         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16976 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16977       fi
16978     fi
16979   fi
16980 
16981   fi
16982   if test "x$PROGRAMFILES" != x; then
16983 
16984   if test "x$VS_ENV_CMD" = x; then
16985     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16986     METHOD="well-known name"
16987 
16988   windows_path="$VS100BASE"
16989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16990     unix_path=`$CYGPATH -u "$windows_path"`
16991     VS100BASE="$unix_path"
16992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16994     VS100BASE="$unix_path"
16995   fi
16996 
16997     if test -d "$VS100BASE"; then
16998       if test -f "$VS100BASE/$VCVARSFILE"; then
16999         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17000 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17001         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17002       else
17003         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17004 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17005         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17006 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17007       fi
17008     fi
17009   fi
17010 
17011   fi
17012 
17013   if test "x$VS_ENV_CMD" = x; then
17014     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
17015     METHOD="well-known name"
17016 
17017   windows_path="$VS100BASE"
17018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17019     unix_path=`$CYGPATH -u "$windows_path"`
17020     VS100BASE="$unix_path"
17021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17023     VS100BASE="$unix_path"
17024   fi
17025 
17026     if test -d "$VS100BASE"; then
17027       if test -f "$VS100BASE/$VCVARSFILE"; then
17028         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17029 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17030         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17031       else
17032         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17033 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17034         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17035 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17036       fi
17037     fi
17038   fi
17039 
17040 
17041   if test "x$VS_ENV_CMD" = x; then
17042     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
17043     METHOD="well-known name"
17044 
17045   windows_path="$VS100BASE"
17046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17047     unix_path=`$CYGPATH -u "$windows_path"`
17048     VS100BASE="$unix_path"
17049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17051     VS100BASE="$unix_path"
17052   fi
17053 
17054     if test -d "$VS100BASE"; then
17055       if test -f "$VS100BASE/$VCVARSFILE"; then
17056         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17057 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17058         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17059       else
17060         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17061 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17062         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17063 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17064       fi
17065     fi
17066   fi
17067 
17068 
17069   if test "x$ProgramW6432" != x; then
17070 
17071   if test "x$VS_ENV_CMD" = x; then
17072     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17073     METHOD="well-known name"
17074 
17075   windows_path="$WIN_SDK_BASE"
17076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17077     unix_path=`$CYGPATH -u "$windows_path"`
17078     WIN_SDK_BASE="$unix_path"
17079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17081     WIN_SDK_BASE="$unix_path"
17082   fi
17083 
17084     if test -d "$WIN_SDK_BASE"; then
17085       # There have been cases of partial or broken SDK installations. A missing
17086       # lib dir is not going to work.
17087       if test ! -d "$WIN_SDK_BASE/../lib"; then
17088         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17089 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17090         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17091 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17092       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17093         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17094 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17095         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17096         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17097           VS_ENV_ARGS="/x86"
17098         else
17099           VS_ENV_ARGS="/x64"
17100         fi
17101       else
17102         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17103 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17104         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17105 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17106       fi
17107     fi
17108   fi
17109 
17110   fi
17111   if test "x$PROGRAMW6432" != x; then
17112 
17113   if test "x$VS_ENV_CMD" = x; then
17114     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17115     METHOD="well-known name"
17116 
17117   windows_path="$WIN_SDK_BASE"
17118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17119     unix_path=`$CYGPATH -u "$windows_path"`
17120     WIN_SDK_BASE="$unix_path"
17121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17122     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17123     WIN_SDK_BASE="$unix_path"
17124   fi
17125 
17126     if test -d "$WIN_SDK_BASE"; then
17127       # There have been cases of partial or broken SDK installations. A missing
17128       # lib dir is not going to work.
17129       if test ! -d "$WIN_SDK_BASE/../lib"; then
17130         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17131 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17132         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17133 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17134       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17135         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17136 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17137         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17138         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17139           VS_ENV_ARGS="/x86"
17140         else
17141           VS_ENV_ARGS="/x64"
17142         fi
17143       else
17144         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17145 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17146         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17147 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17148       fi
17149     fi
17150   fi
17151 
17152   fi
17153   if test "x$PROGRAMFILES" != x; then
17154 
17155   if test "x$VS_ENV_CMD" = x; then
17156     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17157     METHOD="well-known name"
17158 
17159   windows_path="$WIN_SDK_BASE"
17160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17161     unix_path=`$CYGPATH -u "$windows_path"`
17162     WIN_SDK_BASE="$unix_path"
17163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17165     WIN_SDK_BASE="$unix_path"
17166   fi
17167 
17168     if test -d "$WIN_SDK_BASE"; then
17169       # There have been cases of partial or broken SDK installations. A missing
17170       # lib dir is not going to work.
17171       if test ! -d "$WIN_SDK_BASE/../lib"; then
17172         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17173 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17174         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17175 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17176       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17177         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17178 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17179         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17180         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17181           VS_ENV_ARGS="/x86"
17182         else
17183           VS_ENV_ARGS="/x64"
17184         fi
17185       else
17186         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17187 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17188         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17189 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17190       fi
17191     fi
17192   fi
17193 
17194   fi
17195 
17196   if test "x$VS_ENV_CMD" = x; then
17197     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17198     METHOD="well-known name"
17199 
17200   windows_path="$WIN_SDK_BASE"
17201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17202     unix_path=`$CYGPATH -u "$windows_path"`
17203     WIN_SDK_BASE="$unix_path"
17204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17206     WIN_SDK_BASE="$unix_path"
17207   fi
17208 
17209     if test -d "$WIN_SDK_BASE"; then
17210       # There have been cases of partial or broken SDK installations. A missing
17211       # lib dir is not going to work.
17212       if test ! -d "$WIN_SDK_BASE/../lib"; then
17213         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17214 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17215         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17216 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17217       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17218         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17219 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17220         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17221         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17222           VS_ENV_ARGS="/x86"
17223         else
17224           VS_ENV_ARGS="/x64"
17225         fi
17226       else
17227         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17228 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17229         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17230 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17231       fi
17232     fi
17233   fi
17234 
17235 
17236   if test "x$VS_ENV_CMD" = x; then
17237     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17238     METHOD="well-known name"
17239 
17240   windows_path="$WIN_SDK_BASE"
17241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17242     unix_path=`$CYGPATH -u "$windows_path"`
17243     WIN_SDK_BASE="$unix_path"
17244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17246     WIN_SDK_BASE="$unix_path"
17247   fi
17248 
17249     if test -d "$WIN_SDK_BASE"; then
17250       # There have been cases of partial or broken SDK installations. A missing
17251       # lib dir is not going to work.
17252       if test ! -d "$WIN_SDK_BASE/../lib"; then
17253         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17254 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17255         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17256 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17257       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17258         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17259 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17260         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17261         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17262           VS_ENV_ARGS="/x86"
17263         else
17264           VS_ENV_ARGS="/x64"
17265         fi
17266       else
17267         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17268 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17269         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17270 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17271       fi
17272     fi
17273   fi
17274 
17275 
17276   if test "x$VS_ENV_CMD" != x; then
17277     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17278 
17279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17280 
17281   # First separate the path from the arguments. This will split at the first
17282   # space.
17283   complete="$VS_ENV_CMD"
17284   path="${complete%% *}"
17285   tmp="$complete EOL"
17286   arguments="${tmp#* }"
17287 
17288   # Input might be given as Windows format, start by converting to
17289   # unix format.
17290   new_path=`$CYGPATH -u "$path"`
17291 
17292   # Now try to locate executable using which
17293   new_path=`$WHICH "$new_path" 2> /dev/null`
17294   # bat and cmd files are not always considered executable in cygwin causing which
17295   # to not find them
17296   if test "x$new_path" = x \
17297       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17298       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17299     new_path=`$CYGPATH -u "$path"`
17300   fi
17301   if test "x$new_path" = x; then
17302     # Oops. Which didn't find the executable.
17303     # The splitting of arguments from the executable at a space might have been incorrect,
17304     # since paths with space are more likely in Windows. Give it another try with the whole
17305     # argument.
17306     path="$complete"
17307     arguments="EOL"
17308     new_path=`$CYGPATH -u "$path"`
17309     new_path=`$WHICH "$new_path" 2> /dev/null`
17310     # bat and cmd files are not always considered executable in cygwin causing which
17311     # to not find them
17312     if test "x$new_path" = x \
17313         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17314         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17315       new_path=`$CYGPATH -u "$path"`
17316     fi
17317     if test "x$new_path" = x; then
17318       # It's still not found. Now this is an unrecoverable error.
17319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17320 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17321       has_space=`$ECHO "$complete" | $GREP " "`
17322       if test "x$has_space" != x; then
17323         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17324 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17325       fi
17326       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17327     fi
17328   fi
17329 
17330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17333   # "foo.exe" is OK but "foo" is an error.
17334   #
17335   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17336   # It is also a way to make sure we got the proper file name for the real test later on.
17337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17338   if test "x$test_shortpath" = x; then
17339     # Short path failed, file does not exist as specified.
17340     # Try adding .exe or .cmd
17341     if test -f "${new_path}.exe"; then
17342       input_to_shortpath="${new_path}.exe"
17343     elif test -f "${new_path}.cmd"; then
17344       input_to_shortpath="${new_path}.cmd"
17345     else
17346       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17347 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17348       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17349 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17350       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17351     fi
17352   else
17353     input_to_shortpath="$new_path"
17354   fi
17355 
17356   # Call helper function which possibly converts this using DOS-style short mode.
17357   # If so, the updated path is stored in $new_path.
17358   new_path="$input_to_shortpath"
17359 
17360   input_path="$input_to_shortpath"
17361   # Check if we need to convert this using DOS-style short mode. If the path
17362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17363   # take no chances and rewrite it.
17364   # Note: m4 eats our [], so we need to use [ and ] instead.
17365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17366   if test "x$has_forbidden_chars" != x; then
17367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17368     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17369     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17370     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17371       # Going to short mode and back again did indeed matter. Since short mode is
17372       # case insensitive, let's make it lowercase to improve readability.
17373       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17374       # Now convert it back to Unix-stile (cygpath)
17375       input_path=`$CYGPATH -u "$shortmode_path"`
17376       new_path="$input_path"
17377     fi
17378   fi
17379 
17380   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17381   if test "x$test_cygdrive_prefix" = x; then
17382     # As a simple fix, exclude /usr/bin since it's not a real path.
17383     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17384       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17385       # a path prefixed by /cygdrive for fixpath to work.
17386       new_path="$CYGWIN_ROOT_PATH$input_path"
17387     fi
17388   fi
17389 
17390   # remove trailing .exe if any
17391   new_path="${new_path/%.exe/}"
17392 
17393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17394 
17395   # First separate the path from the arguments. This will split at the first
17396   # space.
17397   complete="$VS_ENV_CMD"
17398   path="${complete%% *}"
17399   tmp="$complete EOL"
17400   arguments="${tmp#* }"
17401 
17402   # Input might be given as Windows format, start by converting to
17403   # unix format.
17404   new_path="$path"
17405 
17406   windows_path="$new_path"
17407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17408     unix_path=`$CYGPATH -u "$windows_path"`
17409     new_path="$unix_path"
17410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17412     new_path="$unix_path"
17413   fi
17414 
17415 
17416   # Now try to locate executable using which
17417   new_path=`$WHICH "$new_path" 2> /dev/null`
17418 
17419   if test "x$new_path" = x; then
17420     # Oops. Which didn't find the executable.
17421     # The splitting of arguments from the executable at a space might have been incorrect,
17422     # since paths with space are more likely in Windows. Give it another try with the whole
17423     # argument.
17424     path="$complete"
17425     arguments="EOL"
17426     new_path="$path"
17427 
17428   windows_path="$new_path"
17429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17430     unix_path=`$CYGPATH -u "$windows_path"`
17431     new_path="$unix_path"
17432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17434     new_path="$unix_path"
17435   fi
17436 
17437 
17438     new_path=`$WHICH "$new_path" 2> /dev/null`
17439 
17440     if test "x$new_path" = x; then
17441       # It's still not found. Now this is an unrecoverable error.
17442       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17443 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17444       has_space=`$ECHO "$complete" | $GREP " "`
17445       if test "x$has_space" != x; then
17446         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17447 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17448       fi
17449       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17450     fi
17451   fi
17452 
17453   # Now new_path has a complete unix path to the binary
17454   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17455     # Keep paths in /bin as-is, but remove trailing .exe if any
17456     new_path="${new_path/%.exe/}"
17457     # Do not save /bin paths to all_fixpath_prefixes!
17458   else
17459     # Not in mixed or Windows style, start by that.
17460     new_path=`cmd //c echo $new_path`
17461 
17462   input_path="$new_path"
17463   # Check if we need to convert this using DOS-style short mode. If the path
17464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17465   # take no chances and rewrite it.
17466   # Note: m4 eats our [], so we need to use [ and ] instead.
17467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17468   if test "x$has_forbidden_chars" != x; then
17469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17470     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17471   fi
17472 
17473     # Output is in $new_path
17474 
17475   windows_path="$new_path"
17476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17477     unix_path=`$CYGPATH -u "$windows_path"`
17478     new_path="$unix_path"
17479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17481     new_path="$unix_path"
17482   fi
17483 
17484     # remove trailing .exe if any
17485     new_path="${new_path/%.exe/}"
17486 
17487     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17488     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17489   fi
17490 
17491   else
17492     # We're on a posix platform. Hooray! :)
17493     # First separate the path from the arguments. This will split at the first
17494     # space.
17495     complete="$VS_ENV_CMD"
17496     path="${complete%% *}"
17497     tmp="$complete EOL"
17498     arguments="${tmp#* }"
17499 
17500     # Cannot rely on the command "which" here since it doesn't always work.
17501     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17502     if test -z "$is_absolute_path"; then
17503       # Path to executable is not absolute. Find it.
17504       IFS_save="$IFS"
17505       IFS=:
17506       for p in $PATH; do
17507         if test -f "$p/$path" && test -x "$p/$path"; then
17508           new_path="$p/$path"
17509           break
17510         fi
17511       done
17512       IFS="$IFS_save"
17513     else
17514       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17515 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17516       new_path="$path"
17517     fi
17518 
17519     if test "x$new_path" = x; then
17520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17521 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17522       has_space=`$ECHO "$complete" | $GREP " "`
17523       if test "x$has_space" != x; then
17524         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17525 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17526       fi
17527       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17528     fi
17529   fi
17530 
17531   # Now join together the path and the arguments once again
17532   if test "x$arguments" != xEOL; then
17533     new_complete="$new_path ${arguments% *}"
17534   else
17535     new_complete="$new_path"
17536   fi
17537 
17538   if test "x$complete" != "x$new_complete"; then
17539     VS_ENV_CMD="$new_complete"
17540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17541 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17542   fi
17543 
17544 
17545     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17546     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17547 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17548     cd $OUTPUT_ROOT
17549     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17550     # to autoconf standards.
17551 
17552     #----
17553 
17554     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17555     # but calculate the difference in Cygwin environment before/after running it and then
17556     # apply the diff.
17557 
17558     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17559       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17560       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17561       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17562     else
17563       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17564       _dosbash=`cmd //c echo \`which bash\``
17565     fi
17566 
17567     # generate the set of exported vars before/after the vs10 setup
17568     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17569     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17570     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17571     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17572 
17573     # Now execute the newly created bat file.
17574     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17575     cmd /c localdevenvtmp.bat | cat
17576 
17577     # apply the diff (less some non-vs10 vars named by "!")
17578     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17579     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17580     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17581 
17582     # cleanup
17583     $RM localdevenvtmp*
17584     #----
17585     cd $CURDIR
17586     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17587       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17588 $as_echo "no" >&6; }
17589       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17590 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17591       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17592 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17593       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17594 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17595       as_fn_error $? "Cannot continue" "$LINENO" 5
17596     fi
17597 
17598     # Now set all paths and other env variables. This will allow the rest of
17599     # the configure script to find and run the compiler in the proper way.
17600     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17601 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17602     . $OUTPUT_ROOT/localdevenv.sh
17603   else
17604     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17605     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17606 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17607   fi
17608 
17609   # At this point, we should have corrent variables in the environment, or we can't continue.
17610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17611 $as_echo_n "checking for Visual Studio variables... " >&6; }
17612 
17613   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17614     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17615       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17616 $as_echo "present but broken" >&6; }
17617       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17618     else
17619       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17620 $as_echo "ok" >&6; }
17621       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17622       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17623       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17624       # Remove any paths containing # (typically F#) as that messes up make
17625       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17626       VS_PATH="$PATH"
17627 
17628 
17629 
17630     fi
17631   else
17632     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17633 $as_echo "not found" >&6; }
17634 
17635     if test "x$VS_ENV_CMD" = x; then
17636       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17637 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17638       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17639 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17640     else
17641       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17642 $as_echo "$as_me: Running the extraction script failed." >&6;}
17643     fi
17644     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17645 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17646     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17647 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17648     as_fn_error $? "Cannot continue" "$LINENO" 5
17649   fi
17650 
17651 
17652 
17653 # Check whether --with-msvcr-dll was given.
17654 if test "${with_msvcr_dll+set}" = set; then :
17655   withval=$with_msvcr_dll;
17656 fi
17657 
17658 
17659   if test "x$with_msvcr_dll" != x; then
17660     # If given explicitely by user, do not probe. If not present, fail directly.
17661 
17662   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17663   METHOD="--with-msvcr-dll"
17664   if test -e "$POSSIBLE_MSVCR_DLL"; then
17665     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17666 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17667 
17668     # Need to check if the found msvcr is correct architecture
17669     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17670 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17671     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17672     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17673       CORRECT_MSVCR_ARCH=386
17674     else
17675       CORRECT_MSVCR_ARCH=x86-64
17676     fi
17677     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17678       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17679 $as_echo "ok" >&6; }
17680       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17681       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17682 $as_echo_n "checking for msvcr100.dll... " >&6; }
17683       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17684 $as_echo "$MSVCR_DLL" >&6; }
17685     else
17686       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17687 $as_echo "incorrect, ignoring" >&6; }
17688       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17689 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17690     fi
17691   fi
17692 
17693     if test "x$MSVCR_DLL" = x; then
17694       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17695     fi
17696   fi
17697 
17698   if test "x$MSVCR_DLL" = x; then
17699     # Probe: Using well-known location from Visual Studio 10.0
17700     if test "x$VCINSTALLDIR" != x; then
17701       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17702 
17703   windows_path="$CYGWIN_VC_INSTALL_DIR"
17704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17705     unix_path=`$CYGPATH -u "$windows_path"`
17706     CYGWIN_VC_INSTALL_DIR="$unix_path"
17707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17709     CYGWIN_VC_INSTALL_DIR="$unix_path"
17710   fi
17711 
17712       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17713         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17714       else
17715         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17716       fi
17717 
17718   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17719   METHOD="well-known location in VCINSTALLDIR"
17720   if test -e "$POSSIBLE_MSVCR_DLL"; then
17721     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17722 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17723 
17724     # Need to check if the found msvcr is correct architecture
17725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17726 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17727     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17728     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17729       CORRECT_MSVCR_ARCH=386
17730     else
17731       CORRECT_MSVCR_ARCH=x86-64
17732     fi
17733     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17734       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17735 $as_echo "ok" >&6; }
17736       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17737       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17738 $as_echo_n "checking for msvcr100.dll... " >&6; }
17739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17740 $as_echo "$MSVCR_DLL" >&6; }
17741     else
17742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17743 $as_echo "incorrect, ignoring" >&6; }
17744       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17745 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17746     fi
17747   fi
17748 
17749     fi
17750   fi
17751 
17752   if test "x$MSVCR_DLL" = x; then
17753     # Probe: Check in the Boot JDK directory.
17754     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17755 
17756   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17757   METHOD="well-known location in Boot JDK"
17758   if test -e "$POSSIBLE_MSVCR_DLL"; then
17759     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17760 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17761 
17762     # Need to check if the found msvcr is correct architecture
17763     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17764 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17765     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17766     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17767       CORRECT_MSVCR_ARCH=386
17768     else
17769       CORRECT_MSVCR_ARCH=x86-64
17770     fi
17771     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17772       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17773 $as_echo "ok" >&6; }
17774       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17775       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17776 $as_echo_n "checking for msvcr100.dll... " >&6; }
17777       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17778 $as_echo "$MSVCR_DLL" >&6; }
17779     else
17780       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17781 $as_echo "incorrect, ignoring" >&6; }
17782       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17783 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17784     fi
17785   fi
17786 
17787   fi
17788 
17789   if test "x$MSVCR_DLL" = x; then
17790     # Probe: Look in the Windows system32 directory
17791     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17792 
17793   windows_path="$CYGWIN_SYSTEMROOT"
17794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795     unix_path=`$CYGPATH -u "$windows_path"`
17796     CYGWIN_SYSTEMROOT="$unix_path"
17797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799     CYGWIN_SYSTEMROOT="$unix_path"
17800   fi
17801 
17802     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17803 
17804   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17805   METHOD="well-known location in SYSTEMROOT"
17806   if test -e "$POSSIBLE_MSVCR_DLL"; then
17807     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17808 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17809 
17810     # Need to check if the found msvcr is correct architecture
17811     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17812 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17813     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17814     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17815       CORRECT_MSVCR_ARCH=386
17816     else
17817       CORRECT_MSVCR_ARCH=x86-64
17818     fi
17819     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17820       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17821 $as_echo "ok" >&6; }
17822       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17823       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17824 $as_echo_n "checking for msvcr100.dll... " >&6; }
17825       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17826 $as_echo "$MSVCR_DLL" >&6; }
17827     else
17828       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17829 $as_echo "incorrect, ignoring" >&6; }
17830       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17831 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17832     fi
17833   fi
17834 
17835   fi
17836 
17837   if test "x$MSVCR_DLL" = x; then
17838     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17839     if test "x$VS100COMNTOOLS" != x; then
17840       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17841 
17842   windows_path="$CYGWIN_VS_TOOLS_DIR"
17843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17844     unix_path=`$CYGPATH -u "$windows_path"`
17845     CYGWIN_VS_TOOLS_DIR="$unix_path"
17846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17848     CYGWIN_VS_TOOLS_DIR="$unix_path"
17849   fi
17850 
17851       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17852         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17853       else
17854         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17855       fi
17856 
17857   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17858   METHOD="search of VS100COMNTOOLS"
17859   if test -e "$POSSIBLE_MSVCR_DLL"; then
17860     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17861 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17862 
17863     # Need to check if the found msvcr is correct architecture
17864     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17865 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17866     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17867     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17868       CORRECT_MSVCR_ARCH=386
17869     else
17870       CORRECT_MSVCR_ARCH=x86-64
17871     fi
17872     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17874 $as_echo "ok" >&6; }
17875       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17876       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17877 $as_echo_n "checking for msvcr100.dll... " >&6; }
17878       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17879 $as_echo "$MSVCR_DLL" >&6; }
17880     else
17881       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17882 $as_echo "incorrect, ignoring" >&6; }
17883       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17884 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17885     fi
17886   fi
17887 
17888     fi
17889   fi
17890 
17891   if test "x$MSVCR_DLL" = x; then
17892     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17893     # (This was the original behaviour; kept since it might turn up something)
17894     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17895       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17896         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17897       else
17898         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17899         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17900           # We're grasping at straws now...
17901           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17902         fi
17903       fi
17904 
17905 
17906   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17907   METHOD="search of VCINSTALLDIR"
17908   if test -e "$POSSIBLE_MSVCR_DLL"; then
17909     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17910 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17911 
17912     # Need to check if the found msvcr is correct architecture
17913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17914 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17915     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17916     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17917       CORRECT_MSVCR_ARCH=386
17918     else
17919       CORRECT_MSVCR_ARCH=x86-64
17920     fi
17921     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17922       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17923 $as_echo "ok" >&6; }
17924       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17925       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17926 $as_echo_n "checking for msvcr100.dll... " >&6; }
17927       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17928 $as_echo "$MSVCR_DLL" >&6; }
17929     else
17930       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17931 $as_echo "incorrect, ignoring" >&6; }
17932       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17933 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17934     fi
17935   fi
17936 
17937     fi
17938   fi
17939 
17940   if test "x$MSVCR_DLL" = x; then
17941     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17942 $as_echo_n "checking for msvcr100.dll... " >&6; }
17943     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17944 $as_echo "no" >&6; }
17945     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17946   fi
17947 
17948 
17949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17950 
17951   # Input might be given as Windows format, start by converting to
17952   # unix format.
17953   path="$MSVCR_DLL"
17954   new_path=`$CYGPATH -u "$path"`
17955 
17956   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17957   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17958   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17959   # "foo.exe" is OK but "foo" is an error.
17960   #
17961   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17962   # It is also a way to make sure we got the proper file name for the real test later on.
17963   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17964   if test "x$test_shortpath" = x; then
17965     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17966 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17967     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17968   fi
17969 
17970   # Call helper function which possibly converts this using DOS-style short mode.
17971   # If so, the updated path is stored in $new_path.
17972 
17973   input_path="$new_path"
17974   # Check if we need to convert this using DOS-style short mode. If the path
17975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17976   # take no chances and rewrite it.
17977   # Note: m4 eats our [], so we need to use [ and ] instead.
17978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17979   if test "x$has_forbidden_chars" != x; then
17980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17981     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17982     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17983     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17984       # Going to short mode and back again did indeed matter. Since short mode is
17985       # case insensitive, let's make it lowercase to improve readability.
17986       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17987       # Now convert it back to Unix-stile (cygpath)
17988       input_path=`$CYGPATH -u "$shortmode_path"`
17989       new_path="$input_path"
17990     fi
17991   fi
17992 
17993   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17994   if test "x$test_cygdrive_prefix" = x; then
17995     # As a simple fix, exclude /usr/bin since it's not a real path.
17996     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17997       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17998       # a path prefixed by /cygdrive for fixpath to work.
17999       new_path="$CYGWIN_ROOT_PATH$input_path"
18000     fi
18001   fi
18002 
18003 
18004   if test "x$path" != "x$new_path"; then
18005     MSVCR_DLL="$new_path"
18006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18007 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18008   fi
18009 
18010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18011 
18012   path="$MSVCR_DLL"
18013   has_colon=`$ECHO $path | $GREP ^.:`
18014   new_path="$path"
18015   if test "x$has_colon" = x; then
18016     # Not in mixed or Windows style, start by that.
18017     new_path=`cmd //c echo $path`
18018   fi
18019 
18020 
18021   input_path="$new_path"
18022   # Check if we need to convert this using DOS-style short mode. If the path
18023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18024   # take no chances and rewrite it.
18025   # Note: m4 eats our [], so we need to use [ and ] instead.
18026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18027   if test "x$has_forbidden_chars" != x; then
18028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18029     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18030   fi
18031 
18032 
18033   windows_path="$new_path"
18034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18035     unix_path=`$CYGPATH -u "$windows_path"`
18036     new_path="$unix_path"
18037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18039     new_path="$unix_path"
18040   fi
18041 
18042   if test "x$path" != "x$new_path"; then
18043     MSVCR_DLL="$new_path"
18044     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18045 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18046   fi
18047 
18048   # Save the first 10 bytes of this path to the storage, so fixpath can work.
18049   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18050 
18051   else
18052     # We're on a posix platform. Hooray! :)
18053     path="$MSVCR_DLL"
18054     has_space=`$ECHO "$path" | $GREP " "`
18055     if test "x$has_space" != x; then
18056       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18057 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18058       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18059     fi
18060 
18061     # Use eval to expand a potential ~
18062     eval path="$path"
18063     if test ! -f "$path" && test ! -d "$path"; then
18064       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18065     fi
18066 
18067     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18068   fi
18069 
18070 
18071 
18072 
18073 # Check whether --with-dxsdk was given.
18074 if test "${with_dxsdk+set}" = set; then :
18075   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18076 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18077 fi
18078 
18079 
18080 
18081 
18082 # Check whether --with-dxsdk-lib was given.
18083 if test "${with_dxsdk_lib+set}" = set; then :
18084   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18085 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18086 fi
18087 
18088 
18089 
18090 
18091 # Check whether --with-dxsdk-include was given.
18092 if test "${with_dxsdk_include+set}" = set; then :
18093   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18094 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18095 fi
18096 
18097 
18098   fi
18099 
18100 
18101 
18102   # If --build AND --host is set, then the configure script will find any
18103   # cross compilation tools in the PATH. Cross compilation tools
18104   # follows the cross compilation standard where they are prefixed with ${host}.
18105   # For example the binary i686-sun-solaris2.10-gcc
18106   # will cross compile for i686-sun-solaris2.10
18107   # If neither of build and host is not set, then build=host and the
18108   # default compiler found in the path will be used.
18109   # Setting only --host, does not seem to be really supported.
18110   # Please set both --build and --host if you want to cross compile.
18111 
18112   if test "x$COMPILE_TYPE" = "xcross"; then
18113     # Now we to find a C/C++ compiler that can build executables for the build
18114     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18115     # once. Also, we need to do this before adding a tools dir to the path,
18116     # otherwise we might pick up cross-compilers which don't use standard naming.
18117     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18118     # to wait until they are properly discovered.
18119     for ac_prog in cl cc gcc
18120 do
18121   # Extract the first word of "$ac_prog", so it can be a program name with args.
18122 set dummy $ac_prog; ac_word=$2
18123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18124 $as_echo_n "checking for $ac_word... " >&6; }
18125 if ${ac_cv_path_BUILD_CC+:} false; then :
18126   $as_echo_n "(cached) " >&6
18127 else
18128   case $BUILD_CC in
18129   [\\/]* | ?:[\\/]*)
18130   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18131   ;;
18132   *)
18133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18134 for as_dir in $PATH
18135 do
18136   IFS=$as_save_IFS
18137   test -z "$as_dir" && as_dir=.
18138     for ac_exec_ext in '' $ac_executable_extensions; do
18139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18140     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18142     break 2
18143   fi
18144 done
18145   done
18146 IFS=$as_save_IFS
18147 
18148   ;;
18149 esac
18150 fi
18151 BUILD_CC=$ac_cv_path_BUILD_CC
18152 if test -n "$BUILD_CC"; then
18153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18154 $as_echo "$BUILD_CC" >&6; }
18155 else
18156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18157 $as_echo "no" >&6; }
18158 fi
18159 
18160 
18161   test -n "$BUILD_CC" && break
18162 done
18163 
18164 
18165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18166 
18167   # First separate the path from the arguments. This will split at the first
18168   # space.
18169   complete="$BUILD_CC"
18170   path="${complete%% *}"
18171   tmp="$complete EOL"
18172   arguments="${tmp#* }"
18173 
18174   # Input might be given as Windows format, start by converting to
18175   # unix format.
18176   new_path=`$CYGPATH -u "$path"`
18177 
18178   # Now try to locate executable using which
18179   new_path=`$WHICH "$new_path" 2> /dev/null`
18180   # bat and cmd files are not always considered executable in cygwin causing which
18181   # to not find them
18182   if test "x$new_path" = x \
18183       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18184       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18185     new_path=`$CYGPATH -u "$path"`
18186   fi
18187   if test "x$new_path" = x; then
18188     # Oops. Which didn't find the executable.
18189     # The splitting of arguments from the executable at a space might have been incorrect,
18190     # since paths with space are more likely in Windows. Give it another try with the whole
18191     # argument.
18192     path="$complete"
18193     arguments="EOL"
18194     new_path=`$CYGPATH -u "$path"`
18195     new_path=`$WHICH "$new_path" 2> /dev/null`
18196     # bat and cmd files are not always considered executable in cygwin causing which
18197     # to not find them
18198     if test "x$new_path" = x \
18199         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18200         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18201       new_path=`$CYGPATH -u "$path"`
18202     fi
18203     if test "x$new_path" = x; then
18204       # It's still not found. Now this is an unrecoverable error.
18205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18206 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18207       has_space=`$ECHO "$complete" | $GREP " "`
18208       if test "x$has_space" != x; then
18209         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18210 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18211       fi
18212       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18213     fi
18214   fi
18215 
18216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18219   # "foo.exe" is OK but "foo" is an error.
18220   #
18221   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18222   # It is also a way to make sure we got the proper file name for the real test later on.
18223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18224   if test "x$test_shortpath" = x; then
18225     # Short path failed, file does not exist as specified.
18226     # Try adding .exe or .cmd
18227     if test -f "${new_path}.exe"; then
18228       input_to_shortpath="${new_path}.exe"
18229     elif test -f "${new_path}.cmd"; then
18230       input_to_shortpath="${new_path}.cmd"
18231     else
18232       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18233 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18234       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18235 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18236       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18237     fi
18238   else
18239     input_to_shortpath="$new_path"
18240   fi
18241 
18242   # Call helper function which possibly converts this using DOS-style short mode.
18243   # If so, the updated path is stored in $new_path.
18244   new_path="$input_to_shortpath"
18245 
18246   input_path="$input_to_shortpath"
18247   # Check if we need to convert this using DOS-style short mode. If the path
18248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18249   # take no chances and rewrite it.
18250   # Note: m4 eats our [], so we need to use [ and ] instead.
18251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18252   if test "x$has_forbidden_chars" != x; then
18253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18254     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18255     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18256     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18257       # Going to short mode and back again did indeed matter. Since short mode is
18258       # case insensitive, let's make it lowercase to improve readability.
18259       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18260       # Now convert it back to Unix-stile (cygpath)
18261       input_path=`$CYGPATH -u "$shortmode_path"`
18262       new_path="$input_path"
18263     fi
18264   fi
18265 
18266   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18267   if test "x$test_cygdrive_prefix" = x; then
18268     # As a simple fix, exclude /usr/bin since it's not a real path.
18269     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18270       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18271       # a path prefixed by /cygdrive for fixpath to work.
18272       new_path="$CYGWIN_ROOT_PATH$input_path"
18273     fi
18274   fi
18275 
18276   # remove trailing .exe if any
18277   new_path="${new_path/%.exe/}"
18278 
18279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18280 
18281   # First separate the path from the arguments. This will split at the first
18282   # space.
18283   complete="$BUILD_CC"
18284   path="${complete%% *}"
18285   tmp="$complete EOL"
18286   arguments="${tmp#* }"
18287 
18288   # Input might be given as Windows format, start by converting to
18289   # unix format.
18290   new_path="$path"
18291 
18292   windows_path="$new_path"
18293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18294     unix_path=`$CYGPATH -u "$windows_path"`
18295     new_path="$unix_path"
18296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18298     new_path="$unix_path"
18299   fi
18300 
18301 
18302   # Now try to locate executable using which
18303   new_path=`$WHICH "$new_path" 2> /dev/null`
18304 
18305   if test "x$new_path" = x; then
18306     # Oops. Which didn't find the executable.
18307     # The splitting of arguments from the executable at a space might have been incorrect,
18308     # since paths with space are more likely in Windows. Give it another try with the whole
18309     # argument.
18310     path="$complete"
18311     arguments="EOL"
18312     new_path="$path"
18313 
18314   windows_path="$new_path"
18315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18316     unix_path=`$CYGPATH -u "$windows_path"`
18317     new_path="$unix_path"
18318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18320     new_path="$unix_path"
18321   fi
18322 
18323 
18324     new_path=`$WHICH "$new_path" 2> /dev/null`
18325 
18326     if test "x$new_path" = x; then
18327       # It's still not found. Now this is an unrecoverable error.
18328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18329 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18330       has_space=`$ECHO "$complete" | $GREP " "`
18331       if test "x$has_space" != x; then
18332         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18333 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18334       fi
18335       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18336     fi
18337   fi
18338 
18339   # Now new_path has a complete unix path to the binary
18340   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18341     # Keep paths in /bin as-is, but remove trailing .exe if any
18342     new_path="${new_path/%.exe/}"
18343     # Do not save /bin paths to all_fixpath_prefixes!
18344   else
18345     # Not in mixed or Windows style, start by that.
18346     new_path=`cmd //c echo $new_path`
18347 
18348   input_path="$new_path"
18349   # Check if we need to convert this using DOS-style short mode. If the path
18350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18351   # take no chances and rewrite it.
18352   # Note: m4 eats our [], so we need to use [ and ] instead.
18353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18354   if test "x$has_forbidden_chars" != x; then
18355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18357   fi
18358 
18359     # Output is in $new_path
18360 
18361   windows_path="$new_path"
18362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18363     unix_path=`$CYGPATH -u "$windows_path"`
18364     new_path="$unix_path"
18365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18367     new_path="$unix_path"
18368   fi
18369 
18370     # remove trailing .exe if any
18371     new_path="${new_path/%.exe/}"
18372 
18373     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18374     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18375   fi
18376 
18377   else
18378     # We're on a posix platform. Hooray! :)
18379     # First separate the path from the arguments. This will split at the first
18380     # space.
18381     complete="$BUILD_CC"
18382     path="${complete%% *}"
18383     tmp="$complete EOL"
18384     arguments="${tmp#* }"
18385 
18386     # Cannot rely on the command "which" here since it doesn't always work.
18387     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18388     if test -z "$is_absolute_path"; then
18389       # Path to executable is not absolute. Find it.
18390       IFS_save="$IFS"
18391       IFS=:
18392       for p in $PATH; do
18393         if test -f "$p/$path" && test -x "$p/$path"; then
18394           new_path="$p/$path"
18395           break
18396         fi
18397       done
18398       IFS="$IFS_save"
18399     else
18400       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18401 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18402       new_path="$path"
18403     fi
18404 
18405     if test "x$new_path" = x; then
18406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18407 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18408       has_space=`$ECHO "$complete" | $GREP " "`
18409       if test "x$has_space" != x; then
18410         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18411 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18412       fi
18413       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18414     fi
18415   fi
18416 
18417   # Now join together the path and the arguments once again
18418   if test "x$arguments" != xEOL; then
18419     new_complete="$new_path ${arguments% *}"
18420   else
18421     new_complete="$new_path"
18422   fi
18423 
18424   if test "x$complete" != "x$new_complete"; then
18425     BUILD_CC="$new_complete"
18426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18427 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18428   fi
18429 
18430     for ac_prog in cl CC g++
18431 do
18432   # Extract the first word of "$ac_prog", so it can be a program name with args.
18433 set dummy $ac_prog; ac_word=$2
18434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18435 $as_echo_n "checking for $ac_word... " >&6; }
18436 if ${ac_cv_path_BUILD_CXX+:} false; then :
18437   $as_echo_n "(cached) " >&6
18438 else
18439   case $BUILD_CXX in
18440   [\\/]* | ?:[\\/]*)
18441   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18442   ;;
18443   *)
18444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18445 for as_dir in $PATH
18446 do
18447   IFS=$as_save_IFS
18448   test -z "$as_dir" && as_dir=.
18449     for ac_exec_ext in '' $ac_executable_extensions; do
18450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18451     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18453     break 2
18454   fi
18455 done
18456   done
18457 IFS=$as_save_IFS
18458 
18459   ;;
18460 esac
18461 fi
18462 BUILD_CXX=$ac_cv_path_BUILD_CXX
18463 if test -n "$BUILD_CXX"; then
18464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18465 $as_echo "$BUILD_CXX" >&6; }
18466 else
18467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18468 $as_echo "no" >&6; }
18469 fi
18470 
18471 
18472   test -n "$BUILD_CXX" && break
18473 done
18474 
18475 
18476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18477 
18478   # First separate the path from the arguments. This will split at the first
18479   # space.
18480   complete="$BUILD_CXX"
18481   path="${complete%% *}"
18482   tmp="$complete EOL"
18483   arguments="${tmp#* }"
18484 
18485   # Input might be given as Windows format, start by converting to
18486   # unix format.
18487   new_path=`$CYGPATH -u "$path"`
18488 
18489   # Now try to locate executable using which
18490   new_path=`$WHICH "$new_path" 2> /dev/null`
18491   # bat and cmd files are not always considered executable in cygwin causing which
18492   # to not find them
18493   if test "x$new_path" = x \
18494       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18495       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18496     new_path=`$CYGPATH -u "$path"`
18497   fi
18498   if test "x$new_path" = x; then
18499     # Oops. Which didn't find the executable.
18500     # The splitting of arguments from the executable at a space might have been incorrect,
18501     # since paths with space are more likely in Windows. Give it another try with the whole
18502     # argument.
18503     path="$complete"
18504     arguments="EOL"
18505     new_path=`$CYGPATH -u "$path"`
18506     new_path=`$WHICH "$new_path" 2> /dev/null`
18507     # bat and cmd files are not always considered executable in cygwin causing which
18508     # to not find them
18509     if test "x$new_path" = x \
18510         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18511         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18512       new_path=`$CYGPATH -u "$path"`
18513     fi
18514     if test "x$new_path" = x; then
18515       # It's still not found. Now this is an unrecoverable error.
18516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18517 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18518       has_space=`$ECHO "$complete" | $GREP " "`
18519       if test "x$has_space" != x; then
18520         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18521 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18522       fi
18523       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18524     fi
18525   fi
18526 
18527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18530   # "foo.exe" is OK but "foo" is an error.
18531   #
18532   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18533   # It is also a way to make sure we got the proper file name for the real test later on.
18534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18535   if test "x$test_shortpath" = x; then
18536     # Short path failed, file does not exist as specified.
18537     # Try adding .exe or .cmd
18538     if test -f "${new_path}.exe"; then
18539       input_to_shortpath="${new_path}.exe"
18540     elif test -f "${new_path}.cmd"; then
18541       input_to_shortpath="${new_path}.cmd"
18542     else
18543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18544 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18545       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18546 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18547       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18548     fi
18549   else
18550     input_to_shortpath="$new_path"
18551   fi
18552 
18553   # Call helper function which possibly converts this using DOS-style short mode.
18554   # If so, the updated path is stored in $new_path.
18555   new_path="$input_to_shortpath"
18556 
18557   input_path="$input_to_shortpath"
18558   # Check if we need to convert this using DOS-style short mode. If the path
18559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18560   # take no chances and rewrite it.
18561   # Note: m4 eats our [], so we need to use [ and ] instead.
18562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18563   if test "x$has_forbidden_chars" != x; then
18564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18565     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18566     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18567     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18568       # Going to short mode and back again did indeed matter. Since short mode is
18569       # case insensitive, let's make it lowercase to improve readability.
18570       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18571       # Now convert it back to Unix-stile (cygpath)
18572       input_path=`$CYGPATH -u "$shortmode_path"`
18573       new_path="$input_path"
18574     fi
18575   fi
18576 
18577   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18578   if test "x$test_cygdrive_prefix" = x; then
18579     # As a simple fix, exclude /usr/bin since it's not a real path.
18580     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18581       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18582       # a path prefixed by /cygdrive for fixpath to work.
18583       new_path="$CYGWIN_ROOT_PATH$input_path"
18584     fi
18585   fi
18586 
18587   # remove trailing .exe if any
18588   new_path="${new_path/%.exe/}"
18589 
18590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18591 
18592   # First separate the path from the arguments. This will split at the first
18593   # space.
18594   complete="$BUILD_CXX"
18595   path="${complete%% *}"
18596   tmp="$complete EOL"
18597   arguments="${tmp#* }"
18598 
18599   # Input might be given as Windows format, start by converting to
18600   # unix format.
18601   new_path="$path"
18602 
18603   windows_path="$new_path"
18604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18605     unix_path=`$CYGPATH -u "$windows_path"`
18606     new_path="$unix_path"
18607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18609     new_path="$unix_path"
18610   fi
18611 
18612 
18613   # Now try to locate executable using which
18614   new_path=`$WHICH "$new_path" 2> /dev/null`
18615 
18616   if test "x$new_path" = x; then
18617     # Oops. Which didn't find the executable.
18618     # The splitting of arguments from the executable at a space might have been incorrect,
18619     # since paths with space are more likely in Windows. Give it another try with the whole
18620     # argument.
18621     path="$complete"
18622     arguments="EOL"
18623     new_path="$path"
18624 
18625   windows_path="$new_path"
18626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18627     unix_path=`$CYGPATH -u "$windows_path"`
18628     new_path="$unix_path"
18629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18631     new_path="$unix_path"
18632   fi
18633 
18634 
18635     new_path=`$WHICH "$new_path" 2> /dev/null`
18636 
18637     if test "x$new_path" = x; then
18638       # It's still not found. Now this is an unrecoverable error.
18639       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18640 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18641       has_space=`$ECHO "$complete" | $GREP " "`
18642       if test "x$has_space" != x; then
18643         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18644 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18645       fi
18646       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18647     fi
18648   fi
18649 
18650   # Now new_path has a complete unix path to the binary
18651   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18652     # Keep paths in /bin as-is, but remove trailing .exe if any
18653     new_path="${new_path/%.exe/}"
18654     # Do not save /bin paths to all_fixpath_prefixes!
18655   else
18656     # Not in mixed or Windows style, start by that.
18657     new_path=`cmd //c echo $new_path`
18658 
18659   input_path="$new_path"
18660   # Check if we need to convert this using DOS-style short mode. If the path
18661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18662   # take no chances and rewrite it.
18663   # Note: m4 eats our [], so we need to use [ and ] instead.
18664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18665   if test "x$has_forbidden_chars" != x; then
18666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18667     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18668   fi
18669 
18670     # Output is in $new_path
18671 
18672   windows_path="$new_path"
18673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18674     unix_path=`$CYGPATH -u "$windows_path"`
18675     new_path="$unix_path"
18676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18678     new_path="$unix_path"
18679   fi
18680 
18681     # remove trailing .exe if any
18682     new_path="${new_path/%.exe/}"
18683 
18684     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18685     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18686   fi
18687 
18688   else
18689     # We're on a posix platform. Hooray! :)
18690     # First separate the path from the arguments. This will split at the first
18691     # space.
18692     complete="$BUILD_CXX"
18693     path="${complete%% *}"
18694     tmp="$complete EOL"
18695     arguments="${tmp#* }"
18696 
18697     # Cannot rely on the command "which" here since it doesn't always work.
18698     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18699     if test -z "$is_absolute_path"; then
18700       # Path to executable is not absolute. Find it.
18701       IFS_save="$IFS"
18702       IFS=:
18703       for p in $PATH; do
18704         if test -f "$p/$path" && test -x "$p/$path"; then
18705           new_path="$p/$path"
18706           break
18707         fi
18708       done
18709       IFS="$IFS_save"
18710     else
18711       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18712 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18713       new_path="$path"
18714     fi
18715 
18716     if test "x$new_path" = x; then
18717       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18718 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18719       has_space=`$ECHO "$complete" | $GREP " "`
18720       if test "x$has_space" != x; then
18721         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18722 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18723       fi
18724       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18725     fi
18726   fi
18727 
18728   # Now join together the path and the arguments once again
18729   if test "x$arguments" != xEOL; then
18730     new_complete="$new_path ${arguments% *}"
18731   else
18732     new_complete="$new_path"
18733   fi
18734 
18735   if test "x$complete" != "x$new_complete"; then
18736     BUILD_CXX="$new_complete"
18737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18738 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18739   fi
18740 
18741     # Extract the first word of "ld", so it can be a program name with args.
18742 set dummy ld; ac_word=$2
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18744 $as_echo_n "checking for $ac_word... " >&6; }
18745 if ${ac_cv_path_BUILD_LD+:} false; then :
18746   $as_echo_n "(cached) " >&6
18747 else
18748   case $BUILD_LD in
18749   [\\/]* | ?:[\\/]*)
18750   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18751   ;;
18752   *)
18753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18754 for as_dir in $PATH
18755 do
18756   IFS=$as_save_IFS
18757   test -z "$as_dir" && as_dir=.
18758     for ac_exec_ext in '' $ac_executable_extensions; do
18759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18760     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18762     break 2
18763   fi
18764 done
18765   done
18766 IFS=$as_save_IFS
18767 
18768   ;;
18769 esac
18770 fi
18771 BUILD_LD=$ac_cv_path_BUILD_LD
18772 if test -n "$BUILD_LD"; then
18773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18774 $as_echo "$BUILD_LD" >&6; }
18775 else
18776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18777 $as_echo "no" >&6; }
18778 fi
18779 
18780 
18781 
18782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783 
18784   # First separate the path from the arguments. This will split at the first
18785   # space.
18786   complete="$BUILD_LD"
18787   path="${complete%% *}"
18788   tmp="$complete EOL"
18789   arguments="${tmp#* }"
18790 
18791   # Input might be given as Windows format, start by converting to
18792   # unix format.
18793   new_path=`$CYGPATH -u "$path"`
18794 
18795   # Now try to locate executable using which
18796   new_path=`$WHICH "$new_path" 2> /dev/null`
18797   # bat and cmd files are not always considered executable in cygwin causing which
18798   # to not find them
18799   if test "x$new_path" = x \
18800       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18801       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18802     new_path=`$CYGPATH -u "$path"`
18803   fi
18804   if test "x$new_path" = x; then
18805     # Oops. Which didn't find the executable.
18806     # The splitting of arguments from the executable at a space might have been incorrect,
18807     # since paths with space are more likely in Windows. Give it another try with the whole
18808     # argument.
18809     path="$complete"
18810     arguments="EOL"
18811     new_path=`$CYGPATH -u "$path"`
18812     new_path=`$WHICH "$new_path" 2> /dev/null`
18813     # bat and cmd files are not always considered executable in cygwin causing which
18814     # to not find them
18815     if test "x$new_path" = x \
18816         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18817         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18818       new_path=`$CYGPATH -u "$path"`
18819     fi
18820     if test "x$new_path" = x; then
18821       # It's still not found. Now this is an unrecoverable error.
18822       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18823 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18824       has_space=`$ECHO "$complete" | $GREP " "`
18825       if test "x$has_space" != x; then
18826         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18827 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18828       fi
18829       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18830     fi
18831   fi
18832 
18833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18836   # "foo.exe" is OK but "foo" is an error.
18837   #
18838   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18839   # It is also a way to make sure we got the proper file name for the real test later on.
18840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18841   if test "x$test_shortpath" = x; then
18842     # Short path failed, file does not exist as specified.
18843     # Try adding .exe or .cmd
18844     if test -f "${new_path}.exe"; then
18845       input_to_shortpath="${new_path}.exe"
18846     elif test -f "${new_path}.cmd"; then
18847       input_to_shortpath="${new_path}.cmd"
18848     else
18849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18850 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18851       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18852 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18853       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18854     fi
18855   else
18856     input_to_shortpath="$new_path"
18857   fi
18858 
18859   # Call helper function which possibly converts this using DOS-style short mode.
18860   # If so, the updated path is stored in $new_path.
18861   new_path="$input_to_shortpath"
18862 
18863   input_path="$input_to_shortpath"
18864   # Check if we need to convert this using DOS-style short mode. If the path
18865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18866   # take no chances and rewrite it.
18867   # Note: m4 eats our [], so we need to use [ and ] instead.
18868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18869   if test "x$has_forbidden_chars" != x; then
18870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18871     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18872     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18873     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18874       # Going to short mode and back again did indeed matter. Since short mode is
18875       # case insensitive, let's make it lowercase to improve readability.
18876       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18877       # Now convert it back to Unix-stile (cygpath)
18878       input_path=`$CYGPATH -u "$shortmode_path"`
18879       new_path="$input_path"
18880     fi
18881   fi
18882 
18883   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18884   if test "x$test_cygdrive_prefix" = x; then
18885     # As a simple fix, exclude /usr/bin since it's not a real path.
18886     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18887       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18888       # a path prefixed by /cygdrive for fixpath to work.
18889       new_path="$CYGWIN_ROOT_PATH$input_path"
18890     fi
18891   fi
18892 
18893   # remove trailing .exe if any
18894   new_path="${new_path/%.exe/}"
18895 
18896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18897 
18898   # First separate the path from the arguments. This will split at the first
18899   # space.
18900   complete="$BUILD_LD"
18901   path="${complete%% *}"
18902   tmp="$complete EOL"
18903   arguments="${tmp#* }"
18904 
18905   # Input might be given as Windows format, start by converting to
18906   # unix format.
18907   new_path="$path"
18908 
18909   windows_path="$new_path"
18910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18911     unix_path=`$CYGPATH -u "$windows_path"`
18912     new_path="$unix_path"
18913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18915     new_path="$unix_path"
18916   fi
18917 
18918 
18919   # Now try to locate executable using which
18920   new_path=`$WHICH "$new_path" 2> /dev/null`
18921 
18922   if test "x$new_path" = x; then
18923     # Oops. Which didn't find the executable.
18924     # The splitting of arguments from the executable at a space might have been incorrect,
18925     # since paths with space are more likely in Windows. Give it another try with the whole
18926     # argument.
18927     path="$complete"
18928     arguments="EOL"
18929     new_path="$path"
18930 
18931   windows_path="$new_path"
18932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933     unix_path=`$CYGPATH -u "$windows_path"`
18934     new_path="$unix_path"
18935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937     new_path="$unix_path"
18938   fi
18939 
18940 
18941     new_path=`$WHICH "$new_path" 2> /dev/null`
18942 
18943     if test "x$new_path" = x; then
18944       # It's still not found. Now this is an unrecoverable error.
18945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18946 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18947       has_space=`$ECHO "$complete" | $GREP " "`
18948       if test "x$has_space" != x; then
18949         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18950 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18951       fi
18952       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18953     fi
18954   fi
18955 
18956   # Now new_path has a complete unix path to the binary
18957   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18958     # Keep paths in /bin as-is, but remove trailing .exe if any
18959     new_path="${new_path/%.exe/}"
18960     # Do not save /bin paths to all_fixpath_prefixes!
18961   else
18962     # Not in mixed or Windows style, start by that.
18963     new_path=`cmd //c echo $new_path`
18964 
18965   input_path="$new_path"
18966   # Check if we need to convert this using DOS-style short mode. If the path
18967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18968   # take no chances and rewrite it.
18969   # Note: m4 eats our [], so we need to use [ and ] instead.
18970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18971   if test "x$has_forbidden_chars" != x; then
18972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18974   fi
18975 
18976     # Output is in $new_path
18977 
18978   windows_path="$new_path"
18979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18980     unix_path=`$CYGPATH -u "$windows_path"`
18981     new_path="$unix_path"
18982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18984     new_path="$unix_path"
18985   fi
18986 
18987     # remove trailing .exe if any
18988     new_path="${new_path/%.exe/}"
18989 
18990     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18991     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18992   fi
18993 
18994   else
18995     # We're on a posix platform. Hooray! :)
18996     # First separate the path from the arguments. This will split at the first
18997     # space.
18998     complete="$BUILD_LD"
18999     path="${complete%% *}"
19000     tmp="$complete EOL"
19001     arguments="${tmp#* }"
19002 
19003     # Cannot rely on the command "which" here since it doesn't always work.
19004     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19005     if test -z "$is_absolute_path"; then
19006       # Path to executable is not absolute. Find it.
19007       IFS_save="$IFS"
19008       IFS=:
19009       for p in $PATH; do
19010         if test -f "$p/$path" && test -x "$p/$path"; then
19011           new_path="$p/$path"
19012           break
19013         fi
19014       done
19015       IFS="$IFS_save"
19016     else
19017       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19018 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19019       new_path="$path"
19020     fi
19021 
19022     if test "x$new_path" = x; then
19023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19024 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19025       has_space=`$ECHO "$complete" | $GREP " "`
19026       if test "x$has_space" != x; then
19027         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19028 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19029       fi
19030       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19031     fi
19032   fi
19033 
19034   # Now join together the path and the arguments once again
19035   if test "x$arguments" != xEOL; then
19036     new_complete="$new_path ${arguments% *}"
19037   else
19038     new_complete="$new_path"
19039   fi
19040 
19041   if test "x$complete" != "x$new_complete"; then
19042     BUILD_LD="$new_complete"
19043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19044 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19045   fi
19046 
19047   fi
19048 
19049 
19050 
19051 
19052   # If a devkit is found on the builddeps server, then prepend its path to the
19053   # PATH variable. If there are cross compilers available in the devkit, these
19054   # will be found by AC_PROG_CC et al.
19055   DEVKIT=
19056 
19057 
19058   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19059     # Source the builddeps file again, to make sure it uses the latest variables!
19060     . $builddepsfile
19061     # Look for a target and build machine specific resource!
19062     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19063     if test "x$resource" = x; then
19064       # Ok, lets instead look for a target specific resource
19065       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19066     fi
19067     if test "x$resource" = x; then
19068       # Ok, lets instead look for a build specific resource
19069       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19070     fi
19071     if test "x$resource" = x; then
19072       # Ok, lets instead look for a generic resource
19073       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19074       resource=${builddep_devkit}
19075     fi
19076     if test "x$resource" != x; then
19077       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19078 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19079       # If the resource in the builddeps.conf file is an existing directory,
19080       # for example /java/linux/cups
19081       if test -d ${resource}; then
19082         depdir=${resource}
19083       else
19084 
19085   # devkit is for example mymodule
19086   # $resource is for example libs/general/libmymod_1_2_3.zip
19087   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19088   # $with_builddeps_dir is for example /localhome/builddeps
19089   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19090   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19091   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19092   filename=`basename $resource`
19093   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19094   filebase=${filename%%.*}
19095   extension=${filename#*.}
19096   installdir=$with_builddeps_dir/$filebase
19097   if test ! -f $installdir/$filename.unpacked; then
19098     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19099 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19100     if test ! -d $installdir; then
19101       mkdir -p $installdir
19102     fi
19103     if test ! -d $installdir; then
19104       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19105     fi
19106     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19107     touch $tmpfile
19108     if test ! -f $tmpfile; then
19109       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19110     fi
19111 
19112   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19113   # $tmpfile is the local file name for the downloaded file.
19114   VALID_TOOL=no
19115   if test "x$BDEPS_FTP" = xwget; then
19116     VALID_TOOL=yes
19117     wget -O $tmpfile $with_builddeps_server/$resource
19118   fi
19119   if test "x$BDEPS_FTP" = xlftp; then
19120     VALID_TOOL=yes
19121     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19122   fi
19123   if test "x$BDEPS_FTP" = xftp; then
19124     VALID_TOOL=yes
19125     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19126     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19127     FTPUSERPWD=${FTPSERVER%%@*}
19128     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19129       FTPUSER=${userpwd%%:*}
19130       FTPPWD=${userpwd#*@}
19131       FTPSERVER=${FTPSERVER#*@}
19132     else
19133       FTPUSER=ftp
19134       FTPPWD=ftp
19135     fi
19136     # the "pass" command does not work on some
19137     # ftp clients (read ftp.exe) but if it works,
19138     # passive mode is better!
19139     ( \
19140         echo "user $FTPUSER $FTPPWD"        ; \
19141         echo "pass"                         ; \
19142         echo "bin"                          ; \
19143         echo "get $FTPPATH $tmpfile"              ; \
19144     ) | ftp -in $FTPSERVER
19145   fi
19146   if test "x$VALID_TOOL" != xyes; then
19147     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19148   fi
19149 
19150     mv $tmpfile $installdir/$filename
19151     if test ! -s $installdir/$filename; then
19152       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19153     fi
19154     case "$extension" in
19155       zip)  echo "Unzipping $installdir/$filename..."
19156         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19157         ;;
19158       tar.gz) echo "Untaring $installdir/$filename..."
19159         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19160         ;;
19161       tgz) echo "Untaring $installdir/$filename..."
19162         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19163         ;;
19164       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19165         ;;
19166     esac
19167   fi
19168   if test -f $installdir/$filename.unpacked; then
19169     depdir=$installdir
19170   fi
19171 
19172       fi
19173       # Source the builddeps file again, because in the previous command, the depdir
19174       # was updated to point at the current build dependency install directory.
19175       . $builddepsfile
19176       # Now extract variables from the builddeps.conf files.
19177       theroot=${builddep_devkit_ROOT}
19178       thecflags=${builddep_devkit_CFLAGS}
19179       thelibs=${builddep_devkit_LIBS}
19180       if test "x$depdir" = x; then
19181         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19182       fi
19183       DEVKIT=$depdir
19184       if test "x$theroot" != x; then
19185         DEVKIT="$theroot"
19186       fi
19187       if test "x$thecflags" != x; then
19188         DEVKIT_CFLAGS="$thecflags"
19189       fi
19190       if test "x$thelibs" != x; then
19191         DEVKIT_LIBS="$thelibs"
19192       fi
19193 
19194         # Found devkit
19195         PATH="$DEVKIT/bin:$PATH"
19196         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19197         if test "x$x_includes" = "xNONE"; then
19198           x_includes="$SYS_ROOT/usr/include/X11"
19199         fi
19200         if test "x$x_libraries" = "xNONE"; then
19201           x_libraries="$SYS_ROOT/usr/lib"
19202         fi
19203 
19204 
19205     fi
19206 
19207   fi
19208 
19209 
19210   # Store the CFLAGS etal passed to the configure script.
19211   ORG_CFLAGS="$CFLAGS"
19212   ORG_CXXFLAGS="$CXXFLAGS"
19213   ORG_OBJCFLAGS="$OBJCFLAGS"
19214 
19215   # autoconf magic only relies on PATH, so update it if tools dir is specified
19216   OLD_PATH="$PATH"
19217   if test "x$TOOLS_DIR" != x; then
19218     PATH=$TOOLS_DIR:$PATH
19219   fi
19220 
19221   # Before we locate the compilers, we need to sanitize the Xcode build environment
19222   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19223     # determine path to Xcode developer directory
19224     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
19225     SET_DEVELOPER_DIR=
19226 
19227     if test -n "$XCODE_PATH"; then
19228       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
19229     fi
19230 
19231     # DEVELOPER_DIR could also be provided directly
19232     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
19233 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
19234     if test -n "$DEVELOPER_DIR"; then
19235       if test ! -d "$DEVELOPER_DIR"; then
19236         as_fn_error $? "Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path" "$LINENO" 5
19237       fi
19238       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
19239         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
19240       fi
19241       # make it visible to all the tools immediately
19242       export DEVELOPER_DIR
19243       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
19244       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
19245 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
19246     else
19247       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19248 $as_echo "no" >&6; }
19249     fi
19250 
19251 
19252     # Extract the first word of "xcodebuild", so it can be a program name with args.
19253 set dummy xcodebuild; ac_word=$2
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19255 $as_echo_n "checking for $ac_word... " >&6; }
19256 if ${ac_cv_path_XCODEBUILD+:} false; then :
19257   $as_echo_n "(cached) " >&6
19258 else
19259   case $XCODEBUILD in
19260   [\\/]* | ?:[\\/]*)
19261   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
19262   ;;
19263   *)
19264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19265 for as_dir in $PATH
19266 do
19267   IFS=$as_save_IFS
19268   test -z "$as_dir" && as_dir=.
19269     for ac_exec_ext in '' $ac_executable_extensions; do
19270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19271     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
19272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19273     break 2
19274   fi
19275 done
19276   done
19277 IFS=$as_save_IFS
19278 
19279   ;;
19280 esac
19281 fi
19282 XCODEBUILD=$ac_cv_path_XCODEBUILD
19283 if test -n "$XCODEBUILD"; then
19284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
19285 $as_echo "$XCODEBUILD" >&6; }
19286 else
19287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19288 $as_echo "no" >&6; }
19289 fi
19290 
19291 
19292     if test -z "$XCODEBUILD"; then
19293       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
19294     fi
19295 
19296     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
19297     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
19298     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
19299     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
19300       as_fn_error $? "Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select." "$LINENO" 5
19301     fi
19302 
19303     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
19304     # clang and clang++, which will break the build. So handle that here if we need to.
19305     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
19306       # use xcrun to find the real gcc and add it's directory to PATH
19307       # then autoconf magic will find it
19308       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
19309 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
19310       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
19311       PATH="$XCODE_BIN_PATH":$PATH
19312     fi
19313 
19314     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
19315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
19316 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
19317     # allow SDKNAME to be set to override the default SDK selection
19318     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
19319     if test -n "$SDKPATH"; then
19320       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
19321 $as_echo "$SDKPATH" >&6; }
19322     else
19323       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
19324 $as_echo "(none, will use system headers and frameworks)" >&6; }
19325     fi
19326 
19327 
19328     # Perform a basic sanity test
19329     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
19330       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
19331     fi
19332 
19333     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
19334     if test -n "$SDKPATH"; then
19335       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
19336       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19337       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19338       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19339     fi
19340 
19341     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
19342     # setting this here means it doesn't have to be peppered throughout the forest
19343     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19344     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19345     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19346   fi
19347 
19348   ### Locate C compiler (CC)
19349 
19350   # On windows, only cl.exe is supported.
19351   # On Solaris, cc is preferred to gcc.
19352   # Elsewhere, gcc is preferred to cc.
19353 
19354   if test "x$CC" != x; then
19355     COMPILER_CHECK_LIST="$CC"
19356   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19357     COMPILER_CHECK_LIST="cl"
19358   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19359     COMPILER_CHECK_LIST="cc gcc"
19360   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19361     # Do not probe for cc on AIX.
19362     COMPILER_CHECK_LIST="xlc_r"
19363   else
19364     COMPILER_CHECK_LIST="gcc cc"
19365   fi
19366 
19367 
19368   COMPILER_NAME=C
19369 
19370   CC=
19371   # If TOOLS_DIR is set, check for all compiler names in there first
19372   # before checking the rest of the PATH.
19373   if test -n "$TOOLS_DIR"; then
19374     PATH_save="$PATH"
19375     PATH="$TOOLS_DIR"
19376     for ac_prog in $COMPILER_CHECK_LIST
19377 do
19378   # Extract the first word of "$ac_prog", so it can be a program name with args.
19379 set dummy $ac_prog; ac_word=$2
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19381 $as_echo_n "checking for $ac_word... " >&6; }
19382 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19383   $as_echo_n "(cached) " >&6
19384 else
19385   case $TOOLS_DIR_CC in
19386   [\\/]* | ?:[\\/]*)
19387   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19388   ;;
19389   *)
19390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19391 for as_dir in $PATH
19392 do
19393   IFS=$as_save_IFS
19394   test -z "$as_dir" && as_dir=.
19395     for ac_exec_ext in '' $ac_executable_extensions; do
19396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19397     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19399     break 2
19400   fi
19401 done
19402   done
19403 IFS=$as_save_IFS
19404 
19405   ;;
19406 esac
19407 fi
19408 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19409 if test -n "$TOOLS_DIR_CC"; then
19410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19411 $as_echo "$TOOLS_DIR_CC" >&6; }
19412 else
19413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19414 $as_echo "no" >&6; }
19415 fi
19416 
19417 
19418   test -n "$TOOLS_DIR_CC" && break
19419 done
19420 
19421     CC=$TOOLS_DIR_CC
19422     PATH="$PATH_save"
19423   fi
19424 
19425   # AC_PATH_PROGS can't be run multiple times with the same variable,
19426   # so create a new name for this run.
19427   if test "x$CC" = x; then
19428     for ac_prog in $COMPILER_CHECK_LIST
19429 do
19430   # Extract the first word of "$ac_prog", so it can be a program name with args.
19431 set dummy $ac_prog; ac_word=$2
19432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19433 $as_echo_n "checking for $ac_word... " >&6; }
19434 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19435   $as_echo_n "(cached) " >&6
19436 else
19437   case $POTENTIAL_CC in
19438   [\\/]* | ?:[\\/]*)
19439   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19440   ;;
19441   *)
19442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19443 for as_dir in $PATH
19444 do
19445   IFS=$as_save_IFS
19446   test -z "$as_dir" && as_dir=.
19447     for ac_exec_ext in '' $ac_executable_extensions; do
19448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19449     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19451     break 2
19452   fi
19453 done
19454   done
19455 IFS=$as_save_IFS
19456 
19457   ;;
19458 esac
19459 fi
19460 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19461 if test -n "$POTENTIAL_CC"; then
19462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19463 $as_echo "$POTENTIAL_CC" >&6; }
19464 else
19465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19466 $as_echo "no" >&6; }
19467 fi
19468 
19469 
19470   test -n "$POTENTIAL_CC" && break
19471 done
19472 
19473     CC=$POTENTIAL_CC
19474   fi
19475 
19476   if test "x$CC" = x; then
19477 
19478   # Print a helpful message on how to acquire the necessary build dependency.
19479   # devkit is the help tag: freetype, cups, pulse, alsa etc
19480   MISSING_DEPENDENCY=devkit
19481 
19482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19483     cygwin_help $MISSING_DEPENDENCY
19484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19485     msys_help $MISSING_DEPENDENCY
19486   else
19487     PKGHANDLER_COMMAND=
19488 
19489     case $PKGHANDLER in
19490       apt-get)
19491         apt_help     $MISSING_DEPENDENCY ;;
19492       yum)
19493         yum_help     $MISSING_DEPENDENCY ;;
19494       port)
19495         port_help    $MISSING_DEPENDENCY ;;
19496       pkgutil)
19497         pkgutil_help $MISSING_DEPENDENCY ;;
19498       pkgadd)
19499         pkgadd_help  $MISSING_DEPENDENCY ;;
19500     esac
19501 
19502     if test "x$PKGHANDLER_COMMAND" != x; then
19503       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19504     fi
19505   fi
19506 
19507     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19508   fi
19509 
19510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19511 
19512   # First separate the path from the arguments. This will split at the first
19513   # space.
19514   complete="$CC"
19515   path="${complete%% *}"
19516   tmp="$complete EOL"
19517   arguments="${tmp#* }"
19518 
19519   # Input might be given as Windows format, start by converting to
19520   # unix format.
19521   new_path=`$CYGPATH -u "$path"`
19522 
19523   # Now try to locate executable using which
19524   new_path=`$WHICH "$new_path" 2> /dev/null`
19525   # bat and cmd files are not always considered executable in cygwin causing which
19526   # to not find them
19527   if test "x$new_path" = x \
19528       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19529       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19530     new_path=`$CYGPATH -u "$path"`
19531   fi
19532   if test "x$new_path" = x; then
19533     # Oops. Which didn't find the executable.
19534     # The splitting of arguments from the executable at a space might have been incorrect,
19535     # since paths with space are more likely in Windows. Give it another try with the whole
19536     # argument.
19537     path="$complete"
19538     arguments="EOL"
19539     new_path=`$CYGPATH -u "$path"`
19540     new_path=`$WHICH "$new_path" 2> /dev/null`
19541     # bat and cmd files are not always considered executable in cygwin causing which
19542     # to not find them
19543     if test "x$new_path" = x \
19544         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19545         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19546       new_path=`$CYGPATH -u "$path"`
19547     fi
19548     if test "x$new_path" = x; then
19549       # It's still not found. Now this is an unrecoverable error.
19550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19551 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19552       has_space=`$ECHO "$complete" | $GREP " "`
19553       if test "x$has_space" != x; then
19554         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19555 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19556       fi
19557       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19558     fi
19559   fi
19560 
19561   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19562   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19563   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19564   # "foo.exe" is OK but "foo" is an error.
19565   #
19566   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19567   # It is also a way to make sure we got the proper file name for the real test later on.
19568   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19569   if test "x$test_shortpath" = x; then
19570     # Short path failed, file does not exist as specified.
19571     # Try adding .exe or .cmd
19572     if test -f "${new_path}.exe"; then
19573       input_to_shortpath="${new_path}.exe"
19574     elif test -f "${new_path}.cmd"; then
19575       input_to_shortpath="${new_path}.cmd"
19576     else
19577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19578 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19579       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19580 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19581       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19582     fi
19583   else
19584     input_to_shortpath="$new_path"
19585   fi
19586 
19587   # Call helper function which possibly converts this using DOS-style short mode.
19588   # If so, the updated path is stored in $new_path.
19589   new_path="$input_to_shortpath"
19590 
19591   input_path="$input_to_shortpath"
19592   # Check if we need to convert this using DOS-style short mode. If the path
19593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19594   # take no chances and rewrite it.
19595   # Note: m4 eats our [], so we need to use [ and ] instead.
19596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19597   if test "x$has_forbidden_chars" != x; then
19598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19602       # Going to short mode and back again did indeed matter. Since short mode is
19603       # case insensitive, let's make it lowercase to improve readability.
19604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19605       # Now convert it back to Unix-stile (cygpath)
19606       input_path=`$CYGPATH -u "$shortmode_path"`
19607       new_path="$input_path"
19608     fi
19609   fi
19610 
19611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19612   if test "x$test_cygdrive_prefix" = x; then
19613     # As a simple fix, exclude /usr/bin since it's not a real path.
19614     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19616       # a path prefixed by /cygdrive for fixpath to work.
19617       new_path="$CYGWIN_ROOT_PATH$input_path"
19618     fi
19619   fi
19620 
19621   # remove trailing .exe if any
19622   new_path="${new_path/%.exe/}"
19623 
19624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19625 
19626   # First separate the path from the arguments. This will split at the first
19627   # space.
19628   complete="$CC"
19629   path="${complete%% *}"
19630   tmp="$complete EOL"
19631   arguments="${tmp#* }"
19632 
19633   # Input might be given as Windows format, start by converting to
19634   # unix format.
19635   new_path="$path"
19636 
19637   windows_path="$new_path"
19638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19639     unix_path=`$CYGPATH -u "$windows_path"`
19640     new_path="$unix_path"
19641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19643     new_path="$unix_path"
19644   fi
19645 
19646 
19647   # Now try to locate executable using which
19648   new_path=`$WHICH "$new_path" 2> /dev/null`
19649 
19650   if test "x$new_path" = x; then
19651     # Oops. Which didn't find the executable.
19652     # The splitting of arguments from the executable at a space might have been incorrect,
19653     # since paths with space are more likely in Windows. Give it another try with the whole
19654     # argument.
19655     path="$complete"
19656     arguments="EOL"
19657     new_path="$path"
19658 
19659   windows_path="$new_path"
19660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19661     unix_path=`$CYGPATH -u "$windows_path"`
19662     new_path="$unix_path"
19663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19665     new_path="$unix_path"
19666   fi
19667 
19668 
19669     new_path=`$WHICH "$new_path" 2> /dev/null`
19670 
19671     if test "x$new_path" = x; then
19672       # It's still not found. Now this is an unrecoverable error.
19673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19674 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19675       has_space=`$ECHO "$complete" | $GREP " "`
19676       if test "x$has_space" != x; then
19677         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19678 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19679       fi
19680       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19681     fi
19682   fi
19683 
19684   # Now new_path has a complete unix path to the binary
19685   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19686     # Keep paths in /bin as-is, but remove trailing .exe if any
19687     new_path="${new_path/%.exe/}"
19688     # Do not save /bin paths to all_fixpath_prefixes!
19689   else
19690     # Not in mixed or Windows style, start by that.
19691     new_path=`cmd //c echo $new_path`
19692 
19693   input_path="$new_path"
19694   # Check if we need to convert this using DOS-style short mode. If the path
19695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19696   # take no chances and rewrite it.
19697   # Note: m4 eats our [], so we need to use [ and ] instead.
19698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19699   if test "x$has_forbidden_chars" != x; then
19700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19701     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19702   fi
19703 
19704     # Output is in $new_path
19705 
19706   windows_path="$new_path"
19707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19708     unix_path=`$CYGPATH -u "$windows_path"`
19709     new_path="$unix_path"
19710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19711     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19712     new_path="$unix_path"
19713   fi
19714 
19715     # remove trailing .exe if any
19716     new_path="${new_path/%.exe/}"
19717 
19718     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19719     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19720   fi
19721 
19722   else
19723     # We're on a posix platform. Hooray! :)
19724     # First separate the path from the arguments. This will split at the first
19725     # space.
19726     complete="$CC"
19727     path="${complete%% *}"
19728     tmp="$complete EOL"
19729     arguments="${tmp#* }"
19730 
19731     # Cannot rely on the command "which" here since it doesn't always work.
19732     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19733     if test -z "$is_absolute_path"; then
19734       # Path to executable is not absolute. Find it.
19735       IFS_save="$IFS"
19736       IFS=:
19737       for p in $PATH; do
19738         if test -f "$p/$path" && test -x "$p/$path"; then
19739           new_path="$p/$path"
19740           break
19741         fi
19742       done
19743       IFS="$IFS_save"
19744     else
19745       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19746 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19747       new_path="$path"
19748     fi
19749 
19750     if test "x$new_path" = x; then
19751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19752 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19753       has_space=`$ECHO "$complete" | $GREP " "`
19754       if test "x$has_space" != x; then
19755         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19756 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19757       fi
19758       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19759     fi
19760   fi
19761 
19762   # Now join together the path and the arguments once again
19763   if test "x$arguments" != xEOL; then
19764     new_complete="$new_path ${arguments% *}"
19765   else
19766     new_complete="$new_path"
19767   fi
19768 
19769   if test "x$complete" != "x$new_complete"; then
19770     CC="$new_complete"
19771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19772 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19773   fi
19774 
19775   TEST_COMPILER="$CC"
19776   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19777   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19778   if test "x$OPENJDK_BUILD_OS" != xaix; then
19779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19780 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19781 
19782   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19783     # Follow a chain of symbolic links. Use readlink
19784     # where it exists, else fall back to horribly
19785     # complicated shell code.
19786     if test "x$READLINK_TESTED" != yes; then
19787       # On MacOSX there is a readlink tool with a different
19788       # purpose than the GNU readlink tool. Check the found readlink.
19789       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19790       if test "x$ISGNU" = x; then
19791         # A readlink that we do not know how to use.
19792         # Are there other non-GNU readlinks out there?
19793         READLINK_TESTED=yes
19794         READLINK=
19795       fi
19796     fi
19797 
19798     if test "x$READLINK" != x; then
19799       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19800     else
19801       # Save the current directory for restoring afterwards
19802       STARTDIR=$PWD
19803       COUNTER=0
19804       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19805       sym_link_file=`$BASENAME $TEST_COMPILER`
19806       cd $sym_link_dir
19807       # Use -P flag to resolve symlinks in directories.
19808       cd `$THEPWDCMD -P`
19809       sym_link_dir=`$THEPWDCMD -P`
19810       # Resolve file symlinks
19811       while test $COUNTER -lt 20; do
19812         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19813         if test "x$ISLINK" == x; then
19814           # This is not a symbolic link! We are done!
19815           break
19816         fi
19817         # Again resolve directory symlinks since the target of the just found
19818         # link could be in a different directory
19819         cd `$DIRNAME $ISLINK`
19820         sym_link_dir=`$THEPWDCMD -P`
19821         sym_link_file=`$BASENAME $ISLINK`
19822         let COUNTER=COUNTER+1
19823       done
19824       cd $STARTDIR
19825       TEST_COMPILER=$sym_link_dir/$sym_link_file
19826     fi
19827   fi
19828 
19829     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19830 $as_echo "$TEST_COMPILER" >&6; }
19831   fi
19832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19833 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19834 
19835   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19836   if test "x$COMPILER_BASENAME" = "xccache"; then
19837     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19838 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19839     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19840     # We want to control ccache invocation ourselves, so ignore this cc and try
19841     # searching again.
19842 
19843     # Remove the path to the fake ccache cc from the PATH
19844     RETRY_COMPILER_SAVED_PATH="$PATH"
19845     COMPILER_DIRNAME=`$DIRNAME $CC`
19846     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19847 
19848     # Try again looking for our compiler
19849     if test -n "$ac_tool_prefix"; then
19850   for ac_prog in $COMPILER_CHECK_LIST
19851   do
19852     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19853 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19855 $as_echo_n "checking for $ac_word... " >&6; }
19856 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19857   $as_echo_n "(cached) " >&6
19858 else
19859   if test -n "$PROPER_COMPILER_CC"; then
19860   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19861 else
19862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19863 for as_dir in $PATH
19864 do
19865   IFS=$as_save_IFS
19866   test -z "$as_dir" && as_dir=.
19867     for ac_exec_ext in '' $ac_executable_extensions; do
19868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19869     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19871     break 2
19872   fi
19873 done
19874   done
19875 IFS=$as_save_IFS
19876 
19877 fi
19878 fi
19879 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19880 if test -n "$PROPER_COMPILER_CC"; then
19881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19882 $as_echo "$PROPER_COMPILER_CC" >&6; }
19883 else
19884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19885 $as_echo "no" >&6; }
19886 fi
19887 
19888 
19889     test -n "$PROPER_COMPILER_CC" && break
19890   done
19891 fi
19892 if test -z "$PROPER_COMPILER_CC"; then
19893   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19894   for ac_prog in $COMPILER_CHECK_LIST
19895 do
19896   # Extract the first word of "$ac_prog", so it can be a program name with args.
19897 set dummy $ac_prog; ac_word=$2
19898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19899 $as_echo_n "checking for $ac_word... " >&6; }
19900 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19901   $as_echo_n "(cached) " >&6
19902 else
19903   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19904   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19905 else
19906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19907 for as_dir in $PATH
19908 do
19909   IFS=$as_save_IFS
19910   test -z "$as_dir" && as_dir=.
19911     for ac_exec_ext in '' $ac_executable_extensions; do
19912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19913     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19915     break 2
19916   fi
19917 done
19918   done
19919 IFS=$as_save_IFS
19920 
19921 fi
19922 fi
19923 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19924 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19926 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19927 else
19928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19929 $as_echo "no" >&6; }
19930 fi
19931 
19932 
19933   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19934 done
19935 
19936   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19937     PROPER_COMPILER_CC=""
19938   else
19939     case $cross_compiling:$ac_tool_warned in
19940 yes:)
19941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19942 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19943 ac_tool_warned=yes ;;
19944 esac
19945     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19946   fi
19947 fi
19948 
19949 
19950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19951 
19952   # First separate the path from the arguments. This will split at the first
19953   # space.
19954   complete="$PROPER_COMPILER_CC"
19955   path="${complete%% *}"
19956   tmp="$complete EOL"
19957   arguments="${tmp#* }"
19958 
19959   # Input might be given as Windows format, start by converting to
19960   # unix format.
19961   new_path=`$CYGPATH -u "$path"`
19962 
19963   # Now try to locate executable using which
19964   new_path=`$WHICH "$new_path" 2> /dev/null`
19965   # bat and cmd files are not always considered executable in cygwin causing which
19966   # to not find them
19967   if test "x$new_path" = x \
19968       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19969       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19970     new_path=`$CYGPATH -u "$path"`
19971   fi
19972   if test "x$new_path" = x; then
19973     # Oops. Which didn't find the executable.
19974     # The splitting of arguments from the executable at a space might have been incorrect,
19975     # since paths with space are more likely in Windows. Give it another try with the whole
19976     # argument.
19977     path="$complete"
19978     arguments="EOL"
19979     new_path=`$CYGPATH -u "$path"`
19980     new_path=`$WHICH "$new_path" 2> /dev/null`
19981     # bat and cmd files are not always considered executable in cygwin causing which
19982     # to not find them
19983     if test "x$new_path" = x \
19984         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19985         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19986       new_path=`$CYGPATH -u "$path"`
19987     fi
19988     if test "x$new_path" = x; then
19989       # It's still not found. Now this is an unrecoverable error.
19990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19991 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19992       has_space=`$ECHO "$complete" | $GREP " "`
19993       if test "x$has_space" != x; then
19994         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19995 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19996       fi
19997       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19998     fi
19999   fi
20000 
20001   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20002   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20003   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20004   # "foo.exe" is OK but "foo" is an error.
20005   #
20006   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20007   # It is also a way to make sure we got the proper file name for the real test later on.
20008   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20009   if test "x$test_shortpath" = x; then
20010     # Short path failed, file does not exist as specified.
20011     # Try adding .exe or .cmd
20012     if test -f "${new_path}.exe"; then
20013       input_to_shortpath="${new_path}.exe"
20014     elif test -f "${new_path}.cmd"; then
20015       input_to_shortpath="${new_path}.cmd"
20016     else
20017       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
20018 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
20019       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20020 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20021       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20022     fi
20023   else
20024     input_to_shortpath="$new_path"
20025   fi
20026 
20027   # Call helper function which possibly converts this using DOS-style short mode.
20028   # If so, the updated path is stored in $new_path.
20029   new_path="$input_to_shortpath"
20030 
20031   input_path="$input_to_shortpath"
20032   # Check if we need to convert this using DOS-style short mode. If the path
20033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20034   # take no chances and rewrite it.
20035   # Note: m4 eats our [], so we need to use [ and ] instead.
20036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20037   if test "x$has_forbidden_chars" != x; then
20038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20039     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20040     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20041     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20042       # Going to short mode and back again did indeed matter. Since short mode is
20043       # case insensitive, let's make it lowercase to improve readability.
20044       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20045       # Now convert it back to Unix-stile (cygpath)
20046       input_path=`$CYGPATH -u "$shortmode_path"`
20047       new_path="$input_path"
20048     fi
20049   fi
20050 
20051   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20052   if test "x$test_cygdrive_prefix" = x; then
20053     # As a simple fix, exclude /usr/bin since it's not a real path.
20054     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20055       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20056       # a path prefixed by /cygdrive for fixpath to work.
20057       new_path="$CYGWIN_ROOT_PATH$input_path"
20058     fi
20059   fi
20060 
20061   # remove trailing .exe if any
20062   new_path="${new_path/%.exe/}"
20063 
20064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20065 
20066   # First separate the path from the arguments. This will split at the first
20067   # space.
20068   complete="$PROPER_COMPILER_CC"
20069   path="${complete%% *}"
20070   tmp="$complete EOL"
20071   arguments="${tmp#* }"
20072 
20073   # Input might be given as Windows format, start by converting to
20074   # unix format.
20075   new_path="$path"
20076 
20077   windows_path="$new_path"
20078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20079     unix_path=`$CYGPATH -u "$windows_path"`
20080     new_path="$unix_path"
20081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20083     new_path="$unix_path"
20084   fi
20085 
20086 
20087   # Now try to locate executable using which
20088   new_path=`$WHICH "$new_path" 2> /dev/null`
20089 
20090   if test "x$new_path" = x; then
20091     # Oops. Which didn't find the executable.
20092     # The splitting of arguments from the executable at a space might have been incorrect,
20093     # since paths with space are more likely in Windows. Give it another try with the whole
20094     # argument.
20095     path="$complete"
20096     arguments="EOL"
20097     new_path="$path"
20098 
20099   windows_path="$new_path"
20100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20101     unix_path=`$CYGPATH -u "$windows_path"`
20102     new_path="$unix_path"
20103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20105     new_path="$unix_path"
20106   fi
20107 
20108 
20109     new_path=`$WHICH "$new_path" 2> /dev/null`
20110 
20111     if test "x$new_path" = x; then
20112       # It's still not found. Now this is an unrecoverable error.
20113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20114 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20115       has_space=`$ECHO "$complete" | $GREP " "`
20116       if test "x$has_space" != x; then
20117         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20118 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20119       fi
20120       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20121     fi
20122   fi
20123 
20124   # Now new_path has a complete unix path to the binary
20125   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20126     # Keep paths in /bin as-is, but remove trailing .exe if any
20127     new_path="${new_path/%.exe/}"
20128     # Do not save /bin paths to all_fixpath_prefixes!
20129   else
20130     # Not in mixed or Windows style, start by that.
20131     new_path=`cmd //c echo $new_path`
20132 
20133   input_path="$new_path"
20134   # Check if we need to convert this using DOS-style short mode. If the path
20135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20136   # take no chances and rewrite it.
20137   # Note: m4 eats our [], so we need to use [ and ] instead.
20138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20139   if test "x$has_forbidden_chars" != x; then
20140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20141     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20142   fi
20143 
20144     # Output is in $new_path
20145 
20146   windows_path="$new_path"
20147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20148     unix_path=`$CYGPATH -u "$windows_path"`
20149     new_path="$unix_path"
20150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20152     new_path="$unix_path"
20153   fi
20154 
20155     # remove trailing .exe if any
20156     new_path="${new_path/%.exe/}"
20157 
20158     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20159     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20160   fi
20161 
20162   else
20163     # We're on a posix platform. Hooray! :)
20164     # First separate the path from the arguments. This will split at the first
20165     # space.
20166     complete="$PROPER_COMPILER_CC"
20167     path="${complete%% *}"
20168     tmp="$complete EOL"
20169     arguments="${tmp#* }"
20170 
20171     # Cannot rely on the command "which" here since it doesn't always work.
20172     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20173     if test -z "$is_absolute_path"; then
20174       # Path to executable is not absolute. Find it.
20175       IFS_save="$IFS"
20176       IFS=:
20177       for p in $PATH; do
20178         if test -f "$p/$path" && test -x "$p/$path"; then
20179           new_path="$p/$path"
20180           break
20181         fi
20182       done
20183       IFS="$IFS_save"
20184     else
20185       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20186 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20187       new_path="$path"
20188     fi
20189 
20190     if test "x$new_path" = x; then
20191       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20192 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20193       has_space=`$ECHO "$complete" | $GREP " "`
20194       if test "x$has_space" != x; then
20195         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20196 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20197       fi
20198       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20199     fi
20200   fi
20201 
20202   # Now join together the path and the arguments once again
20203   if test "x$arguments" != xEOL; then
20204     new_complete="$new_path ${arguments% *}"
20205   else
20206     new_complete="$new_path"
20207   fi
20208 
20209   if test "x$complete" != "x$new_complete"; then
20210     PROPER_COMPILER_CC="$new_complete"
20211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20212 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20213   fi
20214 
20215     PATH="$RETRY_COMPILER_SAVED_PATH"
20216 
20217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20218 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20219 
20220   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20221     # Follow a chain of symbolic links. Use readlink
20222     # where it exists, else fall back to horribly
20223     # complicated shell code.
20224     if test "x$READLINK_TESTED" != yes; then
20225       # On MacOSX there is a readlink tool with a different
20226       # purpose than the GNU readlink tool. Check the found readlink.
20227       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20228       if test "x$ISGNU" = x; then
20229         # A readlink that we do not know how to use.
20230         # Are there other non-GNU readlinks out there?
20231         READLINK_TESTED=yes
20232         READLINK=
20233       fi
20234     fi
20235 
20236     if test "x$READLINK" != x; then
20237       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20238     else
20239       # Save the current directory for restoring afterwards
20240       STARTDIR=$PWD
20241       COUNTER=0
20242       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20243       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20244       cd $sym_link_dir
20245       # Use -P flag to resolve symlinks in directories.
20246       cd `$THEPWDCMD -P`
20247       sym_link_dir=`$THEPWDCMD -P`
20248       # Resolve file symlinks
20249       while test $COUNTER -lt 20; do
20250         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20251         if test "x$ISLINK" == x; then
20252           # This is not a symbolic link! We are done!
20253           break
20254         fi
20255         # Again resolve directory symlinks since the target of the just found
20256         # link could be in a different directory
20257         cd `$DIRNAME $ISLINK`
20258         sym_link_dir=`$THEPWDCMD -P`
20259         sym_link_file=`$BASENAME $ISLINK`
20260         let COUNTER=COUNTER+1
20261       done
20262       cd $STARTDIR
20263       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20264     fi
20265   fi
20266 
20267     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20268 $as_echo "$PROPER_COMPILER_CC" >&6; }
20269     CC="$PROPER_COMPILER_CC"
20270   else
20271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20272 $as_echo "no, keeping CC" >&6; }
20273     CC="$TEST_COMPILER"
20274   fi
20275 
20276   COMPILER=$CC
20277   COMPILER_NAME=$COMPILER_NAME
20278 
20279   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20280     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20281     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20282     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20283     if test $? -ne 0; then
20284       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20285 
20286       { $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
20287 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20288       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20289 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20290       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20291     else
20292       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20293       COMPILER_VENDOR="Sun Studio"
20294     fi
20295   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20296       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20297       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20298       if test $? -ne 0; then
20299         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20300       else
20301         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20302         COMPILER_VENDOR='IBM'
20303       fi
20304   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20305     # First line typically looks something like:
20306     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20307     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20308     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20309     COMPILER_VENDOR="Microsoft CL.EXE"
20310     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20311     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20312       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20313         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20314       fi
20315     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20316       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20317         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20318       fi
20319     fi
20320   else
20321     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20322     # Check that this is likely to be GCC.
20323     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20324     if test $? -ne 0; then
20325       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20326 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20327       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20328 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20329       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20330     fi
20331 
20332     # First line typically looks something like:
20333     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20334     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20335     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20336   fi
20337   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20338   CC_VERSION="$COMPILER_VERSION"
20339   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20340   CC_VENDOR="$COMPILER_VENDOR"
20341 
20342   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20343 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20344 
20345 
20346   # Now that we have resolved CC ourself, let autoconf have its go at it
20347   ac_ext=c
20348 ac_cpp='$CPP $CPPFLAGS'
20349 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20350 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20351 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20352 if test -n "$ac_tool_prefix"; then
20353   for ac_prog in $CC
20354   do
20355     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20356 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20358 $as_echo_n "checking for $ac_word... " >&6; }
20359 if ${ac_cv_prog_CC+:} false; then :
20360   $as_echo_n "(cached) " >&6
20361 else
20362   if test -n "$CC"; then
20363   ac_cv_prog_CC="$CC" # Let the user override the test.
20364 else
20365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20366 for as_dir in $PATH
20367 do
20368   IFS=$as_save_IFS
20369   test -z "$as_dir" && as_dir=.
20370     for ac_exec_ext in '' $ac_executable_extensions; do
20371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20372     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20374     break 2
20375   fi
20376 done
20377   done
20378 IFS=$as_save_IFS
20379 
20380 fi
20381 fi
20382 CC=$ac_cv_prog_CC
20383 if test -n "$CC"; then
20384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20385 $as_echo "$CC" >&6; }
20386 else
20387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20388 $as_echo "no" >&6; }
20389 fi
20390 
20391 
20392     test -n "$CC" && break
20393   done
20394 fi
20395 if test -z "$CC"; then
20396   ac_ct_CC=$CC
20397   for ac_prog in $CC
20398 do
20399   # Extract the first word of "$ac_prog", so it can be a program name with args.
20400 set dummy $ac_prog; ac_word=$2
20401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20402 $as_echo_n "checking for $ac_word... " >&6; }
20403 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20404   $as_echo_n "(cached) " >&6
20405 else
20406   if test -n "$ac_ct_CC"; then
20407   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20408 else
20409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20410 for as_dir in $PATH
20411 do
20412   IFS=$as_save_IFS
20413   test -z "$as_dir" && as_dir=.
20414     for ac_exec_ext in '' $ac_executable_extensions; do
20415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20416     ac_cv_prog_ac_ct_CC="$ac_prog"
20417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20418     break 2
20419   fi
20420 done
20421   done
20422 IFS=$as_save_IFS
20423 
20424 fi
20425 fi
20426 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20427 if test -n "$ac_ct_CC"; then
20428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20429 $as_echo "$ac_ct_CC" >&6; }
20430 else
20431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20432 $as_echo "no" >&6; }
20433 fi
20434 
20435 
20436   test -n "$ac_ct_CC" && break
20437 done
20438 
20439   if test "x$ac_ct_CC" = x; then
20440     CC=""
20441   else
20442     case $cross_compiling:$ac_tool_warned in
20443 yes:)
20444 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20445 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20446 ac_tool_warned=yes ;;
20447 esac
20448     CC=$ac_ct_CC
20449   fi
20450 fi
20451 
20452 
20453 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20454 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20455 as_fn_error $? "no acceptable C compiler found in \$PATH
20456 See \`config.log' for more details" "$LINENO" 5; }
20457 
20458 # Provide some information about the compiler.
20459 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20460 set X $ac_compile
20461 ac_compiler=$2
20462 for ac_option in --version -v -V -qversion; do
20463   { { ac_try="$ac_compiler $ac_option >&5"
20464 case "(($ac_try" in
20465   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20466   *) ac_try_echo=$ac_try;;
20467 esac
20468 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20469 $as_echo "$ac_try_echo"; } >&5
20470   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20471   ac_status=$?
20472   if test -s conftest.err; then
20473     sed '10a\
20474 ... rest of stderr output deleted ...
20475          10q' conftest.err >conftest.er1
20476     cat conftest.er1 >&5
20477   fi
20478   rm -f conftest.er1 conftest.err
20479   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20480   test $ac_status = 0; }
20481 done
20482 
20483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20484 /* end confdefs.h.  */
20485 
20486 int
20487 main ()
20488 {
20489 
20490   ;
20491   return 0;
20492 }
20493 _ACEOF
20494 ac_clean_files_save=$ac_clean_files
20495 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20496 # Try to create an executable without -o first, disregard a.out.
20497 # It will help us diagnose broken compilers, and finding out an intuition
20498 # of exeext.
20499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20500 $as_echo_n "checking whether the C compiler works... " >&6; }
20501 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20502 
20503 # The possible output files:
20504 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20505 
20506 ac_rmfiles=
20507 for ac_file in $ac_files
20508 do
20509   case $ac_file in
20510     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20511     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20512   esac
20513 done
20514 rm -f $ac_rmfiles
20515 
20516 if { { ac_try="$ac_link_default"
20517 case "(($ac_try" in
20518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20519   *) ac_try_echo=$ac_try;;
20520 esac
20521 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20522 $as_echo "$ac_try_echo"; } >&5
20523   (eval "$ac_link_default") 2>&5
20524   ac_status=$?
20525   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20526   test $ac_status = 0; }; then :
20527   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20528 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20529 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20530 # so that the user can short-circuit this test for compilers unknown to
20531 # Autoconf.
20532 for ac_file in $ac_files ''
20533 do
20534   test -f "$ac_file" || continue
20535   case $ac_file in
20536     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20537         ;;
20538     [ab].out )
20539         # We found the default executable, but exeext='' is most
20540         # certainly right.
20541         break;;
20542     *.* )
20543         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20544         then :; else
20545            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20546         fi
20547         # We set ac_cv_exeext here because the later test for it is not
20548         # safe: cross compilers may not add the suffix if given an `-o'
20549         # argument, so we may need to know it at that point already.
20550         # Even if this section looks crufty: it has the advantage of
20551         # actually working.
20552         break;;
20553     * )
20554         break;;
20555   esac
20556 done
20557 test "$ac_cv_exeext" = no && ac_cv_exeext=
20558 
20559 else
20560   ac_file=''
20561 fi
20562 if test -z "$ac_file"; then :
20563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20564 $as_echo "no" >&6; }
20565 $as_echo "$as_me: failed program was:" >&5
20566 sed 's/^/| /' conftest.$ac_ext >&5
20567 
20568 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20569 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20570 as_fn_error 77 "C compiler cannot create executables
20571 See \`config.log' for more details" "$LINENO" 5; }
20572 else
20573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20574 $as_echo "yes" >&6; }
20575 fi
20576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20577 $as_echo_n "checking for C compiler default output file name... " >&6; }
20578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20579 $as_echo "$ac_file" >&6; }
20580 ac_exeext=$ac_cv_exeext
20581 
20582 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20583 ac_clean_files=$ac_clean_files_save
20584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20585 $as_echo_n "checking for suffix of executables... " >&6; }
20586 if { { ac_try="$ac_link"
20587 case "(($ac_try" in
20588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20589   *) ac_try_echo=$ac_try;;
20590 esac
20591 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20592 $as_echo "$ac_try_echo"; } >&5
20593   (eval "$ac_link") 2>&5
20594   ac_status=$?
20595   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20596   test $ac_status = 0; }; then :
20597   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20598 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20599 # work properly (i.e., refer to `conftest.exe'), while it won't with
20600 # `rm'.
20601 for ac_file in conftest.exe conftest conftest.*; do
20602   test -f "$ac_file" || continue
20603   case $ac_file in
20604     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20605     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20606           break;;
20607     * ) break;;
20608   esac
20609 done
20610 else
20611   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20612 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20613 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20614 See \`config.log' for more details" "$LINENO" 5; }
20615 fi
20616 rm -f conftest conftest$ac_cv_exeext
20617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20618 $as_echo "$ac_cv_exeext" >&6; }
20619 
20620 rm -f conftest.$ac_ext
20621 EXEEXT=$ac_cv_exeext
20622 ac_exeext=$EXEEXT
20623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20624 /* end confdefs.h.  */
20625 #include <stdio.h>
20626 int
20627 main ()
20628 {
20629 FILE *f = fopen ("conftest.out", "w");
20630  return ferror (f) || fclose (f) != 0;
20631 
20632   ;
20633   return 0;
20634 }
20635 _ACEOF
20636 ac_clean_files="$ac_clean_files conftest.out"
20637 # Check that the compiler produces executables we can run.  If not, either
20638 # the compiler is broken, or we cross compile.
20639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20640 $as_echo_n "checking whether we are cross compiling... " >&6; }
20641 if test "$cross_compiling" != yes; then
20642   { { ac_try="$ac_link"
20643 case "(($ac_try" in
20644   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20645   *) ac_try_echo=$ac_try;;
20646 esac
20647 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20648 $as_echo "$ac_try_echo"; } >&5
20649   (eval "$ac_link") 2>&5
20650   ac_status=$?
20651   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20652   test $ac_status = 0; }
20653   if { ac_try='./conftest$ac_cv_exeext'
20654   { { case "(($ac_try" in
20655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20656   *) ac_try_echo=$ac_try;;
20657 esac
20658 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20659 $as_echo "$ac_try_echo"; } >&5
20660   (eval "$ac_try") 2>&5
20661   ac_status=$?
20662   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20663   test $ac_status = 0; }; }; then
20664     cross_compiling=no
20665   else
20666     if test "$cross_compiling" = maybe; then
20667         cross_compiling=yes
20668     else
20669         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20670 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20671 as_fn_error $? "cannot run C compiled programs.
20672 If you meant to cross compile, use \`--host'.
20673 See \`config.log' for more details" "$LINENO" 5; }
20674     fi
20675   fi
20676 fi
20677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20678 $as_echo "$cross_compiling" >&6; }
20679 
20680 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20681 ac_clean_files=$ac_clean_files_save
20682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20683 $as_echo_n "checking for suffix of object files... " >&6; }
20684 if ${ac_cv_objext+:} false; then :
20685   $as_echo_n "(cached) " >&6
20686 else
20687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20688 /* end confdefs.h.  */
20689 
20690 int
20691 main ()
20692 {
20693 
20694   ;
20695   return 0;
20696 }
20697 _ACEOF
20698 rm -f conftest.o conftest.obj
20699 if { { ac_try="$ac_compile"
20700 case "(($ac_try" in
20701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20702   *) ac_try_echo=$ac_try;;
20703 esac
20704 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20705 $as_echo "$ac_try_echo"; } >&5
20706   (eval "$ac_compile") 2>&5
20707   ac_status=$?
20708   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20709   test $ac_status = 0; }; then :
20710   for ac_file in conftest.o conftest.obj conftest.*; do
20711   test -f "$ac_file" || continue;
20712   case $ac_file in
20713     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20714     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20715        break;;
20716   esac
20717 done
20718 else
20719   $as_echo "$as_me: failed program was:" >&5
20720 sed 's/^/| /' conftest.$ac_ext >&5
20721 
20722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20723 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20724 as_fn_error $? "cannot compute suffix of object files: cannot compile
20725 See \`config.log' for more details" "$LINENO" 5; }
20726 fi
20727 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20728 fi
20729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20730 $as_echo "$ac_cv_objext" >&6; }
20731 OBJEXT=$ac_cv_objext
20732 ac_objext=$OBJEXT
20733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20734 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20735 if ${ac_cv_c_compiler_gnu+:} false; then :
20736   $as_echo_n "(cached) " >&6
20737 else
20738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20739 /* end confdefs.h.  */
20740 
20741 int
20742 main ()
20743 {
20744 #ifndef __GNUC__
20745        choke me
20746 #endif
20747 
20748   ;
20749   return 0;
20750 }
20751 _ACEOF
20752 if ac_fn_c_try_compile "$LINENO"; then :
20753   ac_compiler_gnu=yes
20754 else
20755   ac_compiler_gnu=no
20756 fi
20757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20758 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20759 
20760 fi
20761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20762 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20763 if test $ac_compiler_gnu = yes; then
20764   GCC=yes
20765 else
20766   GCC=
20767 fi
20768 ac_test_CFLAGS=${CFLAGS+set}
20769 ac_save_CFLAGS=$CFLAGS
20770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20771 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20772 if ${ac_cv_prog_cc_g+:} false; then :
20773   $as_echo_n "(cached) " >&6
20774 else
20775   ac_save_c_werror_flag=$ac_c_werror_flag
20776    ac_c_werror_flag=yes
20777    ac_cv_prog_cc_g=no
20778    CFLAGS="-g"
20779    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20780 /* end confdefs.h.  */
20781 
20782 int
20783 main ()
20784 {
20785 
20786   ;
20787   return 0;
20788 }
20789 _ACEOF
20790 if ac_fn_c_try_compile "$LINENO"; then :
20791   ac_cv_prog_cc_g=yes
20792 else
20793   CFLAGS=""
20794       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20795 /* end confdefs.h.  */
20796 
20797 int
20798 main ()
20799 {
20800 
20801   ;
20802   return 0;
20803 }
20804 _ACEOF
20805 if ac_fn_c_try_compile "$LINENO"; then :
20806 
20807 else
20808   ac_c_werror_flag=$ac_save_c_werror_flag
20809          CFLAGS="-g"
20810          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20811 /* end confdefs.h.  */
20812 
20813 int
20814 main ()
20815 {
20816 
20817   ;
20818   return 0;
20819 }
20820 _ACEOF
20821 if ac_fn_c_try_compile "$LINENO"; then :
20822   ac_cv_prog_cc_g=yes
20823 fi
20824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20825 fi
20826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20827 fi
20828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20829    ac_c_werror_flag=$ac_save_c_werror_flag
20830 fi
20831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20832 $as_echo "$ac_cv_prog_cc_g" >&6; }
20833 if test "$ac_test_CFLAGS" = set; then
20834   CFLAGS=$ac_save_CFLAGS
20835 elif test $ac_cv_prog_cc_g = yes; then
20836   if test "$GCC" = yes; then
20837     CFLAGS="-g -O2"
20838   else
20839     CFLAGS="-g"
20840   fi
20841 else
20842   if test "$GCC" = yes; then
20843     CFLAGS="-O2"
20844   else
20845     CFLAGS=
20846   fi
20847 fi
20848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20849 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20850 if ${ac_cv_prog_cc_c89+:} false; then :
20851   $as_echo_n "(cached) " >&6
20852 else
20853   ac_cv_prog_cc_c89=no
20854 ac_save_CC=$CC
20855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20856 /* end confdefs.h.  */
20857 #include <stdarg.h>
20858 #include <stdio.h>
20859 struct stat;
20860 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20861 struct buf { int x; };
20862 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20863 static char *e (p, i)
20864      char **p;
20865      int i;
20866 {
20867   return p[i];
20868 }
20869 static char *f (char * (*g) (char **, int), char **p, ...)
20870 {
20871   char *s;
20872   va_list v;
20873   va_start (v,p);
20874   s = g (p, va_arg (v,int));
20875   va_end (v);
20876   return s;
20877 }
20878 
20879 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20880    function prototypes and stuff, but not '\xHH' hex character constants.
20881    These don't provoke an error unfortunately, instead are silently treated
20882    as 'x'.  The following induces an error, until -std is added to get
20883    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20884    array size at least.  It's necessary to write '\x00'==0 to get something
20885    that's true only with -std.  */
20886 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20887 
20888 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20889    inside strings and character constants.  */
20890 #define FOO(x) 'x'
20891 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20892 
20893 int test (int i, double x);
20894 struct s1 {int (*f) (int a);};
20895 struct s2 {int (*f) (double a);};
20896 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20897 int argc;
20898 char **argv;
20899 int
20900 main ()
20901 {
20902 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20903   ;
20904   return 0;
20905 }
20906 _ACEOF
20907 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20908         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20909 do
20910   CC="$ac_save_CC $ac_arg"
20911   if ac_fn_c_try_compile "$LINENO"; then :
20912   ac_cv_prog_cc_c89=$ac_arg
20913 fi
20914 rm -f core conftest.err conftest.$ac_objext
20915   test "x$ac_cv_prog_cc_c89" != "xno" && break
20916 done
20917 rm -f conftest.$ac_ext
20918 CC=$ac_save_CC
20919 
20920 fi
20921 # AC_CACHE_VAL
20922 case "x$ac_cv_prog_cc_c89" in
20923   x)
20924     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20925 $as_echo "none needed" >&6; } ;;
20926   xno)
20927     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20928 $as_echo "unsupported" >&6; } ;;
20929   *)
20930     CC="$CC $ac_cv_prog_cc_c89"
20931     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20932 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20933 esac
20934 if test "x$ac_cv_prog_cc_c89" != xno; then :
20935 
20936 fi
20937 
20938 ac_ext=cpp
20939 ac_cpp='$CXXCPP $CPPFLAGS'
20940 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20941 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20942 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20943 
20944 
20945   # Option used to tell the compiler whether to create 32- or 64-bit executables
20946   # Notice that CC contains the full compiler path at this point.
20947   case $CC in
20948     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20949     *)      COMPILER_TARGET_BITS_FLAG="-m";;
20950   esac
20951 
20952 
20953   ### Locate C++ compiler (CXX)
20954 
20955   if test "x$CXX" != x; then
20956     COMPILER_CHECK_LIST="$CXX"
20957   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20958     COMPILER_CHECK_LIST="cl"
20959   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20960     COMPILER_CHECK_LIST="CC g++"
20961   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20962     # Do not probe for CC on AIX .
20963     COMPILER_CHECK_LIST="xlC_r"
20964   else
20965     COMPILER_CHECK_LIST="g++ CC"
20966   fi
20967 
20968 
20969   COMPILER_NAME=C++
20970 
20971   CXX=
20972   # If TOOLS_DIR is set, check for all compiler names in there first
20973   # before checking the rest of the PATH.
20974   if test -n "$TOOLS_DIR"; then
20975     PATH_save="$PATH"
20976     PATH="$TOOLS_DIR"
20977     for ac_prog in $COMPILER_CHECK_LIST
20978 do
20979   # Extract the first word of "$ac_prog", so it can be a program name with args.
20980 set dummy $ac_prog; ac_word=$2
20981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20982 $as_echo_n "checking for $ac_word... " >&6; }
20983 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20984   $as_echo_n "(cached) " >&6
20985 else
20986   case $TOOLS_DIR_CXX in
20987   [\\/]* | ?:[\\/]*)
20988   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20989   ;;
20990   *)
20991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20992 for as_dir in $PATH
20993 do
20994   IFS=$as_save_IFS
20995   test -z "$as_dir" && as_dir=.
20996     for ac_exec_ext in '' $ac_executable_extensions; do
20997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20998     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21000     break 2
21001   fi
21002 done
21003   done
21004 IFS=$as_save_IFS
21005 
21006   ;;
21007 esac
21008 fi
21009 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
21010 if test -n "$TOOLS_DIR_CXX"; then
21011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
21012 $as_echo "$TOOLS_DIR_CXX" >&6; }
21013 else
21014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21015 $as_echo "no" >&6; }
21016 fi
21017 
21018 
21019   test -n "$TOOLS_DIR_CXX" && break
21020 done
21021 
21022     CXX=$TOOLS_DIR_CXX
21023     PATH="$PATH_save"
21024   fi
21025 
21026   # AC_PATH_PROGS can't be run multiple times with the same variable,
21027   # so create a new name for this run.
21028   if test "x$CXX" = x; then
21029     for ac_prog in $COMPILER_CHECK_LIST
21030 do
21031   # Extract the first word of "$ac_prog", so it can be a program name with args.
21032 set dummy $ac_prog; ac_word=$2
21033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21034 $as_echo_n "checking for $ac_word... " >&6; }
21035 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
21036   $as_echo_n "(cached) " >&6
21037 else
21038   case $POTENTIAL_CXX in
21039   [\\/]* | ?:[\\/]*)
21040   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
21041   ;;
21042   *)
21043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21044 for as_dir in $PATH
21045 do
21046   IFS=$as_save_IFS
21047   test -z "$as_dir" && as_dir=.
21048     for ac_exec_ext in '' $ac_executable_extensions; do
21049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21050     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
21051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21052     break 2
21053   fi
21054 done
21055   done
21056 IFS=$as_save_IFS
21057 
21058   ;;
21059 esac
21060 fi
21061 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
21062 if test -n "$POTENTIAL_CXX"; then
21063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
21064 $as_echo "$POTENTIAL_CXX" >&6; }
21065 else
21066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21067 $as_echo "no" >&6; }
21068 fi
21069 
21070 
21071   test -n "$POTENTIAL_CXX" && break
21072 done
21073 
21074     CXX=$POTENTIAL_CXX
21075   fi
21076 
21077   if test "x$CXX" = x; then
21078 
21079   # Print a helpful message on how to acquire the necessary build dependency.
21080   # devkit is the help tag: freetype, cups, pulse, alsa etc
21081   MISSING_DEPENDENCY=devkit
21082 
21083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21084     cygwin_help $MISSING_DEPENDENCY
21085   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21086     msys_help $MISSING_DEPENDENCY
21087   else
21088     PKGHANDLER_COMMAND=
21089 
21090     case $PKGHANDLER in
21091       apt-get)
21092         apt_help     $MISSING_DEPENDENCY ;;
21093       yum)
21094         yum_help     $MISSING_DEPENDENCY ;;
21095       port)
21096         port_help    $MISSING_DEPENDENCY ;;
21097       pkgutil)
21098         pkgutil_help $MISSING_DEPENDENCY ;;
21099       pkgadd)
21100         pkgadd_help  $MISSING_DEPENDENCY ;;
21101     esac
21102 
21103     if test "x$PKGHANDLER_COMMAND" != x; then
21104       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21105     fi
21106   fi
21107 
21108     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21109   fi
21110 
21111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21112 
21113   # First separate the path from the arguments. This will split at the first
21114   # space.
21115   complete="$CXX"
21116   path="${complete%% *}"
21117   tmp="$complete EOL"
21118   arguments="${tmp#* }"
21119 
21120   # Input might be given as Windows format, start by converting to
21121   # unix format.
21122   new_path=`$CYGPATH -u "$path"`
21123 
21124   # Now try to locate executable using which
21125   new_path=`$WHICH "$new_path" 2> /dev/null`
21126   # bat and cmd files are not always considered executable in cygwin causing which
21127   # to not find them
21128   if test "x$new_path" = x \
21129       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21130       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21131     new_path=`$CYGPATH -u "$path"`
21132   fi
21133   if test "x$new_path" = x; then
21134     # Oops. Which didn't find the executable.
21135     # The splitting of arguments from the executable at a space might have been incorrect,
21136     # since paths with space are more likely in Windows. Give it another try with the whole
21137     # argument.
21138     path="$complete"
21139     arguments="EOL"
21140     new_path=`$CYGPATH -u "$path"`
21141     new_path=`$WHICH "$new_path" 2> /dev/null`
21142     # bat and cmd files are not always considered executable in cygwin causing which
21143     # to not find them
21144     if test "x$new_path" = x \
21145         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21146         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21147       new_path=`$CYGPATH -u "$path"`
21148     fi
21149     if test "x$new_path" = x; then
21150       # It's still not found. Now this is an unrecoverable error.
21151       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21152 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21153       has_space=`$ECHO "$complete" | $GREP " "`
21154       if test "x$has_space" != x; then
21155         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21156 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21157       fi
21158       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21159     fi
21160   fi
21161 
21162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21165   # "foo.exe" is OK but "foo" is an error.
21166   #
21167   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21168   # It is also a way to make sure we got the proper file name for the real test later on.
21169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21170   if test "x$test_shortpath" = x; then
21171     # Short path failed, file does not exist as specified.
21172     # Try adding .exe or .cmd
21173     if test -f "${new_path}.exe"; then
21174       input_to_shortpath="${new_path}.exe"
21175     elif test -f "${new_path}.cmd"; then
21176       input_to_shortpath="${new_path}.cmd"
21177     else
21178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21179 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21180       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21181 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21182       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21183     fi
21184   else
21185     input_to_shortpath="$new_path"
21186   fi
21187 
21188   # Call helper function which possibly converts this using DOS-style short mode.
21189   # If so, the updated path is stored in $new_path.
21190   new_path="$input_to_shortpath"
21191 
21192   input_path="$input_to_shortpath"
21193   # Check if we need to convert this using DOS-style short mode. If the path
21194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21195   # take no chances and rewrite it.
21196   # Note: m4 eats our [], so we need to use [ and ] instead.
21197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21198   if test "x$has_forbidden_chars" != x; then
21199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21203       # Going to short mode and back again did indeed matter. Since short mode is
21204       # case insensitive, let's make it lowercase to improve readability.
21205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21206       # Now convert it back to Unix-stile (cygpath)
21207       input_path=`$CYGPATH -u "$shortmode_path"`
21208       new_path="$input_path"
21209     fi
21210   fi
21211 
21212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21213   if test "x$test_cygdrive_prefix" = x; then
21214     # As a simple fix, exclude /usr/bin since it's not a real path.
21215     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21217       # a path prefixed by /cygdrive for fixpath to work.
21218       new_path="$CYGWIN_ROOT_PATH$input_path"
21219     fi
21220   fi
21221 
21222   # remove trailing .exe if any
21223   new_path="${new_path/%.exe/}"
21224 
21225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21226 
21227   # First separate the path from the arguments. This will split at the first
21228   # space.
21229   complete="$CXX"
21230   path="${complete%% *}"
21231   tmp="$complete EOL"
21232   arguments="${tmp#* }"
21233 
21234   # Input might be given as Windows format, start by converting to
21235   # unix format.
21236   new_path="$path"
21237 
21238   windows_path="$new_path"
21239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21240     unix_path=`$CYGPATH -u "$windows_path"`
21241     new_path="$unix_path"
21242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21244     new_path="$unix_path"
21245   fi
21246 
21247 
21248   # Now try to locate executable using which
21249   new_path=`$WHICH "$new_path" 2> /dev/null`
21250 
21251   if test "x$new_path" = x; then
21252     # Oops. Which didn't find the executable.
21253     # The splitting of arguments from the executable at a space might have been incorrect,
21254     # since paths with space are more likely in Windows. Give it another try with the whole
21255     # argument.
21256     path="$complete"
21257     arguments="EOL"
21258     new_path="$path"
21259 
21260   windows_path="$new_path"
21261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21262     unix_path=`$CYGPATH -u "$windows_path"`
21263     new_path="$unix_path"
21264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21266     new_path="$unix_path"
21267   fi
21268 
21269 
21270     new_path=`$WHICH "$new_path" 2> /dev/null`
21271 
21272     if test "x$new_path" = x; then
21273       # It's still not found. Now this is an unrecoverable error.
21274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21275 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21276       has_space=`$ECHO "$complete" | $GREP " "`
21277       if test "x$has_space" != x; then
21278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21280       fi
21281       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21282     fi
21283   fi
21284 
21285   # Now new_path has a complete unix path to the binary
21286   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21287     # Keep paths in /bin as-is, but remove trailing .exe if any
21288     new_path="${new_path/%.exe/}"
21289     # Do not save /bin paths to all_fixpath_prefixes!
21290   else
21291     # Not in mixed or Windows style, start by that.
21292     new_path=`cmd //c echo $new_path`
21293 
21294   input_path="$new_path"
21295   # Check if we need to convert this using DOS-style short mode. If the path
21296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21297   # take no chances and rewrite it.
21298   # Note: m4 eats our [], so we need to use [ and ] instead.
21299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21300   if test "x$has_forbidden_chars" != x; then
21301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21303   fi
21304 
21305     # Output is in $new_path
21306 
21307   windows_path="$new_path"
21308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21309     unix_path=`$CYGPATH -u "$windows_path"`
21310     new_path="$unix_path"
21311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21313     new_path="$unix_path"
21314   fi
21315 
21316     # remove trailing .exe if any
21317     new_path="${new_path/%.exe/}"
21318 
21319     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21320     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21321   fi
21322 
21323   else
21324     # We're on a posix platform. Hooray! :)
21325     # First separate the path from the arguments. This will split at the first
21326     # space.
21327     complete="$CXX"
21328     path="${complete%% *}"
21329     tmp="$complete EOL"
21330     arguments="${tmp#* }"
21331 
21332     # Cannot rely on the command "which" here since it doesn't always work.
21333     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21334     if test -z "$is_absolute_path"; then
21335       # Path to executable is not absolute. Find it.
21336       IFS_save="$IFS"
21337       IFS=:
21338       for p in $PATH; do
21339         if test -f "$p/$path" && test -x "$p/$path"; then
21340           new_path="$p/$path"
21341           break
21342         fi
21343       done
21344       IFS="$IFS_save"
21345     else
21346       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21347 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21348       new_path="$path"
21349     fi
21350 
21351     if test "x$new_path" = x; then
21352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21353 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21354       has_space=`$ECHO "$complete" | $GREP " "`
21355       if test "x$has_space" != x; then
21356         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21357 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21358       fi
21359       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21360     fi
21361   fi
21362 
21363   # Now join together the path and the arguments once again
21364   if test "x$arguments" != xEOL; then
21365     new_complete="$new_path ${arguments% *}"
21366   else
21367     new_complete="$new_path"
21368   fi
21369 
21370   if test "x$complete" != "x$new_complete"; then
21371     CXX="$new_complete"
21372     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21373 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21374   fi
21375 
21376   TEST_COMPILER="$CXX"
21377   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21378   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21379   if test "x$OPENJDK_BUILD_OS" != xaix; then
21380     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21381 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21382 
21383   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21384     # Follow a chain of symbolic links. Use readlink
21385     # where it exists, else fall back to horribly
21386     # complicated shell code.
21387     if test "x$READLINK_TESTED" != yes; then
21388       # On MacOSX there is a readlink tool with a different
21389       # purpose than the GNU readlink tool. Check the found readlink.
21390       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21391       if test "x$ISGNU" = x; then
21392         # A readlink that we do not know how to use.
21393         # Are there other non-GNU readlinks out there?
21394         READLINK_TESTED=yes
21395         READLINK=
21396       fi
21397     fi
21398 
21399     if test "x$READLINK" != x; then
21400       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21401     else
21402       # Save the current directory for restoring afterwards
21403       STARTDIR=$PWD
21404       COUNTER=0
21405       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21406       sym_link_file=`$BASENAME $TEST_COMPILER`
21407       cd $sym_link_dir
21408       # Use -P flag to resolve symlinks in directories.
21409       cd `$THEPWDCMD -P`
21410       sym_link_dir=`$THEPWDCMD -P`
21411       # Resolve file symlinks
21412       while test $COUNTER -lt 20; do
21413         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21414         if test "x$ISLINK" == x; then
21415           # This is not a symbolic link! We are done!
21416           break
21417         fi
21418         # Again resolve directory symlinks since the target of the just found
21419         # link could be in a different directory
21420         cd `$DIRNAME $ISLINK`
21421         sym_link_dir=`$THEPWDCMD -P`
21422         sym_link_file=`$BASENAME $ISLINK`
21423         let COUNTER=COUNTER+1
21424       done
21425       cd $STARTDIR
21426       TEST_COMPILER=$sym_link_dir/$sym_link_file
21427     fi
21428   fi
21429 
21430     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21431 $as_echo "$TEST_COMPILER" >&6; }
21432   fi
21433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21434 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21435 
21436   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21437   if test "x$COMPILER_BASENAME" = "xccache"; then
21438     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21439 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21440     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21441     # We want to control ccache invocation ourselves, so ignore this cc and try
21442     # searching again.
21443 
21444     # Remove the path to the fake ccache cc from the PATH
21445     RETRY_COMPILER_SAVED_PATH="$PATH"
21446     COMPILER_DIRNAME=`$DIRNAME $CXX`
21447     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21448 
21449     # Try again looking for our compiler
21450     if test -n "$ac_tool_prefix"; then
21451   for ac_prog in $COMPILER_CHECK_LIST
21452   do
21453     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21454 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21456 $as_echo_n "checking for $ac_word... " >&6; }
21457 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21458   $as_echo_n "(cached) " >&6
21459 else
21460   if test -n "$PROPER_COMPILER_CXX"; then
21461   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21462 else
21463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21464 for as_dir in $PATH
21465 do
21466   IFS=$as_save_IFS
21467   test -z "$as_dir" && as_dir=.
21468     for ac_exec_ext in '' $ac_executable_extensions; do
21469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21470     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21472     break 2
21473   fi
21474 done
21475   done
21476 IFS=$as_save_IFS
21477 
21478 fi
21479 fi
21480 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21481 if test -n "$PROPER_COMPILER_CXX"; then
21482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21483 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21484 else
21485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21486 $as_echo "no" >&6; }
21487 fi
21488 
21489 
21490     test -n "$PROPER_COMPILER_CXX" && break
21491   done
21492 fi
21493 if test -z "$PROPER_COMPILER_CXX"; then
21494   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21495   for ac_prog in $COMPILER_CHECK_LIST
21496 do
21497   # Extract the first word of "$ac_prog", so it can be a program name with args.
21498 set dummy $ac_prog; ac_word=$2
21499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21500 $as_echo_n "checking for $ac_word... " >&6; }
21501 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21502   $as_echo_n "(cached) " >&6
21503 else
21504   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21505   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21506 else
21507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21508 for as_dir in $PATH
21509 do
21510   IFS=$as_save_IFS
21511   test -z "$as_dir" && as_dir=.
21512     for ac_exec_ext in '' $ac_executable_extensions; do
21513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21514     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21516     break 2
21517   fi
21518 done
21519   done
21520 IFS=$as_save_IFS
21521 
21522 fi
21523 fi
21524 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21525 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21527 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21528 else
21529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21530 $as_echo "no" >&6; }
21531 fi
21532 
21533 
21534   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21535 done
21536 
21537   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21538     PROPER_COMPILER_CXX=""
21539   else
21540     case $cross_compiling:$ac_tool_warned in
21541 yes:)
21542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21543 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21544 ac_tool_warned=yes ;;
21545 esac
21546     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21547   fi
21548 fi
21549 
21550 
21551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21552 
21553   # First separate the path from the arguments. This will split at the first
21554   # space.
21555   complete="$PROPER_COMPILER_CXX"
21556   path="${complete%% *}"
21557   tmp="$complete EOL"
21558   arguments="${tmp#* }"
21559 
21560   # Input might be given as Windows format, start by converting to
21561   # unix format.
21562   new_path=`$CYGPATH -u "$path"`
21563 
21564   # Now try to locate executable using which
21565   new_path=`$WHICH "$new_path" 2> /dev/null`
21566   # bat and cmd files are not always considered executable in cygwin causing which
21567   # to not find them
21568   if test "x$new_path" = x \
21569       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21570       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21571     new_path=`$CYGPATH -u "$path"`
21572   fi
21573   if test "x$new_path" = x; then
21574     # Oops. Which didn't find the executable.
21575     # The splitting of arguments from the executable at a space might have been incorrect,
21576     # since paths with space are more likely in Windows. Give it another try with the whole
21577     # argument.
21578     path="$complete"
21579     arguments="EOL"
21580     new_path=`$CYGPATH -u "$path"`
21581     new_path=`$WHICH "$new_path" 2> /dev/null`
21582     # bat and cmd files are not always considered executable in cygwin causing which
21583     # to not find them
21584     if test "x$new_path" = x \
21585         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21586         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21587       new_path=`$CYGPATH -u "$path"`
21588     fi
21589     if test "x$new_path" = x; then
21590       # It's still not found. Now this is an unrecoverable error.
21591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21592 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21593       has_space=`$ECHO "$complete" | $GREP " "`
21594       if test "x$has_space" != x; then
21595         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21596 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21597       fi
21598       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21599     fi
21600   fi
21601 
21602   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21603   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21604   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21605   # "foo.exe" is OK but "foo" is an error.
21606   #
21607   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21608   # It is also a way to make sure we got the proper file name for the real test later on.
21609   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21610   if test "x$test_shortpath" = x; then
21611     # Short path failed, file does not exist as specified.
21612     # Try adding .exe or .cmd
21613     if test -f "${new_path}.exe"; then
21614       input_to_shortpath="${new_path}.exe"
21615     elif test -f "${new_path}.cmd"; then
21616       input_to_shortpath="${new_path}.cmd"
21617     else
21618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21619 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21620       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21621 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21622       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21623     fi
21624   else
21625     input_to_shortpath="$new_path"
21626   fi
21627 
21628   # Call helper function which possibly converts this using DOS-style short mode.
21629   # If so, the updated path is stored in $new_path.
21630   new_path="$input_to_shortpath"
21631 
21632   input_path="$input_to_shortpath"
21633   # Check if we need to convert this using DOS-style short mode. If the path
21634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21635   # take no chances and rewrite it.
21636   # Note: m4 eats our [], so we need to use [ and ] instead.
21637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21638   if test "x$has_forbidden_chars" != x; then
21639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21640     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21641     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21642     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21643       # Going to short mode and back again did indeed matter. Since short mode is
21644       # case insensitive, let's make it lowercase to improve readability.
21645       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21646       # Now convert it back to Unix-stile (cygpath)
21647       input_path=`$CYGPATH -u "$shortmode_path"`
21648       new_path="$input_path"
21649     fi
21650   fi
21651 
21652   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21653   if test "x$test_cygdrive_prefix" = x; then
21654     # As a simple fix, exclude /usr/bin since it's not a real path.
21655     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21656       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21657       # a path prefixed by /cygdrive for fixpath to work.
21658       new_path="$CYGWIN_ROOT_PATH$input_path"
21659     fi
21660   fi
21661 
21662   # remove trailing .exe if any
21663   new_path="${new_path/%.exe/}"
21664 
21665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21666 
21667   # First separate the path from the arguments. This will split at the first
21668   # space.
21669   complete="$PROPER_COMPILER_CXX"
21670   path="${complete%% *}"
21671   tmp="$complete EOL"
21672   arguments="${tmp#* }"
21673 
21674   # Input might be given as Windows format, start by converting to
21675   # unix format.
21676   new_path="$path"
21677 
21678   windows_path="$new_path"
21679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21680     unix_path=`$CYGPATH -u "$windows_path"`
21681     new_path="$unix_path"
21682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21684     new_path="$unix_path"
21685   fi
21686 
21687 
21688   # Now try to locate executable using which
21689   new_path=`$WHICH "$new_path" 2> /dev/null`
21690 
21691   if test "x$new_path" = x; then
21692     # Oops. Which didn't find the executable.
21693     # The splitting of arguments from the executable at a space might have been incorrect,
21694     # since paths with space are more likely in Windows. Give it another try with the whole
21695     # argument.
21696     path="$complete"
21697     arguments="EOL"
21698     new_path="$path"
21699 
21700   windows_path="$new_path"
21701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21702     unix_path=`$CYGPATH -u "$windows_path"`
21703     new_path="$unix_path"
21704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21706     new_path="$unix_path"
21707   fi
21708 
21709 
21710     new_path=`$WHICH "$new_path" 2> /dev/null`
21711 
21712     if test "x$new_path" = x; then
21713       # It's still not found. Now this is an unrecoverable error.
21714       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21715 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21716       has_space=`$ECHO "$complete" | $GREP " "`
21717       if test "x$has_space" != x; then
21718         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21719 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21720       fi
21721       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21722     fi
21723   fi
21724 
21725   # Now new_path has a complete unix path to the binary
21726   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21727     # Keep paths in /bin as-is, but remove trailing .exe if any
21728     new_path="${new_path/%.exe/}"
21729     # Do not save /bin paths to all_fixpath_prefixes!
21730   else
21731     # Not in mixed or Windows style, start by that.
21732     new_path=`cmd //c echo $new_path`
21733 
21734   input_path="$new_path"
21735   # Check if we need to convert this using DOS-style short mode. If the path
21736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21737   # take no chances and rewrite it.
21738   # Note: m4 eats our [], so we need to use [ and ] instead.
21739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21740   if test "x$has_forbidden_chars" != x; then
21741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21742     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21743   fi
21744 
21745     # Output is in $new_path
21746 
21747   windows_path="$new_path"
21748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21749     unix_path=`$CYGPATH -u "$windows_path"`
21750     new_path="$unix_path"
21751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21753     new_path="$unix_path"
21754   fi
21755 
21756     # remove trailing .exe if any
21757     new_path="${new_path/%.exe/}"
21758 
21759     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21760     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21761   fi
21762 
21763   else
21764     # We're on a posix platform. Hooray! :)
21765     # First separate the path from the arguments. This will split at the first
21766     # space.
21767     complete="$PROPER_COMPILER_CXX"
21768     path="${complete%% *}"
21769     tmp="$complete EOL"
21770     arguments="${tmp#* }"
21771 
21772     # Cannot rely on the command "which" here since it doesn't always work.
21773     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21774     if test -z "$is_absolute_path"; then
21775       # Path to executable is not absolute. Find it.
21776       IFS_save="$IFS"
21777       IFS=:
21778       for p in $PATH; do
21779         if test -f "$p/$path" && test -x "$p/$path"; then
21780           new_path="$p/$path"
21781           break
21782         fi
21783       done
21784       IFS="$IFS_save"
21785     else
21786       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21787 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21788       new_path="$path"
21789     fi
21790 
21791     if test "x$new_path" = x; then
21792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21793 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21794       has_space=`$ECHO "$complete" | $GREP " "`
21795       if test "x$has_space" != x; then
21796         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21797 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21798       fi
21799       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21800     fi
21801   fi
21802 
21803   # Now join together the path and the arguments once again
21804   if test "x$arguments" != xEOL; then
21805     new_complete="$new_path ${arguments% *}"
21806   else
21807     new_complete="$new_path"
21808   fi
21809 
21810   if test "x$complete" != "x$new_complete"; then
21811     PROPER_COMPILER_CXX="$new_complete"
21812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21813 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21814   fi
21815 
21816     PATH="$RETRY_COMPILER_SAVED_PATH"
21817 
21818     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21819 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21820 
21821   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21822     # Follow a chain of symbolic links. Use readlink
21823     # where it exists, else fall back to horribly
21824     # complicated shell code.
21825     if test "x$READLINK_TESTED" != yes; then
21826       # On MacOSX there is a readlink tool with a different
21827       # purpose than the GNU readlink tool. Check the found readlink.
21828       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21829       if test "x$ISGNU" = x; then
21830         # A readlink that we do not know how to use.
21831         # Are there other non-GNU readlinks out there?
21832         READLINK_TESTED=yes
21833         READLINK=
21834       fi
21835     fi
21836 
21837     if test "x$READLINK" != x; then
21838       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21839     else
21840       # Save the current directory for restoring afterwards
21841       STARTDIR=$PWD
21842       COUNTER=0
21843       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21844       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21845       cd $sym_link_dir
21846       # Use -P flag to resolve symlinks in directories.
21847       cd `$THEPWDCMD -P`
21848       sym_link_dir=`$THEPWDCMD -P`
21849       # Resolve file symlinks
21850       while test $COUNTER -lt 20; do
21851         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21852         if test "x$ISLINK" == x; then
21853           # This is not a symbolic link! We are done!
21854           break
21855         fi
21856         # Again resolve directory symlinks since the target of the just found
21857         # link could be in a different directory
21858         cd `$DIRNAME $ISLINK`
21859         sym_link_dir=`$THEPWDCMD -P`
21860         sym_link_file=`$BASENAME $ISLINK`
21861         let COUNTER=COUNTER+1
21862       done
21863       cd $STARTDIR
21864       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21865     fi
21866   fi
21867 
21868     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21869 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21870     CXX="$PROPER_COMPILER_CXX"
21871   else
21872     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21873 $as_echo "no, keeping CXX" >&6; }
21874     CXX="$TEST_COMPILER"
21875   fi
21876 
21877   COMPILER=$CXX
21878   COMPILER_NAME=$COMPILER_NAME
21879 
21880   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21881     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21882     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21883     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21884     if test $? -ne 0; then
21885       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21886 
21887       { $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
21888 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21889       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21890 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21891       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21892     else
21893       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21894       COMPILER_VENDOR="Sun Studio"
21895     fi
21896   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21897       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21898       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21899       if test $? -ne 0; then
21900         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21901       else
21902         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21903         COMPILER_VENDOR='IBM'
21904       fi
21905   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21906     # First line typically looks something like:
21907     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21908     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21909     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21910     COMPILER_VENDOR="Microsoft CL.EXE"
21911     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21912     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21913       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21914         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21915       fi
21916     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21917       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21918         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21919       fi
21920     fi
21921   else
21922     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21923     # Check that this is likely to be GCC.
21924     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21925     if test $? -ne 0; then
21926       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21927 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21928       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21929 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21930       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21931     fi
21932 
21933     # First line typically looks something like:
21934     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21935     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21936     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21937   fi
21938   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21939   CXX_VERSION="$COMPILER_VERSION"
21940   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21941   CXX_VENDOR="$COMPILER_VENDOR"
21942 
21943   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21944 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21945 
21946 
21947   # Now that we have resolved CXX ourself, let autoconf have its go at it
21948   ac_ext=cpp
21949 ac_cpp='$CXXCPP $CPPFLAGS'
21950 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21951 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21952 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21953 if test -z "$CXX"; then
21954   if test -n "$CCC"; then
21955     CXX=$CCC
21956   else
21957     if test -n "$ac_tool_prefix"; then
21958   for ac_prog in $CXX
21959   do
21960     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21961 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21963 $as_echo_n "checking for $ac_word... " >&6; }
21964 if ${ac_cv_prog_CXX+:} false; then :
21965   $as_echo_n "(cached) " >&6
21966 else
21967   if test -n "$CXX"; then
21968   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21969 else
21970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21971 for as_dir in $PATH
21972 do
21973   IFS=$as_save_IFS
21974   test -z "$as_dir" && as_dir=.
21975     for ac_exec_ext in '' $ac_executable_extensions; do
21976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21977     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21979     break 2
21980   fi
21981 done
21982   done
21983 IFS=$as_save_IFS
21984 
21985 fi
21986 fi
21987 CXX=$ac_cv_prog_CXX
21988 if test -n "$CXX"; then
21989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21990 $as_echo "$CXX" >&6; }
21991 else
21992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21993 $as_echo "no" >&6; }
21994 fi
21995 
21996 
21997     test -n "$CXX" && break
21998   done
21999 fi
22000 if test -z "$CXX"; then
22001   ac_ct_CXX=$CXX
22002   for ac_prog in $CXX
22003 do
22004   # Extract the first word of "$ac_prog", so it can be a program name with args.
22005 set dummy $ac_prog; ac_word=$2
22006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22007 $as_echo_n "checking for $ac_word... " >&6; }
22008 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
22009   $as_echo_n "(cached) " >&6
22010 else
22011   if test -n "$ac_ct_CXX"; then
22012   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
22013 else
22014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22015 for as_dir in $PATH
22016 do
22017   IFS=$as_save_IFS
22018   test -z "$as_dir" && as_dir=.
22019     for ac_exec_ext in '' $ac_executable_extensions; do
22020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22021     ac_cv_prog_ac_ct_CXX="$ac_prog"
22022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22023     break 2
22024   fi
22025 done
22026   done
22027 IFS=$as_save_IFS
22028 
22029 fi
22030 fi
22031 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
22032 if test -n "$ac_ct_CXX"; then
22033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
22034 $as_echo "$ac_ct_CXX" >&6; }
22035 else
22036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22037 $as_echo "no" >&6; }
22038 fi
22039 
22040 
22041   test -n "$ac_ct_CXX" && break
22042 done
22043 
22044   if test "x$ac_ct_CXX" = x; then
22045     CXX="g++"
22046   else
22047     case $cross_compiling:$ac_tool_warned in
22048 yes:)
22049 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22050 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22051 ac_tool_warned=yes ;;
22052 esac
22053     CXX=$ac_ct_CXX
22054   fi
22055 fi
22056 
22057   fi
22058 fi
22059 # Provide some information about the compiler.
22060 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
22061 set X $ac_compile
22062 ac_compiler=$2
22063 for ac_option in --version -v -V -qversion; do
22064   { { ac_try="$ac_compiler $ac_option >&5"
22065 case "(($ac_try" in
22066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22067   *) ac_try_echo=$ac_try;;
22068 esac
22069 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22070 $as_echo "$ac_try_echo"; } >&5
22071   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22072   ac_status=$?
22073   if test -s conftest.err; then
22074     sed '10a\
22075 ... rest of stderr output deleted ...
22076          10q' conftest.err >conftest.er1
22077     cat conftest.er1 >&5
22078   fi
22079   rm -f conftest.er1 conftest.err
22080   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22081   test $ac_status = 0; }
22082 done
22083 
22084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
22085 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
22086 if ${ac_cv_cxx_compiler_gnu+:} false; then :
22087   $as_echo_n "(cached) " >&6
22088 else
22089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22090 /* end confdefs.h.  */
22091 
22092 int
22093 main ()
22094 {
22095 #ifndef __GNUC__
22096        choke me
22097 #endif
22098 
22099   ;
22100   return 0;
22101 }
22102 _ACEOF
22103 if ac_fn_cxx_try_compile "$LINENO"; then :
22104   ac_compiler_gnu=yes
22105 else
22106   ac_compiler_gnu=no
22107 fi
22108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22109 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22110 
22111 fi
22112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22113 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22114 if test $ac_compiler_gnu = yes; then
22115   GXX=yes
22116 else
22117   GXX=
22118 fi
22119 ac_test_CXXFLAGS=${CXXFLAGS+set}
22120 ac_save_CXXFLAGS=$CXXFLAGS
22121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22122 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
22123 if ${ac_cv_prog_cxx_g+:} false; then :
22124   $as_echo_n "(cached) " >&6
22125 else
22126   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22127    ac_cxx_werror_flag=yes
22128    ac_cv_prog_cxx_g=no
22129    CXXFLAGS="-g"
22130    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22131 /* end confdefs.h.  */
22132 
22133 int
22134 main ()
22135 {
22136 
22137   ;
22138   return 0;
22139 }
22140 _ACEOF
22141 if ac_fn_cxx_try_compile "$LINENO"; then :
22142   ac_cv_prog_cxx_g=yes
22143 else
22144   CXXFLAGS=""
22145       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22146 /* end confdefs.h.  */
22147 
22148 int
22149 main ()
22150 {
22151 
22152   ;
22153   return 0;
22154 }
22155 _ACEOF
22156 if ac_fn_cxx_try_compile "$LINENO"; then :
22157 
22158 else
22159   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22160          CXXFLAGS="-g"
22161          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22162 /* end confdefs.h.  */
22163 
22164 int
22165 main ()
22166 {
22167 
22168   ;
22169   return 0;
22170 }
22171 _ACEOF
22172 if ac_fn_cxx_try_compile "$LINENO"; then :
22173   ac_cv_prog_cxx_g=yes
22174 fi
22175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22176 fi
22177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22178 fi
22179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22180    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22181 fi
22182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22183 $as_echo "$ac_cv_prog_cxx_g" >&6; }
22184 if test "$ac_test_CXXFLAGS" = set; then
22185   CXXFLAGS=$ac_save_CXXFLAGS
22186 elif test $ac_cv_prog_cxx_g = yes; then
22187   if test "$GXX" = yes; then
22188     CXXFLAGS="-g -O2"
22189   else
22190     CXXFLAGS="-g"
22191   fi
22192 else
22193   if test "$GXX" = yes; then
22194     CXXFLAGS="-O2"
22195   else
22196     CXXFLAGS=
22197   fi
22198 fi
22199 ac_ext=cpp
22200 ac_cpp='$CXXCPP $CPPFLAGS'
22201 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22202 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22203 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22204 
22205 
22206   ### Locate other tools
22207 
22208   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22209     ac_ext=m
22210 ac_cpp='$OBJCPP $CPPFLAGS'
22211 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22212 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22213 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22214 if test -n "$ac_tool_prefix"; then
22215   for ac_prog in gcc objcc objc cc CC
22216   do
22217     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22218 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22220 $as_echo_n "checking for $ac_word... " >&6; }
22221 if ${ac_cv_prog_OBJC+:} false; then :
22222   $as_echo_n "(cached) " >&6
22223 else
22224   if test -n "$OBJC"; then
22225   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22226 else
22227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22228 for as_dir in $PATH
22229 do
22230   IFS=$as_save_IFS
22231   test -z "$as_dir" && as_dir=.
22232     for ac_exec_ext in '' $ac_executable_extensions; do
22233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22234     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22236     break 2
22237   fi
22238 done
22239   done
22240 IFS=$as_save_IFS
22241 
22242 fi
22243 fi
22244 OBJC=$ac_cv_prog_OBJC
22245 if test -n "$OBJC"; then
22246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22247 $as_echo "$OBJC" >&6; }
22248 else
22249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22250 $as_echo "no" >&6; }
22251 fi
22252 
22253 
22254     test -n "$OBJC" && break
22255   done
22256 fi
22257 if test -z "$OBJC"; then
22258   ac_ct_OBJC=$OBJC
22259   for ac_prog in gcc objcc objc cc CC
22260 do
22261   # Extract the first word of "$ac_prog", so it can be a program name with args.
22262 set dummy $ac_prog; ac_word=$2
22263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22264 $as_echo_n "checking for $ac_word... " >&6; }
22265 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22266   $as_echo_n "(cached) " >&6
22267 else
22268   if test -n "$ac_ct_OBJC"; then
22269   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22270 else
22271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22272 for as_dir in $PATH
22273 do
22274   IFS=$as_save_IFS
22275   test -z "$as_dir" && as_dir=.
22276     for ac_exec_ext in '' $ac_executable_extensions; do
22277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22278     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22280     break 2
22281   fi
22282 done
22283   done
22284 IFS=$as_save_IFS
22285 
22286 fi
22287 fi
22288 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22289 if test -n "$ac_ct_OBJC"; then
22290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22291 $as_echo "$ac_ct_OBJC" >&6; }
22292 else
22293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22294 $as_echo "no" >&6; }
22295 fi
22296 
22297 
22298   test -n "$ac_ct_OBJC" && break
22299 done
22300 
22301   if test "x$ac_ct_OBJC" = x; then
22302     OBJC="gcc"
22303   else
22304     case $cross_compiling:$ac_tool_warned in
22305 yes:)
22306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22307 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22308 ac_tool_warned=yes ;;
22309 esac
22310     OBJC=$ac_ct_OBJC
22311   fi
22312 fi
22313 
22314 # Provide some information about the compiler.
22315 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22316 set X $ac_compile
22317 ac_compiler=$2
22318 for ac_option in --version -v -V -qversion; do
22319   { { ac_try="$ac_compiler $ac_option >&5"
22320 case "(($ac_try" in
22321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22322   *) ac_try_echo=$ac_try;;
22323 esac
22324 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22325 $as_echo "$ac_try_echo"; } >&5
22326   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22327   ac_status=$?
22328   if test -s conftest.err; then
22329     sed '10a\
22330 ... rest of stderr output deleted ...
22331          10q' conftest.err >conftest.er1
22332     cat conftest.er1 >&5
22333   fi
22334   rm -f conftest.er1 conftest.err
22335   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22336   test $ac_status = 0; }
22337 done
22338 
22339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22340 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22341 if ${ac_cv_objc_compiler_gnu+:} false; then :
22342   $as_echo_n "(cached) " >&6
22343 else
22344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22345 /* end confdefs.h.  */
22346 
22347 int
22348 main ()
22349 {
22350 #ifndef __GNUC__
22351        choke me
22352 #endif
22353 
22354   ;
22355   return 0;
22356 }
22357 _ACEOF
22358 if ac_fn_objc_try_compile "$LINENO"; then :
22359   ac_compiler_gnu=yes
22360 else
22361   ac_compiler_gnu=no
22362 fi
22363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22364 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22365 
22366 fi
22367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22368 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22369 if test $ac_compiler_gnu = yes; then
22370   GOBJC=yes
22371 else
22372   GOBJC=
22373 fi
22374 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22375 ac_save_OBJCFLAGS=$OBJCFLAGS
22376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22377 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22378 if ${ac_cv_prog_objc_g+:} false; then :
22379   $as_echo_n "(cached) " >&6
22380 else
22381   ac_save_objc_werror_flag=$ac_objc_werror_flag
22382    ac_objc_werror_flag=yes
22383    ac_cv_prog_objc_g=no
22384    OBJCFLAGS="-g"
22385    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22386 /* end confdefs.h.  */
22387 
22388 int
22389 main ()
22390 {
22391 
22392   ;
22393   return 0;
22394 }
22395 _ACEOF
22396 if ac_fn_objc_try_compile "$LINENO"; then :
22397   ac_cv_prog_objc_g=yes
22398 else
22399   OBJCFLAGS=""
22400       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22401 /* end confdefs.h.  */
22402 
22403 int
22404 main ()
22405 {
22406 
22407   ;
22408   return 0;
22409 }
22410 _ACEOF
22411 if ac_fn_objc_try_compile "$LINENO"; then :
22412 
22413 else
22414   ac_objc_werror_flag=$ac_save_objc_werror_flag
22415          OBJCFLAGS="-g"
22416          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22417 /* end confdefs.h.  */
22418 
22419 int
22420 main ()
22421 {
22422 
22423   ;
22424   return 0;
22425 }
22426 _ACEOF
22427 if ac_fn_objc_try_compile "$LINENO"; then :
22428   ac_cv_prog_objc_g=yes
22429 fi
22430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22431 fi
22432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22433 fi
22434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22435    ac_objc_werror_flag=$ac_save_objc_werror_flag
22436 fi
22437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22438 $as_echo "$ac_cv_prog_objc_g" >&6; }
22439 if test "$ac_test_OBJCFLAGS" = set; then
22440   OBJCFLAGS=$ac_save_OBJCFLAGS
22441 elif test $ac_cv_prog_objc_g = yes; then
22442   if test "$GOBJC" = yes; then
22443     OBJCFLAGS="-g -O2"
22444   else
22445     OBJCFLAGS="-g"
22446   fi
22447 else
22448   if test "$GOBJC" = yes; then
22449     OBJCFLAGS="-O2"
22450   else
22451     OBJCFLAGS=
22452   fi
22453 fi
22454 ac_ext=cpp
22455 ac_cpp='$CXXCPP $CPPFLAGS'
22456 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22457 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22458 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22459 
22460 
22461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22462 
22463   # First separate the path from the arguments. This will split at the first
22464   # space.
22465   complete="$OBJC"
22466   path="${complete%% *}"
22467   tmp="$complete EOL"
22468   arguments="${tmp#* }"
22469 
22470   # Input might be given as Windows format, start by converting to
22471   # unix format.
22472   new_path=`$CYGPATH -u "$path"`
22473 
22474   # Now try to locate executable using which
22475   new_path=`$WHICH "$new_path" 2> /dev/null`
22476   # bat and cmd files are not always considered executable in cygwin causing which
22477   # to not find them
22478   if test "x$new_path" = x \
22479       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22480       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22481     new_path=`$CYGPATH -u "$path"`
22482   fi
22483   if test "x$new_path" = x; then
22484     # Oops. Which didn't find the executable.
22485     # The splitting of arguments from the executable at a space might have been incorrect,
22486     # since paths with space are more likely in Windows. Give it another try with the whole
22487     # argument.
22488     path="$complete"
22489     arguments="EOL"
22490     new_path=`$CYGPATH -u "$path"`
22491     new_path=`$WHICH "$new_path" 2> /dev/null`
22492     # bat and cmd files are not always considered executable in cygwin causing which
22493     # to not find them
22494     if test "x$new_path" = x \
22495         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22496         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22497       new_path=`$CYGPATH -u "$path"`
22498     fi
22499     if test "x$new_path" = x; then
22500       # It's still not found. Now this is an unrecoverable error.
22501       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22502 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22503       has_space=`$ECHO "$complete" | $GREP " "`
22504       if test "x$has_space" != x; then
22505         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22506 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22507       fi
22508       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22509     fi
22510   fi
22511 
22512   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22513   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22514   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22515   # "foo.exe" is OK but "foo" is an error.
22516   #
22517   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22518   # It is also a way to make sure we got the proper file name for the real test later on.
22519   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22520   if test "x$test_shortpath" = x; then
22521     # Short path failed, file does not exist as specified.
22522     # Try adding .exe or .cmd
22523     if test -f "${new_path}.exe"; then
22524       input_to_shortpath="${new_path}.exe"
22525     elif test -f "${new_path}.cmd"; then
22526       input_to_shortpath="${new_path}.cmd"
22527     else
22528       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22529 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22530       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22531 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22532       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22533     fi
22534   else
22535     input_to_shortpath="$new_path"
22536   fi
22537 
22538   # Call helper function which possibly converts this using DOS-style short mode.
22539   # If so, the updated path is stored in $new_path.
22540   new_path="$input_to_shortpath"
22541 
22542   input_path="$input_to_shortpath"
22543   # Check if we need to convert this using DOS-style short mode. If the path
22544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22545   # take no chances and rewrite it.
22546   # Note: m4 eats our [], so we need to use [ and ] instead.
22547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22548   if test "x$has_forbidden_chars" != x; then
22549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22550     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22551     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22552     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22553       # Going to short mode and back again did indeed matter. Since short mode is
22554       # case insensitive, let's make it lowercase to improve readability.
22555       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22556       # Now convert it back to Unix-stile (cygpath)
22557       input_path=`$CYGPATH -u "$shortmode_path"`
22558       new_path="$input_path"
22559     fi
22560   fi
22561 
22562   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22563   if test "x$test_cygdrive_prefix" = x; then
22564     # As a simple fix, exclude /usr/bin since it's not a real path.
22565     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22566       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22567       # a path prefixed by /cygdrive for fixpath to work.
22568       new_path="$CYGWIN_ROOT_PATH$input_path"
22569     fi
22570   fi
22571 
22572   # remove trailing .exe if any
22573   new_path="${new_path/%.exe/}"
22574 
22575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22576 
22577   # First separate the path from the arguments. This will split at the first
22578   # space.
22579   complete="$OBJC"
22580   path="${complete%% *}"
22581   tmp="$complete EOL"
22582   arguments="${tmp#* }"
22583 
22584   # Input might be given as Windows format, start by converting to
22585   # unix format.
22586   new_path="$path"
22587 
22588   windows_path="$new_path"
22589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22590     unix_path=`$CYGPATH -u "$windows_path"`
22591     new_path="$unix_path"
22592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22593     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22594     new_path="$unix_path"
22595   fi
22596 
22597 
22598   # Now try to locate executable using which
22599   new_path=`$WHICH "$new_path" 2> /dev/null`
22600 
22601   if test "x$new_path" = x; then
22602     # Oops. Which didn't find the executable.
22603     # The splitting of arguments from the executable at a space might have been incorrect,
22604     # since paths with space are more likely in Windows. Give it another try with the whole
22605     # argument.
22606     path="$complete"
22607     arguments="EOL"
22608     new_path="$path"
22609 
22610   windows_path="$new_path"
22611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22612     unix_path=`$CYGPATH -u "$windows_path"`
22613     new_path="$unix_path"
22614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22616     new_path="$unix_path"
22617   fi
22618 
22619 
22620     new_path=`$WHICH "$new_path" 2> /dev/null`
22621 
22622     if test "x$new_path" = x; then
22623       # It's still not found. Now this is an unrecoverable error.
22624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22625 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22626       has_space=`$ECHO "$complete" | $GREP " "`
22627       if test "x$has_space" != x; then
22628         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22629 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22630       fi
22631       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22632     fi
22633   fi
22634 
22635   # Now new_path has a complete unix path to the binary
22636   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22637     # Keep paths in /bin as-is, but remove trailing .exe if any
22638     new_path="${new_path/%.exe/}"
22639     # Do not save /bin paths to all_fixpath_prefixes!
22640   else
22641     # Not in mixed or Windows style, start by that.
22642     new_path=`cmd //c echo $new_path`
22643 
22644   input_path="$new_path"
22645   # Check if we need to convert this using DOS-style short mode. If the path
22646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22647   # take no chances and rewrite it.
22648   # Note: m4 eats our [], so we need to use [ and ] instead.
22649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22650   if test "x$has_forbidden_chars" != x; then
22651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22652     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22653   fi
22654 
22655     # Output is in $new_path
22656 
22657   windows_path="$new_path"
22658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22659     unix_path=`$CYGPATH -u "$windows_path"`
22660     new_path="$unix_path"
22661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22663     new_path="$unix_path"
22664   fi
22665 
22666     # remove trailing .exe if any
22667     new_path="${new_path/%.exe/}"
22668 
22669     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22670     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22671   fi
22672 
22673   else
22674     # We're on a posix platform. Hooray! :)
22675     # First separate the path from the arguments. This will split at the first
22676     # space.
22677     complete="$OBJC"
22678     path="${complete%% *}"
22679     tmp="$complete EOL"
22680     arguments="${tmp#* }"
22681 
22682     # Cannot rely on the command "which" here since it doesn't always work.
22683     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22684     if test -z "$is_absolute_path"; then
22685       # Path to executable is not absolute. Find it.
22686       IFS_save="$IFS"
22687       IFS=:
22688       for p in $PATH; do
22689         if test -f "$p/$path" && test -x "$p/$path"; then
22690           new_path="$p/$path"
22691           break
22692         fi
22693       done
22694       IFS="$IFS_save"
22695     else
22696       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22697 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22698       new_path="$path"
22699     fi
22700 
22701     if test "x$new_path" = x; then
22702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22703 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22704       has_space=`$ECHO "$complete" | $GREP " "`
22705       if test "x$has_space" != x; then
22706         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22707 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22708       fi
22709       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22710     fi
22711   fi
22712 
22713   # Now join together the path and the arguments once again
22714   if test "x$arguments" != xEOL; then
22715     new_complete="$new_path ${arguments% *}"
22716   else
22717     new_complete="$new_path"
22718   fi
22719 
22720   if test "x$complete" != "x$new_complete"; then
22721     OBJC="$new_complete"
22722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22723 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22724   fi
22725 
22726   else
22727     OBJC=
22728   fi
22729 
22730   # Restore the flags to the user specified values.
22731   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22732   CFLAGS="$ORG_CFLAGS"
22733   CXXFLAGS="$ORG_CXXFLAGS"
22734   OBJCFLAGS="$ORG_OBJCFLAGS"
22735 
22736   LD="$CC"
22737   LDEXE="$CC"
22738   LDCXX="$CXX"
22739   LDEXECXX="$CXX"
22740 
22741   # LDEXE is the linker to use, when creating executables.
22742 
22743   # Linking C++ libraries.
22744 
22745   # Linking C++ executables.
22746 
22747 
22748   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22749     if test -n "$ac_tool_prefix"; then
22750   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22751 set dummy ${ac_tool_prefix}ar; ac_word=$2
22752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22753 $as_echo_n "checking for $ac_word... " >&6; }
22754 if ${ac_cv_prog_AR+:} false; then :
22755   $as_echo_n "(cached) " >&6
22756 else
22757   if test -n "$AR"; then
22758   ac_cv_prog_AR="$AR" # Let the user override the test.
22759 else
22760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22761 for as_dir in $PATH
22762 do
22763   IFS=$as_save_IFS
22764   test -z "$as_dir" && as_dir=.
22765     for ac_exec_ext in '' $ac_executable_extensions; do
22766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22767     ac_cv_prog_AR="${ac_tool_prefix}ar"
22768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22769     break 2
22770   fi
22771 done
22772   done
22773 IFS=$as_save_IFS
22774 
22775 fi
22776 fi
22777 AR=$ac_cv_prog_AR
22778 if test -n "$AR"; then
22779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22780 $as_echo "$AR" >&6; }
22781 else
22782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22783 $as_echo "no" >&6; }
22784 fi
22785 
22786 
22787 fi
22788 if test -z "$ac_cv_prog_AR"; then
22789   ac_ct_AR=$AR
22790   # Extract the first word of "ar", so it can be a program name with args.
22791 set dummy ar; ac_word=$2
22792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22793 $as_echo_n "checking for $ac_word... " >&6; }
22794 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22795   $as_echo_n "(cached) " >&6
22796 else
22797   if test -n "$ac_ct_AR"; then
22798   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22799 else
22800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22801 for as_dir in $PATH
22802 do
22803   IFS=$as_save_IFS
22804   test -z "$as_dir" && as_dir=.
22805     for ac_exec_ext in '' $ac_executable_extensions; do
22806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22807     ac_cv_prog_ac_ct_AR="ar"
22808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22809     break 2
22810   fi
22811 done
22812   done
22813 IFS=$as_save_IFS
22814 
22815 fi
22816 fi
22817 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22818 if test -n "$ac_ct_AR"; then
22819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22820 $as_echo "$ac_ct_AR" >&6; }
22821 else
22822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22823 $as_echo "no" >&6; }
22824 fi
22825 
22826   if test "x$ac_ct_AR" = x; then
22827     AR=""
22828   else
22829     case $cross_compiling:$ac_tool_warned in
22830 yes:)
22831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22832 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22833 ac_tool_warned=yes ;;
22834 esac
22835     AR=$ac_ct_AR
22836   fi
22837 else
22838   AR="$ac_cv_prog_AR"
22839 fi
22840 
22841 
22842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22843 
22844   # First separate the path from the arguments. This will split at the first
22845   # space.
22846   complete="$AR"
22847   path="${complete%% *}"
22848   tmp="$complete EOL"
22849   arguments="${tmp#* }"
22850 
22851   # Input might be given as Windows format, start by converting to
22852   # unix format.
22853   new_path=`$CYGPATH -u "$path"`
22854 
22855   # Now try to locate executable using which
22856   new_path=`$WHICH "$new_path" 2> /dev/null`
22857   # bat and cmd files are not always considered executable in cygwin causing which
22858   # to not find them
22859   if test "x$new_path" = x \
22860       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22861       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22862     new_path=`$CYGPATH -u "$path"`
22863   fi
22864   if test "x$new_path" = x; then
22865     # Oops. Which didn't find the executable.
22866     # The splitting of arguments from the executable at a space might have been incorrect,
22867     # since paths with space are more likely in Windows. Give it another try with the whole
22868     # argument.
22869     path="$complete"
22870     arguments="EOL"
22871     new_path=`$CYGPATH -u "$path"`
22872     new_path=`$WHICH "$new_path" 2> /dev/null`
22873     # bat and cmd files are not always considered executable in cygwin causing which
22874     # to not find them
22875     if test "x$new_path" = x \
22876         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22877         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22878       new_path=`$CYGPATH -u "$path"`
22879     fi
22880     if test "x$new_path" = x; then
22881       # It's still not found. Now this is an unrecoverable error.
22882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22883 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22884       has_space=`$ECHO "$complete" | $GREP " "`
22885       if test "x$has_space" != x; then
22886         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22887 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22888       fi
22889       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22890     fi
22891   fi
22892 
22893   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22894   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22895   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22896   # "foo.exe" is OK but "foo" is an error.
22897   #
22898   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22899   # It is also a way to make sure we got the proper file name for the real test later on.
22900   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22901   if test "x$test_shortpath" = x; then
22902     # Short path failed, file does not exist as specified.
22903     # Try adding .exe or .cmd
22904     if test -f "${new_path}.exe"; then
22905       input_to_shortpath="${new_path}.exe"
22906     elif test -f "${new_path}.cmd"; then
22907       input_to_shortpath="${new_path}.cmd"
22908     else
22909       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22910 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22911       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22912 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22913       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22914     fi
22915   else
22916     input_to_shortpath="$new_path"
22917   fi
22918 
22919   # Call helper function which possibly converts this using DOS-style short mode.
22920   # If so, the updated path is stored in $new_path.
22921   new_path="$input_to_shortpath"
22922 
22923   input_path="$input_to_shortpath"
22924   # Check if we need to convert this using DOS-style short mode. If the path
22925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22926   # take no chances and rewrite it.
22927   # Note: m4 eats our [], so we need to use [ and ] instead.
22928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22929   if test "x$has_forbidden_chars" != x; then
22930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22934       # Going to short mode and back again did indeed matter. Since short mode is
22935       # case insensitive, let's make it lowercase to improve readability.
22936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22937       # Now convert it back to Unix-stile (cygpath)
22938       input_path=`$CYGPATH -u "$shortmode_path"`
22939       new_path="$input_path"
22940     fi
22941   fi
22942 
22943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22944   if test "x$test_cygdrive_prefix" = x; then
22945     # As a simple fix, exclude /usr/bin since it's not a real path.
22946     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22948       # a path prefixed by /cygdrive for fixpath to work.
22949       new_path="$CYGWIN_ROOT_PATH$input_path"
22950     fi
22951   fi
22952 
22953   # remove trailing .exe if any
22954   new_path="${new_path/%.exe/}"
22955 
22956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22957 
22958   # First separate the path from the arguments. This will split at the first
22959   # space.
22960   complete="$AR"
22961   path="${complete%% *}"
22962   tmp="$complete EOL"
22963   arguments="${tmp#* }"
22964 
22965   # Input might be given as Windows format, start by converting to
22966   # unix format.
22967   new_path="$path"
22968 
22969   windows_path="$new_path"
22970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22971     unix_path=`$CYGPATH -u "$windows_path"`
22972     new_path="$unix_path"
22973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22975     new_path="$unix_path"
22976   fi
22977 
22978 
22979   # Now try to locate executable using which
22980   new_path=`$WHICH "$new_path" 2> /dev/null`
22981 
22982   if test "x$new_path" = x; then
22983     # Oops. Which didn't find the executable.
22984     # The splitting of arguments from the executable at a space might have been incorrect,
22985     # since paths with space are more likely in Windows. Give it another try with the whole
22986     # argument.
22987     path="$complete"
22988     arguments="EOL"
22989     new_path="$path"
22990 
22991   windows_path="$new_path"
22992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22993     unix_path=`$CYGPATH -u "$windows_path"`
22994     new_path="$unix_path"
22995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22997     new_path="$unix_path"
22998   fi
22999 
23000 
23001     new_path=`$WHICH "$new_path" 2> /dev/null`
23002 
23003     if test "x$new_path" = x; then
23004       # It's still not found. Now this is an unrecoverable error.
23005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23006 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23007       has_space=`$ECHO "$complete" | $GREP " "`
23008       if test "x$has_space" != x; then
23009         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23010 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23011       fi
23012       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23013     fi
23014   fi
23015 
23016   # Now new_path has a complete unix path to the binary
23017   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23018     # Keep paths in /bin as-is, but remove trailing .exe if any
23019     new_path="${new_path/%.exe/}"
23020     # Do not save /bin paths to all_fixpath_prefixes!
23021   else
23022     # Not in mixed or Windows style, start by that.
23023     new_path=`cmd //c echo $new_path`
23024 
23025   input_path="$new_path"
23026   # Check if we need to convert this using DOS-style short mode. If the path
23027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23028   # take no chances and rewrite it.
23029   # Note: m4 eats our [], so we need to use [ and ] instead.
23030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23031   if test "x$has_forbidden_chars" != x; then
23032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23034   fi
23035 
23036     # Output is in $new_path
23037 
23038   windows_path="$new_path"
23039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23040     unix_path=`$CYGPATH -u "$windows_path"`
23041     new_path="$unix_path"
23042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23044     new_path="$unix_path"
23045   fi
23046 
23047     # remove trailing .exe if any
23048     new_path="${new_path/%.exe/}"
23049 
23050     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23051     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23052   fi
23053 
23054   else
23055     # We're on a posix platform. Hooray! :)
23056     # First separate the path from the arguments. This will split at the first
23057     # space.
23058     complete="$AR"
23059     path="${complete%% *}"
23060     tmp="$complete EOL"
23061     arguments="${tmp#* }"
23062 
23063     # Cannot rely on the command "which" here since it doesn't always work.
23064     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23065     if test -z "$is_absolute_path"; then
23066       # Path to executable is not absolute. Find it.
23067       IFS_save="$IFS"
23068       IFS=:
23069       for p in $PATH; do
23070         if test -f "$p/$path" && test -x "$p/$path"; then
23071           new_path="$p/$path"
23072           break
23073         fi
23074       done
23075       IFS="$IFS_save"
23076     else
23077       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
23078 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
23079       new_path="$path"
23080     fi
23081 
23082     if test "x$new_path" = x; then
23083       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23084 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23085       has_space=`$ECHO "$complete" | $GREP " "`
23086       if test "x$has_space" != x; then
23087         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23088 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23089       fi
23090       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23091     fi
23092   fi
23093 
23094   # Now join together the path and the arguments once again
23095   if test "x$arguments" != xEOL; then
23096     new_complete="$new_path ${arguments% *}"
23097   else
23098     new_complete="$new_path"
23099   fi
23100 
23101   if test "x$complete" != "x$new_complete"; then
23102     AR="$new_complete"
23103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23104 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23105   fi
23106 
23107   fi
23108   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23109     ARFLAGS="-r"
23110   elif test "x$OPENJDK_TARGET_OS" = xaix; then
23111     ARFLAGS="-X64"
23112   else
23113     ARFLAGS=""
23114   fi
23115 
23116 
23117   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
23118   HOTSPOT_CXX="$CXX"
23119   HOTSPOT_LD="$LD"
23120 
23121 
23122 
23123   COMPILER_NAME=gcc
23124   COMPILER_TYPE=CC
23125   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23126 
23127     # For now, assume that we are always compiling using cl.exe.
23128     CC_OUT_OPTION=-Fo
23129     EXE_OUT_OPTION=-out:
23130     LD_OUT_OPTION=-out:
23131     AR_OUT_OPTION=-out:
23132     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23133     # program for something completely different.
23134     # Extract the first word of "link", so it can be a program name with args.
23135 set dummy link; ac_word=$2
23136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23137 $as_echo_n "checking for $ac_word... " >&6; }
23138 if ${ac_cv_prog_WINLD+:} false; then :
23139   $as_echo_n "(cached) " >&6
23140 else
23141   if test -n "$WINLD"; then
23142   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23143 else
23144   ac_prog_rejected=no
23145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23146 for as_dir in $PATH
23147 do
23148   IFS=$as_save_IFS
23149   test -z "$as_dir" && as_dir=.
23150     for ac_exec_ext in '' $ac_executable_extensions; do
23151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23152     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23153        ac_prog_rejected=yes
23154        continue
23155      fi
23156     ac_cv_prog_WINLD="link"
23157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23158     break 2
23159   fi
23160 done
23161   done
23162 IFS=$as_save_IFS
23163 
23164 if test $ac_prog_rejected = yes; then
23165   # We found a bogon in the path, so make sure we never use it.
23166   set dummy $ac_cv_prog_WINLD
23167   shift
23168   if test $# != 0; then
23169     # We chose a different compiler from the bogus one.
23170     # However, it has the same basename, so the bogon will be chosen
23171     # first if we set WINLD to just the basename; use the full file name.
23172     shift
23173     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23174   fi
23175 fi
23176 fi
23177 fi
23178 WINLD=$ac_cv_prog_WINLD
23179 if test -n "$WINLD"; then
23180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23181 $as_echo "$WINLD" >&6; }
23182 else
23183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23184 $as_echo "no" >&6; }
23185 fi
23186 
23187 
23188     # Since we must ignore the first found link, WINLD will contain
23189     # the full path to the link.exe program.
23190 
23191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23192 
23193   # First separate the path from the arguments. This will split at the first
23194   # space.
23195   complete="$WINLD"
23196   path="${complete%% *}"
23197   tmp="$complete EOL"
23198   arguments="${tmp#* }"
23199 
23200   # Input might be given as Windows format, start by converting to
23201   # unix format.
23202   new_path=`$CYGPATH -u "$path"`
23203 
23204   # Now try to locate executable using which
23205   new_path=`$WHICH "$new_path" 2> /dev/null`
23206   # bat and cmd files are not always considered executable in cygwin causing which
23207   # to not find them
23208   if test "x$new_path" = x \
23209       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23210       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23211     new_path=`$CYGPATH -u "$path"`
23212   fi
23213   if test "x$new_path" = x; then
23214     # Oops. Which didn't find the executable.
23215     # The splitting of arguments from the executable at a space might have been incorrect,
23216     # since paths with space are more likely in Windows. Give it another try with the whole
23217     # argument.
23218     path="$complete"
23219     arguments="EOL"
23220     new_path=`$CYGPATH -u "$path"`
23221     new_path=`$WHICH "$new_path" 2> /dev/null`
23222     # bat and cmd files are not always considered executable in cygwin causing which
23223     # to not find them
23224     if test "x$new_path" = x \
23225         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23226         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23227       new_path=`$CYGPATH -u "$path"`
23228     fi
23229     if test "x$new_path" = x; then
23230       # It's still not found. Now this is an unrecoverable error.
23231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23232 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23233       has_space=`$ECHO "$complete" | $GREP " "`
23234       if test "x$has_space" != x; then
23235         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23236 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23237       fi
23238       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23239     fi
23240   fi
23241 
23242   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23243   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23244   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23245   # "foo.exe" is OK but "foo" is an error.
23246   #
23247   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23248   # It is also a way to make sure we got the proper file name for the real test later on.
23249   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23250   if test "x$test_shortpath" = x; then
23251     # Short path failed, file does not exist as specified.
23252     # Try adding .exe or .cmd
23253     if test -f "${new_path}.exe"; then
23254       input_to_shortpath="${new_path}.exe"
23255     elif test -f "${new_path}.cmd"; then
23256       input_to_shortpath="${new_path}.cmd"
23257     else
23258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23259 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23260       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23261 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23262       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23263     fi
23264   else
23265     input_to_shortpath="$new_path"
23266   fi
23267 
23268   # Call helper function which possibly converts this using DOS-style short mode.
23269   # If so, the updated path is stored in $new_path.
23270   new_path="$input_to_shortpath"
23271 
23272   input_path="$input_to_shortpath"
23273   # Check if we need to convert this using DOS-style short mode. If the path
23274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23275   # take no chances and rewrite it.
23276   # Note: m4 eats our [], so we need to use [ and ] instead.
23277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23278   if test "x$has_forbidden_chars" != x; then
23279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23280     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23281     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23282     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23283       # Going to short mode and back again did indeed matter. Since short mode is
23284       # case insensitive, let's make it lowercase to improve readability.
23285       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23286       # Now convert it back to Unix-stile (cygpath)
23287       input_path=`$CYGPATH -u "$shortmode_path"`
23288       new_path="$input_path"
23289     fi
23290   fi
23291 
23292   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23293   if test "x$test_cygdrive_prefix" = x; then
23294     # As a simple fix, exclude /usr/bin since it's not a real path.
23295     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23296       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23297       # a path prefixed by /cygdrive for fixpath to work.
23298       new_path="$CYGWIN_ROOT_PATH$input_path"
23299     fi
23300   fi
23301 
23302   # remove trailing .exe if any
23303   new_path="${new_path/%.exe/}"
23304 
23305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23306 
23307   # First separate the path from the arguments. This will split at the first
23308   # space.
23309   complete="$WINLD"
23310   path="${complete%% *}"
23311   tmp="$complete EOL"
23312   arguments="${tmp#* }"
23313 
23314   # Input might be given as Windows format, start by converting to
23315   # unix format.
23316   new_path="$path"
23317 
23318   windows_path="$new_path"
23319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23320     unix_path=`$CYGPATH -u "$windows_path"`
23321     new_path="$unix_path"
23322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23324     new_path="$unix_path"
23325   fi
23326 
23327 
23328   # Now try to locate executable using which
23329   new_path=`$WHICH "$new_path" 2> /dev/null`
23330 
23331   if test "x$new_path" = x; then
23332     # Oops. Which didn't find the executable.
23333     # The splitting of arguments from the executable at a space might have been incorrect,
23334     # since paths with space are more likely in Windows. Give it another try with the whole
23335     # argument.
23336     path="$complete"
23337     arguments="EOL"
23338     new_path="$path"
23339 
23340   windows_path="$new_path"
23341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23342     unix_path=`$CYGPATH -u "$windows_path"`
23343     new_path="$unix_path"
23344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23346     new_path="$unix_path"
23347   fi
23348 
23349 
23350     new_path=`$WHICH "$new_path" 2> /dev/null`
23351 
23352     if test "x$new_path" = x; then
23353       # It's still not found. Now this is an unrecoverable error.
23354       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23355 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23356       has_space=`$ECHO "$complete" | $GREP " "`
23357       if test "x$has_space" != x; then
23358         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23359 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23360       fi
23361       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23362     fi
23363   fi
23364 
23365   # Now new_path has a complete unix path to the binary
23366   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23367     # Keep paths in /bin as-is, but remove trailing .exe if any
23368     new_path="${new_path/%.exe/}"
23369     # Do not save /bin paths to all_fixpath_prefixes!
23370   else
23371     # Not in mixed or Windows style, start by that.
23372     new_path=`cmd //c echo $new_path`
23373 
23374   input_path="$new_path"
23375   # Check if we need to convert this using DOS-style short mode. If the path
23376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23377   # take no chances and rewrite it.
23378   # Note: m4 eats our [], so we need to use [ and ] instead.
23379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23380   if test "x$has_forbidden_chars" != x; then
23381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23382     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23383   fi
23384 
23385     # Output is in $new_path
23386 
23387   windows_path="$new_path"
23388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23389     unix_path=`$CYGPATH -u "$windows_path"`
23390     new_path="$unix_path"
23391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23393     new_path="$unix_path"
23394   fi
23395 
23396     # remove trailing .exe if any
23397     new_path="${new_path/%.exe/}"
23398 
23399     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23400     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23401   fi
23402 
23403   else
23404     # We're on a posix platform. Hooray! :)
23405     # First separate the path from the arguments. This will split at the first
23406     # space.
23407     complete="$WINLD"
23408     path="${complete%% *}"
23409     tmp="$complete EOL"
23410     arguments="${tmp#* }"
23411 
23412     # Cannot rely on the command "which" here since it doesn't always work.
23413     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23414     if test -z "$is_absolute_path"; then
23415       # Path to executable is not absolute. Find it.
23416       IFS_save="$IFS"
23417       IFS=:
23418       for p in $PATH; do
23419         if test -f "$p/$path" && test -x "$p/$path"; then
23420           new_path="$p/$path"
23421           break
23422         fi
23423       done
23424       IFS="$IFS_save"
23425     else
23426       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23427 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23428       new_path="$path"
23429     fi
23430 
23431     if test "x$new_path" = x; then
23432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23433 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23434       has_space=`$ECHO "$complete" | $GREP " "`
23435       if test "x$has_space" != x; then
23436         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23437 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23438       fi
23439       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23440     fi
23441   fi
23442 
23443   # Now join together the path and the arguments once again
23444   if test "x$arguments" != xEOL; then
23445     new_complete="$new_path ${arguments% *}"
23446   else
23447     new_complete="$new_path"
23448   fi
23449 
23450   if test "x$complete" != "x$new_complete"; then
23451     WINLD="$new_complete"
23452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23453 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23454   fi
23455 
23456     printf "Windows linker was found at $WINLD\n"
23457     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23458 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23459     "$WINLD" --version > /dev/null
23460     if test $? -eq 0 ; then
23461       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23462 $as_echo "no" >&6; }
23463       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23464     else
23465       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23466 $as_echo "yes" >&6; }
23467     fi
23468     LD="$WINLD"
23469     LDEXE="$WINLD"
23470     LDCXX="$WINLD"
23471     LDEXECXX="$WINLD"
23472 
23473     # Extract the first word of "mt", so it can be a program name with args.
23474 set dummy mt; ac_word=$2
23475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23476 $as_echo_n "checking for $ac_word... " >&6; }
23477 if ${ac_cv_prog_MT+:} false; then :
23478   $as_echo_n "(cached) " >&6
23479 else
23480   if test -n "$MT"; then
23481   ac_cv_prog_MT="$MT" # Let the user override the test.
23482 else
23483   ac_prog_rejected=no
23484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23485 for as_dir in $PATH
23486 do
23487   IFS=$as_save_IFS
23488   test -z "$as_dir" && as_dir=.
23489     for ac_exec_ext in '' $ac_executable_extensions; do
23490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23491     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23492        ac_prog_rejected=yes
23493        continue
23494      fi
23495     ac_cv_prog_MT="mt"
23496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23497     break 2
23498   fi
23499 done
23500   done
23501 IFS=$as_save_IFS
23502 
23503 if test $ac_prog_rejected = yes; then
23504   # We found a bogon in the path, so make sure we never use it.
23505   set dummy $ac_cv_prog_MT
23506   shift
23507   if test $# != 0; then
23508     # We chose a different compiler from the bogus one.
23509     # However, it has the same basename, so the bogon will be chosen
23510     # first if we set MT to just the basename; use the full file name.
23511     shift
23512     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23513   fi
23514 fi
23515 fi
23516 fi
23517 MT=$ac_cv_prog_MT
23518 if test -n "$MT"; then
23519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23520 $as_echo "$MT" >&6; }
23521 else
23522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23523 $as_echo "no" >&6; }
23524 fi
23525 
23526 
23527 
23528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23529 
23530   # First separate the path from the arguments. This will split at the first
23531   # space.
23532   complete="$MT"
23533   path="${complete%% *}"
23534   tmp="$complete EOL"
23535   arguments="${tmp#* }"
23536 
23537   # Input might be given as Windows format, start by converting to
23538   # unix format.
23539   new_path=`$CYGPATH -u "$path"`
23540 
23541   # Now try to locate executable using which
23542   new_path=`$WHICH "$new_path" 2> /dev/null`
23543   # bat and cmd files are not always considered executable in cygwin causing which
23544   # to not find them
23545   if test "x$new_path" = x \
23546       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23547       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23548     new_path=`$CYGPATH -u "$path"`
23549   fi
23550   if test "x$new_path" = x; then
23551     # Oops. Which didn't find the executable.
23552     # The splitting of arguments from the executable at a space might have been incorrect,
23553     # since paths with space are more likely in Windows. Give it another try with the whole
23554     # argument.
23555     path="$complete"
23556     arguments="EOL"
23557     new_path=`$CYGPATH -u "$path"`
23558     new_path=`$WHICH "$new_path" 2> /dev/null`
23559     # bat and cmd files are not always considered executable in cygwin causing which
23560     # to not find them
23561     if test "x$new_path" = x \
23562         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23563         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23564       new_path=`$CYGPATH -u "$path"`
23565     fi
23566     if test "x$new_path" = x; then
23567       # It's still not found. Now this is an unrecoverable error.
23568       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23569 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23570       has_space=`$ECHO "$complete" | $GREP " "`
23571       if test "x$has_space" != x; then
23572         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23573 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23574       fi
23575       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23576     fi
23577   fi
23578 
23579   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23580   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23581   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23582   # "foo.exe" is OK but "foo" is an error.
23583   #
23584   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23585   # It is also a way to make sure we got the proper file name for the real test later on.
23586   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23587   if test "x$test_shortpath" = x; then
23588     # Short path failed, file does not exist as specified.
23589     # Try adding .exe or .cmd
23590     if test -f "${new_path}.exe"; then
23591       input_to_shortpath="${new_path}.exe"
23592     elif test -f "${new_path}.cmd"; then
23593       input_to_shortpath="${new_path}.cmd"
23594     else
23595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23596 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23597       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23598 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23599       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23600     fi
23601   else
23602     input_to_shortpath="$new_path"
23603   fi
23604 
23605   # Call helper function which possibly converts this using DOS-style short mode.
23606   # If so, the updated path is stored in $new_path.
23607   new_path="$input_to_shortpath"
23608 
23609   input_path="$input_to_shortpath"
23610   # Check if we need to convert this using DOS-style short mode. If the path
23611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23612   # take no chances and rewrite it.
23613   # Note: m4 eats our [], so we need to use [ and ] instead.
23614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23615   if test "x$has_forbidden_chars" != x; then
23616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23620       # Going to short mode and back again did indeed matter. Since short mode is
23621       # case insensitive, let's make it lowercase to improve readability.
23622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23623       # Now convert it back to Unix-stile (cygpath)
23624       input_path=`$CYGPATH -u "$shortmode_path"`
23625       new_path="$input_path"
23626     fi
23627   fi
23628 
23629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23630   if test "x$test_cygdrive_prefix" = x; then
23631     # As a simple fix, exclude /usr/bin since it's not a real path.
23632     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23634       # a path prefixed by /cygdrive for fixpath to work.
23635       new_path="$CYGWIN_ROOT_PATH$input_path"
23636     fi
23637   fi
23638 
23639   # remove trailing .exe if any
23640   new_path="${new_path/%.exe/}"
23641 
23642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23643 
23644   # First separate the path from the arguments. This will split at the first
23645   # space.
23646   complete="$MT"
23647   path="${complete%% *}"
23648   tmp="$complete EOL"
23649   arguments="${tmp#* }"
23650 
23651   # Input might be given as Windows format, start by converting to
23652   # unix format.
23653   new_path="$path"
23654 
23655   windows_path="$new_path"
23656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23657     unix_path=`$CYGPATH -u "$windows_path"`
23658     new_path="$unix_path"
23659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23661     new_path="$unix_path"
23662   fi
23663 
23664 
23665   # Now try to locate executable using which
23666   new_path=`$WHICH "$new_path" 2> /dev/null`
23667 
23668   if test "x$new_path" = x; then
23669     # Oops. Which didn't find the executable.
23670     # The splitting of arguments from the executable at a space might have been incorrect,
23671     # since paths with space are more likely in Windows. Give it another try with the whole
23672     # argument.
23673     path="$complete"
23674     arguments="EOL"
23675     new_path="$path"
23676 
23677   windows_path="$new_path"
23678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23679     unix_path=`$CYGPATH -u "$windows_path"`
23680     new_path="$unix_path"
23681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23682     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23683     new_path="$unix_path"
23684   fi
23685 
23686 
23687     new_path=`$WHICH "$new_path" 2> /dev/null`
23688 
23689     if test "x$new_path" = x; then
23690       # It's still not found. Now this is an unrecoverable error.
23691       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23692 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23693       has_space=`$ECHO "$complete" | $GREP " "`
23694       if test "x$has_space" != x; then
23695         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23696 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23697       fi
23698       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23699     fi
23700   fi
23701 
23702   # Now new_path has a complete unix path to the binary
23703   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23704     # Keep paths in /bin as-is, but remove trailing .exe if any
23705     new_path="${new_path/%.exe/}"
23706     # Do not save /bin paths to all_fixpath_prefixes!
23707   else
23708     # Not in mixed or Windows style, start by that.
23709     new_path=`cmd //c echo $new_path`
23710 
23711   input_path="$new_path"
23712   # Check if we need to convert this using DOS-style short mode. If the path
23713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23714   # take no chances and rewrite it.
23715   # Note: m4 eats our [], so we need to use [ and ] instead.
23716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23717   if test "x$has_forbidden_chars" != x; then
23718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23720   fi
23721 
23722     # Output is in $new_path
23723 
23724   windows_path="$new_path"
23725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23726     unix_path=`$CYGPATH -u "$windows_path"`
23727     new_path="$unix_path"
23728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23730     new_path="$unix_path"
23731   fi
23732 
23733     # remove trailing .exe if any
23734     new_path="${new_path/%.exe/}"
23735 
23736     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23737     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23738   fi
23739 
23740   else
23741     # We're on a posix platform. Hooray! :)
23742     # First separate the path from the arguments. This will split at the first
23743     # space.
23744     complete="$MT"
23745     path="${complete%% *}"
23746     tmp="$complete EOL"
23747     arguments="${tmp#* }"
23748 
23749     # Cannot rely on the command "which" here since it doesn't always work.
23750     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23751     if test -z "$is_absolute_path"; then
23752       # Path to executable is not absolute. Find it.
23753       IFS_save="$IFS"
23754       IFS=:
23755       for p in $PATH; do
23756         if test -f "$p/$path" && test -x "$p/$path"; then
23757           new_path="$p/$path"
23758           break
23759         fi
23760       done
23761       IFS="$IFS_save"
23762     else
23763       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23764 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23765       new_path="$path"
23766     fi
23767 
23768     if test "x$new_path" = x; then
23769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23770 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23771       has_space=`$ECHO "$complete" | $GREP " "`
23772       if test "x$has_space" != x; then
23773         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23774 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23775       fi
23776       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23777     fi
23778   fi
23779 
23780   # Now join together the path and the arguments once again
23781   if test "x$arguments" != xEOL; then
23782     new_complete="$new_path ${arguments% *}"
23783   else
23784     new_complete="$new_path"
23785   fi
23786 
23787   if test "x$complete" != "x$new_complete"; then
23788     MT="$new_complete"
23789     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23790 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23791   fi
23792 
23793     # The resource compiler
23794     # Extract the first word of "rc", so it can be a program name with args.
23795 set dummy rc; ac_word=$2
23796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23797 $as_echo_n "checking for $ac_word... " >&6; }
23798 if ${ac_cv_prog_RC+:} false; then :
23799   $as_echo_n "(cached) " >&6
23800 else
23801   if test -n "$RC"; then
23802   ac_cv_prog_RC="$RC" # Let the user override the test.
23803 else
23804   ac_prog_rejected=no
23805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23806 for as_dir in $PATH
23807 do
23808   IFS=$as_save_IFS
23809   test -z "$as_dir" && as_dir=.
23810     for ac_exec_ext in '' $ac_executable_extensions; do
23811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23812     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23813        ac_prog_rejected=yes
23814        continue
23815      fi
23816     ac_cv_prog_RC="rc"
23817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23818     break 2
23819   fi
23820 done
23821   done
23822 IFS=$as_save_IFS
23823 
23824 if test $ac_prog_rejected = yes; then
23825   # We found a bogon in the path, so make sure we never use it.
23826   set dummy $ac_cv_prog_RC
23827   shift
23828   if test $# != 0; then
23829     # We chose a different compiler from the bogus one.
23830     # However, it has the same basename, so the bogon will be chosen
23831     # first if we set RC to just the basename; use the full file name.
23832     shift
23833     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23834   fi
23835 fi
23836 fi
23837 fi
23838 RC=$ac_cv_prog_RC
23839 if test -n "$RC"; then
23840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23841 $as_echo "$RC" >&6; }
23842 else
23843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23844 $as_echo "no" >&6; }
23845 fi
23846 
23847 
23848 
23849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23850 
23851   # First separate the path from the arguments. This will split at the first
23852   # space.
23853   complete="$RC"
23854   path="${complete%% *}"
23855   tmp="$complete EOL"
23856   arguments="${tmp#* }"
23857 
23858   # Input might be given as Windows format, start by converting to
23859   # unix format.
23860   new_path=`$CYGPATH -u "$path"`
23861 
23862   # Now try to locate executable using which
23863   new_path=`$WHICH "$new_path" 2> /dev/null`
23864   # bat and cmd files are not always considered executable in cygwin causing which
23865   # to not find them
23866   if test "x$new_path" = x \
23867       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23868       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23869     new_path=`$CYGPATH -u "$path"`
23870   fi
23871   if test "x$new_path" = x; then
23872     # Oops. Which didn't find the executable.
23873     # The splitting of arguments from the executable at a space might have been incorrect,
23874     # since paths with space are more likely in Windows. Give it another try with the whole
23875     # argument.
23876     path="$complete"
23877     arguments="EOL"
23878     new_path=`$CYGPATH -u "$path"`
23879     new_path=`$WHICH "$new_path" 2> /dev/null`
23880     # bat and cmd files are not always considered executable in cygwin causing which
23881     # to not find them
23882     if test "x$new_path" = x \
23883         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23884         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23885       new_path=`$CYGPATH -u "$path"`
23886     fi
23887     if test "x$new_path" = x; then
23888       # It's still not found. Now this is an unrecoverable error.
23889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23890 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23891       has_space=`$ECHO "$complete" | $GREP " "`
23892       if test "x$has_space" != x; then
23893         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23894 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23895       fi
23896       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23897     fi
23898   fi
23899 
23900   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23901   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23902   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23903   # "foo.exe" is OK but "foo" is an error.
23904   #
23905   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23906   # It is also a way to make sure we got the proper file name for the real test later on.
23907   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23908   if test "x$test_shortpath" = x; then
23909     # Short path failed, file does not exist as specified.
23910     # Try adding .exe or .cmd
23911     if test -f "${new_path}.exe"; then
23912       input_to_shortpath="${new_path}.exe"
23913     elif test -f "${new_path}.cmd"; then
23914       input_to_shortpath="${new_path}.cmd"
23915     else
23916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23917 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23918       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23919 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23920       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23921     fi
23922   else
23923     input_to_shortpath="$new_path"
23924   fi
23925 
23926   # Call helper function which possibly converts this using DOS-style short mode.
23927   # If so, the updated path is stored in $new_path.
23928   new_path="$input_to_shortpath"
23929 
23930   input_path="$input_to_shortpath"
23931   # Check if we need to convert this using DOS-style short mode. If the path
23932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23933   # take no chances and rewrite it.
23934   # Note: m4 eats our [], so we need to use [ and ] instead.
23935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23936   if test "x$has_forbidden_chars" != x; then
23937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23938     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23939     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23940     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23941       # Going to short mode and back again did indeed matter. Since short mode is
23942       # case insensitive, let's make it lowercase to improve readability.
23943       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23944       # Now convert it back to Unix-stile (cygpath)
23945       input_path=`$CYGPATH -u "$shortmode_path"`
23946       new_path="$input_path"
23947     fi
23948   fi
23949 
23950   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23951   if test "x$test_cygdrive_prefix" = x; then
23952     # As a simple fix, exclude /usr/bin since it's not a real path.
23953     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23954       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23955       # a path prefixed by /cygdrive for fixpath to work.
23956       new_path="$CYGWIN_ROOT_PATH$input_path"
23957     fi
23958   fi
23959 
23960   # remove trailing .exe if any
23961   new_path="${new_path/%.exe/}"
23962 
23963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23964 
23965   # First separate the path from the arguments. This will split at the first
23966   # space.
23967   complete="$RC"
23968   path="${complete%% *}"
23969   tmp="$complete EOL"
23970   arguments="${tmp#* }"
23971 
23972   # Input might be given as Windows format, start by converting to
23973   # unix format.
23974   new_path="$path"
23975 
23976   windows_path="$new_path"
23977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23978     unix_path=`$CYGPATH -u "$windows_path"`
23979     new_path="$unix_path"
23980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23982     new_path="$unix_path"
23983   fi
23984 
23985 
23986   # Now try to locate executable using which
23987   new_path=`$WHICH "$new_path" 2> /dev/null`
23988 
23989   if test "x$new_path" = x; then
23990     # Oops. Which didn't find the executable.
23991     # The splitting of arguments from the executable at a space might have been incorrect,
23992     # since paths with space are more likely in Windows. Give it another try with the whole
23993     # argument.
23994     path="$complete"
23995     arguments="EOL"
23996     new_path="$path"
23997 
23998   windows_path="$new_path"
23999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24000     unix_path=`$CYGPATH -u "$windows_path"`
24001     new_path="$unix_path"
24002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24004     new_path="$unix_path"
24005   fi
24006 
24007 
24008     new_path=`$WHICH "$new_path" 2> /dev/null`
24009 
24010     if test "x$new_path" = x; then
24011       # It's still not found. Now this is an unrecoverable error.
24012       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24013 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24014       has_space=`$ECHO "$complete" | $GREP " "`
24015       if test "x$has_space" != x; then
24016         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24017 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24018       fi
24019       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24020     fi
24021   fi
24022 
24023   # Now new_path has a complete unix path to the binary
24024   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24025     # Keep paths in /bin as-is, but remove trailing .exe if any
24026     new_path="${new_path/%.exe/}"
24027     # Do not save /bin paths to all_fixpath_prefixes!
24028   else
24029     # Not in mixed or Windows style, start by that.
24030     new_path=`cmd //c echo $new_path`
24031 
24032   input_path="$new_path"
24033   # Check if we need to convert this using DOS-style short mode. If the path
24034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24035   # take no chances and rewrite it.
24036   # Note: m4 eats our [], so we need to use [ and ] instead.
24037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24038   if test "x$has_forbidden_chars" != x; then
24039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24040     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24041   fi
24042 
24043     # Output is in $new_path
24044 
24045   windows_path="$new_path"
24046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24047     unix_path=`$CYGPATH -u "$windows_path"`
24048     new_path="$unix_path"
24049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24051     new_path="$unix_path"
24052   fi
24053 
24054     # remove trailing .exe if any
24055     new_path="${new_path/%.exe/}"
24056 
24057     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24058     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24059   fi
24060 
24061   else
24062     # We're on a posix platform. Hooray! :)
24063     # First separate the path from the arguments. This will split at the first
24064     # space.
24065     complete="$RC"
24066     path="${complete%% *}"
24067     tmp="$complete EOL"
24068     arguments="${tmp#* }"
24069 
24070     # Cannot rely on the command "which" here since it doesn't always work.
24071     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24072     if test -z "$is_absolute_path"; then
24073       # Path to executable is not absolute. Find it.
24074       IFS_save="$IFS"
24075       IFS=:
24076       for p in $PATH; do
24077         if test -f "$p/$path" && test -x "$p/$path"; then
24078           new_path="$p/$path"
24079           break
24080         fi
24081       done
24082       IFS="$IFS_save"
24083     else
24084       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
24085 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
24086       new_path="$path"
24087     fi
24088 
24089     if test "x$new_path" = x; then
24090       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24091 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24092       has_space=`$ECHO "$complete" | $GREP " "`
24093       if test "x$has_space" != x; then
24094         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24095 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24096       fi
24097       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24098     fi
24099   fi
24100 
24101   # Now join together the path and the arguments once again
24102   if test "x$arguments" != xEOL; then
24103     new_complete="$new_path ${arguments% *}"
24104   else
24105     new_complete="$new_path"
24106   fi
24107 
24108   if test "x$complete" != "x$new_complete"; then
24109     RC="$new_complete"
24110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24111 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24112   fi
24113 
24114 
24115     # For hotspot, we need these in Windows mixed path,
24116     # so rewrite them all. Need added .exe suffix.
24117     HOTSPOT_CXX="$CXX.exe"
24118     HOTSPOT_LD="$LD.exe"
24119     HOTSPOT_MT="$MT.exe"
24120     HOTSPOT_RC="$RC.exe"
24121 
24122   unix_path="$HOTSPOT_CXX"
24123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24124     windows_path=`$CYGPATH -m "$unix_path"`
24125     HOTSPOT_CXX="$windows_path"
24126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24127     windows_path=`cmd //c echo $unix_path`
24128     HOTSPOT_CXX="$windows_path"
24129   fi
24130 
24131 
24132   unix_path="$HOTSPOT_LD"
24133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24134     windows_path=`$CYGPATH -m "$unix_path"`
24135     HOTSPOT_LD="$windows_path"
24136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24137     windows_path=`cmd //c echo $unix_path`
24138     HOTSPOT_LD="$windows_path"
24139   fi
24140 
24141 
24142   unix_path="$HOTSPOT_MT"
24143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24144     windows_path=`$CYGPATH -m "$unix_path"`
24145     HOTSPOT_MT="$windows_path"
24146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24147     windows_path=`cmd //c echo $unix_path`
24148     HOTSPOT_MT="$windows_path"
24149   fi
24150 
24151 
24152   unix_path="$HOTSPOT_RC"
24153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24154     windows_path=`$CYGPATH -m "$unix_path"`
24155     HOTSPOT_RC="$windows_path"
24156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24157     windows_path=`cmd //c echo $unix_path`
24158     HOTSPOT_RC="$windows_path"
24159   fi
24160 
24161 
24162 
24163 
24164     RC_FLAGS="-nologo -l 0x409 -r"
24165     if test "x$VARIANT" = xOPT; then :
24166 
24167     RC_FLAGS="$RC_FLAGS -d NDEBUG"
24168 
24169 fi
24170 
24171   # The version variables used to create RC_FLAGS may be overridden
24172   # in a custom configure script, or possibly the command line.
24173   # Let those variables be expanded at make time in spec.gmk.
24174   # The \$ are escaped to the shell, and the $(...) variables
24175   # are evaluated by make.
24176   RC_FLAGS="$RC_FLAGS \
24177       -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
24178       -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
24179       -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
24180       -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
24181       -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
24182       -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
24183       -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
24184 
24185   # lib.exe is used to create static libraries.
24186   # Extract the first word of "lib", so it can be a program name with args.
24187 set dummy lib; ac_word=$2
24188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24189 $as_echo_n "checking for $ac_word... " >&6; }
24190 if ${ac_cv_prog_WINAR+:} false; then :
24191   $as_echo_n "(cached) " >&6
24192 else
24193   if test -n "$WINAR"; then
24194   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24195 else
24196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24197 for as_dir in $PATH
24198 do
24199   IFS=$as_save_IFS
24200   test -z "$as_dir" && as_dir=.
24201     for ac_exec_ext in '' $ac_executable_extensions; do
24202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24203     ac_cv_prog_WINAR="lib"
24204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24205     break 2
24206   fi
24207 done
24208   done
24209 IFS=$as_save_IFS
24210 
24211 fi
24212 fi
24213 WINAR=$ac_cv_prog_WINAR
24214 if test -n "$WINAR"; then
24215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24216 $as_echo "$WINAR" >&6; }
24217 else
24218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219 $as_echo "no" >&6; }
24220 fi
24221 
24222 
24223 
24224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24225 
24226   # First separate the path from the arguments. This will split at the first
24227   # space.
24228   complete="$WINAR"
24229   path="${complete%% *}"
24230   tmp="$complete EOL"
24231   arguments="${tmp#* }"
24232 
24233   # Input might be given as Windows format, start by converting to
24234   # unix format.
24235   new_path=`$CYGPATH -u "$path"`
24236 
24237   # Now try to locate executable using which
24238   new_path=`$WHICH "$new_path" 2> /dev/null`
24239   # bat and cmd files are not always considered executable in cygwin causing which
24240   # to not find them
24241   if test "x$new_path" = x \
24242       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24243       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24244     new_path=`$CYGPATH -u "$path"`
24245   fi
24246   if test "x$new_path" = x; then
24247     # Oops. Which didn't find the executable.
24248     # The splitting of arguments from the executable at a space might have been incorrect,
24249     # since paths with space are more likely in Windows. Give it another try with the whole
24250     # argument.
24251     path="$complete"
24252     arguments="EOL"
24253     new_path=`$CYGPATH -u "$path"`
24254     new_path=`$WHICH "$new_path" 2> /dev/null`
24255     # bat and cmd files are not always considered executable in cygwin causing which
24256     # to not find them
24257     if test "x$new_path" = x \
24258         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24259         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24260       new_path=`$CYGPATH -u "$path"`
24261     fi
24262     if test "x$new_path" = x; then
24263       # It's still not found. Now this is an unrecoverable error.
24264       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24265 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24266       has_space=`$ECHO "$complete" | $GREP " "`
24267       if test "x$has_space" != x; then
24268         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24269 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24270       fi
24271       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24272     fi
24273   fi
24274 
24275   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24276   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24277   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24278   # "foo.exe" is OK but "foo" is an error.
24279   #
24280   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24281   # It is also a way to make sure we got the proper file name for the real test later on.
24282   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24283   if test "x$test_shortpath" = x; then
24284     # Short path failed, file does not exist as specified.
24285     # Try adding .exe or .cmd
24286     if test -f "${new_path}.exe"; then
24287       input_to_shortpath="${new_path}.exe"
24288     elif test -f "${new_path}.cmd"; then
24289       input_to_shortpath="${new_path}.cmd"
24290     else
24291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24292 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24293       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24294 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24295       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24296     fi
24297   else
24298     input_to_shortpath="$new_path"
24299   fi
24300 
24301   # Call helper function which possibly converts this using DOS-style short mode.
24302   # If so, the updated path is stored in $new_path.
24303   new_path="$input_to_shortpath"
24304 
24305   input_path="$input_to_shortpath"
24306   # Check if we need to convert this using DOS-style short mode. If the path
24307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24308   # take no chances and rewrite it.
24309   # Note: m4 eats our [], so we need to use [ and ] instead.
24310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24311   if test "x$has_forbidden_chars" != x; then
24312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24313     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24314     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24315     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24316       # Going to short mode and back again did indeed matter. Since short mode is
24317       # case insensitive, let's make it lowercase to improve readability.
24318       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24319       # Now convert it back to Unix-stile (cygpath)
24320       input_path=`$CYGPATH -u "$shortmode_path"`
24321       new_path="$input_path"
24322     fi
24323   fi
24324 
24325   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24326   if test "x$test_cygdrive_prefix" = x; then
24327     # As a simple fix, exclude /usr/bin since it's not a real path.
24328     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24329       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24330       # a path prefixed by /cygdrive for fixpath to work.
24331       new_path="$CYGWIN_ROOT_PATH$input_path"
24332     fi
24333   fi
24334 
24335   # remove trailing .exe if any
24336   new_path="${new_path/%.exe/}"
24337 
24338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24339 
24340   # First separate the path from the arguments. This will split at the first
24341   # space.
24342   complete="$WINAR"
24343   path="${complete%% *}"
24344   tmp="$complete EOL"
24345   arguments="${tmp#* }"
24346 
24347   # Input might be given as Windows format, start by converting to
24348   # unix format.
24349   new_path="$path"
24350 
24351   windows_path="$new_path"
24352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24353     unix_path=`$CYGPATH -u "$windows_path"`
24354     new_path="$unix_path"
24355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24357     new_path="$unix_path"
24358   fi
24359 
24360 
24361   # Now try to locate executable using which
24362   new_path=`$WHICH "$new_path" 2> /dev/null`
24363 
24364   if test "x$new_path" = x; then
24365     # Oops. Which didn't find the executable.
24366     # The splitting of arguments from the executable at a space might have been incorrect,
24367     # since paths with space are more likely in Windows. Give it another try with the whole
24368     # argument.
24369     path="$complete"
24370     arguments="EOL"
24371     new_path="$path"
24372 
24373   windows_path="$new_path"
24374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24375     unix_path=`$CYGPATH -u "$windows_path"`
24376     new_path="$unix_path"
24377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24379     new_path="$unix_path"
24380   fi
24381 
24382 
24383     new_path=`$WHICH "$new_path" 2> /dev/null`
24384 
24385     if test "x$new_path" = x; then
24386       # It's still not found. Now this is an unrecoverable error.
24387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24388 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24389       has_space=`$ECHO "$complete" | $GREP " "`
24390       if test "x$has_space" != x; then
24391         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24392 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24393       fi
24394       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24395     fi
24396   fi
24397 
24398   # Now new_path has a complete unix path to the binary
24399   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24400     # Keep paths in /bin as-is, but remove trailing .exe if any
24401     new_path="${new_path/%.exe/}"
24402     # Do not save /bin paths to all_fixpath_prefixes!
24403   else
24404     # Not in mixed or Windows style, start by that.
24405     new_path=`cmd //c echo $new_path`
24406 
24407   input_path="$new_path"
24408   # Check if we need to convert this using DOS-style short mode. If the path
24409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24410   # take no chances and rewrite it.
24411   # Note: m4 eats our [], so we need to use [ and ] instead.
24412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24413   if test "x$has_forbidden_chars" != x; then
24414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24415     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24416   fi
24417 
24418     # Output is in $new_path
24419 
24420   windows_path="$new_path"
24421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24422     unix_path=`$CYGPATH -u "$windows_path"`
24423     new_path="$unix_path"
24424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24426     new_path="$unix_path"
24427   fi
24428 
24429     # remove trailing .exe if any
24430     new_path="${new_path/%.exe/}"
24431 
24432     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24433     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24434   fi
24435 
24436   else
24437     # We're on a posix platform. Hooray! :)
24438     # First separate the path from the arguments. This will split at the first
24439     # space.
24440     complete="$WINAR"
24441     path="${complete%% *}"
24442     tmp="$complete EOL"
24443     arguments="${tmp#* }"
24444 
24445     # Cannot rely on the command "which" here since it doesn't always work.
24446     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24447     if test -z "$is_absolute_path"; then
24448       # Path to executable is not absolute. Find it.
24449       IFS_save="$IFS"
24450       IFS=:
24451       for p in $PATH; do
24452         if test -f "$p/$path" && test -x "$p/$path"; then
24453           new_path="$p/$path"
24454           break
24455         fi
24456       done
24457       IFS="$IFS_save"
24458     else
24459       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24460 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24461       new_path="$path"
24462     fi
24463 
24464     if test "x$new_path" = x; then
24465       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24466 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24467       has_space=`$ECHO "$complete" | $GREP " "`
24468       if test "x$has_space" != x; then
24469         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24470 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24471       fi
24472       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24473     fi
24474   fi
24475 
24476   # Now join together the path and the arguments once again
24477   if test "x$arguments" != xEOL; then
24478     new_complete="$new_path ${arguments% *}"
24479   else
24480     new_complete="$new_path"
24481   fi
24482 
24483   if test "x$complete" != "x$new_complete"; then
24484     WINAR="$new_complete"
24485     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24486 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24487   fi
24488 
24489   AR="$WINAR"
24490   ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24491 
24492   # Extract the first word of "dumpbin", so it can be a program name with args.
24493 set dummy dumpbin; ac_word=$2
24494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24495 $as_echo_n "checking for $ac_word... " >&6; }
24496 if ${ac_cv_prog_DUMPBIN+:} false; then :
24497   $as_echo_n "(cached) " >&6
24498 else
24499   if test -n "$DUMPBIN"; then
24500   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24501 else
24502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24503 for as_dir in $PATH
24504 do
24505   IFS=$as_save_IFS
24506   test -z "$as_dir" && as_dir=.
24507     for ac_exec_ext in '' $ac_executable_extensions; do
24508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24509     ac_cv_prog_DUMPBIN="dumpbin"
24510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24511     break 2
24512   fi
24513 done
24514   done
24515 IFS=$as_save_IFS
24516 
24517 fi
24518 fi
24519 DUMPBIN=$ac_cv_prog_DUMPBIN
24520 if test -n "$DUMPBIN"; then
24521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24522 $as_echo "$DUMPBIN" >&6; }
24523 else
24524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24525 $as_echo "no" >&6; }
24526 fi
24527 
24528 
24529 
24530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24531 
24532   # First separate the path from the arguments. This will split at the first
24533   # space.
24534   complete="$DUMPBIN"
24535   path="${complete%% *}"
24536   tmp="$complete EOL"
24537   arguments="${tmp#* }"
24538 
24539   # Input might be given as Windows format, start by converting to
24540   # unix format.
24541   new_path=`$CYGPATH -u "$path"`
24542 
24543   # Now try to locate executable using which
24544   new_path=`$WHICH "$new_path" 2> /dev/null`
24545   # bat and cmd files are not always considered executable in cygwin causing which
24546   # to not find them
24547   if test "x$new_path" = x \
24548       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24549       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24550     new_path=`$CYGPATH -u "$path"`
24551   fi
24552   if test "x$new_path" = x; then
24553     # Oops. Which didn't find the executable.
24554     # The splitting of arguments from the executable at a space might have been incorrect,
24555     # since paths with space are more likely in Windows. Give it another try with the whole
24556     # argument.
24557     path="$complete"
24558     arguments="EOL"
24559     new_path=`$CYGPATH -u "$path"`
24560     new_path=`$WHICH "$new_path" 2> /dev/null`
24561     # bat and cmd files are not always considered executable in cygwin causing which
24562     # to not find them
24563     if test "x$new_path" = x \
24564         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24565         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24566       new_path=`$CYGPATH -u "$path"`
24567     fi
24568     if test "x$new_path" = x; then
24569       # It's still not found. Now this is an unrecoverable error.
24570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24571 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24572       has_space=`$ECHO "$complete" | $GREP " "`
24573       if test "x$has_space" != x; then
24574         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24575 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24576       fi
24577       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24578     fi
24579   fi
24580 
24581   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24582   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24583   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24584   # "foo.exe" is OK but "foo" is an error.
24585   #
24586   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24587   # It is also a way to make sure we got the proper file name for the real test later on.
24588   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24589   if test "x$test_shortpath" = x; then
24590     # Short path failed, file does not exist as specified.
24591     # Try adding .exe or .cmd
24592     if test -f "${new_path}.exe"; then
24593       input_to_shortpath="${new_path}.exe"
24594     elif test -f "${new_path}.cmd"; then
24595       input_to_shortpath="${new_path}.cmd"
24596     else
24597       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24598 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24599       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24600 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24601       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24602     fi
24603   else
24604     input_to_shortpath="$new_path"
24605   fi
24606 
24607   # Call helper function which possibly converts this using DOS-style short mode.
24608   # If so, the updated path is stored in $new_path.
24609   new_path="$input_to_shortpath"
24610 
24611   input_path="$input_to_shortpath"
24612   # Check if we need to convert this using DOS-style short mode. If the path
24613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24614   # take no chances and rewrite it.
24615   # Note: m4 eats our [], so we need to use [ and ] instead.
24616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24617   if test "x$has_forbidden_chars" != x; then
24618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24619     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24620     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24621     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24622       # Going to short mode and back again did indeed matter. Since short mode is
24623       # case insensitive, let's make it lowercase to improve readability.
24624       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24625       # Now convert it back to Unix-stile (cygpath)
24626       input_path=`$CYGPATH -u "$shortmode_path"`
24627       new_path="$input_path"
24628     fi
24629   fi
24630 
24631   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24632   if test "x$test_cygdrive_prefix" = x; then
24633     # As a simple fix, exclude /usr/bin since it's not a real path.
24634     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24635       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24636       # a path prefixed by /cygdrive for fixpath to work.
24637       new_path="$CYGWIN_ROOT_PATH$input_path"
24638     fi
24639   fi
24640 
24641   # remove trailing .exe if any
24642   new_path="${new_path/%.exe/}"
24643 
24644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24645 
24646   # First separate the path from the arguments. This will split at the first
24647   # space.
24648   complete="$DUMPBIN"
24649   path="${complete%% *}"
24650   tmp="$complete EOL"
24651   arguments="${tmp#* }"
24652 
24653   # Input might be given as Windows format, start by converting to
24654   # unix format.
24655   new_path="$path"
24656 
24657   windows_path="$new_path"
24658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24659     unix_path=`$CYGPATH -u "$windows_path"`
24660     new_path="$unix_path"
24661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24663     new_path="$unix_path"
24664   fi
24665 
24666 
24667   # Now try to locate executable using which
24668   new_path=`$WHICH "$new_path" 2> /dev/null`
24669 
24670   if test "x$new_path" = x; then
24671     # Oops. Which didn't find the executable.
24672     # The splitting of arguments from the executable at a space might have been incorrect,
24673     # since paths with space are more likely in Windows. Give it another try with the whole
24674     # argument.
24675     path="$complete"
24676     arguments="EOL"
24677     new_path="$path"
24678 
24679   windows_path="$new_path"
24680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24681     unix_path=`$CYGPATH -u "$windows_path"`
24682     new_path="$unix_path"
24683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24685     new_path="$unix_path"
24686   fi
24687 
24688 
24689     new_path=`$WHICH "$new_path" 2> /dev/null`
24690 
24691     if test "x$new_path" = x; then
24692       # It's still not found. Now this is an unrecoverable error.
24693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24694 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24695       has_space=`$ECHO "$complete" | $GREP " "`
24696       if test "x$has_space" != x; then
24697         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24698 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24699       fi
24700       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24701     fi
24702   fi
24703 
24704   # Now new_path has a complete unix path to the binary
24705   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24706     # Keep paths in /bin as-is, but remove trailing .exe if any
24707     new_path="${new_path/%.exe/}"
24708     # Do not save /bin paths to all_fixpath_prefixes!
24709   else
24710     # Not in mixed or Windows style, start by that.
24711     new_path=`cmd //c echo $new_path`
24712 
24713   input_path="$new_path"
24714   # Check if we need to convert this using DOS-style short mode. If the path
24715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24716   # take no chances and rewrite it.
24717   # Note: m4 eats our [], so we need to use [ and ] instead.
24718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24719   if test "x$has_forbidden_chars" != x; then
24720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24722   fi
24723 
24724     # Output is in $new_path
24725 
24726   windows_path="$new_path"
24727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24728     unix_path=`$CYGPATH -u "$windows_path"`
24729     new_path="$unix_path"
24730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24732     new_path="$unix_path"
24733   fi
24734 
24735     # remove trailing .exe if any
24736     new_path="${new_path/%.exe/}"
24737 
24738     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24739     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24740   fi
24741 
24742   else
24743     # We're on a posix platform. Hooray! :)
24744     # First separate the path from the arguments. This will split at the first
24745     # space.
24746     complete="$DUMPBIN"
24747     path="${complete%% *}"
24748     tmp="$complete EOL"
24749     arguments="${tmp#* }"
24750 
24751     # Cannot rely on the command "which" here since it doesn't always work.
24752     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24753     if test -z "$is_absolute_path"; then
24754       # Path to executable is not absolute. Find it.
24755       IFS_save="$IFS"
24756       IFS=:
24757       for p in $PATH; do
24758         if test -f "$p/$path" && test -x "$p/$path"; then
24759           new_path="$p/$path"
24760           break
24761         fi
24762       done
24763       IFS="$IFS_save"
24764     else
24765       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24766 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24767       new_path="$path"
24768     fi
24769 
24770     if test "x$new_path" = x; then
24771       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24772 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24773       has_space=`$ECHO "$complete" | $GREP " "`
24774       if test "x$has_space" != x; then
24775         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24776 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24777       fi
24778       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24779     fi
24780   fi
24781 
24782   # Now join together the path and the arguments once again
24783   if test "x$arguments" != xEOL; then
24784     new_complete="$new_path ${arguments% *}"
24785   else
24786     new_complete="$new_path"
24787   fi
24788 
24789   if test "x$complete" != "x$new_complete"; then
24790     DUMPBIN="$new_complete"
24791     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24792 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24793   fi
24794 
24795 
24796       COMPILER_TYPE=CL
24797       CCXXFLAGS="$CCXXFLAGS -nologo"
24798 
24799 fi
24800 
24801 
24802 
24803   ac_ext=c
24804 ac_cpp='$CPP $CPPFLAGS'
24805 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24806 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24809 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24810 # On Suns, sometimes $CPP names a directory.
24811 if test -n "$CPP" && test -d "$CPP"; then
24812   CPP=
24813 fi
24814 if test -z "$CPP"; then
24815   if ${ac_cv_prog_CPP+:} false; then :
24816   $as_echo_n "(cached) " >&6
24817 else
24818       # Double quotes because CPP needs to be expanded
24819     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24820     do
24821       ac_preproc_ok=false
24822 for ac_c_preproc_warn_flag in '' yes
24823 do
24824   # Use a header file that comes with gcc, so configuring glibc
24825   # with a fresh cross-compiler works.
24826   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24827   # <limits.h> exists even on freestanding compilers.
24828   # On the NeXT, cc -E runs the code through the compiler's parser,
24829   # not just through cpp. "Syntax error" is here to catch this case.
24830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24831 /* end confdefs.h.  */
24832 #ifdef __STDC__
24833 # include <limits.h>
24834 #else
24835 # include <assert.h>
24836 #endif
24837                      Syntax error
24838 _ACEOF
24839 if ac_fn_c_try_cpp "$LINENO"; then :
24840 
24841 else
24842   # Broken: fails on valid input.
24843 continue
24844 fi
24845 rm -f conftest.err conftest.i conftest.$ac_ext
24846 
24847   # OK, works on sane cases.  Now check whether nonexistent headers
24848   # can be detected and how.
24849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24850 /* end confdefs.h.  */
24851 #include <ac_nonexistent.h>
24852 _ACEOF
24853 if ac_fn_c_try_cpp "$LINENO"; then :
24854   # Broken: success on invalid input.
24855 continue
24856 else
24857   # Passes both tests.
24858 ac_preproc_ok=:
24859 break
24860 fi
24861 rm -f conftest.err conftest.i conftest.$ac_ext
24862 
24863 done
24864 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24865 rm -f conftest.i conftest.err conftest.$ac_ext
24866 if $ac_preproc_ok; then :
24867   break
24868 fi
24869 
24870     done
24871     ac_cv_prog_CPP=$CPP
24872 
24873 fi
24874   CPP=$ac_cv_prog_CPP
24875 else
24876   ac_cv_prog_CPP=$CPP
24877 fi
24878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24879 $as_echo "$CPP" >&6; }
24880 ac_preproc_ok=false
24881 for ac_c_preproc_warn_flag in '' yes
24882 do
24883   # Use a header file that comes with gcc, so configuring glibc
24884   # with a fresh cross-compiler works.
24885   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24886   # <limits.h> exists even on freestanding compilers.
24887   # On the NeXT, cc -E runs the code through the compiler's parser,
24888   # not just through cpp. "Syntax error" is here to catch this case.
24889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24890 /* end confdefs.h.  */
24891 #ifdef __STDC__
24892 # include <limits.h>
24893 #else
24894 # include <assert.h>
24895 #endif
24896                      Syntax error
24897 _ACEOF
24898 if ac_fn_c_try_cpp "$LINENO"; then :
24899 
24900 else
24901   # Broken: fails on valid input.
24902 continue
24903 fi
24904 rm -f conftest.err conftest.i conftest.$ac_ext
24905 
24906   # OK, works on sane cases.  Now check whether nonexistent headers
24907   # can be detected and how.
24908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24909 /* end confdefs.h.  */
24910 #include <ac_nonexistent.h>
24911 _ACEOF
24912 if ac_fn_c_try_cpp "$LINENO"; then :
24913   # Broken: success on invalid input.
24914 continue
24915 else
24916   # Passes both tests.
24917 ac_preproc_ok=:
24918 break
24919 fi
24920 rm -f conftest.err conftest.i conftest.$ac_ext
24921 
24922 done
24923 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24924 rm -f conftest.i conftest.err conftest.$ac_ext
24925 if $ac_preproc_ok; then :
24926 
24927 else
24928   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24929 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24930 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24931 See \`config.log' for more details" "$LINENO" 5; }
24932 fi
24933 
24934 ac_ext=cpp
24935 ac_cpp='$CXXCPP $CPPFLAGS'
24936 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24937 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24938 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24939 
24940 
24941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24942 
24943   # First separate the path from the arguments. This will split at the first
24944   # space.
24945   complete="$CPP"
24946   path="${complete%% *}"
24947   tmp="$complete EOL"
24948   arguments="${tmp#* }"
24949 
24950   # Input might be given as Windows format, start by converting to
24951   # unix format.
24952   new_path=`$CYGPATH -u "$path"`
24953 
24954   # Now try to locate executable using which
24955   new_path=`$WHICH "$new_path" 2> /dev/null`
24956   # bat and cmd files are not always considered executable in cygwin causing which
24957   # to not find them
24958   if test "x$new_path" = x \
24959       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24960       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24961     new_path=`$CYGPATH -u "$path"`
24962   fi
24963   if test "x$new_path" = x; then
24964     # Oops. Which didn't find the executable.
24965     # The splitting of arguments from the executable at a space might have been incorrect,
24966     # since paths with space are more likely in Windows. Give it another try with the whole
24967     # argument.
24968     path="$complete"
24969     arguments="EOL"
24970     new_path=`$CYGPATH -u "$path"`
24971     new_path=`$WHICH "$new_path" 2> /dev/null`
24972     # bat and cmd files are not always considered executable in cygwin causing which
24973     # to not find them
24974     if test "x$new_path" = x \
24975         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24976         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24977       new_path=`$CYGPATH -u "$path"`
24978     fi
24979     if test "x$new_path" = x; then
24980       # It's still not found. Now this is an unrecoverable error.
24981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24982 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24983       has_space=`$ECHO "$complete" | $GREP " "`
24984       if test "x$has_space" != x; then
24985         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24987       fi
24988       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24989     fi
24990   fi
24991 
24992   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24993   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24994   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24995   # "foo.exe" is OK but "foo" is an error.
24996   #
24997   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24998   # It is also a way to make sure we got the proper file name for the real test later on.
24999   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25000   if test "x$test_shortpath" = x; then
25001     # Short path failed, file does not exist as specified.
25002     # Try adding .exe or .cmd
25003     if test -f "${new_path}.exe"; then
25004       input_to_shortpath="${new_path}.exe"
25005     elif test -f "${new_path}.cmd"; then
25006       input_to_shortpath="${new_path}.cmd"
25007     else
25008       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
25009 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
25010       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25011 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25012       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25013     fi
25014   else
25015     input_to_shortpath="$new_path"
25016   fi
25017 
25018   # Call helper function which possibly converts this using DOS-style short mode.
25019   # If so, the updated path is stored in $new_path.
25020   new_path="$input_to_shortpath"
25021 
25022   input_path="$input_to_shortpath"
25023   # Check if we need to convert this using DOS-style short mode. If the path
25024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25025   # take no chances and rewrite it.
25026   # Note: m4 eats our [], so we need to use [ and ] instead.
25027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25028   if test "x$has_forbidden_chars" != x; then
25029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25030     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25031     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25032     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25033       # Going to short mode and back again did indeed matter. Since short mode is
25034       # case insensitive, let's make it lowercase to improve readability.
25035       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25036       # Now convert it back to Unix-stile (cygpath)
25037       input_path=`$CYGPATH -u "$shortmode_path"`
25038       new_path="$input_path"
25039     fi
25040   fi
25041 
25042   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25043   if test "x$test_cygdrive_prefix" = x; then
25044     # As a simple fix, exclude /usr/bin since it's not a real path.
25045     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25046       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25047       # a path prefixed by /cygdrive for fixpath to work.
25048       new_path="$CYGWIN_ROOT_PATH$input_path"
25049     fi
25050   fi
25051 
25052   # remove trailing .exe if any
25053   new_path="${new_path/%.exe/}"
25054 
25055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25056 
25057   # First separate the path from the arguments. This will split at the first
25058   # space.
25059   complete="$CPP"
25060   path="${complete%% *}"
25061   tmp="$complete EOL"
25062   arguments="${tmp#* }"
25063 
25064   # Input might be given as Windows format, start by converting to
25065   # unix format.
25066   new_path="$path"
25067 
25068   windows_path="$new_path"
25069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25070     unix_path=`$CYGPATH -u "$windows_path"`
25071     new_path="$unix_path"
25072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25074     new_path="$unix_path"
25075   fi
25076 
25077 
25078   # Now try to locate executable using which
25079   new_path=`$WHICH "$new_path" 2> /dev/null`
25080 
25081   if test "x$new_path" = x; then
25082     # Oops. Which didn't find the executable.
25083     # The splitting of arguments from the executable at a space might have been incorrect,
25084     # since paths with space are more likely in Windows. Give it another try with the whole
25085     # argument.
25086     path="$complete"
25087     arguments="EOL"
25088     new_path="$path"
25089 
25090   windows_path="$new_path"
25091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25092     unix_path=`$CYGPATH -u "$windows_path"`
25093     new_path="$unix_path"
25094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25096     new_path="$unix_path"
25097   fi
25098 
25099 
25100     new_path=`$WHICH "$new_path" 2> /dev/null`
25101 
25102     if test "x$new_path" = x; then
25103       # It's still not found. Now this is an unrecoverable error.
25104       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25105 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25106       has_space=`$ECHO "$complete" | $GREP " "`
25107       if test "x$has_space" != x; then
25108         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25109 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25110       fi
25111       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25112     fi
25113   fi
25114 
25115   # Now new_path has a complete unix path to the binary
25116   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25117     # Keep paths in /bin as-is, but remove trailing .exe if any
25118     new_path="${new_path/%.exe/}"
25119     # Do not save /bin paths to all_fixpath_prefixes!
25120   else
25121     # Not in mixed or Windows style, start by that.
25122     new_path=`cmd //c echo $new_path`
25123 
25124   input_path="$new_path"
25125   # Check if we need to convert this using DOS-style short mode. If the path
25126   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25127   # take no chances and rewrite it.
25128   # Note: m4 eats our [], so we need to use [ and ] instead.
25129   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25130   if test "x$has_forbidden_chars" != x; then
25131     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25132     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25133   fi
25134 
25135     # Output is in $new_path
25136 
25137   windows_path="$new_path"
25138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25139     unix_path=`$CYGPATH -u "$windows_path"`
25140     new_path="$unix_path"
25141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25142     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25143     new_path="$unix_path"
25144   fi
25145 
25146     # remove trailing .exe if any
25147     new_path="${new_path/%.exe/}"
25148 
25149     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25150     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25151   fi
25152 
25153   else
25154     # We're on a posix platform. Hooray! :)
25155     # First separate the path from the arguments. This will split at the first
25156     # space.
25157     complete="$CPP"
25158     path="${complete%% *}"
25159     tmp="$complete EOL"
25160     arguments="${tmp#* }"
25161 
25162     # Cannot rely on the command "which" here since it doesn't always work.
25163     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25164     if test -z "$is_absolute_path"; then
25165       # Path to executable is not absolute. Find it.
25166       IFS_save="$IFS"
25167       IFS=:
25168       for p in $PATH; do
25169         if test -f "$p/$path" && test -x "$p/$path"; then
25170           new_path="$p/$path"
25171           break
25172         fi
25173       done
25174       IFS="$IFS_save"
25175     else
25176       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
25177 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
25178       new_path="$path"
25179     fi
25180 
25181     if test "x$new_path" = x; then
25182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25183 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25184       has_space=`$ECHO "$complete" | $GREP " "`
25185       if test "x$has_space" != x; then
25186         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25187 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25188       fi
25189       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25190     fi
25191   fi
25192 
25193   # Now join together the path and the arguments once again
25194   if test "x$arguments" != xEOL; then
25195     new_complete="$new_path ${arguments% *}"
25196   else
25197     new_complete="$new_path"
25198   fi
25199 
25200   if test "x$complete" != "x$new_complete"; then
25201     CPP="$new_complete"
25202     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25203 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25204   fi
25205 
25206 
25207   ac_ext=cpp
25208 ac_cpp='$CXXCPP $CPPFLAGS'
25209 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25210 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25211 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25213 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25214 if test -z "$CXXCPP"; then
25215   if ${ac_cv_prog_CXXCPP+:} false; then :
25216   $as_echo_n "(cached) " >&6
25217 else
25218       # Double quotes because CXXCPP needs to be expanded
25219     for CXXCPP in "$CXX -E" "/lib/cpp"
25220     do
25221       ac_preproc_ok=false
25222 for ac_cxx_preproc_warn_flag in '' yes
25223 do
25224   # Use a header file that comes with gcc, so configuring glibc
25225   # with a fresh cross-compiler works.
25226   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25227   # <limits.h> exists even on freestanding compilers.
25228   # On the NeXT, cc -E runs the code through the compiler's parser,
25229   # not just through cpp. "Syntax error" is here to catch this case.
25230   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25231 /* end confdefs.h.  */
25232 #ifdef __STDC__
25233 # include <limits.h>
25234 #else
25235 # include <assert.h>
25236 #endif
25237                      Syntax error
25238 _ACEOF
25239 if ac_fn_cxx_try_cpp "$LINENO"; then :
25240 
25241 else
25242   # Broken: fails on valid input.
25243 continue
25244 fi
25245 rm -f conftest.err conftest.i conftest.$ac_ext
25246 
25247   # OK, works on sane cases.  Now check whether nonexistent headers
25248   # can be detected and how.
25249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25250 /* end confdefs.h.  */
25251 #include <ac_nonexistent.h>
25252 _ACEOF
25253 if ac_fn_cxx_try_cpp "$LINENO"; then :
25254   # Broken: success on invalid input.
25255 continue
25256 else
25257   # Passes both tests.
25258 ac_preproc_ok=:
25259 break
25260 fi
25261 rm -f conftest.err conftest.i conftest.$ac_ext
25262 
25263 done
25264 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25265 rm -f conftest.i conftest.err conftest.$ac_ext
25266 if $ac_preproc_ok; then :
25267   break
25268 fi
25269 
25270     done
25271     ac_cv_prog_CXXCPP=$CXXCPP
25272 
25273 fi
25274   CXXCPP=$ac_cv_prog_CXXCPP
25275 else
25276   ac_cv_prog_CXXCPP=$CXXCPP
25277 fi
25278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25279 $as_echo "$CXXCPP" >&6; }
25280 ac_preproc_ok=false
25281 for ac_cxx_preproc_warn_flag in '' yes
25282 do
25283   # Use a header file that comes with gcc, so configuring glibc
25284   # with a fresh cross-compiler works.
25285   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25286   # <limits.h> exists even on freestanding compilers.
25287   # On the NeXT, cc -E runs the code through the compiler's parser,
25288   # not just through cpp. "Syntax error" is here to catch this case.
25289   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25290 /* end confdefs.h.  */
25291 #ifdef __STDC__
25292 # include <limits.h>
25293 #else
25294 # include <assert.h>
25295 #endif
25296                      Syntax error
25297 _ACEOF
25298 if ac_fn_cxx_try_cpp "$LINENO"; then :
25299 
25300 else
25301   # Broken: fails on valid input.
25302 continue
25303 fi
25304 rm -f conftest.err conftest.i conftest.$ac_ext
25305 
25306   # OK, works on sane cases.  Now check whether nonexistent headers
25307   # can be detected and how.
25308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25309 /* end confdefs.h.  */
25310 #include <ac_nonexistent.h>
25311 _ACEOF
25312 if ac_fn_cxx_try_cpp "$LINENO"; then :
25313   # Broken: success on invalid input.
25314 continue
25315 else
25316   # Passes both tests.
25317 ac_preproc_ok=:
25318 break
25319 fi
25320 rm -f conftest.err conftest.i conftest.$ac_ext
25321 
25322 done
25323 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25324 rm -f conftest.i conftest.err conftest.$ac_ext
25325 if $ac_preproc_ok; then :
25326 
25327 else
25328   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25329 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25330 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25331 See \`config.log' for more details" "$LINENO" 5; }
25332 fi
25333 
25334 ac_ext=cpp
25335 ac_cpp='$CXXCPP $CPPFLAGS'
25336 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25337 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25338 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25339 
25340 
25341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25342 
25343   # First separate the path from the arguments. This will split at the first
25344   # space.
25345   complete="$CXXCPP"
25346   path="${complete%% *}"
25347   tmp="$complete EOL"
25348   arguments="${tmp#* }"
25349 
25350   # Input might be given as Windows format, start by converting to
25351   # unix format.
25352   new_path=`$CYGPATH -u "$path"`
25353 
25354   # Now try to locate executable using which
25355   new_path=`$WHICH "$new_path" 2> /dev/null`
25356   # bat and cmd files are not always considered executable in cygwin causing which
25357   # to not find them
25358   if test "x$new_path" = x \
25359       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25360       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25361     new_path=`$CYGPATH -u "$path"`
25362   fi
25363   if test "x$new_path" = x; then
25364     # Oops. Which didn't find the executable.
25365     # The splitting of arguments from the executable at a space might have been incorrect,
25366     # since paths with space are more likely in Windows. Give it another try with the whole
25367     # argument.
25368     path="$complete"
25369     arguments="EOL"
25370     new_path=`$CYGPATH -u "$path"`
25371     new_path=`$WHICH "$new_path" 2> /dev/null`
25372     # bat and cmd files are not always considered executable in cygwin causing which
25373     # to not find them
25374     if test "x$new_path" = x \
25375         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25376         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25377       new_path=`$CYGPATH -u "$path"`
25378     fi
25379     if test "x$new_path" = x; then
25380       # It's still not found. Now this is an unrecoverable error.
25381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25382 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25383       has_space=`$ECHO "$complete" | $GREP " "`
25384       if test "x$has_space" != x; then
25385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25387       fi
25388       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25389     fi
25390   fi
25391 
25392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25395   # "foo.exe" is OK but "foo" is an error.
25396   #
25397   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25398   # It is also a way to make sure we got the proper file name for the real test later on.
25399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25400   if test "x$test_shortpath" = x; then
25401     # Short path failed, file does not exist as specified.
25402     # Try adding .exe or .cmd
25403     if test -f "${new_path}.exe"; then
25404       input_to_shortpath="${new_path}.exe"
25405     elif test -f "${new_path}.cmd"; then
25406       input_to_shortpath="${new_path}.cmd"
25407     else
25408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25409 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25410       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25411 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25412       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25413     fi
25414   else
25415     input_to_shortpath="$new_path"
25416   fi
25417 
25418   # Call helper function which possibly converts this using DOS-style short mode.
25419   # If so, the updated path is stored in $new_path.
25420   new_path="$input_to_shortpath"
25421 
25422   input_path="$input_to_shortpath"
25423   # Check if we need to convert this using DOS-style short mode. If the path
25424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25425   # take no chances and rewrite it.
25426   # Note: m4 eats our [], so we need to use [ and ] instead.
25427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25428   if test "x$has_forbidden_chars" != x; then
25429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25430     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25431     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25432     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25433       # Going to short mode and back again did indeed matter. Since short mode is
25434       # case insensitive, let's make it lowercase to improve readability.
25435       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25436       # Now convert it back to Unix-stile (cygpath)
25437       input_path=`$CYGPATH -u "$shortmode_path"`
25438       new_path="$input_path"
25439     fi
25440   fi
25441 
25442   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25443   if test "x$test_cygdrive_prefix" = x; then
25444     # As a simple fix, exclude /usr/bin since it's not a real path.
25445     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25446       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25447       # a path prefixed by /cygdrive for fixpath to work.
25448       new_path="$CYGWIN_ROOT_PATH$input_path"
25449     fi
25450   fi
25451 
25452   # remove trailing .exe if any
25453   new_path="${new_path/%.exe/}"
25454 
25455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25456 
25457   # First separate the path from the arguments. This will split at the first
25458   # space.
25459   complete="$CXXCPP"
25460   path="${complete%% *}"
25461   tmp="$complete EOL"
25462   arguments="${tmp#* }"
25463 
25464   # Input might be given as Windows format, start by converting to
25465   # unix format.
25466   new_path="$path"
25467 
25468   windows_path="$new_path"
25469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25470     unix_path=`$CYGPATH -u "$windows_path"`
25471     new_path="$unix_path"
25472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25473     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25474     new_path="$unix_path"
25475   fi
25476 
25477 
25478   # Now try to locate executable using which
25479   new_path=`$WHICH "$new_path" 2> /dev/null`
25480 
25481   if test "x$new_path" = x; then
25482     # Oops. Which didn't find the executable.
25483     # The splitting of arguments from the executable at a space might have been incorrect,
25484     # since paths with space are more likely in Windows. Give it another try with the whole
25485     # argument.
25486     path="$complete"
25487     arguments="EOL"
25488     new_path="$path"
25489 
25490   windows_path="$new_path"
25491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25492     unix_path=`$CYGPATH -u "$windows_path"`
25493     new_path="$unix_path"
25494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25496     new_path="$unix_path"
25497   fi
25498 
25499 
25500     new_path=`$WHICH "$new_path" 2> /dev/null`
25501 
25502     if test "x$new_path" = x; then
25503       # It's still not found. Now this is an unrecoverable error.
25504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25505 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25506       has_space=`$ECHO "$complete" | $GREP " "`
25507       if test "x$has_space" != x; then
25508         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25509 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25510       fi
25511       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25512     fi
25513   fi
25514 
25515   # Now new_path has a complete unix path to the binary
25516   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25517     # Keep paths in /bin as-is, but remove trailing .exe if any
25518     new_path="${new_path/%.exe/}"
25519     # Do not save /bin paths to all_fixpath_prefixes!
25520   else
25521     # Not in mixed or Windows style, start by that.
25522     new_path=`cmd //c echo $new_path`
25523 
25524   input_path="$new_path"
25525   # Check if we need to convert this using DOS-style short mode. If the path
25526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25527   # take no chances and rewrite it.
25528   # Note: m4 eats our [], so we need to use [ and ] instead.
25529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25530   if test "x$has_forbidden_chars" != x; then
25531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25533   fi
25534 
25535     # Output is in $new_path
25536 
25537   windows_path="$new_path"
25538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25539     unix_path=`$CYGPATH -u "$windows_path"`
25540     new_path="$unix_path"
25541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25543     new_path="$unix_path"
25544   fi
25545 
25546     # remove trailing .exe if any
25547     new_path="${new_path/%.exe/}"
25548 
25549     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25550     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25551   fi
25552 
25553   else
25554     # We're on a posix platform. Hooray! :)
25555     # First separate the path from the arguments. This will split at the first
25556     # space.
25557     complete="$CXXCPP"
25558     path="${complete%% *}"
25559     tmp="$complete EOL"
25560     arguments="${tmp#* }"
25561 
25562     # Cannot rely on the command "which" here since it doesn't always work.
25563     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25564     if test -z "$is_absolute_path"; then
25565       # Path to executable is not absolute. Find it.
25566       IFS_save="$IFS"
25567       IFS=:
25568       for p in $PATH; do
25569         if test -f "$p/$path" && test -x "$p/$path"; then
25570           new_path="$p/$path"
25571           break
25572         fi
25573       done
25574       IFS="$IFS_save"
25575     else
25576       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25577 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25578       new_path="$path"
25579     fi
25580 
25581     if test "x$new_path" = x; then
25582       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25583 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25584       has_space=`$ECHO "$complete" | $GREP " "`
25585       if test "x$has_space" != x; then
25586         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25587 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25588       fi
25589       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25590     fi
25591   fi
25592 
25593   # Now join together the path and the arguments once again
25594   if test "x$arguments" != xEOL; then
25595     new_complete="$new_path ${arguments% *}"
25596   else
25597     new_complete="$new_path"
25598   fi
25599 
25600   if test "x$complete" != "x$new_complete"; then
25601     CXXCPP="$new_complete"
25602     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25603 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25604   fi
25605 
25606 
25607   if test "x$COMPILE_TYPE" != "xcross"; then
25608     # If we are not cross compiling, use the same compilers for
25609     # building the build platform executables. The cross-compilation
25610     # case needed to be done earlier, but this can only be done after
25611     # the native tools have been localized.
25612     BUILD_CC="$CC"
25613     BUILD_CXX="$CXX"
25614     BUILD_LD="$LD"
25615   fi
25616 
25617   # for solaris we really need solaris tools, and not gnu equivalent
25618   #   these seems to normally reside in /usr/ccs/bin so add that to path before
25619   #   starting to probe
25620   #
25621   #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25622   #         so that it can be overriden --with-tools-dir
25623   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25624     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25625   fi
25626 
25627   # Find the right assembler.
25628   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25629     # Extract the first word of "as", so it can be a program name with args.
25630 set dummy as; ac_word=$2
25631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25632 $as_echo_n "checking for $ac_word... " >&6; }
25633 if ${ac_cv_path_AS+:} false; then :
25634   $as_echo_n "(cached) " >&6
25635 else
25636   case $AS in
25637   [\\/]* | ?:[\\/]*)
25638   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25639   ;;
25640   *)
25641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25642 for as_dir in $PATH
25643 do
25644   IFS=$as_save_IFS
25645   test -z "$as_dir" && as_dir=.
25646     for ac_exec_ext in '' $ac_executable_extensions; do
25647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25648     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25650     break 2
25651   fi
25652 done
25653   done
25654 IFS=$as_save_IFS
25655 
25656   ;;
25657 esac
25658 fi
25659 AS=$ac_cv_path_AS
25660 if test -n "$AS"; then
25661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25662 $as_echo "$AS" >&6; }
25663 else
25664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25665 $as_echo "no" >&6; }
25666 fi
25667 
25668 
25669 
25670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25671 
25672   # First separate the path from the arguments. This will split at the first
25673   # space.
25674   complete="$AS"
25675   path="${complete%% *}"
25676   tmp="$complete EOL"
25677   arguments="${tmp#* }"
25678 
25679   # Input might be given as Windows format, start by converting to
25680   # unix format.
25681   new_path=`$CYGPATH -u "$path"`
25682 
25683   # Now try to locate executable using which
25684   new_path=`$WHICH "$new_path" 2> /dev/null`
25685   # bat and cmd files are not always considered executable in cygwin causing which
25686   # to not find them
25687   if test "x$new_path" = x \
25688       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25689       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25690     new_path=`$CYGPATH -u "$path"`
25691   fi
25692   if test "x$new_path" = x; then
25693     # Oops. Which didn't find the executable.
25694     # The splitting of arguments from the executable at a space might have been incorrect,
25695     # since paths with space are more likely in Windows. Give it another try with the whole
25696     # argument.
25697     path="$complete"
25698     arguments="EOL"
25699     new_path=`$CYGPATH -u "$path"`
25700     new_path=`$WHICH "$new_path" 2> /dev/null`
25701     # bat and cmd files are not always considered executable in cygwin causing which
25702     # to not find them
25703     if test "x$new_path" = x \
25704         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25705         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25706       new_path=`$CYGPATH -u "$path"`
25707     fi
25708     if test "x$new_path" = x; then
25709       # It's still not found. Now this is an unrecoverable error.
25710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25711 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25712       has_space=`$ECHO "$complete" | $GREP " "`
25713       if test "x$has_space" != x; then
25714         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25715 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25716       fi
25717       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25718     fi
25719   fi
25720 
25721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25724   # "foo.exe" is OK but "foo" is an error.
25725   #
25726   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25727   # It is also a way to make sure we got the proper file name for the real test later on.
25728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25729   if test "x$test_shortpath" = x; then
25730     # Short path failed, file does not exist as specified.
25731     # Try adding .exe or .cmd
25732     if test -f "${new_path}.exe"; then
25733       input_to_shortpath="${new_path}.exe"
25734     elif test -f "${new_path}.cmd"; then
25735       input_to_shortpath="${new_path}.cmd"
25736     else
25737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25738 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25739       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25740 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25741       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25742     fi
25743   else
25744     input_to_shortpath="$new_path"
25745   fi
25746 
25747   # Call helper function which possibly converts this using DOS-style short mode.
25748   # If so, the updated path is stored in $new_path.
25749   new_path="$input_to_shortpath"
25750 
25751   input_path="$input_to_shortpath"
25752   # Check if we need to convert this using DOS-style short mode. If the path
25753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25754   # take no chances and rewrite it.
25755   # Note: m4 eats our [], so we need to use [ and ] instead.
25756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25757   if test "x$has_forbidden_chars" != x; then
25758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25759     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25760     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25761     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25762       # Going to short mode and back again did indeed matter. Since short mode is
25763       # case insensitive, let's make it lowercase to improve readability.
25764       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25765       # Now convert it back to Unix-stile (cygpath)
25766       input_path=`$CYGPATH -u "$shortmode_path"`
25767       new_path="$input_path"
25768     fi
25769   fi
25770 
25771   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25772   if test "x$test_cygdrive_prefix" = x; then
25773     # As a simple fix, exclude /usr/bin since it's not a real path.
25774     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25775       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25776       # a path prefixed by /cygdrive for fixpath to work.
25777       new_path="$CYGWIN_ROOT_PATH$input_path"
25778     fi
25779   fi
25780 
25781   # remove trailing .exe if any
25782   new_path="${new_path/%.exe/}"
25783 
25784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25785 
25786   # First separate the path from the arguments. This will split at the first
25787   # space.
25788   complete="$AS"
25789   path="${complete%% *}"
25790   tmp="$complete EOL"
25791   arguments="${tmp#* }"
25792 
25793   # Input might be given as Windows format, start by converting to
25794   # unix format.
25795   new_path="$path"
25796 
25797   windows_path="$new_path"
25798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25799     unix_path=`$CYGPATH -u "$windows_path"`
25800     new_path="$unix_path"
25801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25803     new_path="$unix_path"
25804   fi
25805 
25806 
25807   # Now try to locate executable using which
25808   new_path=`$WHICH "$new_path" 2> /dev/null`
25809 
25810   if test "x$new_path" = x; then
25811     # Oops. Which didn't find the executable.
25812     # The splitting of arguments from the executable at a space might have been incorrect,
25813     # since paths with space are more likely in Windows. Give it another try with the whole
25814     # argument.
25815     path="$complete"
25816     arguments="EOL"
25817     new_path="$path"
25818 
25819   windows_path="$new_path"
25820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25821     unix_path=`$CYGPATH -u "$windows_path"`
25822     new_path="$unix_path"
25823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25825     new_path="$unix_path"
25826   fi
25827 
25828 
25829     new_path=`$WHICH "$new_path" 2> /dev/null`
25830 
25831     if test "x$new_path" = x; then
25832       # It's still not found. Now this is an unrecoverable error.
25833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25834 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25835       has_space=`$ECHO "$complete" | $GREP " "`
25836       if test "x$has_space" != x; then
25837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25839       fi
25840       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25841     fi
25842   fi
25843 
25844   # Now new_path has a complete unix path to the binary
25845   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25846     # Keep paths in /bin as-is, but remove trailing .exe if any
25847     new_path="${new_path/%.exe/}"
25848     # Do not save /bin paths to all_fixpath_prefixes!
25849   else
25850     # Not in mixed or Windows style, start by that.
25851     new_path=`cmd //c echo $new_path`
25852 
25853   input_path="$new_path"
25854   # Check if we need to convert this using DOS-style short mode. If the path
25855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25856   # take no chances and rewrite it.
25857   # Note: m4 eats our [], so we need to use [ and ] instead.
25858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25859   if test "x$has_forbidden_chars" != x; then
25860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25861     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25862   fi
25863 
25864     # Output is in $new_path
25865 
25866   windows_path="$new_path"
25867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25868     unix_path=`$CYGPATH -u "$windows_path"`
25869     new_path="$unix_path"
25870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25872     new_path="$unix_path"
25873   fi
25874 
25875     # remove trailing .exe if any
25876     new_path="${new_path/%.exe/}"
25877 
25878     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25879     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25880   fi
25881 
25882   else
25883     # We're on a posix platform. Hooray! :)
25884     # First separate the path from the arguments. This will split at the first
25885     # space.
25886     complete="$AS"
25887     path="${complete%% *}"
25888     tmp="$complete EOL"
25889     arguments="${tmp#* }"
25890 
25891     # Cannot rely on the command "which" here since it doesn't always work.
25892     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25893     if test -z "$is_absolute_path"; then
25894       # Path to executable is not absolute. Find it.
25895       IFS_save="$IFS"
25896       IFS=:
25897       for p in $PATH; do
25898         if test -f "$p/$path" && test -x "$p/$path"; then
25899           new_path="$p/$path"
25900           break
25901         fi
25902       done
25903       IFS="$IFS_save"
25904     else
25905       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25906 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25907       new_path="$path"
25908     fi
25909 
25910     if test "x$new_path" = x; then
25911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25912 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25913       has_space=`$ECHO "$complete" | $GREP " "`
25914       if test "x$has_space" != x; then
25915         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25916 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25917       fi
25918       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25919     fi
25920   fi
25921 
25922   # Now join together the path and the arguments once again
25923   if test "x$arguments" != xEOL; then
25924     new_complete="$new_path ${arguments% *}"
25925   else
25926     new_complete="$new_path"
25927   fi
25928 
25929   if test "x$complete" != "x$new_complete"; then
25930     AS="$new_complete"
25931     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25932 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25933   fi
25934 
25935   else
25936     AS="$CC -c"
25937   fi
25938 
25939 
25940   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25941     # Extract the first word of "nm", so it can be a program name with args.
25942 set dummy nm; ac_word=$2
25943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25944 $as_echo_n "checking for $ac_word... " >&6; }
25945 if ${ac_cv_path_NM+:} false; then :
25946   $as_echo_n "(cached) " >&6
25947 else
25948   case $NM in
25949   [\\/]* | ?:[\\/]*)
25950   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25951   ;;
25952   *)
25953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25954 for as_dir in $PATH
25955 do
25956   IFS=$as_save_IFS
25957   test -z "$as_dir" && as_dir=.
25958     for ac_exec_ext in '' $ac_executable_extensions; do
25959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25960     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25962     break 2
25963   fi
25964 done
25965   done
25966 IFS=$as_save_IFS
25967 
25968   ;;
25969 esac
25970 fi
25971 NM=$ac_cv_path_NM
25972 if test -n "$NM"; then
25973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25974 $as_echo "$NM" >&6; }
25975 else
25976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25977 $as_echo "no" >&6; }
25978 fi
25979 
25980 
25981 
25982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25983 
25984   # First separate the path from the arguments. This will split at the first
25985   # space.
25986   complete="$NM"
25987   path="${complete%% *}"
25988   tmp="$complete EOL"
25989   arguments="${tmp#* }"
25990 
25991   # Input might be given as Windows format, start by converting to
25992   # unix format.
25993   new_path=`$CYGPATH -u "$path"`
25994 
25995   # Now try to locate executable using which
25996   new_path=`$WHICH "$new_path" 2> /dev/null`
25997   # bat and cmd files are not always considered executable in cygwin causing which
25998   # to not find them
25999   if test "x$new_path" = x \
26000       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26001       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26002     new_path=`$CYGPATH -u "$path"`
26003   fi
26004   if test "x$new_path" = x; then
26005     # Oops. Which didn't find the executable.
26006     # The splitting of arguments from the executable at a space might have been incorrect,
26007     # since paths with space are more likely in Windows. Give it another try with the whole
26008     # argument.
26009     path="$complete"
26010     arguments="EOL"
26011     new_path=`$CYGPATH -u "$path"`
26012     new_path=`$WHICH "$new_path" 2> /dev/null`
26013     # bat and cmd files are not always considered executable in cygwin causing which
26014     # to not find them
26015     if test "x$new_path" = x \
26016         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26017         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26018       new_path=`$CYGPATH -u "$path"`
26019     fi
26020     if test "x$new_path" = x; then
26021       # It's still not found. Now this is an unrecoverable error.
26022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26023 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26024       has_space=`$ECHO "$complete" | $GREP " "`
26025       if test "x$has_space" != x; then
26026         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26027 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26028       fi
26029       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26030     fi
26031   fi
26032 
26033   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26034   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26035   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26036   # "foo.exe" is OK but "foo" is an error.
26037   #
26038   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26039   # It is also a way to make sure we got the proper file name for the real test later on.
26040   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26041   if test "x$test_shortpath" = x; then
26042     # Short path failed, file does not exist as specified.
26043     # Try adding .exe or .cmd
26044     if test -f "${new_path}.exe"; then
26045       input_to_shortpath="${new_path}.exe"
26046     elif test -f "${new_path}.cmd"; then
26047       input_to_shortpath="${new_path}.cmd"
26048     else
26049       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26050 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26051       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26052 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26053       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26054     fi
26055   else
26056     input_to_shortpath="$new_path"
26057   fi
26058 
26059   # Call helper function which possibly converts this using DOS-style short mode.
26060   # If so, the updated path is stored in $new_path.
26061   new_path="$input_to_shortpath"
26062 
26063   input_path="$input_to_shortpath"
26064   # Check if we need to convert this using DOS-style short mode. If the path
26065   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26066   # take no chances and rewrite it.
26067   # Note: m4 eats our [], so we need to use [ and ] instead.
26068   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26069   if test "x$has_forbidden_chars" != x; then
26070     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26071     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26072     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26073     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26074       # Going to short mode and back again did indeed matter. Since short mode is
26075       # case insensitive, let's make it lowercase to improve readability.
26076       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26077       # Now convert it back to Unix-stile (cygpath)
26078       input_path=`$CYGPATH -u "$shortmode_path"`
26079       new_path="$input_path"
26080     fi
26081   fi
26082 
26083   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26084   if test "x$test_cygdrive_prefix" = x; then
26085     # As a simple fix, exclude /usr/bin since it's not a real path.
26086     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26087       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26088       # a path prefixed by /cygdrive for fixpath to work.
26089       new_path="$CYGWIN_ROOT_PATH$input_path"
26090     fi
26091   fi
26092 
26093   # remove trailing .exe if any
26094   new_path="${new_path/%.exe/}"
26095 
26096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26097 
26098   # First separate the path from the arguments. This will split at the first
26099   # space.
26100   complete="$NM"
26101   path="${complete%% *}"
26102   tmp="$complete EOL"
26103   arguments="${tmp#* }"
26104 
26105   # Input might be given as Windows format, start by converting to
26106   # unix format.
26107   new_path="$path"
26108 
26109   windows_path="$new_path"
26110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26111     unix_path=`$CYGPATH -u "$windows_path"`
26112     new_path="$unix_path"
26113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26115     new_path="$unix_path"
26116   fi
26117 
26118 
26119   # Now try to locate executable using which
26120   new_path=`$WHICH "$new_path" 2> /dev/null`
26121 
26122   if test "x$new_path" = x; then
26123     # Oops. Which didn't find the executable.
26124     # The splitting of arguments from the executable at a space might have been incorrect,
26125     # since paths with space are more likely in Windows. Give it another try with the whole
26126     # argument.
26127     path="$complete"
26128     arguments="EOL"
26129     new_path="$path"
26130 
26131   windows_path="$new_path"
26132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26133     unix_path=`$CYGPATH -u "$windows_path"`
26134     new_path="$unix_path"
26135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26136     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26137     new_path="$unix_path"
26138   fi
26139 
26140 
26141     new_path=`$WHICH "$new_path" 2> /dev/null`
26142 
26143     if test "x$new_path" = x; then
26144       # It's still not found. Now this is an unrecoverable error.
26145       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26146 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26147       has_space=`$ECHO "$complete" | $GREP " "`
26148       if test "x$has_space" != x; then
26149         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26150 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26151       fi
26152       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26153     fi
26154   fi
26155 
26156   # Now new_path has a complete unix path to the binary
26157   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26158     # Keep paths in /bin as-is, but remove trailing .exe if any
26159     new_path="${new_path/%.exe/}"
26160     # Do not save /bin paths to all_fixpath_prefixes!
26161   else
26162     # Not in mixed or Windows style, start by that.
26163     new_path=`cmd //c echo $new_path`
26164 
26165   input_path="$new_path"
26166   # Check if we need to convert this using DOS-style short mode. If the path
26167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26168   # take no chances and rewrite it.
26169   # Note: m4 eats our [], so we need to use [ and ] instead.
26170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26171   if test "x$has_forbidden_chars" != x; then
26172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26173     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26174   fi
26175 
26176     # Output is in $new_path
26177 
26178   windows_path="$new_path"
26179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26180     unix_path=`$CYGPATH -u "$windows_path"`
26181     new_path="$unix_path"
26182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26183     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26184     new_path="$unix_path"
26185   fi
26186 
26187     # remove trailing .exe if any
26188     new_path="${new_path/%.exe/}"
26189 
26190     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26191     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26192   fi
26193 
26194   else
26195     # We're on a posix platform. Hooray! :)
26196     # First separate the path from the arguments. This will split at the first
26197     # space.
26198     complete="$NM"
26199     path="${complete%% *}"
26200     tmp="$complete EOL"
26201     arguments="${tmp#* }"
26202 
26203     # Cannot rely on the command "which" here since it doesn't always work.
26204     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26205     if test -z "$is_absolute_path"; then
26206       # Path to executable is not absolute. Find it.
26207       IFS_save="$IFS"
26208       IFS=:
26209       for p in $PATH; do
26210         if test -f "$p/$path" && test -x "$p/$path"; then
26211           new_path="$p/$path"
26212           break
26213         fi
26214       done
26215       IFS="$IFS_save"
26216     else
26217       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26218 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26219       new_path="$path"
26220     fi
26221 
26222     if test "x$new_path" = x; then
26223       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26224 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26225       has_space=`$ECHO "$complete" | $GREP " "`
26226       if test "x$has_space" != x; then
26227         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26228 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26229       fi
26230       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26231     fi
26232   fi
26233 
26234   # Now join together the path and the arguments once again
26235   if test "x$arguments" != xEOL; then
26236     new_complete="$new_path ${arguments% *}"
26237   else
26238     new_complete="$new_path"
26239   fi
26240 
26241   if test "x$complete" != "x$new_complete"; then
26242     NM="$new_complete"
26243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26244 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26245   fi
26246 
26247     # Extract the first word of "gnm", so it can be a program name with args.
26248 set dummy gnm; ac_word=$2
26249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26250 $as_echo_n "checking for $ac_word... " >&6; }
26251 if ${ac_cv_path_GNM+:} false; then :
26252   $as_echo_n "(cached) " >&6
26253 else
26254   case $GNM in
26255   [\\/]* | ?:[\\/]*)
26256   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26257   ;;
26258   *)
26259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26260 for as_dir in $PATH
26261 do
26262   IFS=$as_save_IFS
26263   test -z "$as_dir" && as_dir=.
26264     for ac_exec_ext in '' $ac_executable_extensions; do
26265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26266     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26268     break 2
26269   fi
26270 done
26271   done
26272 IFS=$as_save_IFS
26273 
26274   ;;
26275 esac
26276 fi
26277 GNM=$ac_cv_path_GNM
26278 if test -n "$GNM"; then
26279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26280 $as_echo "$GNM" >&6; }
26281 else
26282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26283 $as_echo "no" >&6; }
26284 fi
26285 
26286 
26287 
26288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26289 
26290   # First separate the path from the arguments. This will split at the first
26291   # space.
26292   complete="$GNM"
26293   path="${complete%% *}"
26294   tmp="$complete EOL"
26295   arguments="${tmp#* }"
26296 
26297   # Input might be given as Windows format, start by converting to
26298   # unix format.
26299   new_path=`$CYGPATH -u "$path"`
26300 
26301   # Now try to locate executable using which
26302   new_path=`$WHICH "$new_path" 2> /dev/null`
26303   # bat and cmd files are not always considered executable in cygwin causing which
26304   # to not find them
26305   if test "x$new_path" = x \
26306       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26307       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26308     new_path=`$CYGPATH -u "$path"`
26309   fi
26310   if test "x$new_path" = x; then
26311     # Oops. Which didn't find the executable.
26312     # The splitting of arguments from the executable at a space might have been incorrect,
26313     # since paths with space are more likely in Windows. Give it another try with the whole
26314     # argument.
26315     path="$complete"
26316     arguments="EOL"
26317     new_path=`$CYGPATH -u "$path"`
26318     new_path=`$WHICH "$new_path" 2> /dev/null`
26319     # bat and cmd files are not always considered executable in cygwin causing which
26320     # to not find them
26321     if test "x$new_path" = x \
26322         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26323         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26324       new_path=`$CYGPATH -u "$path"`
26325     fi
26326     if test "x$new_path" = x; then
26327       # It's still not found. Now this is an unrecoverable error.
26328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26329 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26330       has_space=`$ECHO "$complete" | $GREP " "`
26331       if test "x$has_space" != x; then
26332         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26333 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26334       fi
26335       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26336     fi
26337   fi
26338 
26339   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26340   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26341   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26342   # "foo.exe" is OK but "foo" is an error.
26343   #
26344   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26345   # It is also a way to make sure we got the proper file name for the real test later on.
26346   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26347   if test "x$test_shortpath" = x; then
26348     # Short path failed, file does not exist as specified.
26349     # Try adding .exe or .cmd
26350     if test -f "${new_path}.exe"; then
26351       input_to_shortpath="${new_path}.exe"
26352     elif test -f "${new_path}.cmd"; then
26353       input_to_shortpath="${new_path}.cmd"
26354     else
26355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26356 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26357       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26358 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26359       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26360     fi
26361   else
26362     input_to_shortpath="$new_path"
26363   fi
26364 
26365   # Call helper function which possibly converts this using DOS-style short mode.
26366   # If so, the updated path is stored in $new_path.
26367   new_path="$input_to_shortpath"
26368 
26369   input_path="$input_to_shortpath"
26370   # Check if we need to convert this using DOS-style short mode. If the path
26371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26372   # take no chances and rewrite it.
26373   # Note: m4 eats our [], so we need to use [ and ] instead.
26374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26375   if test "x$has_forbidden_chars" != x; then
26376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26377     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26378     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26379     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26380       # Going to short mode and back again did indeed matter. Since short mode is
26381       # case insensitive, let's make it lowercase to improve readability.
26382       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26383       # Now convert it back to Unix-stile (cygpath)
26384       input_path=`$CYGPATH -u "$shortmode_path"`
26385       new_path="$input_path"
26386     fi
26387   fi
26388 
26389   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26390   if test "x$test_cygdrive_prefix" = x; then
26391     # As a simple fix, exclude /usr/bin since it's not a real path.
26392     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26393       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26394       # a path prefixed by /cygdrive for fixpath to work.
26395       new_path="$CYGWIN_ROOT_PATH$input_path"
26396     fi
26397   fi
26398 
26399   # remove trailing .exe if any
26400   new_path="${new_path/%.exe/}"
26401 
26402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26403 
26404   # First separate the path from the arguments. This will split at the first
26405   # space.
26406   complete="$GNM"
26407   path="${complete%% *}"
26408   tmp="$complete EOL"
26409   arguments="${tmp#* }"
26410 
26411   # Input might be given as Windows format, start by converting to
26412   # unix format.
26413   new_path="$path"
26414 
26415   windows_path="$new_path"
26416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26417     unix_path=`$CYGPATH -u "$windows_path"`
26418     new_path="$unix_path"
26419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26421     new_path="$unix_path"
26422   fi
26423 
26424 
26425   # Now try to locate executable using which
26426   new_path=`$WHICH "$new_path" 2> /dev/null`
26427 
26428   if test "x$new_path" = x; then
26429     # Oops. Which didn't find the executable.
26430     # The splitting of arguments from the executable at a space might have been incorrect,
26431     # since paths with space are more likely in Windows. Give it another try with the whole
26432     # argument.
26433     path="$complete"
26434     arguments="EOL"
26435     new_path="$path"
26436 
26437   windows_path="$new_path"
26438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26439     unix_path=`$CYGPATH -u "$windows_path"`
26440     new_path="$unix_path"
26441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26443     new_path="$unix_path"
26444   fi
26445 
26446 
26447     new_path=`$WHICH "$new_path" 2> /dev/null`
26448 
26449     if test "x$new_path" = x; then
26450       # It's still not found. Now this is an unrecoverable error.
26451       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26452 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26453       has_space=`$ECHO "$complete" | $GREP " "`
26454       if test "x$has_space" != x; then
26455         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26456 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26457       fi
26458       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26459     fi
26460   fi
26461 
26462   # Now new_path has a complete unix path to the binary
26463   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26464     # Keep paths in /bin as-is, but remove trailing .exe if any
26465     new_path="${new_path/%.exe/}"
26466     # Do not save /bin paths to all_fixpath_prefixes!
26467   else
26468     # Not in mixed or Windows style, start by that.
26469     new_path=`cmd //c echo $new_path`
26470 
26471   input_path="$new_path"
26472   # Check if we need to convert this using DOS-style short mode. If the path
26473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26474   # take no chances and rewrite it.
26475   # Note: m4 eats our [], so we need to use [ and ] instead.
26476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26477   if test "x$has_forbidden_chars" != x; then
26478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26479     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26480   fi
26481 
26482     # Output is in $new_path
26483 
26484   windows_path="$new_path"
26485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26486     unix_path=`$CYGPATH -u "$windows_path"`
26487     new_path="$unix_path"
26488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26490     new_path="$unix_path"
26491   fi
26492 
26493     # remove trailing .exe if any
26494     new_path="${new_path/%.exe/}"
26495 
26496     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26497     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26498   fi
26499 
26500   else
26501     # We're on a posix platform. Hooray! :)
26502     # First separate the path from the arguments. This will split at the first
26503     # space.
26504     complete="$GNM"
26505     path="${complete%% *}"
26506     tmp="$complete EOL"
26507     arguments="${tmp#* }"
26508 
26509     # Cannot rely on the command "which" here since it doesn't always work.
26510     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26511     if test -z "$is_absolute_path"; then
26512       # Path to executable is not absolute. Find it.
26513       IFS_save="$IFS"
26514       IFS=:
26515       for p in $PATH; do
26516         if test -f "$p/$path" && test -x "$p/$path"; then
26517           new_path="$p/$path"
26518           break
26519         fi
26520       done
26521       IFS="$IFS_save"
26522     else
26523       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26524 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26525       new_path="$path"
26526     fi
26527 
26528     if test "x$new_path" = x; then
26529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26530 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26531       has_space=`$ECHO "$complete" | $GREP " "`
26532       if test "x$has_space" != x; then
26533         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26534 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26535       fi
26536       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26537     fi
26538   fi
26539 
26540   # Now join together the path and the arguments once again
26541   if test "x$arguments" != xEOL; then
26542     new_complete="$new_path ${arguments% *}"
26543   else
26544     new_complete="$new_path"
26545   fi
26546 
26547   if test "x$complete" != "x$new_complete"; then
26548     GNM="$new_complete"
26549     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26550 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26551   fi
26552 
26553     # Extract the first word of "strip", so it can be a program name with args.
26554 set dummy strip; ac_word=$2
26555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26556 $as_echo_n "checking for $ac_word... " >&6; }
26557 if ${ac_cv_path_STRIP+:} false; then :
26558   $as_echo_n "(cached) " >&6
26559 else
26560   case $STRIP in
26561   [\\/]* | ?:[\\/]*)
26562   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26563   ;;
26564   *)
26565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26566 for as_dir in $PATH
26567 do
26568   IFS=$as_save_IFS
26569   test -z "$as_dir" && as_dir=.
26570     for ac_exec_ext in '' $ac_executable_extensions; do
26571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26572     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26574     break 2
26575   fi
26576 done
26577   done
26578 IFS=$as_save_IFS
26579 
26580   ;;
26581 esac
26582 fi
26583 STRIP=$ac_cv_path_STRIP
26584 if test -n "$STRIP"; then
26585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26586 $as_echo "$STRIP" >&6; }
26587 else
26588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26589 $as_echo "no" >&6; }
26590 fi
26591 
26592 
26593 
26594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26595 
26596   # First separate the path from the arguments. This will split at the first
26597   # space.
26598   complete="$STRIP"
26599   path="${complete%% *}"
26600   tmp="$complete EOL"
26601   arguments="${tmp#* }"
26602 
26603   # Input might be given as Windows format, start by converting to
26604   # unix format.
26605   new_path=`$CYGPATH -u "$path"`
26606 
26607   # Now try to locate executable using which
26608   new_path=`$WHICH "$new_path" 2> /dev/null`
26609   # bat and cmd files are not always considered executable in cygwin causing which
26610   # to not find them
26611   if test "x$new_path" = x \
26612       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26613       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26614     new_path=`$CYGPATH -u "$path"`
26615   fi
26616   if test "x$new_path" = x; then
26617     # Oops. Which didn't find the executable.
26618     # The splitting of arguments from the executable at a space might have been incorrect,
26619     # since paths with space are more likely in Windows. Give it another try with the whole
26620     # argument.
26621     path="$complete"
26622     arguments="EOL"
26623     new_path=`$CYGPATH -u "$path"`
26624     new_path=`$WHICH "$new_path" 2> /dev/null`
26625     # bat and cmd files are not always considered executable in cygwin causing which
26626     # to not find them
26627     if test "x$new_path" = x \
26628         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26629         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26630       new_path=`$CYGPATH -u "$path"`
26631     fi
26632     if test "x$new_path" = x; then
26633       # It's still not found. Now this is an unrecoverable error.
26634       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26635 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26636       has_space=`$ECHO "$complete" | $GREP " "`
26637       if test "x$has_space" != x; then
26638         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26639 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26640       fi
26641       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26642     fi
26643   fi
26644 
26645   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26646   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26647   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26648   # "foo.exe" is OK but "foo" is an error.
26649   #
26650   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26651   # It is also a way to make sure we got the proper file name for the real test later on.
26652   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26653   if test "x$test_shortpath" = x; then
26654     # Short path failed, file does not exist as specified.
26655     # Try adding .exe or .cmd
26656     if test -f "${new_path}.exe"; then
26657       input_to_shortpath="${new_path}.exe"
26658     elif test -f "${new_path}.cmd"; then
26659       input_to_shortpath="${new_path}.cmd"
26660     else
26661       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26662 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26663       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26664 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26665       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26666     fi
26667   else
26668     input_to_shortpath="$new_path"
26669   fi
26670 
26671   # Call helper function which possibly converts this using DOS-style short mode.
26672   # If so, the updated path is stored in $new_path.
26673   new_path="$input_to_shortpath"
26674 
26675   input_path="$input_to_shortpath"
26676   # Check if we need to convert this using DOS-style short mode. If the path
26677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26678   # take no chances and rewrite it.
26679   # Note: m4 eats our [], so we need to use [ and ] instead.
26680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26681   if test "x$has_forbidden_chars" != x; then
26682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26683     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26684     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26685     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26686       # Going to short mode and back again did indeed matter. Since short mode is
26687       # case insensitive, let's make it lowercase to improve readability.
26688       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26689       # Now convert it back to Unix-stile (cygpath)
26690       input_path=`$CYGPATH -u "$shortmode_path"`
26691       new_path="$input_path"
26692     fi
26693   fi
26694 
26695   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26696   if test "x$test_cygdrive_prefix" = x; then
26697     # As a simple fix, exclude /usr/bin since it's not a real path.
26698     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26699       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26700       # a path prefixed by /cygdrive for fixpath to work.
26701       new_path="$CYGWIN_ROOT_PATH$input_path"
26702     fi
26703   fi
26704 
26705   # remove trailing .exe if any
26706   new_path="${new_path/%.exe/}"
26707 
26708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26709 
26710   # First separate the path from the arguments. This will split at the first
26711   # space.
26712   complete="$STRIP"
26713   path="${complete%% *}"
26714   tmp="$complete EOL"
26715   arguments="${tmp#* }"
26716 
26717   # Input might be given as Windows format, start by converting to
26718   # unix format.
26719   new_path="$path"
26720 
26721   windows_path="$new_path"
26722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26723     unix_path=`$CYGPATH -u "$windows_path"`
26724     new_path="$unix_path"
26725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26727     new_path="$unix_path"
26728   fi
26729 
26730 
26731   # Now try to locate executable using which
26732   new_path=`$WHICH "$new_path" 2> /dev/null`
26733 
26734   if test "x$new_path" = x; then
26735     # Oops. Which didn't find the executable.
26736     # The splitting of arguments from the executable at a space might have been incorrect,
26737     # since paths with space are more likely in Windows. Give it another try with the whole
26738     # argument.
26739     path="$complete"
26740     arguments="EOL"
26741     new_path="$path"
26742 
26743   windows_path="$new_path"
26744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26745     unix_path=`$CYGPATH -u "$windows_path"`
26746     new_path="$unix_path"
26747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26749     new_path="$unix_path"
26750   fi
26751 
26752 
26753     new_path=`$WHICH "$new_path" 2> /dev/null`
26754 
26755     if test "x$new_path" = x; then
26756       # It's still not found. Now this is an unrecoverable error.
26757       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26758 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26759       has_space=`$ECHO "$complete" | $GREP " "`
26760       if test "x$has_space" != x; then
26761         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26762 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26763       fi
26764       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26765     fi
26766   fi
26767 
26768   # Now new_path has a complete unix path to the binary
26769   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26770     # Keep paths in /bin as-is, but remove trailing .exe if any
26771     new_path="${new_path/%.exe/}"
26772     # Do not save /bin paths to all_fixpath_prefixes!
26773   else
26774     # Not in mixed or Windows style, start by that.
26775     new_path=`cmd //c echo $new_path`
26776 
26777   input_path="$new_path"
26778   # Check if we need to convert this using DOS-style short mode. If the path
26779   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26780   # take no chances and rewrite it.
26781   # Note: m4 eats our [], so we need to use [ and ] instead.
26782   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26783   if test "x$has_forbidden_chars" != x; then
26784     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26785     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26786   fi
26787 
26788     # Output is in $new_path
26789 
26790   windows_path="$new_path"
26791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26792     unix_path=`$CYGPATH -u "$windows_path"`
26793     new_path="$unix_path"
26794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26795     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26796     new_path="$unix_path"
26797   fi
26798 
26799     # remove trailing .exe if any
26800     new_path="${new_path/%.exe/}"
26801 
26802     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26803     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26804   fi
26805 
26806   else
26807     # We're on a posix platform. Hooray! :)
26808     # First separate the path from the arguments. This will split at the first
26809     # space.
26810     complete="$STRIP"
26811     path="${complete%% *}"
26812     tmp="$complete EOL"
26813     arguments="${tmp#* }"
26814 
26815     # Cannot rely on the command "which" here since it doesn't always work.
26816     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26817     if test -z "$is_absolute_path"; then
26818       # Path to executable is not absolute. Find it.
26819       IFS_save="$IFS"
26820       IFS=:
26821       for p in $PATH; do
26822         if test -f "$p/$path" && test -x "$p/$path"; then
26823           new_path="$p/$path"
26824           break
26825         fi
26826       done
26827       IFS="$IFS_save"
26828     else
26829       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26830 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26831       new_path="$path"
26832     fi
26833 
26834     if test "x$new_path" = x; then
26835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26836 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26837       has_space=`$ECHO "$complete" | $GREP " "`
26838       if test "x$has_space" != x; then
26839         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26840 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26841       fi
26842       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26843     fi
26844   fi
26845 
26846   # Now join together the path and the arguments once again
26847   if test "x$arguments" != xEOL; then
26848     new_complete="$new_path ${arguments% *}"
26849   else
26850     new_complete="$new_path"
26851   fi
26852 
26853   if test "x$complete" != "x$new_complete"; then
26854     STRIP="$new_complete"
26855     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26856 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26857   fi
26858 
26859     # Extract the first word of "mcs", so it can be a program name with args.
26860 set dummy mcs; ac_word=$2
26861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26862 $as_echo_n "checking for $ac_word... " >&6; }
26863 if ${ac_cv_path_MCS+:} false; then :
26864   $as_echo_n "(cached) " >&6
26865 else
26866   case $MCS in
26867   [\\/]* | ?:[\\/]*)
26868   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26869   ;;
26870   *)
26871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26872 for as_dir in $PATH
26873 do
26874   IFS=$as_save_IFS
26875   test -z "$as_dir" && as_dir=.
26876     for ac_exec_ext in '' $ac_executable_extensions; do
26877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26878     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26880     break 2
26881   fi
26882 done
26883   done
26884 IFS=$as_save_IFS
26885 
26886   ;;
26887 esac
26888 fi
26889 MCS=$ac_cv_path_MCS
26890 if test -n "$MCS"; then
26891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26892 $as_echo "$MCS" >&6; }
26893 else
26894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26895 $as_echo "no" >&6; }
26896 fi
26897 
26898 
26899 
26900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26901 
26902   # First separate the path from the arguments. This will split at the first
26903   # space.
26904   complete="$MCS"
26905   path="${complete%% *}"
26906   tmp="$complete EOL"
26907   arguments="${tmp#* }"
26908 
26909   # Input might be given as Windows format, start by converting to
26910   # unix format.
26911   new_path=`$CYGPATH -u "$path"`
26912 
26913   # Now try to locate executable using which
26914   new_path=`$WHICH "$new_path" 2> /dev/null`
26915   # bat and cmd files are not always considered executable in cygwin causing which
26916   # to not find them
26917   if test "x$new_path" = x \
26918       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26919       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26920     new_path=`$CYGPATH -u "$path"`
26921   fi
26922   if test "x$new_path" = x; then
26923     # Oops. Which didn't find the executable.
26924     # The splitting of arguments from the executable at a space might have been incorrect,
26925     # since paths with space are more likely in Windows. Give it another try with the whole
26926     # argument.
26927     path="$complete"
26928     arguments="EOL"
26929     new_path=`$CYGPATH -u "$path"`
26930     new_path=`$WHICH "$new_path" 2> /dev/null`
26931     # bat and cmd files are not always considered executable in cygwin causing which
26932     # to not find them
26933     if test "x$new_path" = x \
26934         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26935         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26936       new_path=`$CYGPATH -u "$path"`
26937     fi
26938     if test "x$new_path" = x; then
26939       # It's still not found. Now this is an unrecoverable error.
26940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26941 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26942       has_space=`$ECHO "$complete" | $GREP " "`
26943       if test "x$has_space" != x; then
26944         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26945 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26946       fi
26947       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26948     fi
26949   fi
26950 
26951   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26952   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26953   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26954   # "foo.exe" is OK but "foo" is an error.
26955   #
26956   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26957   # It is also a way to make sure we got the proper file name for the real test later on.
26958   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26959   if test "x$test_shortpath" = x; then
26960     # Short path failed, file does not exist as specified.
26961     # Try adding .exe or .cmd
26962     if test -f "${new_path}.exe"; then
26963       input_to_shortpath="${new_path}.exe"
26964     elif test -f "${new_path}.cmd"; then
26965       input_to_shortpath="${new_path}.cmd"
26966     else
26967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26968 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26969       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26970 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26971       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26972     fi
26973   else
26974     input_to_shortpath="$new_path"
26975   fi
26976 
26977   # Call helper function which possibly converts this using DOS-style short mode.
26978   # If so, the updated path is stored in $new_path.
26979   new_path="$input_to_shortpath"
26980 
26981   input_path="$input_to_shortpath"
26982   # Check if we need to convert this using DOS-style short mode. If the path
26983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26984   # take no chances and rewrite it.
26985   # Note: m4 eats our [], so we need to use [ and ] instead.
26986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26987   if test "x$has_forbidden_chars" != x; then
26988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26989     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26990     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26991     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26992       # Going to short mode and back again did indeed matter. Since short mode is
26993       # case insensitive, let's make it lowercase to improve readability.
26994       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26995       # Now convert it back to Unix-stile (cygpath)
26996       input_path=`$CYGPATH -u "$shortmode_path"`
26997       new_path="$input_path"
26998     fi
26999   fi
27000 
27001   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27002   if test "x$test_cygdrive_prefix" = x; then
27003     # As a simple fix, exclude /usr/bin since it's not a real path.
27004     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27005       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27006       # a path prefixed by /cygdrive for fixpath to work.
27007       new_path="$CYGWIN_ROOT_PATH$input_path"
27008     fi
27009   fi
27010 
27011   # remove trailing .exe if any
27012   new_path="${new_path/%.exe/}"
27013 
27014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27015 
27016   # First separate the path from the arguments. This will split at the first
27017   # space.
27018   complete="$MCS"
27019   path="${complete%% *}"
27020   tmp="$complete EOL"
27021   arguments="${tmp#* }"
27022 
27023   # Input might be given as Windows format, start by converting to
27024   # unix format.
27025   new_path="$path"
27026 
27027   windows_path="$new_path"
27028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27029     unix_path=`$CYGPATH -u "$windows_path"`
27030     new_path="$unix_path"
27031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27033     new_path="$unix_path"
27034   fi
27035 
27036 
27037   # Now try to locate executable using which
27038   new_path=`$WHICH "$new_path" 2> /dev/null`
27039 
27040   if test "x$new_path" = x; then
27041     # Oops. Which didn't find the executable.
27042     # The splitting of arguments from the executable at a space might have been incorrect,
27043     # since paths with space are more likely in Windows. Give it another try with the whole
27044     # argument.
27045     path="$complete"
27046     arguments="EOL"
27047     new_path="$path"
27048 
27049   windows_path="$new_path"
27050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051     unix_path=`$CYGPATH -u "$windows_path"`
27052     new_path="$unix_path"
27053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27055     new_path="$unix_path"
27056   fi
27057 
27058 
27059     new_path=`$WHICH "$new_path" 2> /dev/null`
27060 
27061     if test "x$new_path" = x; then
27062       # It's still not found. Now this is an unrecoverable error.
27063       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27064 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27065       has_space=`$ECHO "$complete" | $GREP " "`
27066       if test "x$has_space" != x; then
27067         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27068 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27069       fi
27070       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27071     fi
27072   fi
27073 
27074   # Now new_path has a complete unix path to the binary
27075   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27076     # Keep paths in /bin as-is, but remove trailing .exe if any
27077     new_path="${new_path/%.exe/}"
27078     # Do not save /bin paths to all_fixpath_prefixes!
27079   else
27080     # Not in mixed or Windows style, start by that.
27081     new_path=`cmd //c echo $new_path`
27082 
27083   input_path="$new_path"
27084   # Check if we need to convert this using DOS-style short mode. If the path
27085   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27086   # take no chances and rewrite it.
27087   # Note: m4 eats our [], so we need to use [ and ] instead.
27088   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27089   if test "x$has_forbidden_chars" != x; then
27090     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27091     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27092   fi
27093 
27094     # Output is in $new_path
27095 
27096   windows_path="$new_path"
27097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27098     unix_path=`$CYGPATH -u "$windows_path"`
27099     new_path="$unix_path"
27100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27101     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27102     new_path="$unix_path"
27103   fi
27104 
27105     # remove trailing .exe if any
27106     new_path="${new_path/%.exe/}"
27107 
27108     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27109     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27110   fi
27111 
27112   else
27113     # We're on a posix platform. Hooray! :)
27114     # First separate the path from the arguments. This will split at the first
27115     # space.
27116     complete="$MCS"
27117     path="${complete%% *}"
27118     tmp="$complete EOL"
27119     arguments="${tmp#* }"
27120 
27121     # Cannot rely on the command "which" here since it doesn't always work.
27122     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27123     if test -z "$is_absolute_path"; then
27124       # Path to executable is not absolute. Find it.
27125       IFS_save="$IFS"
27126       IFS=:
27127       for p in $PATH; do
27128         if test -f "$p/$path" && test -x "$p/$path"; then
27129           new_path="$p/$path"
27130           break
27131         fi
27132       done
27133       IFS="$IFS_save"
27134     else
27135       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
27136 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
27137       new_path="$path"
27138     fi
27139 
27140     if test "x$new_path" = x; then
27141       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27142 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27143       has_space=`$ECHO "$complete" | $GREP " "`
27144       if test "x$has_space" != x; then
27145         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27146 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27147       fi
27148       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27149     fi
27150   fi
27151 
27152   # Now join together the path and the arguments once again
27153   if test "x$arguments" != xEOL; then
27154     new_complete="$new_path ${arguments% *}"
27155   else
27156     new_complete="$new_path"
27157   fi
27158 
27159   if test "x$complete" != "x$new_complete"; then
27160     MCS="$new_complete"
27161     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
27162 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
27163   fi
27164 
27165   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
27166     # Extract the first word of "otool", so it can be a program name with args.
27167 set dummy otool; ac_word=$2
27168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27169 $as_echo_n "checking for $ac_word... " >&6; }
27170 if ${ac_cv_path_OTOOL+:} false; then :
27171   $as_echo_n "(cached) " >&6
27172 else
27173   case $OTOOL in
27174   [\\/]* | ?:[\\/]*)
27175   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
27176   ;;
27177   *)
27178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27179 for as_dir in $PATH
27180 do
27181   IFS=$as_save_IFS
27182   test -z "$as_dir" && as_dir=.
27183     for ac_exec_ext in '' $ac_executable_extensions; do
27184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27185     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
27186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27187     break 2
27188   fi
27189 done
27190   done
27191 IFS=$as_save_IFS
27192 
27193   ;;
27194 esac
27195 fi
27196 OTOOL=$ac_cv_path_OTOOL
27197 if test -n "$OTOOL"; then
27198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
27199 $as_echo "$OTOOL" >&6; }
27200 else
27201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27202 $as_echo "no" >&6; }
27203 fi
27204 
27205 
27206     if test "x$OTOOL" = "x"; then
27207       OTOOL="true"
27208     fi
27209     if test -n "$ac_tool_prefix"; then
27210   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
27211 set dummy ${ac_tool_prefix}nm; ac_word=$2
27212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27213 $as_echo_n "checking for $ac_word... " >&6; }
27214 if ${ac_cv_prog_NM+:} false; then :
27215   $as_echo_n "(cached) " >&6
27216 else
27217   if test -n "$NM"; then
27218   ac_cv_prog_NM="$NM" # Let the user override the test.
27219 else
27220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27221 for as_dir in $PATH
27222 do
27223   IFS=$as_save_IFS
27224   test -z "$as_dir" && as_dir=.
27225     for ac_exec_ext in '' $ac_executable_extensions; do
27226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27227     ac_cv_prog_NM="${ac_tool_prefix}nm"
27228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27229     break 2
27230   fi
27231 done
27232   done
27233 IFS=$as_save_IFS
27234 
27235 fi
27236 fi
27237 NM=$ac_cv_prog_NM
27238 if test -n "$NM"; then
27239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27240 $as_echo "$NM" >&6; }
27241 else
27242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27243 $as_echo "no" >&6; }
27244 fi
27245 
27246 
27247 fi
27248 if test -z "$ac_cv_prog_NM"; then
27249   ac_ct_NM=$NM
27250   # Extract the first word of "nm", so it can be a program name with args.
27251 set dummy nm; ac_word=$2
27252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27253 $as_echo_n "checking for $ac_word... " >&6; }
27254 if ${ac_cv_prog_ac_ct_NM+:} false; then :
27255   $as_echo_n "(cached) " >&6
27256 else
27257   if test -n "$ac_ct_NM"; then
27258   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27259 else
27260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27261 for as_dir in $PATH
27262 do
27263   IFS=$as_save_IFS
27264   test -z "$as_dir" && as_dir=.
27265     for ac_exec_ext in '' $ac_executable_extensions; do
27266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27267     ac_cv_prog_ac_ct_NM="nm"
27268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27269     break 2
27270   fi
27271 done
27272   done
27273 IFS=$as_save_IFS
27274 
27275 fi
27276 fi
27277 ac_ct_NM=$ac_cv_prog_ac_ct_NM
27278 if test -n "$ac_ct_NM"; then
27279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27280 $as_echo "$ac_ct_NM" >&6; }
27281 else
27282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27283 $as_echo "no" >&6; }
27284 fi
27285 
27286   if test "x$ac_ct_NM" = x; then
27287     NM=""
27288   else
27289     case $cross_compiling:$ac_tool_warned in
27290 yes:)
27291 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27292 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27293 ac_tool_warned=yes ;;
27294 esac
27295     NM=$ac_ct_NM
27296   fi
27297 else
27298   NM="$ac_cv_prog_NM"
27299 fi
27300 
27301 
27302   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27303 
27304   # First separate the path from the arguments. This will split at the first
27305   # space.
27306   complete="$NM"
27307   path="${complete%% *}"
27308   tmp="$complete EOL"
27309   arguments="${tmp#* }"
27310 
27311   # Input might be given as Windows format, start by converting to
27312   # unix format.
27313   new_path=`$CYGPATH -u "$path"`
27314 
27315   # Now try to locate executable using which
27316   new_path=`$WHICH "$new_path" 2> /dev/null`
27317   # bat and cmd files are not always considered executable in cygwin causing which
27318   # to not find them
27319   if test "x$new_path" = x \
27320       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27321       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27322     new_path=`$CYGPATH -u "$path"`
27323   fi
27324   if test "x$new_path" = x; then
27325     # Oops. Which didn't find the executable.
27326     # The splitting of arguments from the executable at a space might have been incorrect,
27327     # since paths with space are more likely in Windows. Give it another try with the whole
27328     # argument.
27329     path="$complete"
27330     arguments="EOL"
27331     new_path=`$CYGPATH -u "$path"`
27332     new_path=`$WHICH "$new_path" 2> /dev/null`
27333     # bat and cmd files are not always considered executable in cygwin causing which
27334     # to not find them
27335     if test "x$new_path" = x \
27336         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27337         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27338       new_path=`$CYGPATH -u "$path"`
27339     fi
27340     if test "x$new_path" = x; then
27341       # It's still not found. Now this is an unrecoverable error.
27342       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27343 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27344       has_space=`$ECHO "$complete" | $GREP " "`
27345       if test "x$has_space" != x; then
27346         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27347 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27348       fi
27349       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27350     fi
27351   fi
27352 
27353   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27354   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27355   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27356   # "foo.exe" is OK but "foo" is an error.
27357   #
27358   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27359   # It is also a way to make sure we got the proper file name for the real test later on.
27360   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27361   if test "x$test_shortpath" = x; then
27362     # Short path failed, file does not exist as specified.
27363     # Try adding .exe or .cmd
27364     if test -f "${new_path}.exe"; then
27365       input_to_shortpath="${new_path}.exe"
27366     elif test -f "${new_path}.cmd"; then
27367       input_to_shortpath="${new_path}.cmd"
27368     else
27369       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27370 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27371       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27372 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27373       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27374     fi
27375   else
27376     input_to_shortpath="$new_path"
27377   fi
27378 
27379   # Call helper function which possibly converts this using DOS-style short mode.
27380   # If so, the updated path is stored in $new_path.
27381   new_path="$input_to_shortpath"
27382 
27383   input_path="$input_to_shortpath"
27384   # Check if we need to convert this using DOS-style short mode. If the path
27385   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27386   # take no chances and rewrite it.
27387   # Note: m4 eats our [], so we need to use [ and ] instead.
27388   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27389   if test "x$has_forbidden_chars" != x; then
27390     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27391     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27392     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27393     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27394       # Going to short mode and back again did indeed matter. Since short mode is
27395       # case insensitive, let's make it lowercase to improve readability.
27396       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27397       # Now convert it back to Unix-stile (cygpath)
27398       input_path=`$CYGPATH -u "$shortmode_path"`
27399       new_path="$input_path"
27400     fi
27401   fi
27402 
27403   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27404   if test "x$test_cygdrive_prefix" = x; then
27405     # As a simple fix, exclude /usr/bin since it's not a real path.
27406     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27407       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27408       # a path prefixed by /cygdrive for fixpath to work.
27409       new_path="$CYGWIN_ROOT_PATH$input_path"
27410     fi
27411   fi
27412 
27413   # remove trailing .exe if any
27414   new_path="${new_path/%.exe/}"
27415 
27416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27417 
27418   # First separate the path from the arguments. This will split at the first
27419   # space.
27420   complete="$NM"
27421   path="${complete%% *}"
27422   tmp="$complete EOL"
27423   arguments="${tmp#* }"
27424 
27425   # Input might be given as Windows format, start by converting to
27426   # unix format.
27427   new_path="$path"
27428 
27429   windows_path="$new_path"
27430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27431     unix_path=`$CYGPATH -u "$windows_path"`
27432     new_path="$unix_path"
27433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27435     new_path="$unix_path"
27436   fi
27437 
27438 
27439   # Now try to locate executable using which
27440   new_path=`$WHICH "$new_path" 2> /dev/null`
27441 
27442   if test "x$new_path" = x; then
27443     # Oops. Which didn't find the executable.
27444     # The splitting of arguments from the executable at a space might have been incorrect,
27445     # since paths with space are more likely in Windows. Give it another try with the whole
27446     # argument.
27447     path="$complete"
27448     arguments="EOL"
27449     new_path="$path"
27450 
27451   windows_path="$new_path"
27452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27453     unix_path=`$CYGPATH -u "$windows_path"`
27454     new_path="$unix_path"
27455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27457     new_path="$unix_path"
27458   fi
27459 
27460 
27461     new_path=`$WHICH "$new_path" 2> /dev/null`
27462 
27463     if test "x$new_path" = x; then
27464       # It's still not found. Now this is an unrecoverable error.
27465       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27466 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27467       has_space=`$ECHO "$complete" | $GREP " "`
27468       if test "x$has_space" != x; then
27469         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27470 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27471       fi
27472       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27473     fi
27474   fi
27475 
27476   # Now new_path has a complete unix path to the binary
27477   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27478     # Keep paths in /bin as-is, but remove trailing .exe if any
27479     new_path="${new_path/%.exe/}"
27480     # Do not save /bin paths to all_fixpath_prefixes!
27481   else
27482     # Not in mixed or Windows style, start by that.
27483     new_path=`cmd //c echo $new_path`
27484 
27485   input_path="$new_path"
27486   # Check if we need to convert this using DOS-style short mode. If the path
27487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27488   # take no chances and rewrite it.
27489   # Note: m4 eats our [], so we need to use [ and ] instead.
27490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27491   if test "x$has_forbidden_chars" != x; then
27492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27493     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27494   fi
27495 
27496     # Output is in $new_path
27497 
27498   windows_path="$new_path"
27499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27500     unix_path=`$CYGPATH -u "$windows_path"`
27501     new_path="$unix_path"
27502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27504     new_path="$unix_path"
27505   fi
27506 
27507     # remove trailing .exe if any
27508     new_path="${new_path/%.exe/}"
27509 
27510     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27511     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27512   fi
27513 
27514   else
27515     # We're on a posix platform. Hooray! :)
27516     # First separate the path from the arguments. This will split at the first
27517     # space.
27518     complete="$NM"
27519     path="${complete%% *}"
27520     tmp="$complete EOL"
27521     arguments="${tmp#* }"
27522 
27523     # Cannot rely on the command "which" here since it doesn't always work.
27524     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27525     if test -z "$is_absolute_path"; then
27526       # Path to executable is not absolute. Find it.
27527       IFS_save="$IFS"
27528       IFS=:
27529       for p in $PATH; do
27530         if test -f "$p/$path" && test -x "$p/$path"; then
27531           new_path="$p/$path"
27532           break
27533         fi
27534       done
27535       IFS="$IFS_save"
27536     else
27537       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27538 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27539       new_path="$path"
27540     fi
27541 
27542     if test "x$new_path" = x; then
27543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27544 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27545       has_space=`$ECHO "$complete" | $GREP " "`
27546       if test "x$has_space" != x; then
27547         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27548 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27549       fi
27550       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27551     fi
27552   fi
27553 
27554   # Now join together the path and the arguments once again
27555   if test "x$arguments" != xEOL; then
27556     new_complete="$new_path ${arguments% *}"
27557   else
27558     new_complete="$new_path"
27559   fi
27560 
27561   if test "x$complete" != "x$new_complete"; then
27562     NM="$new_complete"
27563     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27564 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27565   fi
27566 
27567     GNM="$NM"
27568 
27569     if test -n "$ac_tool_prefix"; then
27570   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27571 set dummy ${ac_tool_prefix}strip; ac_word=$2
27572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27573 $as_echo_n "checking for $ac_word... " >&6; }
27574 if ${ac_cv_prog_STRIP+:} false; then :
27575   $as_echo_n "(cached) " >&6
27576 else
27577   if test -n "$STRIP"; then
27578   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27579 else
27580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27581 for as_dir in $PATH
27582 do
27583   IFS=$as_save_IFS
27584   test -z "$as_dir" && as_dir=.
27585     for ac_exec_ext in '' $ac_executable_extensions; do
27586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27587     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27589     break 2
27590   fi
27591 done
27592   done
27593 IFS=$as_save_IFS
27594 
27595 fi
27596 fi
27597 STRIP=$ac_cv_prog_STRIP
27598 if test -n "$STRIP"; then
27599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27600 $as_echo "$STRIP" >&6; }
27601 else
27602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27603 $as_echo "no" >&6; }
27604 fi
27605 
27606 
27607 fi
27608 if test -z "$ac_cv_prog_STRIP"; then
27609   ac_ct_STRIP=$STRIP
27610   # Extract the first word of "strip", so it can be a program name with args.
27611 set dummy strip; ac_word=$2
27612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27613 $as_echo_n "checking for $ac_word... " >&6; }
27614 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27615   $as_echo_n "(cached) " >&6
27616 else
27617   if test -n "$ac_ct_STRIP"; then
27618   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27619 else
27620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27621 for as_dir in $PATH
27622 do
27623   IFS=$as_save_IFS
27624   test -z "$as_dir" && as_dir=.
27625     for ac_exec_ext in '' $ac_executable_extensions; do
27626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27627     ac_cv_prog_ac_ct_STRIP="strip"
27628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27629     break 2
27630   fi
27631 done
27632   done
27633 IFS=$as_save_IFS
27634 
27635 fi
27636 fi
27637 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27638 if test -n "$ac_ct_STRIP"; then
27639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27640 $as_echo "$ac_ct_STRIP" >&6; }
27641 else
27642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27643 $as_echo "no" >&6; }
27644 fi
27645 
27646   if test "x$ac_ct_STRIP" = x; then
27647     STRIP=""
27648   else
27649     case $cross_compiling:$ac_tool_warned in
27650 yes:)
27651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27652 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27653 ac_tool_warned=yes ;;
27654 esac
27655     STRIP=$ac_ct_STRIP
27656   fi
27657 else
27658   STRIP="$ac_cv_prog_STRIP"
27659 fi
27660 
27661 
27662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27663 
27664   # First separate the path from the arguments. This will split at the first
27665   # space.
27666   complete="$STRIP"
27667   path="${complete%% *}"
27668   tmp="$complete EOL"
27669   arguments="${tmp#* }"
27670 
27671   # Input might be given as Windows format, start by converting to
27672   # unix format.
27673   new_path=`$CYGPATH -u "$path"`
27674 
27675   # Now try to locate executable using which
27676   new_path=`$WHICH "$new_path" 2> /dev/null`
27677   # bat and cmd files are not always considered executable in cygwin causing which
27678   # to not find them
27679   if test "x$new_path" = x \
27680       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27681       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27682     new_path=`$CYGPATH -u "$path"`
27683   fi
27684   if test "x$new_path" = x; then
27685     # Oops. Which didn't find the executable.
27686     # The splitting of arguments from the executable at a space might have been incorrect,
27687     # since paths with space are more likely in Windows. Give it another try with the whole
27688     # argument.
27689     path="$complete"
27690     arguments="EOL"
27691     new_path=`$CYGPATH -u "$path"`
27692     new_path=`$WHICH "$new_path" 2> /dev/null`
27693     # bat and cmd files are not always considered executable in cygwin causing which
27694     # to not find them
27695     if test "x$new_path" = x \
27696         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27697         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27698       new_path=`$CYGPATH -u "$path"`
27699     fi
27700     if test "x$new_path" = x; then
27701       # It's still not found. Now this is an unrecoverable error.
27702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27703 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27704       has_space=`$ECHO "$complete" | $GREP " "`
27705       if test "x$has_space" != x; then
27706         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27707 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27708       fi
27709       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27710     fi
27711   fi
27712 
27713   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27714   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27715   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27716   # "foo.exe" is OK but "foo" is an error.
27717   #
27718   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27719   # It is also a way to make sure we got the proper file name for the real test later on.
27720   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27721   if test "x$test_shortpath" = x; then
27722     # Short path failed, file does not exist as specified.
27723     # Try adding .exe or .cmd
27724     if test -f "${new_path}.exe"; then
27725       input_to_shortpath="${new_path}.exe"
27726     elif test -f "${new_path}.cmd"; then
27727       input_to_shortpath="${new_path}.cmd"
27728     else
27729       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27730 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27731       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27732 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27733       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27734     fi
27735   else
27736     input_to_shortpath="$new_path"
27737   fi
27738 
27739   # Call helper function which possibly converts this using DOS-style short mode.
27740   # If so, the updated path is stored in $new_path.
27741   new_path="$input_to_shortpath"
27742 
27743   input_path="$input_to_shortpath"
27744   # Check if we need to convert this using DOS-style short mode. If the path
27745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27746   # take no chances and rewrite it.
27747   # Note: m4 eats our [], so we need to use [ and ] instead.
27748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27749   if test "x$has_forbidden_chars" != x; then
27750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27751     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27752     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27753     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27754       # Going to short mode and back again did indeed matter. Since short mode is
27755       # case insensitive, let's make it lowercase to improve readability.
27756       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27757       # Now convert it back to Unix-stile (cygpath)
27758       input_path=`$CYGPATH -u "$shortmode_path"`
27759       new_path="$input_path"
27760     fi
27761   fi
27762 
27763   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27764   if test "x$test_cygdrive_prefix" = x; then
27765     # As a simple fix, exclude /usr/bin since it's not a real path.
27766     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27767       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27768       # a path prefixed by /cygdrive for fixpath to work.
27769       new_path="$CYGWIN_ROOT_PATH$input_path"
27770     fi
27771   fi
27772 
27773   # remove trailing .exe if any
27774   new_path="${new_path/%.exe/}"
27775 
27776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27777 
27778   # First separate the path from the arguments. This will split at the first
27779   # space.
27780   complete="$STRIP"
27781   path="${complete%% *}"
27782   tmp="$complete EOL"
27783   arguments="${tmp#* }"
27784 
27785   # Input might be given as Windows format, start by converting to
27786   # unix format.
27787   new_path="$path"
27788 
27789   windows_path="$new_path"
27790   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27791     unix_path=`$CYGPATH -u "$windows_path"`
27792     new_path="$unix_path"
27793   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27794     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27795     new_path="$unix_path"
27796   fi
27797 
27798 
27799   # Now try to locate executable using which
27800   new_path=`$WHICH "$new_path" 2> /dev/null`
27801 
27802   if test "x$new_path" = x; then
27803     # Oops. Which didn't find the executable.
27804     # The splitting of arguments from the executable at a space might have been incorrect,
27805     # since paths with space are more likely in Windows. Give it another try with the whole
27806     # argument.
27807     path="$complete"
27808     arguments="EOL"
27809     new_path="$path"
27810 
27811   windows_path="$new_path"
27812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27813     unix_path=`$CYGPATH -u "$windows_path"`
27814     new_path="$unix_path"
27815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27817     new_path="$unix_path"
27818   fi
27819 
27820 
27821     new_path=`$WHICH "$new_path" 2> /dev/null`
27822 
27823     if test "x$new_path" = x; then
27824       # It's still not found. Now this is an unrecoverable error.
27825       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27826 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27827       has_space=`$ECHO "$complete" | $GREP " "`
27828       if test "x$has_space" != x; then
27829         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27830 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27831       fi
27832       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27833     fi
27834   fi
27835 
27836   # Now new_path has a complete unix path to the binary
27837   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27838     # Keep paths in /bin as-is, but remove trailing .exe if any
27839     new_path="${new_path/%.exe/}"
27840     # Do not save /bin paths to all_fixpath_prefixes!
27841   else
27842     # Not in mixed or Windows style, start by that.
27843     new_path=`cmd //c echo $new_path`
27844 
27845   input_path="$new_path"
27846   # Check if we need to convert this using DOS-style short mode. If the path
27847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27848   # take no chances and rewrite it.
27849   # Note: m4 eats our [], so we need to use [ and ] instead.
27850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27851   if test "x$has_forbidden_chars" != x; then
27852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27853     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27854   fi
27855 
27856     # Output is in $new_path
27857 
27858   windows_path="$new_path"
27859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27860     unix_path=`$CYGPATH -u "$windows_path"`
27861     new_path="$unix_path"
27862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27864     new_path="$unix_path"
27865   fi
27866 
27867     # remove trailing .exe if any
27868     new_path="${new_path/%.exe/}"
27869 
27870     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27871     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27872   fi
27873 
27874   else
27875     # We're on a posix platform. Hooray! :)
27876     # First separate the path from the arguments. This will split at the first
27877     # space.
27878     complete="$STRIP"
27879     path="${complete%% *}"
27880     tmp="$complete EOL"
27881     arguments="${tmp#* }"
27882 
27883     # Cannot rely on the command "which" here since it doesn't always work.
27884     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27885     if test -z "$is_absolute_path"; then
27886       # Path to executable is not absolute. Find it.
27887       IFS_save="$IFS"
27888       IFS=:
27889       for p in $PATH; do
27890         if test -f "$p/$path" && test -x "$p/$path"; then
27891           new_path="$p/$path"
27892           break
27893         fi
27894       done
27895       IFS="$IFS_save"
27896     else
27897       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27898 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27899       new_path="$path"
27900     fi
27901 
27902     if test "x$new_path" = x; then
27903       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27904 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27905       has_space=`$ECHO "$complete" | $GREP " "`
27906       if test "x$has_space" != x; then
27907         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27908 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27909       fi
27910       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27911     fi
27912   fi
27913 
27914   # Now join together the path and the arguments once again
27915   if test "x$arguments" != xEOL; then
27916     new_complete="$new_path ${arguments% *}"
27917   else
27918     new_complete="$new_path"
27919   fi
27920 
27921   if test "x$complete" != "x$new_complete"; then
27922     STRIP="$new_complete"
27923     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27924 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27925   fi
27926 
27927   fi
27928 
27929   # objcopy is used for moving debug symbols to separate files when
27930   # full debug symbols are enabled.
27931   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27932     if test -n "$ac_tool_prefix"; then
27933   for ac_prog in gobjcopy objcopy
27934   do
27935     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27936 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27938 $as_echo_n "checking for $ac_word... " >&6; }
27939 if ${ac_cv_prog_OBJCOPY+:} false; then :
27940   $as_echo_n "(cached) " >&6
27941 else
27942   if test -n "$OBJCOPY"; then
27943   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27944 else
27945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27946 for as_dir in $PATH
27947 do
27948   IFS=$as_save_IFS
27949   test -z "$as_dir" && as_dir=.
27950     for ac_exec_ext in '' $ac_executable_extensions; do
27951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27952     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27954     break 2
27955   fi
27956 done
27957   done
27958 IFS=$as_save_IFS
27959 
27960 fi
27961 fi
27962 OBJCOPY=$ac_cv_prog_OBJCOPY
27963 if test -n "$OBJCOPY"; then
27964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27965 $as_echo "$OBJCOPY" >&6; }
27966 else
27967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27968 $as_echo "no" >&6; }
27969 fi
27970 
27971 
27972     test -n "$OBJCOPY" && break
27973   done
27974 fi
27975 if test -z "$OBJCOPY"; then
27976   ac_ct_OBJCOPY=$OBJCOPY
27977   for ac_prog in gobjcopy objcopy
27978 do
27979   # Extract the first word of "$ac_prog", so it can be a program name with args.
27980 set dummy $ac_prog; ac_word=$2
27981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27982 $as_echo_n "checking for $ac_word... " >&6; }
27983 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27984   $as_echo_n "(cached) " >&6
27985 else
27986   if test -n "$ac_ct_OBJCOPY"; then
27987   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27988 else
27989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27990 for as_dir in $PATH
27991 do
27992   IFS=$as_save_IFS
27993   test -z "$as_dir" && as_dir=.
27994     for ac_exec_ext in '' $ac_executable_extensions; do
27995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27996     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27998     break 2
27999   fi
28000 done
28001   done
28002 IFS=$as_save_IFS
28003 
28004 fi
28005 fi
28006 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
28007 if test -n "$ac_ct_OBJCOPY"; then
28008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
28009 $as_echo "$ac_ct_OBJCOPY" >&6; }
28010 else
28011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28012 $as_echo "no" >&6; }
28013 fi
28014 
28015 
28016   test -n "$ac_ct_OBJCOPY" && break
28017 done
28018 
28019   if test "x$ac_ct_OBJCOPY" = x; then
28020     OBJCOPY=""
28021   else
28022     case $cross_compiling:$ac_tool_warned in
28023 yes:)
28024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28025 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28026 ac_tool_warned=yes ;;
28027 esac
28028     OBJCOPY=$ac_ct_OBJCOPY
28029   fi
28030 fi
28031 
28032     # Only call fixup if objcopy was found.
28033     if test -n "$OBJCOPY"; then
28034 
28035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28036 
28037   # First separate the path from the arguments. This will split at the first
28038   # space.
28039   complete="$OBJCOPY"
28040   path="${complete%% *}"
28041   tmp="$complete EOL"
28042   arguments="${tmp#* }"
28043 
28044   # Input might be given as Windows format, start by converting to
28045   # unix format.
28046   new_path=`$CYGPATH -u "$path"`
28047 
28048   # Now try to locate executable using which
28049   new_path=`$WHICH "$new_path" 2> /dev/null`
28050   # bat and cmd files are not always considered executable in cygwin causing which
28051   # to not find them
28052   if test "x$new_path" = x \
28053       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28054       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28055     new_path=`$CYGPATH -u "$path"`
28056   fi
28057   if test "x$new_path" = x; then
28058     # Oops. Which didn't find the executable.
28059     # The splitting of arguments from the executable at a space might have been incorrect,
28060     # since paths with space are more likely in Windows. Give it another try with the whole
28061     # argument.
28062     path="$complete"
28063     arguments="EOL"
28064     new_path=`$CYGPATH -u "$path"`
28065     new_path=`$WHICH "$new_path" 2> /dev/null`
28066     # bat and cmd files are not always considered executable in cygwin causing which
28067     # to not find them
28068     if test "x$new_path" = x \
28069         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28070         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28071       new_path=`$CYGPATH -u "$path"`
28072     fi
28073     if test "x$new_path" = x; then
28074       # It's still not found. Now this is an unrecoverable error.
28075       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28076 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28077       has_space=`$ECHO "$complete" | $GREP " "`
28078       if test "x$has_space" != x; then
28079         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28080 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28081       fi
28082       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28083     fi
28084   fi
28085 
28086   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28087   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28088   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28089   # "foo.exe" is OK but "foo" is an error.
28090   #
28091   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28092   # It is also a way to make sure we got the proper file name for the real test later on.
28093   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28094   if test "x$test_shortpath" = x; then
28095     # Short path failed, file does not exist as specified.
28096     # Try adding .exe or .cmd
28097     if test -f "${new_path}.exe"; then
28098       input_to_shortpath="${new_path}.exe"
28099     elif test -f "${new_path}.cmd"; then
28100       input_to_shortpath="${new_path}.cmd"
28101     else
28102       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
28103 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
28104       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28105 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28106       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28107     fi
28108   else
28109     input_to_shortpath="$new_path"
28110   fi
28111 
28112   # Call helper function which possibly converts this using DOS-style short mode.
28113   # If so, the updated path is stored in $new_path.
28114   new_path="$input_to_shortpath"
28115 
28116   input_path="$input_to_shortpath"
28117   # Check if we need to convert this using DOS-style short mode. If the path
28118   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28119   # take no chances and rewrite it.
28120   # Note: m4 eats our [], so we need to use [ and ] instead.
28121   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28122   if test "x$has_forbidden_chars" != x; then
28123     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28124     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28125     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28126     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28127       # Going to short mode and back again did indeed matter. Since short mode is
28128       # case insensitive, let's make it lowercase to improve readability.
28129       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28130       # Now convert it back to Unix-stile (cygpath)
28131       input_path=`$CYGPATH -u "$shortmode_path"`
28132       new_path="$input_path"
28133     fi
28134   fi
28135 
28136   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28137   if test "x$test_cygdrive_prefix" = x; then
28138     # As a simple fix, exclude /usr/bin since it's not a real path.
28139     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28140       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28141       # a path prefixed by /cygdrive for fixpath to work.
28142       new_path="$CYGWIN_ROOT_PATH$input_path"
28143     fi
28144   fi
28145 
28146   # remove trailing .exe if any
28147   new_path="${new_path/%.exe/}"
28148 
28149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28150 
28151   # First separate the path from the arguments. This will split at the first
28152   # space.
28153   complete="$OBJCOPY"
28154   path="${complete%% *}"
28155   tmp="$complete EOL"
28156   arguments="${tmp#* }"
28157 
28158   # Input might be given as Windows format, start by converting to
28159   # unix format.
28160   new_path="$path"
28161 
28162   windows_path="$new_path"
28163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28164     unix_path=`$CYGPATH -u "$windows_path"`
28165     new_path="$unix_path"
28166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28167     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28168     new_path="$unix_path"
28169   fi
28170 
28171 
28172   # Now try to locate executable using which
28173   new_path=`$WHICH "$new_path" 2> /dev/null`
28174 
28175   if test "x$new_path" = x; then
28176     # Oops. Which didn't find the executable.
28177     # The splitting of arguments from the executable at a space might have been incorrect,
28178     # since paths with space are more likely in Windows. Give it another try with the whole
28179     # argument.
28180     path="$complete"
28181     arguments="EOL"
28182     new_path="$path"
28183 
28184   windows_path="$new_path"
28185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28186     unix_path=`$CYGPATH -u "$windows_path"`
28187     new_path="$unix_path"
28188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28189     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28190     new_path="$unix_path"
28191   fi
28192 
28193 
28194     new_path=`$WHICH "$new_path" 2> /dev/null`
28195 
28196     if test "x$new_path" = x; then
28197       # It's still not found. Now this is an unrecoverable error.
28198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28199 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28200       has_space=`$ECHO "$complete" | $GREP " "`
28201       if test "x$has_space" != x; then
28202         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28203 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28204       fi
28205       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28206     fi
28207   fi
28208 
28209   # Now new_path has a complete unix path to the binary
28210   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28211     # Keep paths in /bin as-is, but remove trailing .exe if any
28212     new_path="${new_path/%.exe/}"
28213     # Do not save /bin paths to all_fixpath_prefixes!
28214   else
28215     # Not in mixed or Windows style, start by that.
28216     new_path=`cmd //c echo $new_path`
28217 
28218   input_path="$new_path"
28219   # Check if we need to convert this using DOS-style short mode. If the path
28220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28221   # take no chances and rewrite it.
28222   # Note: m4 eats our [], so we need to use [ and ] instead.
28223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28224   if test "x$has_forbidden_chars" != x; then
28225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28226     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28227   fi
28228 
28229     # Output is in $new_path
28230 
28231   windows_path="$new_path"
28232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28233     unix_path=`$CYGPATH -u "$windows_path"`
28234     new_path="$unix_path"
28235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28237     new_path="$unix_path"
28238   fi
28239 
28240     # remove trailing .exe if any
28241     new_path="${new_path/%.exe/}"
28242 
28243     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28244     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28245   fi
28246 
28247   else
28248     # We're on a posix platform. Hooray! :)
28249     # First separate the path from the arguments. This will split at the first
28250     # space.
28251     complete="$OBJCOPY"
28252     path="${complete%% *}"
28253     tmp="$complete EOL"
28254     arguments="${tmp#* }"
28255 
28256     # Cannot rely on the command "which" here since it doesn't always work.
28257     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28258     if test -z "$is_absolute_path"; then
28259       # Path to executable is not absolute. Find it.
28260       IFS_save="$IFS"
28261       IFS=:
28262       for p in $PATH; do
28263         if test -f "$p/$path" && test -x "$p/$path"; then
28264           new_path="$p/$path"
28265           break
28266         fi
28267       done
28268       IFS="$IFS_save"
28269     else
28270       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28271 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28272       new_path="$path"
28273     fi
28274 
28275     if test "x$new_path" = x; then
28276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28277 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28278       has_space=`$ECHO "$complete" | $GREP " "`
28279       if test "x$has_space" != x; then
28280         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28281 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28282       fi
28283       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28284     fi
28285   fi
28286 
28287   # Now join together the path and the arguments once again
28288   if test "x$arguments" != xEOL; then
28289     new_complete="$new_path ${arguments% *}"
28290   else
28291     new_complete="$new_path"
28292   fi
28293 
28294   if test "x$complete" != "x$new_complete"; then
28295     OBJCOPY="$new_complete"
28296     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28297 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28298   fi
28299 
28300     fi
28301   fi
28302 
28303   if test -n "$ac_tool_prefix"; then
28304   for ac_prog in gobjdump objdump
28305   do
28306     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28307 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28309 $as_echo_n "checking for $ac_word... " >&6; }
28310 if ${ac_cv_prog_OBJDUMP+:} false; then :
28311   $as_echo_n "(cached) " >&6
28312 else
28313   if test -n "$OBJDUMP"; then
28314   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28315 else
28316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28317 for as_dir in $PATH
28318 do
28319   IFS=$as_save_IFS
28320   test -z "$as_dir" && as_dir=.
28321     for ac_exec_ext in '' $ac_executable_extensions; do
28322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28323     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28325     break 2
28326   fi
28327 done
28328   done
28329 IFS=$as_save_IFS
28330 
28331 fi
28332 fi
28333 OBJDUMP=$ac_cv_prog_OBJDUMP
28334 if test -n "$OBJDUMP"; then
28335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28336 $as_echo "$OBJDUMP" >&6; }
28337 else
28338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28339 $as_echo "no" >&6; }
28340 fi
28341 
28342 
28343     test -n "$OBJDUMP" && break
28344   done
28345 fi
28346 if test -z "$OBJDUMP"; then
28347   ac_ct_OBJDUMP=$OBJDUMP
28348   for ac_prog in gobjdump objdump
28349 do
28350   # Extract the first word of "$ac_prog", so it can be a program name with args.
28351 set dummy $ac_prog; ac_word=$2
28352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28353 $as_echo_n "checking for $ac_word... " >&6; }
28354 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28355   $as_echo_n "(cached) " >&6
28356 else
28357   if test -n "$ac_ct_OBJDUMP"; then
28358   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28359 else
28360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28361 for as_dir in $PATH
28362 do
28363   IFS=$as_save_IFS
28364   test -z "$as_dir" && as_dir=.
28365     for ac_exec_ext in '' $ac_executable_extensions; do
28366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28367     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28369     break 2
28370   fi
28371 done
28372   done
28373 IFS=$as_save_IFS
28374 
28375 fi
28376 fi
28377 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28378 if test -n "$ac_ct_OBJDUMP"; then
28379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28380 $as_echo "$ac_ct_OBJDUMP" >&6; }
28381 else
28382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28383 $as_echo "no" >&6; }
28384 fi
28385 
28386 
28387   test -n "$ac_ct_OBJDUMP" && break
28388 done
28389 
28390   if test "x$ac_ct_OBJDUMP" = x; then
28391     OBJDUMP=""
28392   else
28393     case $cross_compiling:$ac_tool_warned in
28394 yes:)
28395 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28396 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28397 ac_tool_warned=yes ;;
28398 esac
28399     OBJDUMP=$ac_ct_OBJDUMP
28400   fi
28401 fi
28402 
28403   if test "x$OBJDUMP" != x; then
28404     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28405 
28406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28407 
28408   # First separate the path from the arguments. This will split at the first
28409   # space.
28410   complete="$OBJDUMP"
28411   path="${complete%% *}"
28412   tmp="$complete EOL"
28413   arguments="${tmp#* }"
28414 
28415   # Input might be given as Windows format, start by converting to
28416   # unix format.
28417   new_path=`$CYGPATH -u "$path"`
28418 
28419   # Now try to locate executable using which
28420   new_path=`$WHICH "$new_path" 2> /dev/null`
28421   # bat and cmd files are not always considered executable in cygwin causing which
28422   # to not find them
28423   if test "x$new_path" = x \
28424       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28425       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28426     new_path=`$CYGPATH -u "$path"`
28427   fi
28428   if test "x$new_path" = x; then
28429     # Oops. Which didn't find the executable.
28430     # The splitting of arguments from the executable at a space might have been incorrect,
28431     # since paths with space are more likely in Windows. Give it another try with the whole
28432     # argument.
28433     path="$complete"
28434     arguments="EOL"
28435     new_path=`$CYGPATH -u "$path"`
28436     new_path=`$WHICH "$new_path" 2> /dev/null`
28437     # bat and cmd files are not always considered executable in cygwin causing which
28438     # to not find them
28439     if test "x$new_path" = x \
28440         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28441         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28442       new_path=`$CYGPATH -u "$path"`
28443     fi
28444     if test "x$new_path" = x; then
28445       # It's still not found. Now this is an unrecoverable error.
28446       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28447 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28448       has_space=`$ECHO "$complete" | $GREP " "`
28449       if test "x$has_space" != x; then
28450         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28451 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28452       fi
28453       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28454     fi
28455   fi
28456 
28457   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28458   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28459   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28460   # "foo.exe" is OK but "foo" is an error.
28461   #
28462   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28463   # It is also a way to make sure we got the proper file name for the real test later on.
28464   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28465   if test "x$test_shortpath" = x; then
28466     # Short path failed, file does not exist as specified.
28467     # Try adding .exe or .cmd
28468     if test -f "${new_path}.exe"; then
28469       input_to_shortpath="${new_path}.exe"
28470     elif test -f "${new_path}.cmd"; then
28471       input_to_shortpath="${new_path}.cmd"
28472     else
28473       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28474 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28475       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28476 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28477       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28478     fi
28479   else
28480     input_to_shortpath="$new_path"
28481   fi
28482 
28483   # Call helper function which possibly converts this using DOS-style short mode.
28484   # If so, the updated path is stored in $new_path.
28485   new_path="$input_to_shortpath"
28486 
28487   input_path="$input_to_shortpath"
28488   # Check if we need to convert this using DOS-style short mode. If the path
28489   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28490   # take no chances and rewrite it.
28491   # Note: m4 eats our [], so we need to use [ and ] instead.
28492   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28493   if test "x$has_forbidden_chars" != x; then
28494     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28495     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28496     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28497     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28498       # Going to short mode and back again did indeed matter. Since short mode is
28499       # case insensitive, let's make it lowercase to improve readability.
28500       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28501       # Now convert it back to Unix-stile (cygpath)
28502       input_path=`$CYGPATH -u "$shortmode_path"`
28503       new_path="$input_path"
28504     fi
28505   fi
28506 
28507   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28508   if test "x$test_cygdrive_prefix" = x; then
28509     # As a simple fix, exclude /usr/bin since it's not a real path.
28510     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28511       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28512       # a path prefixed by /cygdrive for fixpath to work.
28513       new_path="$CYGWIN_ROOT_PATH$input_path"
28514     fi
28515   fi
28516 
28517   # remove trailing .exe if any
28518   new_path="${new_path/%.exe/}"
28519 
28520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28521 
28522   # First separate the path from the arguments. This will split at the first
28523   # space.
28524   complete="$OBJDUMP"
28525   path="${complete%% *}"
28526   tmp="$complete EOL"
28527   arguments="${tmp#* }"
28528 
28529   # Input might be given as Windows format, start by converting to
28530   # unix format.
28531   new_path="$path"
28532 
28533   windows_path="$new_path"
28534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28535     unix_path=`$CYGPATH -u "$windows_path"`
28536     new_path="$unix_path"
28537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28539     new_path="$unix_path"
28540   fi
28541 
28542 
28543   # Now try to locate executable using which
28544   new_path=`$WHICH "$new_path" 2> /dev/null`
28545 
28546   if test "x$new_path" = x; then
28547     # Oops. Which didn't find the executable.
28548     # The splitting of arguments from the executable at a space might have been incorrect,
28549     # since paths with space are more likely in Windows. Give it another try with the whole
28550     # argument.
28551     path="$complete"
28552     arguments="EOL"
28553     new_path="$path"
28554 
28555   windows_path="$new_path"
28556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28557     unix_path=`$CYGPATH -u "$windows_path"`
28558     new_path="$unix_path"
28559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28561     new_path="$unix_path"
28562   fi
28563 
28564 
28565     new_path=`$WHICH "$new_path" 2> /dev/null`
28566 
28567     if test "x$new_path" = x; then
28568       # It's still not found. Now this is an unrecoverable error.
28569       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28570 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28571       has_space=`$ECHO "$complete" | $GREP " "`
28572       if test "x$has_space" != x; then
28573         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28574 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28575       fi
28576       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28577     fi
28578   fi
28579 
28580   # Now new_path has a complete unix path to the binary
28581   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28582     # Keep paths in /bin as-is, but remove trailing .exe if any
28583     new_path="${new_path/%.exe/}"
28584     # Do not save /bin paths to all_fixpath_prefixes!
28585   else
28586     # Not in mixed or Windows style, start by that.
28587     new_path=`cmd //c echo $new_path`
28588 
28589   input_path="$new_path"
28590   # Check if we need to convert this using DOS-style short mode. If the path
28591   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28592   # take no chances and rewrite it.
28593   # Note: m4 eats our [], so we need to use [ and ] instead.
28594   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28595   if test "x$has_forbidden_chars" != x; then
28596     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28597     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28598   fi
28599 
28600     # Output is in $new_path
28601 
28602   windows_path="$new_path"
28603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28604     unix_path=`$CYGPATH -u "$windows_path"`
28605     new_path="$unix_path"
28606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28608     new_path="$unix_path"
28609   fi
28610 
28611     # remove trailing .exe if any
28612     new_path="${new_path/%.exe/}"
28613 
28614     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28615     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28616   fi
28617 
28618   else
28619     # We're on a posix platform. Hooray! :)
28620     # First separate the path from the arguments. This will split at the first
28621     # space.
28622     complete="$OBJDUMP"
28623     path="${complete%% *}"
28624     tmp="$complete EOL"
28625     arguments="${tmp#* }"
28626 
28627     # Cannot rely on the command "which" here since it doesn't always work.
28628     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28629     if test -z "$is_absolute_path"; then
28630       # Path to executable is not absolute. Find it.
28631       IFS_save="$IFS"
28632       IFS=:
28633       for p in $PATH; do
28634         if test -f "$p/$path" && test -x "$p/$path"; then
28635           new_path="$p/$path"
28636           break
28637         fi
28638       done
28639       IFS="$IFS_save"
28640     else
28641       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28642 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28643       new_path="$path"
28644     fi
28645 
28646     if test "x$new_path" = x; then
28647       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28648 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28649       has_space=`$ECHO "$complete" | $GREP " "`
28650       if test "x$has_space" != x; then
28651         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28652 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28653       fi
28654       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28655     fi
28656   fi
28657 
28658   # Now join together the path and the arguments once again
28659   if test "x$arguments" != xEOL; then
28660     new_complete="$new_path ${arguments% *}"
28661   else
28662     new_complete="$new_path"
28663   fi
28664 
28665   if test "x$complete" != "x$new_complete"; then
28666     OBJDUMP="$new_complete"
28667     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28668 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28669   fi
28670 
28671   fi
28672 
28673 
28674 
28675   # Restore old path without tools dir
28676   PATH="$OLD_PATH"
28677 
28678 
28679 # FIXME: Currently we must test this after paths but before flags. Fix!
28680 
28681 # And we can test some aspects on the target using configure macros.
28682 
28683 
28684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28685 $as_echo_n "checking for ANSI C header files... " >&6; }
28686 if ${ac_cv_header_stdc+:} false; then :
28687   $as_echo_n "(cached) " >&6
28688 else
28689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28690 /* end confdefs.h.  */
28691 #include <stdlib.h>
28692 #include <stdarg.h>
28693 #include <string.h>
28694 #include <float.h>
28695 
28696 int
28697 main ()
28698 {
28699 
28700   ;
28701   return 0;
28702 }
28703 _ACEOF
28704 if ac_fn_cxx_try_compile "$LINENO"; then :
28705   ac_cv_header_stdc=yes
28706 else
28707   ac_cv_header_stdc=no
28708 fi
28709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28710 
28711 if test $ac_cv_header_stdc = yes; then
28712   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28714 /* end confdefs.h.  */
28715 #include <string.h>
28716 
28717 _ACEOF
28718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28719   $EGREP "memchr" >/dev/null 2>&1; then :
28720 
28721 else
28722   ac_cv_header_stdc=no
28723 fi
28724 rm -f conftest*
28725 
28726 fi
28727 
28728 if test $ac_cv_header_stdc = yes; then
28729   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28731 /* end confdefs.h.  */
28732 #include <stdlib.h>
28733 
28734 _ACEOF
28735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28736   $EGREP "free" >/dev/null 2>&1; then :
28737 
28738 else
28739   ac_cv_header_stdc=no
28740 fi
28741 rm -f conftest*
28742 
28743 fi
28744 
28745 if test $ac_cv_header_stdc = yes; then
28746   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28747   if test "$cross_compiling" = yes; then :
28748   :
28749 else
28750   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28751 /* end confdefs.h.  */
28752 #include <ctype.h>
28753 #include <stdlib.h>
28754 #if ((' ' & 0x0FF) == 0x020)
28755 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28756 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28757 #else
28758 # define ISLOWER(c) \
28759                    (('a' <= (c) && (c) <= 'i') \
28760                      || ('j' <= (c) && (c) <= 'r') \
28761                      || ('s' <= (c) && (c) <= 'z'))
28762 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28763 #endif
28764 
28765 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28766 int
28767 main ()
28768 {
28769   int i;
28770   for (i = 0; i < 256; i++)
28771     if (XOR (islower (i), ISLOWER (i))
28772         || toupper (i) != TOUPPER (i))
28773       return 2;
28774   return 0;
28775 }
28776 _ACEOF
28777 if ac_fn_cxx_try_run "$LINENO"; then :
28778 
28779 else
28780   ac_cv_header_stdc=no
28781 fi
28782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28783   conftest.$ac_objext conftest.beam conftest.$ac_ext
28784 fi
28785 
28786 fi
28787 fi
28788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28789 $as_echo "$ac_cv_header_stdc" >&6; }
28790 if test $ac_cv_header_stdc = yes; then
28791 
28792 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28793 
28794 fi
28795 
28796 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28797 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28798                   inttypes.h stdint.h unistd.h
28799 do :
28800   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28801 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28802 "
28803 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28804   cat >>confdefs.h <<_ACEOF
28805 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28806 _ACEOF
28807 
28808 fi
28809 
28810 done
28811 
28812 
28813 
28814   ###############################################################################
28815   #
28816   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28817   # (The JVM can use 32 or 64 bit Java pointers but that decision
28818   # is made at runtime.)
28819   #
28820 
28821   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28822     # Always specify -m flag on Solaris
28823     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28824 
28825   # When we add flags to the "official" CFLAGS etc, we need to
28826   # keep track of these additions in ADDED_CFLAGS etc. These
28827   # will later be checked to make sure only controlled additions
28828   # have been made to CFLAGS etc.
28829   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28830   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28831   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28832 
28833   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28834   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28835   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28836 
28837   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28838   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28839   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28840 
28841   elif test "x$COMPILE_TYPE" = xreduced; then
28842     if test "x$OPENJDK_TARGET_OS" != xwindows; then
28843       # Specify -m if running reduced on other Posix platforms
28844 
28845   # When we add flags to the "official" CFLAGS etc, we need to
28846   # keep track of these additions in ADDED_CFLAGS etc. These
28847   # will later be checked to make sure only controlled additions
28848   # have been made to CFLAGS etc.
28849   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28850   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28851   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28852 
28853   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28854   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28855   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28856 
28857   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28858   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28859   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28860 
28861     fi
28862   fi
28863 
28864   # Make compilation sanity check
28865   for ac_header in stdio.h
28866 do :
28867   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28868 if test "x$ac_cv_header_stdio_h" = xyes; then :
28869   cat >>confdefs.h <<_ACEOF
28870 #define HAVE_STDIO_H 1
28871 _ACEOF
28872 
28873 else
28874 
28875     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28876 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28877     if test "x$COMPILE_TYPE" = xreduced; then
28878       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28879 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28880     elif test "x$COMPILE_TYPE" = xcross; then
28881       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28882 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28883     fi
28884     as_fn_error $? "Cannot continue." "$LINENO" 5
28885 
28886 fi
28887 
28888 done
28889 
28890 
28891   # The cast to long int works around a bug in the HP C Compiler
28892 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28893 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28894 # This bug is HP SR number 8606223364.
28895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28896 $as_echo_n "checking size of int *... " >&6; }
28897 if ${ac_cv_sizeof_int_p+:} false; then :
28898   $as_echo_n "(cached) " >&6
28899 else
28900   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28901 
28902 else
28903   if test "$ac_cv_type_int_p" = yes; then
28904      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28906 as_fn_error 77 "cannot compute sizeof (int *)
28907 See \`config.log' for more details" "$LINENO" 5; }
28908    else
28909      ac_cv_sizeof_int_p=0
28910    fi
28911 fi
28912 
28913 fi
28914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28915 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28916 
28917 
28918 
28919 cat >>confdefs.h <<_ACEOF
28920 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28921 _ACEOF
28922 
28923 
28924 
28925   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
28926   if test "x$ac_cv_sizeof_int_p" = x; then
28927     # The test failed, lets stick to the assumed value.
28928     { $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
28929 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28930   else
28931     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
28932 
28933     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28934       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
28935       # Let's try to implicitely set the compilers target architecture and retry the test
28936       { $as_echo "$as_me:${as_lineno-$LINENO}: 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)." >&5
28937 $as_echo "$as_me: 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)." >&6;}
28938       { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
28939 $as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
28940 
28941   # When we add flags to the "official" CFLAGS etc, we need to
28942   # keep track of these additions in ADDED_CFLAGS etc. These
28943   # will later be checked to make sure only controlled additions
28944   # have been made to CFLAGS etc.
28945   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28946   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28947   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28948 
28949   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28950   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28951   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28952 
28953   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28954   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28955   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28956 
28957 
28958       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
28959       unset ac_cv_sizeof_int_p
28960       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
28961       cat >>confdefs.h <<_ACEOF
28962 #undef SIZEOF_INT_P
28963 _ACEOF
28964 
28965       # The cast to long int works around a bug in the HP C Compiler
28966 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28967 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28968 # This bug is HP SR number 8606223364.
28969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28970 $as_echo_n "checking size of int *... " >&6; }
28971 if ${ac_cv_sizeof_int_p+:} false; then :
28972   $as_echo_n "(cached) " >&6
28973 else
28974   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28975 
28976 else
28977   if test "$ac_cv_type_int_p" = yes; then
28978      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28979 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28980 as_fn_error 77 "cannot compute sizeof (int *)
28981 See \`config.log' for more details" "$LINENO" 5; }
28982    else
28983      ac_cv_sizeof_int_p=0
28984    fi
28985 fi
28986 
28987 fi
28988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28989 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28990 
28991 
28992 
28993 cat >>confdefs.h <<_ACEOF
28994 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28995 _ACEOF
28996 
28997 
28998 
28999       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29000 
29001       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29002         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
29003       fi
29004     fi
29005   fi
29006 
29007   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29008 $as_echo_n "checking for target address size... " >&6; }
29009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29010 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29011 
29012 
29013   ###############################################################################
29014   #
29015   # Is the target little of big endian?
29016   #
29017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29018 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29019 if ${ac_cv_c_bigendian+:} false; then :
29020   $as_echo_n "(cached) " >&6
29021 else
29022   ac_cv_c_bigendian=unknown
29023     # See if we're dealing with a universal compiler.
29024     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29025 /* end confdefs.h.  */
29026 #ifndef __APPLE_CC__
29027                not a universal capable compiler
29028              #endif
29029              typedef int dummy;
29030 
29031 _ACEOF
29032 if ac_fn_cxx_try_compile "$LINENO"; then :
29033 
29034         # Check for potential -arch flags.  It is not universal unless
29035         # there are at least two -arch flags with different values.
29036         ac_arch=
29037         ac_prev=
29038         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29039          if test -n "$ac_prev"; then
29040            case $ac_word in
29041              i?86 | x86_64 | ppc | ppc64)
29042                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29043                  ac_arch=$ac_word
29044                else
29045                  ac_cv_c_bigendian=universal
29046                  break
29047                fi
29048                ;;
29049            esac
29050            ac_prev=
29051          elif test "x$ac_word" = "x-arch"; then
29052            ac_prev=arch
29053          fi
29054        done
29055 fi
29056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29057     if test $ac_cv_c_bigendian = unknown; then
29058       # See if sys/param.h defines the BYTE_ORDER macro.
29059       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29060 /* end confdefs.h.  */
29061 #include <sys/types.h>
29062              #include <sys/param.h>
29063 
29064 int
29065 main ()
29066 {
29067 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29068                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29069                      && LITTLE_ENDIAN)
29070               bogus endian macros
29071              #endif
29072 
29073   ;
29074   return 0;
29075 }
29076 _ACEOF
29077 if ac_fn_cxx_try_compile "$LINENO"; then :
29078   # It does; now see whether it defined to BIG_ENDIAN or not.
29079          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29080 /* end confdefs.h.  */
29081 #include <sys/types.h>
29082                 #include <sys/param.h>
29083 
29084 int
29085 main ()
29086 {
29087 #if BYTE_ORDER != BIG_ENDIAN
29088                  not big endian
29089                 #endif
29090 
29091   ;
29092   return 0;
29093 }
29094 _ACEOF
29095 if ac_fn_cxx_try_compile "$LINENO"; then :
29096   ac_cv_c_bigendian=yes
29097 else
29098   ac_cv_c_bigendian=no
29099 fi
29100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29101 fi
29102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29103     fi
29104     if test $ac_cv_c_bigendian = unknown; then
29105       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29106       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29107 /* end confdefs.h.  */
29108 #include <limits.h>
29109 
29110 int
29111 main ()
29112 {
29113 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29114               bogus endian macros
29115              #endif
29116 
29117   ;
29118   return 0;
29119 }
29120 _ACEOF
29121 if ac_fn_cxx_try_compile "$LINENO"; then :
29122   # It does; now see whether it defined to _BIG_ENDIAN or not.
29123          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29124 /* end confdefs.h.  */
29125 #include <limits.h>
29126 
29127 int
29128 main ()
29129 {
29130 #ifndef _BIG_ENDIAN
29131                  not big endian
29132                 #endif
29133 
29134   ;
29135   return 0;
29136 }
29137 _ACEOF
29138 if ac_fn_cxx_try_compile "$LINENO"; then :
29139   ac_cv_c_bigendian=yes
29140 else
29141   ac_cv_c_bigendian=no
29142 fi
29143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29144 fi
29145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29146     fi
29147     if test $ac_cv_c_bigendian = unknown; then
29148       # Compile a test program.
29149       if test "$cross_compiling" = yes; then :
29150   # Try to guess by grepping values from an object file.
29151          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29152 /* end confdefs.h.  */
29153 short int ascii_mm[] =
29154                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29155                 short int ascii_ii[] =
29156                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29157                 int use_ascii (int i) {
29158                   return ascii_mm[i] + ascii_ii[i];
29159                 }
29160                 short int ebcdic_ii[] =
29161                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29162                 short int ebcdic_mm[] =
29163                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29164                 int use_ebcdic (int i) {
29165                   return ebcdic_mm[i] + ebcdic_ii[i];
29166                 }
29167                 extern int foo;
29168 
29169 int
29170 main ()
29171 {
29172 return use_ascii (foo) == use_ebcdic (foo);
29173   ;
29174   return 0;
29175 }
29176 _ACEOF
29177 if ac_fn_cxx_try_compile "$LINENO"; then :
29178   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29179               ac_cv_c_bigendian=yes
29180             fi
29181             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29182               if test "$ac_cv_c_bigendian" = unknown; then
29183                 ac_cv_c_bigendian=no
29184               else
29185                 # finding both strings is unlikely to happen, but who knows?
29186                 ac_cv_c_bigendian=unknown
29187               fi
29188             fi
29189 fi
29190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29191 else
29192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29193 /* end confdefs.h.  */
29194 $ac_includes_default
29195 int
29196 main ()
29197 {
29198 
29199              /* Are we little or big endian?  From Harbison&Steele.  */
29200              union
29201              {
29202                long int l;
29203                char c[sizeof (long int)];
29204              } u;
29205              u.l = 1;
29206              return u.c[sizeof (long int) - 1] == 1;
29207 
29208   ;
29209   return 0;
29210 }
29211 _ACEOF
29212 if ac_fn_cxx_try_run "$LINENO"; then :
29213   ac_cv_c_bigendian=no
29214 else
29215   ac_cv_c_bigendian=yes
29216 fi
29217 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29218   conftest.$ac_objext conftest.beam conftest.$ac_ext
29219 fi
29220 
29221     fi
29222 fi
29223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29224 $as_echo "$ac_cv_c_bigendian" >&6; }
29225  case $ac_cv_c_bigendian in #(
29226    yes)
29227      ENDIAN="big";; #(
29228    no)
29229      ENDIAN="little" ;; #(
29230    universal)
29231      ENDIAN="universal_endianness"
29232      ;; #(
29233    *)
29234      ENDIAN="unknown" ;;
29235  esac
29236 
29237 
29238   if test "x$ENDIAN" = xuniversal_endianness; then
29239     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29240   fi
29241   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29242     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
29243   fi
29244 
29245 
29246 # Configure flags for the tools
29247 
29248 
29249   ###############################################################################
29250   #
29251   # How to compile shared libraries.
29252   #
29253 
29254   if test "x$GCC" = xyes; then
29255     COMPILER_NAME=gcc
29256     PICFLAG="-fPIC"
29257     LIBRARY_PREFIX=lib
29258     SHARED_LIBRARY='lib$1.so'
29259     STATIC_LIBRARY='lib$1.a'
29260     SHARED_LIBRARY_FLAGS="-shared"
29261     SHARED_LIBRARY_SUFFIX='.so'
29262     STATIC_LIBRARY_SUFFIX='.a'
29263     OBJ_SUFFIX='.o'
29264     EXE_SUFFIX=''
29265     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29266     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29267     C_FLAG_REORDER=''
29268     CXX_FLAG_REORDER=''
29269     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29270     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29271     LD="$CC"
29272     LDEXE="$CC"
29273     LDCXX="$CXX"
29274     LDEXECXX="$CXX"
29275     POST_STRIP_CMD="$STRIP -g"
29276 
29277     # Linking is different on MacOSX
29278     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29279       # Might change in the future to clang.
29280       COMPILER_NAME=gcc
29281       SHARED_LIBRARY='lib$1.dylib'
29282       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29283       SHARED_LIBRARY_SUFFIX='.dylib'
29284       EXE_SUFFIX=''
29285       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29286       SET_SHARED_LIBRARY_MAPFILE=''
29287       SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29288       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29289       POST_STRIP_CMD="$STRIP -S"
29290     fi
29291   else
29292     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29293       # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29294       COMPILER_NAME=ossc
29295       PICFLAG="-KPIC"
29296       LIBRARY_PREFIX=lib
29297       SHARED_LIBRARY='lib$1.so'
29298       STATIC_LIBRARY='lib$1.a'
29299       SHARED_LIBRARY_FLAGS="-G"
29300       SHARED_LIBRARY_SUFFIX='.so'
29301       STATIC_LIBRARY_SUFFIX='.a'
29302       OBJ_SUFFIX='.o'
29303       EXE_SUFFIX=''
29304       SET_SHARED_LIBRARY_NAME=''
29305       SET_SHARED_LIBRARY_MAPFILE='-M$1'
29306       C_FLAG_REORDER='-xF'
29307       CXX_FLAG_REORDER='-xF'
29308       SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29309       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29310       CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29311       CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29312       CFLAGS_JDKLIB_EXTRA='-xstrconst'
29313       POST_STRIP_CMD="$STRIP -x"
29314       POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29315     fi
29316     if test "x$OPENJDK_TARGET_OS" = xaix; then
29317         COMPILER_NAME=xlc
29318         PICFLAG="-qpic=large"
29319         LIBRARY_PREFIX=lib
29320         SHARED_LIBRARY='lib$1.so'
29321         STATIC_LIBRARY='lib$1.a'
29322         SHARED_LIBRARY_FLAGS="-qmkshrobj"
29323         SHARED_LIBRARY_SUFFIX='.so'
29324         STATIC_LIBRARY_SUFFIX='.a'
29325         OBJ_SUFFIX='.o'
29326         EXE_SUFFIX=''
29327         SET_SHARED_LIBRARY_NAME=''
29328         SET_SHARED_LIBRARY_MAPFILE=''
29329         C_FLAG_REORDER=''
29330         CXX_FLAG_REORDER=''
29331         SET_SHARED_LIBRARY_ORIGIN=''
29332         SET_EXECUTABLE_ORIGIN=""
29333         CFLAGS_JDK=""
29334         CXXFLAGS_JDK=""
29335         CFLAGS_JDKLIB_EXTRA=''
29336         POST_STRIP_CMD="$STRIP -X32_64"
29337         POST_MCS_CMD=""
29338     fi
29339     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29340       # If it is not gcc, then assume it is the MS Visual Studio compiler
29341       COMPILER_NAME=cl
29342       PICFLAG=""
29343       LIBRARY_PREFIX=
29344       SHARED_LIBRARY='$1.dll'
29345       STATIC_LIBRARY='$1.lib'
29346       SHARED_LIBRARY_FLAGS="-LD"
29347       SHARED_LIBRARY_SUFFIX='.dll'
29348       STATIC_LIBRARY_SUFFIX='.lib'
29349       OBJ_SUFFIX='.obj'
29350       EXE_SUFFIX='.exe'
29351       SET_SHARED_LIBRARY_NAME=''
29352       SET_SHARED_LIBRARY_MAPFILE=''
29353       SET_SHARED_LIBRARY_ORIGIN=''
29354       SET_EXECUTABLE_ORIGIN=''
29355     fi
29356   fi
29357 
29358 
29359 
29360 
29361 
29362 
29363 
29364 
29365 
29366 
29367 
29368 
29369 
29370 
29371 
29372 
29373 
29374 
29375 
29376   # The (cross) compiler is now configured, we can now test capabilities
29377   # of the target platform.
29378 
29379 
29380 
29381   ###############################################################################
29382   #
29383   # Setup the opt flags for different compilers
29384   # and different operating systems.
29385   #
29386 
29387   #
29388   # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29389   #
29390   if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29391     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29392     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29393     CFLAGS="$CFLAGS -mstackrealign"
29394     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29395 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29396     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29397 /* end confdefs.h.  */
29398 int main() { return 0; }
29399 _ACEOF
29400 if ac_fn_cxx_try_link "$LINENO"; then :
29401 
29402           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29403 $as_echo "yes" >&6; }
29404 
29405 else
29406 
29407           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29408 $as_echo "no" >&6; }
29409           as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29410 
29411 
29412 fi
29413 rm -f core conftest.err conftest.$ac_objext \
29414     conftest$ac_exeext conftest.$ac_ext
29415   fi
29416 
29417   C_FLAG_DEPS="-MMD -MF"
29418   CXX_FLAG_DEPS="-MMD -MF"
29419 
29420   case $COMPILER_TYPE in
29421     CC )
29422       case $COMPILER_NAME in
29423         gcc )
29424           case $OPENJDK_TARGET_OS in
29425             macosx )
29426               # On MacOSX we optimize for size, something
29427               # we should do for all platforms?
29428               C_O_FLAG_HI="-Os"
29429               C_O_FLAG_NORM="-Os"
29430               C_O_FLAG_NONE=""
29431               ;;
29432             *)
29433               C_O_FLAG_HI="-O3"
29434               C_O_FLAG_NORM="-O2"
29435               C_O_FLAG_NONE="-O0"
29436               ;;
29437           esac
29438           CXX_O_FLAG_HI="$C_O_FLAG_HI"
29439           CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29440           CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29441           CFLAGS_DEBUG_SYMBOLS="-g"
29442           CXXFLAGS_DEBUG_SYMBOLS="-g"
29443           if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29444             CFLAGS_DEBUG_SYMBOLS="-g1"
29445             CXXFLAGS_DEBUG_SYMBOLS="-g1"
29446           fi
29447           ;;
29448         ossc )
29449           #
29450           # Forte has different names for this with their C++ compiler...
29451           #
29452           C_FLAG_DEPS="-xMMD -xMF"
29453           CXX_FLAG_DEPS="-xMMD -xMF"
29454 
29455           # Extra options used with HIGHEST
29456           #
29457           # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29458           #          done with care, there are some assumptions below that need to
29459           #          be understood about the use of pointers, and IEEE behavior.
29460           #
29461           # Use non-standard floating point mode (not IEEE 754)
29462           CC_HIGHEST="$CC_HIGHEST -fns"
29463           # Do some simplification of floating point arithmetic (not IEEE 754)
29464           CC_HIGHEST="$CC_HIGHEST -fsimple"
29465           # Use single precision floating point with 'float'
29466           CC_HIGHEST="$CC_HIGHEST -fsingle"
29467           # Assume memory references via basic pointer types do not alias
29468           #   (Source with excessing pointer casting and data access with mixed
29469           #    pointer types are not recommended)
29470           CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29471           # Use intrinsic or inline versions for math/std functions
29472           #   (If you expect perfect errno behavior, do not use this)
29473           CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29474           # Loop data dependency optimizations (need -xO3 or higher)
29475           CC_HIGHEST="$CC_HIGHEST -xdepend"
29476           # Pointer parameters to functions do not overlap
29477           #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29478           #    If you pass in multiple pointers to the same data, do not use this)
29479           CC_HIGHEST="$CC_HIGHEST -xrestrict"
29480           # Inline some library routines
29481           #   (If you expect perfect errno behavior, do not use this)
29482           CC_HIGHEST="$CC_HIGHEST -xlibmil"
29483           # Use optimized math routines
29484           #   (If you expect perfect errno behavior, do not use this)
29485           #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29486           #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29487 
29488           if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29489             CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29490             CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29491           fi
29492 
29493           case $OPENJDK_TARGET_CPU_ARCH in
29494             x86)
29495               C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29496               C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29497               C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29498               C_O_FLAG_NONE="-xregs=no%frameptr"
29499               CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29500               CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29501               CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29502               CXX_O_FLAG_NONE="-xregs=no%frameptr"
29503               if test "x$OPENJDK_TARGET_CPU" = xx86; then
29504                 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29505                 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29506               fi
29507               ;;
29508             sparc)
29509               CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29510               CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29511               C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29512               C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29513               C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29514               C_O_FLAG_NONE=""
29515               CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29516               CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29517               CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29518               CXX_O_FLAG_NONE=""
29519               ;;
29520           esac
29521 
29522           CFLAGS_DEBUG_SYMBOLS="-g -xs"
29523           CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29524           ;;
29525         xlc )
29526           C_FLAG_DEPS="-qmakedep=gcc -MF"
29527           CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29528           C_O_FLAG_HIGHEST="-O3"
29529           C_O_FLAG_HI="-O3 -qstrict"
29530           C_O_FLAG_NORM="-O2"
29531           C_O_FLAG_NONE=""
29532           CXX_O_FLAG_HIGHEST="-O3"
29533           CXX_O_FLAG_HI="-O3 -qstrict"
29534           CXX_O_FLAG_NORM="-O2"
29535           CXX_O_FLAG_NONE=""
29536           CFLAGS_DEBUG_SYMBOLS="-g"
29537           CXXFLAGS_DEBUG_SYMBOLS="-g"
29538           LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29539           CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29540           CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29541           ;;
29542       esac
29543       ;;
29544     CL )
29545       C_O_FLAG_HIGHEST="-O2"
29546       C_O_FLAG_HI="-O1"
29547       C_O_FLAG_NORM="-O1"
29548       C_O_FLAG_NONE="-Od"
29549       CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29550       CXX_O_FLAG_HI="$C_O_FLAG_HI"
29551       CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29552       CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29553       ;;
29554   esac
29555 
29556   if test -z "$C_O_FLAG_HIGHEST"; then
29557     C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29558   fi
29559 
29560   if test -z "$CXX_O_FLAG_HIGHEST"; then
29561     CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29562   fi
29563 
29564 
29565 
29566 
29567 
29568 
29569 
29570 
29571 
29572 
29573 
29574 
29575 
29576 
29577   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29578     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29579 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29580   fi
29581 
29582   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29583     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29584 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29585   fi
29586 
29587   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29588     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29589 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29590   fi
29591 
29592 
29593 # Check whether --with-extra-cflags was given.
29594 if test "${with_extra_cflags+set}" = set; then :
29595   withval=$with_extra_cflags;
29596 fi
29597 
29598 
29599 
29600 # Check whether --with-extra-cxxflags was given.
29601 if test "${with_extra_cxxflags+set}" = set; then :
29602   withval=$with_extra_cxxflags;
29603 fi
29604 
29605 
29606 
29607 # Check whether --with-extra-ldflags was given.
29608 if test "${with_extra_ldflags+set}" = set; then :
29609   withval=$with_extra_ldflags;
29610 fi
29611 
29612 
29613   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29614   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29615   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29616 
29617   # Hotspot needs these set in their legacy form
29618   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29619   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29620   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29621 
29622 
29623 
29624 
29625 
29626   ###############################################################################
29627   #
29628   # Now setup the CFLAGS and LDFLAGS for the JDK build.
29629   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29630   #
29631   case $COMPILER_NAME in
29632     gcc )
29633       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29634       -pipe \
29635       -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29636       case $OPENJDK_TARGET_CPU_ARCH in
29637         arm )
29638           # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29639           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29640           ;;
29641         ppc )
29642           # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29643           ;;
29644         * )
29645           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29646           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29647           ;;
29648       esac
29649       ;;
29650     ossc )
29651       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29652       case $OPENJDK_TARGET_CPU_ARCH in
29653         x86 )
29654           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29655           CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29656           ;;
29657       esac
29658 
29659       CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29660       CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29661 
29662       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29663       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29664       ;;
29665     xlc )
29666       CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29667       CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29668 
29669       LDFLAGS_JDK="$LDFLAGS_JDK"
29670       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29671       ;;
29672     cl )
29673       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29674       -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29675       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29676       -DWIN32 -DIAL"
29677       case $OPENJDK_TARGET_CPU in
29678         x86 )
29679           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29680           ;;
29681         x86_64 )
29682           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29683           ;;
29684       esac
29685       ;;
29686   esac
29687 
29688   ###############################################################################
29689 
29690   # Adjust flags according to debug level.
29691   case $DEBUG_LEVEL in
29692     fastdebug )
29693       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29694       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29695       C_O_FLAG_HI="$C_O_FLAG_NORM"
29696       C_O_FLAG_NORM="$C_O_FLAG_NORM"
29697       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29698       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29699       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29700       ;;
29701     slowdebug )
29702       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29703       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29704       C_O_FLAG_HI="$C_O_FLAG_NONE"
29705       C_O_FLAG_NORM="$C_O_FLAG_NONE"
29706       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29707       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29708       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29709       ;;
29710   esac
29711 
29712   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29713 
29714   # The package path is used only on macosx?
29715   PACKAGE_PATH=/opt/local
29716 
29717 
29718   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29719     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29720     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29721     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29722     #   Note: -Dmacro         is the same as    #define macro 1
29723     #         -Dmacro=        is the same as    #define macro
29724     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29725       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29726     else
29727       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29728     fi
29729   else
29730     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29731   fi
29732   if test "x$OPENJDK_TARGET_OS" = xlinux; then
29733     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29734   fi
29735   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29736     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29737   fi
29738   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29739     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29740   fi
29741   if test "x$OPENJDK_TARGET_OS" = xaix; then
29742     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29743   fi
29744   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29745     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29746     # Setting these parameters makes it an error to link to macosx APIs that are
29747     # newer than the given OS version and makes the linked binaries compatible even
29748     # if built on a newer version of the OS.
29749     # The expected format is X.Y.Z
29750     MACOSX_VERSION_MIN=10.7.0
29751 
29752     # The macro takes the version with no dots, ex: 1070
29753     # Let the flags variables get resolved in make for easier override on make
29754     # command line.
29755     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29756     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29757   fi
29758   if test "x$OPENJDK_TARGET_OS" = xbsd; then
29759     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29760   fi
29761   if test "x$DEBUG_LEVEL" = xrelease; then
29762     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29763   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29764     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29765   fi
29766   else
29767     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29768   fi
29769 
29770   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29771   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29772 
29773   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29774       -I${JDK_OUTPUTDIR}/include \
29775       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29776       -I${JDK_TOPDIR}/src/share/javavm/export \
29777       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29778       -I${JDK_TOPDIR}/src/share/native/common \
29779       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29780 
29781   # The shared libraries are compiled using the picflag.
29782   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29783   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29784 
29785   # Executable flags
29786   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29787   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29788 
29789   # Now this is odd. The JDK native libraries have to link against libjvm.so
29790   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29791   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29792   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29793   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29794   # libraries will link to whatever is in memory. Yuck.
29795   #
29796   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29797   if test "x$COMPILER_NAME" = xcl; then
29798     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29799     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29800       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29801     fi
29802     # TODO: make -debug optional "--disable-full-debug-symbols"
29803     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29804     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29805     LDFLAGS_JDKLIB_SUFFIX=""
29806     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29807       LDFLAGS_STACK_SIZE=1048576
29808     else
29809       LDFLAGS_STACK_SIZE=327680
29810     fi
29811     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29812   else
29813     if test "x$COMPILER_NAME" = xgcc; then
29814       # If this is a --hash-style=gnu system, use --hash-style=both, why?
29815       HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29816       if test -n "$HAS_GNU_HASH"; then
29817         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29818       fi
29819       if test "x$OPENJDK_TARGET_OS" = xlinux; then
29820         # And since we now know that the linker is gnu, then add -z defs, to forbid
29821         # undefined symbols in object files.
29822         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29823         if test "x$DEBUG_LEVEL" = "xrelease"; then
29824           # When building release libraries, tell the linker optimize them.
29825           # Should this be supplied to the OSS linker as well?
29826           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29827         fi
29828       fi
29829     fi
29830     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29831         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29832 
29833     # On some platforms (mac) the linker warns about non existing -L dirs.
29834     # Add server first if available. Linking aginst client does not always produce the same results.
29835     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29836     # Default to server for other variants.
29837     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29838       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29839     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29840       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29841     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29842       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29843     else
29844       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29845     fi
29846 
29847     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29848     if test "x$COMPILER_NAME" = xossc; then
29849       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29850     fi
29851 
29852     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29853     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29854       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29855     fi
29856   fi
29857 
29858 
29859 
29860 
29861 
29862 
29863 
29864 
29865 
29866 
29867 
29868 
29869 
29870 
29871 
29872   # Some Zero and Shark settings.
29873   # ZERO_ARCHFLAG tells the compiler which mode to build for
29874   case "${OPENJDK_TARGET_CPU}" in
29875     s390)
29876       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
29877       ;;
29878     *)
29879       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29880   esac
29881 
29882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29883 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29884   supports=yes
29885 
29886   saved_cflags="$CFLAGS"
29887   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29888   ac_ext=c
29889 ac_cpp='$CPP $CPPFLAGS'
29890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29893 
29894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29895 /* end confdefs.h.  */
29896 int i;
29897 _ACEOF
29898 if ac_fn_c_try_compile "$LINENO"; then :
29899 
29900 else
29901   supports=no
29902 fi
29903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29904   ac_ext=cpp
29905 ac_cpp='$CXXCPP $CPPFLAGS'
29906 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29907 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29908 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29909 
29910   CFLAGS="$saved_cflags"
29911 
29912   saved_cxxflags="$CXXFLAGS"
29913   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29914   ac_ext=cpp
29915 ac_cpp='$CXXCPP $CPPFLAGS'
29916 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29917 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29918 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29919 
29920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29921 /* end confdefs.h.  */
29922 int i;
29923 _ACEOF
29924 if ac_fn_cxx_try_compile "$LINENO"; then :
29925 
29926 else
29927   supports=no
29928 fi
29929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29930   ac_ext=cpp
29931 ac_cpp='$CXXCPP $CPPFLAGS'
29932 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29933 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29934 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29935 
29936   CXXFLAGS="$saved_cxxflags"
29937 
29938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29939 $as_echo "$supports" >&6; }
29940   if test "x$supports" = "xyes" ; then
29941     :
29942   else
29943     ZERO_ARCHFLAG=""
29944   fi
29945 
29946 
29947 
29948   # Check that the compiler supports -mX (or -qX on AIX) flags
29949   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29950 
29951   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
29952 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29953   supports=yes
29954 
29955   saved_cflags="$CFLAGS"
29956   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29957   ac_ext=c
29958 ac_cpp='$CPP $CPPFLAGS'
29959 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29960 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29961 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29962 
29963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29964 /* end confdefs.h.  */
29965 int i;
29966 _ACEOF
29967 if ac_fn_c_try_compile "$LINENO"; then :
29968 
29969 else
29970   supports=no
29971 fi
29972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29973   ac_ext=cpp
29974 ac_cpp='$CXXCPP $CPPFLAGS'
29975 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29976 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29977 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29978 
29979   CFLAGS="$saved_cflags"
29980 
29981   saved_cxxflags="$CXXFLAGS"
29982   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29983   ac_ext=cpp
29984 ac_cpp='$CXXCPP $CPPFLAGS'
29985 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29986 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29987 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29988 
29989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29990 /* end confdefs.h.  */
29991 int i;
29992 _ACEOF
29993 if ac_fn_cxx_try_compile "$LINENO"; then :
29994 
29995 else
29996   supports=no
29997 fi
29998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29999   ac_ext=cpp
30000 ac_cpp='$CXXCPP $CPPFLAGS'
30001 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30002 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30003 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30004 
30005   CXXFLAGS="$saved_cxxflags"
30006 
30007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30008 $as_echo "$supports" >&6; }
30009   if test "x$supports" = "xyes" ; then
30010     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30011   else
30012     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30013   fi
30014 
30015 
30016 
30017 
30018   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30019   USING_BROKEN_SUSE_LD=no
30020   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30022 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30023     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30024     echo "int main() { }" > main.c
30025     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30026       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30027 $as_echo "no" >&6; }
30028       USING_BROKEN_SUSE_LD=no
30029     else
30030       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30031 $as_echo "yes" >&6; }
30032       USING_BROKEN_SUSE_LD=yes
30033     fi
30034     rm -rf version-script.map main.c
30035   fi
30036 
30037 
30038 
30039 # Setup debug symbols (need objcopy from the toolchain for that)
30040 
30041   #
30042   # ENABLE_DEBUG_SYMBOLS
30043   # This must be done after the toolchain is setup, since we're looking at objcopy.
30044   #
30045   # Check whether --enable-debug-symbols was given.
30046 if test "${enable_debug_symbols+set}" = set; then :
30047   enableval=$enable_debug_symbols;
30048 fi
30049 
30050 
30051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30052 $as_echo_n "checking if we should generate debug symbols... " >&6; }
30053 
30054   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30055     # explicit enabling of enable-debug-symbols and can't find objcopy
30056     #   this is an error
30057     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30058   fi
30059 
30060   if test "x$enable_debug_symbols" = "xyes"; then
30061     ENABLE_DEBUG_SYMBOLS=true
30062   elif test "x$enable_debug_symbols" = "xno"; then
30063     ENABLE_DEBUG_SYMBOLS=false
30064   else
30065     # Default is on if objcopy is found
30066     if test "x$OBJCOPY" != x; then
30067       ENABLE_DEBUG_SYMBOLS=true
30068     # MacOS X and Windows don't use objcopy but default is on for those OSes
30069     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30070       ENABLE_DEBUG_SYMBOLS=true
30071     else
30072       ENABLE_DEBUG_SYMBOLS=false
30073     fi
30074   fi
30075 
30076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30077 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30078 
30079   #
30080   # ZIP_DEBUGINFO_FILES
30081   #
30082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30083 $as_echo_n "checking if we should zip debug-info files... " >&6; }
30084   # Check whether --enable-zip-debug-info was given.
30085 if test "${enable_zip_debug_info+set}" = set; then :
30086   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30087 else
30088   enable_zip_debug_info="yes"
30089 fi
30090 
30091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30092 $as_echo "${enable_zip_debug_info}" >&6; }
30093 
30094   if test "x${enable_zip_debug_info}" = "xno"; then
30095     ZIP_DEBUGINFO_FILES=false
30096   else
30097     ZIP_DEBUGINFO_FILES=true
30098   fi
30099 
30100 
30101 
30102 
30103 
30104 
30105 
30106 ###############################################################################
30107 #
30108 # Check dependencies for external and internal libraries.
30109 #
30110 ###############################################################################
30111 
30112 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30113 
30114   # When using cygwin or msys, we need a wrapper binary that renames
30115   # /cygdrive/c/ arguments into c:/ arguments and peeks into
30116   # @files and rewrites these too! This wrapper binary is
30117   # called fixpath.
30118   FIXPATH=
30119   if test "x$OPENJDK_BUILD_OS" = xwindows; then
30120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30121 $as_echo_n "checking if fixpath can be created... " >&6; }
30122     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30123     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30124     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30125       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30126       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30127       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30128       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30129     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30130       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30131       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30132 
30133       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30134       # @ was chosen as separator to minimize risk of other tools messing around with it
30135       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30136       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30137 
30138       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30139     fi
30140     rm -f $OUTPUT_ROOT/fixpath*
30141     cd $OUTPUT_ROOT
30142     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30143     cd $CURDIR
30144 
30145     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30146       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30147 $as_echo "no" >&6; }
30148       cat $OUTPUT_ROOT/fixpath1.log
30149       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30150     fi
30151     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30152 $as_echo "yes" >&6; }
30153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30154 $as_echo_n "checking if fixpath.exe works... " >&6; }
30155     cd $OUTPUT_ROOT
30156     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30157     cd $CURDIR
30158     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30159       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30160 $as_echo "no" >&6; }
30161       cat $OUTPUT_ROOT/fixpath2.log
30162       as_fn_error $? "fixpath did not work!" "$LINENO" 5
30163     fi
30164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30165 $as_echo "yes" >&6; }
30166     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30167   fi
30168 
30169 
30170 
30171 
30172 
30173 
30174   ###############################################################################
30175   #
30176   # OS specific settings that we never will need to probe.
30177   #
30178   if test "x$OPENJDK_TARGET_OS" = xlinux; then
30179     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30180 $as_echo_n "checking what is not needed on Linux?... " >&6; }
30181     PULSE_NOT_NEEDED=yes
30182     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30183 $as_echo "pulse" >&6; }
30184   fi
30185 
30186   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30188 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
30189     ALSA_NOT_NEEDED=yes
30190     PULSE_NOT_NEEDED=yes
30191     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30192 $as_echo "alsa pulse" >&6; }
30193   fi
30194 
30195   if test "x$OPENJDK_TARGET_OS" = xaix; then
30196     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30197 $as_echo_n "checking what is not needed on AIX?... " >&6; }
30198     ALSA_NOT_NEEDED=yes
30199     PULSE_NOT_NEEDED=yes
30200     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30201 $as_echo "alsa pulse" >&6; }
30202   fi
30203 
30204 
30205   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30206     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30207 $as_echo_n "checking what is not needed on Windows?... " >&6; }
30208     CUPS_NOT_NEEDED=yes
30209     ALSA_NOT_NEEDED=yes
30210     PULSE_NOT_NEEDED=yes
30211     X11_NOT_NEEDED=yes
30212     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30213 $as_echo "alsa cups pulse x11" >&6; }
30214   fi
30215 
30216   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30218 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30219     ALSA_NOT_NEEDED=yes
30220     PULSE_NOT_NEEDED=yes
30221     X11_NOT_NEEDED=yes
30222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30223 $as_echo "alsa pulse x11" >&6; }
30224   fi
30225 
30226   if test "x$OPENJDK_TARGET_OS" = xbsd; then
30227     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30228 $as_echo_n "checking what is not needed on bsd?... " >&6; }
30229     ALSA_NOT_NEEDED=yes
30230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30231 $as_echo "alsa" >&6; }
30232   fi
30233 
30234   if test "x$OPENJDK" = "xfalse"; then
30235     FREETYPE_NOT_NEEDED=yes
30236   fi
30237 
30238   if test "x$SUPPORT_HEADFUL" = xno; then
30239     X11_NOT_NEEDED=yes
30240   fi
30241 
30242   # Deprecated and now ignored
30243 
30244   # Check whether --enable-macosx-runtime-support was given.
30245 if test "${enable_macosx_runtime_support+set}" = set; then :
30246   enableval=$enable_macosx_runtime_support;
30247 fi
30248 
30249   if test "x$enable_macosx_runtime_support" != x; then
30250     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30251 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30252   fi
30253 
30254 
30255 
30256 
30257   ###############################################################################
30258   #
30259   # Check for X Windows
30260   #
30261 
30262   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30263   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30264   # --x-libraries for the sysroot, if that seems to be correct.
30265   if test "x$SYS_ROOT" != "x/"; then
30266     if test "x$x_includes" = xNONE; then
30267       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30268         x_includes="$SYS_ROOT/usr/X11R6/include"
30269       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30270         x_includes="$SYS_ROOT/usr/include"
30271       fi
30272     fi
30273     if test "x$x_libraries" = xNONE; then
30274       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30275         x_libraries="$SYS_ROOT/usr/X11R6/lib"
30276       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30277         x_libraries="$SYS_ROOT/usr/lib64"
30278       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30279         x_libraries="$SYS_ROOT/usr/lib"
30280       fi
30281     fi
30282   fi
30283 
30284   # Now let autoconf do it's magic
30285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30286 $as_echo_n "checking for X... " >&6; }
30287 
30288 
30289 # Check whether --with-x was given.
30290 if test "${with_x+set}" = set; then :
30291   withval=$with_x;
30292 fi
30293 
30294 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30295 if test "x$with_x" = xno; then
30296   # The user explicitly disabled X.
30297   have_x=disabled
30298 else
30299   case $x_includes,$x_libraries in #(
30300     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30301     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30302   $as_echo_n "(cached) " >&6
30303 else
30304   # One or both of the vars are not set, and there is no cached value.
30305 ac_x_includes=no ac_x_libraries=no
30306 rm -f -r conftest.dir
30307 if mkdir conftest.dir; then
30308   cd conftest.dir
30309   cat >Imakefile <<'_ACEOF'
30310 incroot:
30311         @echo incroot='${INCROOT}'
30312 usrlibdir:
30313         @echo usrlibdir='${USRLIBDIR}'
30314 libdir:
30315         @echo libdir='${LIBDIR}'
30316 _ACEOF
30317   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30318     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30319     for ac_var in incroot usrlibdir libdir; do
30320       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30321     done
30322     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30323     for ac_extension in a so sl dylib la dll; do
30324       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30325          test -f "$ac_im_libdir/libX11.$ac_extension"; then
30326         ac_im_usrlibdir=$ac_im_libdir; break
30327       fi
30328     done
30329     # Screen out bogus values from the imake configuration.  They are
30330     # bogus both because they are the default anyway, and because
30331     # using them would break gcc on systems where it needs fixed includes.
30332     case $ac_im_incroot in
30333         /usr/include) ac_x_includes= ;;
30334         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30335     esac
30336     case $ac_im_usrlibdir in
30337         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
30338         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30339     esac
30340   fi
30341   cd ..
30342   rm -f -r conftest.dir
30343 fi
30344 
30345 # Standard set of common directories for X headers.
30346 # Check X11 before X11Rn because it is often a symlink to the current release.
30347 ac_x_header_dirs='
30348 /usr/X11/include
30349 /usr/X11R7/include
30350 /usr/X11R6/include
30351 /usr/X11R5/include
30352 /usr/X11R4/include
30353 
30354 /usr/include/X11
30355 /usr/include/X11R7
30356 /usr/include/X11R6
30357 /usr/include/X11R5
30358 /usr/include/X11R4
30359 
30360 /usr/local/X11/include
30361 /usr/local/X11R7/include
30362 /usr/local/X11R6/include
30363 /usr/local/X11R5/include
30364 /usr/local/X11R4/include
30365 
30366 /usr/local/include/X11
30367 /usr/local/include/X11R7
30368 /usr/local/include/X11R6
30369 /usr/local/include/X11R5
30370 /usr/local/include/X11R4
30371 
30372 /usr/X386/include
30373 /usr/x386/include
30374 /usr/XFree86/include/X11
30375 
30376 /usr/include
30377 /usr/local/include
30378 /usr/unsupported/include
30379 /usr/athena/include
30380 /usr/local/x11r5/include
30381 /usr/lpp/Xamples/include
30382 
30383 /usr/openwin/include
30384 /usr/openwin/share/include'
30385 
30386 if test "$ac_x_includes" = no; then
30387   # Guess where to find include files, by looking for Xlib.h.
30388   # First, try using that file with no special directory specified.
30389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30390 /* end confdefs.h.  */
30391 #include <X11/Xlib.h>
30392 _ACEOF
30393 if ac_fn_cxx_try_cpp "$LINENO"; then :
30394   # We can compile using X headers with no special include directory.
30395 ac_x_includes=
30396 else
30397   for ac_dir in $ac_x_header_dirs; do
30398   if test -r "$ac_dir/X11/Xlib.h"; then
30399     ac_x_includes=$ac_dir
30400     break
30401   fi
30402 done
30403 fi
30404 rm -f conftest.err conftest.i conftest.$ac_ext
30405 fi # $ac_x_includes = no
30406 
30407 if test "$ac_x_libraries" = no; then
30408   # Check for the libraries.
30409   # See if we find them without any special options.
30410   # Don't add to $LIBS permanently.
30411   ac_save_LIBS=$LIBS
30412   LIBS="-lX11 $LIBS"
30413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30414 /* end confdefs.h.  */
30415 #include <X11/Xlib.h>
30416 int
30417 main ()
30418 {
30419 XrmInitialize ()
30420   ;
30421   return 0;
30422 }
30423 _ACEOF
30424 if ac_fn_cxx_try_link "$LINENO"; then :
30425   LIBS=$ac_save_LIBS
30426 # We can link X programs with no special library path.
30427 ac_x_libraries=
30428 else
30429   LIBS=$ac_save_LIBS
30430 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30431 do
30432   # Don't even attempt the hair of trying to link an X program!
30433   for ac_extension in a so sl dylib la dll; do
30434     if test -r "$ac_dir/libX11.$ac_extension"; then
30435       ac_x_libraries=$ac_dir
30436       break 2
30437     fi
30438   done
30439 done
30440 fi
30441 rm -f core conftest.err conftest.$ac_objext \
30442     conftest$ac_exeext conftest.$ac_ext
30443 fi # $ac_x_libraries = no
30444 
30445 case $ac_x_includes,$ac_x_libraries in #(
30446   no,* | *,no | *\'*)
30447     # Didn't find X, or a directory has "'" in its name.
30448     ac_cv_have_x="have_x=no";; #(
30449   *)
30450     # Record where we found X for the cache.
30451     ac_cv_have_x="have_x=yes\
30452         ac_x_includes='$ac_x_includes'\
30453         ac_x_libraries='$ac_x_libraries'"
30454 esac
30455 fi
30456 ;; #(
30457     *) have_x=yes;;
30458   esac
30459   eval "$ac_cv_have_x"
30460 fi # $with_x != no
30461 
30462 if test "$have_x" != yes; then
30463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30464 $as_echo "$have_x" >&6; }
30465   no_x=yes
30466 else
30467   # If each of the values was on the command line, it overrides each guess.
30468   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30469   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30470   # Update the cache value to reflect the command line values.
30471   ac_cv_have_x="have_x=yes\
30472         ac_x_includes='$x_includes'\
30473         ac_x_libraries='$x_libraries'"
30474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30475 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30476 fi
30477 
30478   if test "$no_x" = yes; then
30479   # Not all programs may use this symbol, but it does not hurt to define it.
30480 
30481 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30482 
30483   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30484 else
30485   if test -n "$x_includes"; then
30486     X_CFLAGS="$X_CFLAGS -I$x_includes"
30487   fi
30488 
30489   # It would also be nice to do this for all -L options, not just this one.
30490   if test -n "$x_libraries"; then
30491     X_LIBS="$X_LIBS -L$x_libraries"
30492     # For Solaris; some versions of Sun CC require a space after -R and
30493     # others require no space.  Words are not sufficient . . . .
30494     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30495 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30496     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30497     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30498     ac_cxx_werror_flag=yes
30499     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30500 /* end confdefs.h.  */
30501 
30502 int
30503 main ()
30504 {
30505 
30506   ;
30507   return 0;
30508 }
30509 _ACEOF
30510 if ac_fn_cxx_try_link "$LINENO"; then :
30511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30512 $as_echo "no" >&6; }
30513        X_LIBS="$X_LIBS -R$x_libraries"
30514 else
30515   LIBS="$ac_xsave_LIBS -R $x_libraries"
30516        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30517 /* end confdefs.h.  */
30518 
30519 int
30520 main ()
30521 {
30522 
30523   ;
30524   return 0;
30525 }
30526 _ACEOF
30527 if ac_fn_cxx_try_link "$LINENO"; then :
30528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30529 $as_echo "yes" >&6; }
30530           X_LIBS="$X_LIBS -R $x_libraries"
30531 else
30532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30533 $as_echo "neither works" >&6; }
30534 fi
30535 rm -f core conftest.err conftest.$ac_objext \
30536     conftest$ac_exeext conftest.$ac_ext
30537 fi
30538 rm -f core conftest.err conftest.$ac_objext \
30539     conftest$ac_exeext conftest.$ac_ext
30540     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30541     LIBS=$ac_xsave_LIBS
30542   fi
30543 
30544   # Check for system-dependent libraries X programs must link with.
30545   # Do this before checking for the system-independent R6 libraries
30546   # (-lICE), since we may need -lsocket or whatever for X linking.
30547 
30548   if test "$ISC" = yes; then
30549     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30550   else
30551     # Martyn Johnson says this is needed for Ultrix, if the X
30552     # libraries were built with DECnet support.  And Karl Berry says
30553     # the Alpha needs dnet_stub (dnet does not exist).
30554     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30555     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30556 /* end confdefs.h.  */
30557 
30558 /* Override any GCC internal prototype to avoid an error.
30559    Use char because int might match the return type of a GCC
30560    builtin and then its argument prototype would still apply.  */
30561 #ifdef __cplusplus
30562 extern "C"
30563 #endif
30564 char XOpenDisplay ();
30565 int
30566 main ()
30567 {
30568 return XOpenDisplay ();
30569   ;
30570   return 0;
30571 }
30572 _ACEOF
30573 if ac_fn_cxx_try_link "$LINENO"; then :
30574 
30575 else
30576   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30577 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30578 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30579   $as_echo_n "(cached) " >&6
30580 else
30581   ac_check_lib_save_LIBS=$LIBS
30582 LIBS="-ldnet  $LIBS"
30583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30584 /* end confdefs.h.  */
30585 
30586 /* Override any GCC internal prototype to avoid an error.
30587    Use char because int might match the return type of a GCC
30588    builtin and then its argument prototype would still apply.  */
30589 #ifdef __cplusplus
30590 extern "C"
30591 #endif
30592 char dnet_ntoa ();
30593 int
30594 main ()
30595 {
30596 return dnet_ntoa ();
30597   ;
30598   return 0;
30599 }
30600 _ACEOF
30601 if ac_fn_cxx_try_link "$LINENO"; then :
30602   ac_cv_lib_dnet_dnet_ntoa=yes
30603 else
30604   ac_cv_lib_dnet_dnet_ntoa=no
30605 fi
30606 rm -f core conftest.err conftest.$ac_objext \
30607     conftest$ac_exeext conftest.$ac_ext
30608 LIBS=$ac_check_lib_save_LIBS
30609 fi
30610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30611 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30612 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30613   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30614 fi
30615 
30616     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30617       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30618 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30619 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30620   $as_echo_n "(cached) " >&6
30621 else
30622   ac_check_lib_save_LIBS=$LIBS
30623 LIBS="-ldnet_stub  $LIBS"
30624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30625 /* end confdefs.h.  */
30626 
30627 /* Override any GCC internal prototype to avoid an error.
30628    Use char because int might match the return type of a GCC
30629    builtin and then its argument prototype would still apply.  */
30630 #ifdef __cplusplus
30631 extern "C"
30632 #endif
30633 char dnet_ntoa ();
30634 int
30635 main ()
30636 {
30637 return dnet_ntoa ();
30638   ;
30639   return 0;
30640 }
30641 _ACEOF
30642 if ac_fn_cxx_try_link "$LINENO"; then :
30643   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30644 else
30645   ac_cv_lib_dnet_stub_dnet_ntoa=no
30646 fi
30647 rm -f core conftest.err conftest.$ac_objext \
30648     conftest$ac_exeext conftest.$ac_ext
30649 LIBS=$ac_check_lib_save_LIBS
30650 fi
30651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30652 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30653 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30654   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30655 fi
30656 
30657     fi
30658 fi
30659 rm -f core conftest.err conftest.$ac_objext \
30660     conftest$ac_exeext conftest.$ac_ext
30661     LIBS="$ac_xsave_LIBS"
30662 
30663     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30664     # to get the SysV transport functions.
30665     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30666     # needs -lnsl.
30667     # The nsl library prevents programs from opening the X display
30668     # on Irix 5.2, according to T.E. Dickey.
30669     # The functions gethostbyname, getservbyname, and inet_addr are
30670     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30671     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30672 if test "x$ac_cv_func_gethostbyname" = xyes; then :
30673 
30674 fi
30675 
30676     if test $ac_cv_func_gethostbyname = no; then
30677       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30678 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30679 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30680   $as_echo_n "(cached) " >&6
30681 else
30682   ac_check_lib_save_LIBS=$LIBS
30683 LIBS="-lnsl  $LIBS"
30684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30685 /* end confdefs.h.  */
30686 
30687 /* Override any GCC internal prototype to avoid an error.
30688    Use char because int might match the return type of a GCC
30689    builtin and then its argument prototype would still apply.  */
30690 #ifdef __cplusplus
30691 extern "C"
30692 #endif
30693 char gethostbyname ();
30694 int
30695 main ()
30696 {
30697 return gethostbyname ();
30698   ;
30699   return 0;
30700 }
30701 _ACEOF
30702 if ac_fn_cxx_try_link "$LINENO"; then :
30703   ac_cv_lib_nsl_gethostbyname=yes
30704 else
30705   ac_cv_lib_nsl_gethostbyname=no
30706 fi
30707 rm -f core conftest.err conftest.$ac_objext \
30708     conftest$ac_exeext conftest.$ac_ext
30709 LIBS=$ac_check_lib_save_LIBS
30710 fi
30711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30712 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30713 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30714   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30715 fi
30716 
30717       if test $ac_cv_lib_nsl_gethostbyname = no; then
30718         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30719 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30720 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30721   $as_echo_n "(cached) " >&6
30722 else
30723   ac_check_lib_save_LIBS=$LIBS
30724 LIBS="-lbsd  $LIBS"
30725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30726 /* end confdefs.h.  */
30727 
30728 /* Override any GCC internal prototype to avoid an error.
30729    Use char because int might match the return type of a GCC
30730    builtin and then its argument prototype would still apply.  */
30731 #ifdef __cplusplus
30732 extern "C"
30733 #endif
30734 char gethostbyname ();
30735 int
30736 main ()
30737 {
30738 return gethostbyname ();
30739   ;
30740   return 0;
30741 }
30742 _ACEOF
30743 if ac_fn_cxx_try_link "$LINENO"; then :
30744   ac_cv_lib_bsd_gethostbyname=yes
30745 else
30746   ac_cv_lib_bsd_gethostbyname=no
30747 fi
30748 rm -f core conftest.err conftest.$ac_objext \
30749     conftest$ac_exeext conftest.$ac_ext
30750 LIBS=$ac_check_lib_save_LIBS
30751 fi
30752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30753 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30754 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30755   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30756 fi
30757 
30758       fi
30759     fi
30760 
30761     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30762     # socket/setsockopt and other routines are undefined under SCO ODT
30763     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30764     # on later versions), says Simon Leinen: it contains gethostby*
30765     # variants that don't use the name server (or something).  -lsocket
30766     # must be given before -lnsl if both are needed.  We assume that
30767     # if connect needs -lnsl, so does gethostbyname.
30768     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30769 if test "x$ac_cv_func_connect" = xyes; then :
30770 
30771 fi
30772 
30773     if test $ac_cv_func_connect = no; then
30774       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30775 $as_echo_n "checking for connect in -lsocket... " >&6; }
30776 if ${ac_cv_lib_socket_connect+:} false; then :
30777   $as_echo_n "(cached) " >&6
30778 else
30779   ac_check_lib_save_LIBS=$LIBS
30780 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30782 /* end confdefs.h.  */
30783 
30784 /* Override any GCC internal prototype to avoid an error.
30785    Use char because int might match the return type of a GCC
30786    builtin and then its argument prototype would still apply.  */
30787 #ifdef __cplusplus
30788 extern "C"
30789 #endif
30790 char connect ();
30791 int
30792 main ()
30793 {
30794 return connect ();
30795   ;
30796   return 0;
30797 }
30798 _ACEOF
30799 if ac_fn_cxx_try_link "$LINENO"; then :
30800   ac_cv_lib_socket_connect=yes
30801 else
30802   ac_cv_lib_socket_connect=no
30803 fi
30804 rm -f core conftest.err conftest.$ac_objext \
30805     conftest$ac_exeext conftest.$ac_ext
30806 LIBS=$ac_check_lib_save_LIBS
30807 fi
30808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30809 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30810 if test "x$ac_cv_lib_socket_connect" = xyes; then :
30811   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30812 fi
30813 
30814     fi
30815 
30816     # Guillermo Gomez says -lposix is necessary on A/UX.
30817     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30818 if test "x$ac_cv_func_remove" = xyes; then :
30819 
30820 fi
30821 
30822     if test $ac_cv_func_remove = no; then
30823       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30824 $as_echo_n "checking for remove in -lposix... " >&6; }
30825 if ${ac_cv_lib_posix_remove+:} false; then :
30826   $as_echo_n "(cached) " >&6
30827 else
30828   ac_check_lib_save_LIBS=$LIBS
30829 LIBS="-lposix  $LIBS"
30830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30831 /* end confdefs.h.  */
30832 
30833 /* Override any GCC internal prototype to avoid an error.
30834    Use char because int might match the return type of a GCC
30835    builtin and then its argument prototype would still apply.  */
30836 #ifdef __cplusplus
30837 extern "C"
30838 #endif
30839 char remove ();
30840 int
30841 main ()
30842 {
30843 return remove ();
30844   ;
30845   return 0;
30846 }
30847 _ACEOF
30848 if ac_fn_cxx_try_link "$LINENO"; then :
30849   ac_cv_lib_posix_remove=yes
30850 else
30851   ac_cv_lib_posix_remove=no
30852 fi
30853 rm -f core conftest.err conftest.$ac_objext \
30854     conftest$ac_exeext conftest.$ac_ext
30855 LIBS=$ac_check_lib_save_LIBS
30856 fi
30857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30858 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30859 if test "x$ac_cv_lib_posix_remove" = xyes; then :
30860   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30861 fi
30862 
30863     fi
30864 
30865     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30866     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30867 if test "x$ac_cv_func_shmat" = xyes; then :
30868 
30869 fi
30870 
30871     if test $ac_cv_func_shmat = no; then
30872       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30873 $as_echo_n "checking for shmat in -lipc... " >&6; }
30874 if ${ac_cv_lib_ipc_shmat+:} false; then :
30875   $as_echo_n "(cached) " >&6
30876 else
30877   ac_check_lib_save_LIBS=$LIBS
30878 LIBS="-lipc  $LIBS"
30879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30880 /* end confdefs.h.  */
30881 
30882 /* Override any GCC internal prototype to avoid an error.
30883    Use char because int might match the return type of a GCC
30884    builtin and then its argument prototype would still apply.  */
30885 #ifdef __cplusplus
30886 extern "C"
30887 #endif
30888 char shmat ();
30889 int
30890 main ()
30891 {
30892 return shmat ();
30893   ;
30894   return 0;
30895 }
30896 _ACEOF
30897 if ac_fn_cxx_try_link "$LINENO"; then :
30898   ac_cv_lib_ipc_shmat=yes
30899 else
30900   ac_cv_lib_ipc_shmat=no
30901 fi
30902 rm -f core conftest.err conftest.$ac_objext \
30903     conftest$ac_exeext conftest.$ac_ext
30904 LIBS=$ac_check_lib_save_LIBS
30905 fi
30906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30907 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30908 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30909   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30910 fi
30911 
30912     fi
30913   fi
30914 
30915   # Check for libraries that X11R6 Xt/Xaw programs need.
30916   ac_save_LDFLAGS=$LDFLAGS
30917   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30918   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30919   # check for ICE first), but we must link in the order -lSM -lICE or
30920   # we get undefined symbols.  So assume we have SM if we have ICE.
30921   # These have to be linked with before -lX11, unlike the other
30922   # libraries we check for below, so use a different variable.
30923   # John Interrante, Karl Berry
30924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30925 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30926 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30927   $as_echo_n "(cached) " >&6
30928 else
30929   ac_check_lib_save_LIBS=$LIBS
30930 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30932 /* end confdefs.h.  */
30933 
30934 /* Override any GCC internal prototype to avoid an error.
30935    Use char because int might match the return type of a GCC
30936    builtin and then its argument prototype would still apply.  */
30937 #ifdef __cplusplus
30938 extern "C"
30939 #endif
30940 char IceConnectionNumber ();
30941 int
30942 main ()
30943 {
30944 return IceConnectionNumber ();
30945   ;
30946   return 0;
30947 }
30948 _ACEOF
30949 if ac_fn_cxx_try_link "$LINENO"; then :
30950   ac_cv_lib_ICE_IceConnectionNumber=yes
30951 else
30952   ac_cv_lib_ICE_IceConnectionNumber=no
30953 fi
30954 rm -f core conftest.err conftest.$ac_objext \
30955     conftest$ac_exeext conftest.$ac_ext
30956 LIBS=$ac_check_lib_save_LIBS
30957 fi
30958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30959 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30960 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30961   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30962 fi
30963 
30964   LDFLAGS=$ac_save_LDFLAGS
30965 
30966 fi
30967 
30968 
30969   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30970   # this doesn't make sense so we remove it.
30971   if test "x$COMPILE_TYPE" = xcross; then
30972     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30973   fi
30974 
30975   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30976 
30977   # Print a helpful message on how to acquire the necessary build dependency.
30978   # x11 is the help tag: freetype, cups, pulse, alsa etc
30979   MISSING_DEPENDENCY=x11
30980 
30981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30982     cygwin_help $MISSING_DEPENDENCY
30983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30984     msys_help $MISSING_DEPENDENCY
30985   else
30986     PKGHANDLER_COMMAND=
30987 
30988     case $PKGHANDLER in
30989       apt-get)
30990         apt_help     $MISSING_DEPENDENCY ;;
30991       yum)
30992         yum_help     $MISSING_DEPENDENCY ;;
30993       port)
30994         port_help    $MISSING_DEPENDENCY ;;
30995       pkgutil)
30996         pkgutil_help $MISSING_DEPENDENCY ;;
30997       pkgadd)
30998         pkgadd_help  $MISSING_DEPENDENCY ;;
30999     esac
31000 
31001     if test "x$PKGHANDLER_COMMAND" != x; then
31002       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31003     fi
31004   fi
31005 
31006     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31007   fi
31008 
31009   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31010     OPENWIN_HOME="/usr/openwin"
31011   fi
31012 
31013 
31014 
31015   #
31016   # Weird Sol10 something check...TODO change to try compile
31017   #
31018   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31019     if test "`uname -r`" = "5.10"; then
31020       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31021         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31022       fi
31023     fi
31024   fi
31025 
31026   ac_ext=c
31027 ac_cpp='$CPP $CPPFLAGS'
31028 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31029 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31030 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31031 
31032   OLD_CFLAGS="$CFLAGS"
31033   CFLAGS="$CFLAGS $X_CFLAGS"
31034 
31035   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31036   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31037 do :
31038   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31039 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31040         # include <X11/Xlib.h>
31041         # include <X11/Xutil.h>
31042 
31043 
31044 "
31045 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31046   cat >>confdefs.h <<_ACEOF
31047 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31048 _ACEOF
31049  X11_A_OK=yes
31050 else
31051   X11_A_OK=no; break
31052 fi
31053 
31054 done
31055 
31056 
31057   CFLAGS="$OLD_CFLAGS"
31058   ac_ext=cpp
31059 ac_cpp='$CXXCPP $CPPFLAGS'
31060 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31061 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31062 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31063 
31064 
31065   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31066 
31067   # Print a helpful message on how to acquire the necessary build dependency.
31068   # x11 is the help tag: freetype, cups, pulse, alsa etc
31069   MISSING_DEPENDENCY=x11
31070 
31071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31072     cygwin_help $MISSING_DEPENDENCY
31073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31074     msys_help $MISSING_DEPENDENCY
31075   else
31076     PKGHANDLER_COMMAND=
31077 
31078     case $PKGHANDLER in
31079       apt-get)
31080         apt_help     $MISSING_DEPENDENCY ;;
31081       yum)
31082         yum_help     $MISSING_DEPENDENCY ;;
31083       port)
31084         port_help    $MISSING_DEPENDENCY ;;
31085       pkgutil)
31086         pkgutil_help $MISSING_DEPENDENCY ;;
31087       pkgadd)
31088         pkgadd_help  $MISSING_DEPENDENCY ;;
31089     esac
31090 
31091     if test "x$PKGHANDLER_COMMAND" != x; then
31092       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31093     fi
31094   fi
31095 
31096     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31097   fi
31098 
31099 
31100 
31101 
31102 
31103 
31104   ###############################################################################
31105   #
31106   # The common unix printing system cups is used to print from java.
31107   #
31108 
31109 # Check whether --with-cups was given.
31110 if test "${with_cups+set}" = set; then :
31111   withval=$with_cups;
31112 fi
31113 
31114 
31115 # Check whether --with-cups-include was given.
31116 if test "${with_cups_include+set}" = set; then :
31117   withval=$with_cups_include;
31118 fi
31119 
31120 
31121   if test "x$CUPS_NOT_NEEDED" = xyes; then
31122     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31123       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31124 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31125     fi
31126     CUPS_CFLAGS=
31127   else
31128     CUPS_FOUND=no
31129 
31130     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31131       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31132     fi
31133 
31134     if test "x${with_cups}" != x; then
31135       CUPS_CFLAGS="-I${with_cups}/include"
31136       CUPS_FOUND=yes
31137     fi
31138     if test "x${with_cups_include}" != x; then
31139       CUPS_CFLAGS="-I${with_cups_include}"
31140       CUPS_FOUND=yes
31141     fi
31142     if test "x$CUPS_FOUND" = xno; then
31143 
31144 
31145   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31146     # Source the builddeps file again, to make sure it uses the latest variables!
31147     . $builddepsfile
31148     # Look for a target and build machine specific resource!
31149     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31150     if test "x$resource" = x; then
31151       # Ok, lets instead look for a target specific resource
31152       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31153     fi
31154     if test "x$resource" = x; then
31155       # Ok, lets instead look for a build specific resource
31156       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31157     fi
31158     if test "x$resource" = x; then
31159       # Ok, lets instead look for a generic resource
31160       # (The cups comes from M4 and not the shell, thus no need for eval here.)
31161       resource=${builddep_cups}
31162     fi
31163     if test "x$resource" != x; then
31164       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31165 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31166       # If the resource in the builddeps.conf file is an existing directory,
31167       # for example /java/linux/cups
31168       if test -d ${resource}; then
31169         depdir=${resource}
31170       else
31171 
31172   # cups is for example mymodule
31173   # $resource is for example libs/general/libmymod_1_2_3.zip
31174   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31175   # $with_builddeps_dir is for example /localhome/builddeps
31176   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31177   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31178   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31179   filename=`basename $resource`
31180   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31181   filebase=${filename%%.*}
31182   extension=${filename#*.}
31183   installdir=$with_builddeps_dir/$filebase
31184   if test ! -f $installdir/$filename.unpacked; then
31185     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31186 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31187     if test ! -d $installdir; then
31188       mkdir -p $installdir
31189     fi
31190     if test ! -d $installdir; then
31191       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31192     fi
31193     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31194     touch $tmpfile
31195     if test ! -f $tmpfile; then
31196       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31197     fi
31198 
31199   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31200   # $tmpfile is the local file name for the downloaded file.
31201   VALID_TOOL=no
31202   if test "x$BDEPS_FTP" = xwget; then
31203     VALID_TOOL=yes
31204     wget -O $tmpfile $with_builddeps_server/$resource
31205   fi
31206   if test "x$BDEPS_FTP" = xlftp; then
31207     VALID_TOOL=yes
31208     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31209   fi
31210   if test "x$BDEPS_FTP" = xftp; then
31211     VALID_TOOL=yes
31212     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31213     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31214     FTPUSERPWD=${FTPSERVER%%@*}
31215     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31216       FTPUSER=${userpwd%%:*}
31217       FTPPWD=${userpwd#*@}
31218       FTPSERVER=${FTPSERVER#*@}
31219     else
31220       FTPUSER=ftp
31221       FTPPWD=ftp
31222     fi
31223     # the "pass" command does not work on some
31224     # ftp clients (read ftp.exe) but if it works,
31225     # passive mode is better!
31226     ( \
31227         echo "user $FTPUSER $FTPPWD"        ; \
31228         echo "pass"                         ; \
31229         echo "bin"                          ; \
31230         echo "get $FTPPATH $tmpfile"              ; \
31231     ) | ftp -in $FTPSERVER
31232   fi
31233   if test "x$VALID_TOOL" != xyes; then
31234     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31235   fi
31236 
31237     mv $tmpfile $installdir/$filename
31238     if test ! -s $installdir/$filename; then
31239       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31240     fi
31241     case "$extension" in
31242       zip)  echo "Unzipping $installdir/$filename..."
31243         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31244         ;;
31245       tar.gz) echo "Untaring $installdir/$filename..."
31246         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31247         ;;
31248       tgz) echo "Untaring $installdir/$filename..."
31249         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31250         ;;
31251       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31252         ;;
31253     esac
31254   fi
31255   if test -f $installdir/$filename.unpacked; then
31256     depdir=$installdir
31257   fi
31258 
31259       fi
31260       # Source the builddeps file again, because in the previous command, the depdir
31261       # was updated to point at the current build dependency install directory.
31262       . $builddepsfile
31263       # Now extract variables from the builddeps.conf files.
31264       theroot=${builddep_cups_ROOT}
31265       thecflags=${builddep_cups_CFLAGS}
31266       thelibs=${builddep_cups_LIBS}
31267       if test "x$depdir" = x; then
31268         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31269       fi
31270       CUPS=$depdir
31271       if test "x$theroot" != x; then
31272         CUPS="$theroot"
31273       fi
31274       if test "x$thecflags" != x; then
31275         CUPS_CFLAGS="$thecflags"
31276       fi
31277       if test "x$thelibs" != x; then
31278         CUPS_LIBS="$thelibs"
31279       fi
31280       CUPS_FOUND=yes
31281 
31282     fi
31283 
31284   fi
31285 
31286     fi
31287     if test "x$CUPS_FOUND" = xno; then
31288       # Are the cups headers installed in the default /usr/include location?
31289       for ac_header in cups/cups.h cups/ppd.h
31290 do :
31291   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31292 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31293 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31294   cat >>confdefs.h <<_ACEOF
31295 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31296 _ACEOF
31297 
31298             CUPS_FOUND=yes
31299             CUPS_CFLAGS=
31300             DEFAULT_CUPS=yes
31301 
31302 
31303 fi
31304 
31305 done
31306 
31307     fi
31308     if test "x$CUPS_FOUND" = xno; then
31309       # Getting nervous now? Lets poke around for standard Solaris third-party
31310       # package installation locations.
31311       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31312 $as_echo_n "checking for cups headers... " >&6; }
31313       if test -s /opt/sfw/cups/include/cups/cups.h; then
31314         # An SFW package seems to be installed!
31315         CUPS_FOUND=yes
31316         CUPS_CFLAGS="-I/opt/sfw/cups/include"
31317       elif test -s /opt/csw/include/cups/cups.h; then
31318         # A CSW package seems to be installed!
31319         CUPS_FOUND=yes
31320         CUPS_CFLAGS="-I/opt/csw/include"
31321       fi
31322       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31323 $as_echo "$CUPS_FOUND" >&6; }
31324     fi
31325     if test "x$CUPS_FOUND" = xno; then
31326 
31327   # Print a helpful message on how to acquire the necessary build dependency.
31328   # cups is the help tag: freetype, cups, pulse, alsa etc
31329   MISSING_DEPENDENCY=cups
31330 
31331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31332     cygwin_help $MISSING_DEPENDENCY
31333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31334     msys_help $MISSING_DEPENDENCY
31335   else
31336     PKGHANDLER_COMMAND=
31337 
31338     case $PKGHANDLER in
31339       apt-get)
31340         apt_help     $MISSING_DEPENDENCY ;;
31341       yum)
31342         yum_help     $MISSING_DEPENDENCY ;;
31343       port)
31344         port_help    $MISSING_DEPENDENCY ;;
31345       pkgutil)
31346         pkgutil_help $MISSING_DEPENDENCY ;;
31347       pkgadd)
31348         pkgadd_help  $MISSING_DEPENDENCY ;;
31349     esac
31350 
31351     if test "x$PKGHANDLER_COMMAND" != x; then
31352       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31353     fi
31354   fi
31355 
31356       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31357     fi
31358   fi
31359 
31360 
31361 
31362 
31363 
31364 
31365   ###############################################################################
31366   #
31367   # The ubiquitous freetype library is used to render fonts.
31368   #
31369 
31370 # Check whether --with-freetype was given.
31371 if test "${with_freetype+set}" = set; then :
31372   withval=$with_freetype;
31373 fi
31374 
31375 
31376 # Check whether --with-freetype-include was given.
31377 if test "${with_freetype_include+set}" = set; then :
31378   withval=$with_freetype_include;
31379 fi
31380 
31381 
31382 # Check whether --with-freetype-lib was given.
31383 if test "${with_freetype_lib+set}" = set; then :
31384   withval=$with_freetype_lib;
31385 fi
31386 
31387   # Check whether --enable-freetype-bundling was given.
31388 if test "${enable_freetype_bundling+set}" = set; then :
31389   enableval=$enable_freetype_bundling;
31390 fi
31391 
31392 
31393   FREETYPE_CFLAGS=
31394   FREETYPE_LIBS=
31395   FREETYPE_BUNDLE_LIB_PATH=
31396 
31397   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31398     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31399       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31400 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31401     fi
31402     if test "x$enable_freetype_bundling" != x; then
31403       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31404 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31405     fi
31406   else
31407     # freetype is needed to build; go get it!
31408 
31409     BUNDLE_FREETYPE="$enable_freetype_bundling"
31410 
31411     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31412       # User has specified settings
31413 
31414       if test "x$BUNDLE_FREETYPE" = x; then
31415         # If not specified, default is to bundle freetype
31416         BUNDLE_FREETYPE=yes
31417       fi
31418 
31419       if test "x$with_freetype" != x; then
31420         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31421         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31422       fi
31423 
31424       # Allow --with-freetype-lib and --with-freetype-include to override
31425       if test "x$with_freetype_include" != x; then
31426         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31427       fi
31428       if test "x$with_freetype_lib" != x; then
31429         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31430       fi
31431 
31432       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31433         # Okay, we got it. Check that it works.
31434 
31435   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31436   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31437   METHOD="--with-freetype"
31438 
31439   # First check if the files exists.
31440   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31441     # We found an arbitrary include file. That's a good sign.
31442     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31443 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31444     FOUND_FREETYPE=yes
31445 
31446     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31447     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31448       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31449 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31450       FOUND_FREETYPE=no
31451     else
31452       if test "x$OPENJDK_TARGET_OS" = xwindows; then
31453         # On Windows, we will need both .lib and .dll file.
31454         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31455           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31456 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31457           FOUND_FREETYPE=no
31458         fi
31459       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
31460         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31461         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31462       fi
31463     fi
31464   fi
31465 
31466   if test "x$FOUND_FREETYPE" = xyes; then
31467 
31468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31469 
31470   # Input might be given as Windows format, start by converting to
31471   # unix format.
31472   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31473   new_path=`$CYGPATH -u "$path"`
31474 
31475   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31476   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31477   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31478   # "foo.exe" is OK but "foo" is an error.
31479   #
31480   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31481   # It is also a way to make sure we got the proper file name for the real test later on.
31482   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31483   if test "x$test_shortpath" = x; then
31484     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31485 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31486     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31487   fi
31488 
31489   # Call helper function which possibly converts this using DOS-style short mode.
31490   # If so, the updated path is stored in $new_path.
31491 
31492   input_path="$new_path"
31493   # Check if we need to convert this using DOS-style short mode. If the path
31494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31495   # take no chances and rewrite it.
31496   # Note: m4 eats our [], so we need to use [ and ] instead.
31497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31498   if test "x$has_forbidden_chars" != x; then
31499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31500     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31501     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31502     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31503       # Going to short mode and back again did indeed matter. Since short mode is
31504       # case insensitive, let's make it lowercase to improve readability.
31505       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31506       # Now convert it back to Unix-stile (cygpath)
31507       input_path=`$CYGPATH -u "$shortmode_path"`
31508       new_path="$input_path"
31509     fi
31510   fi
31511 
31512   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31513   if test "x$test_cygdrive_prefix" = x; then
31514     # As a simple fix, exclude /usr/bin since it's not a real path.
31515     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31516       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31517       # a path prefixed by /cygdrive for fixpath to work.
31518       new_path="$CYGWIN_ROOT_PATH$input_path"
31519     fi
31520   fi
31521 
31522 
31523   if test "x$path" != "x$new_path"; then
31524     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31525     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31526 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31527   fi
31528 
31529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31530 
31531   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31532   has_colon=`$ECHO $path | $GREP ^.:`
31533   new_path="$path"
31534   if test "x$has_colon" = x; then
31535     # Not in mixed or Windows style, start by that.
31536     new_path=`cmd //c echo $path`
31537   fi
31538 
31539 
31540   input_path="$new_path"
31541   # Check if we need to convert this using DOS-style short mode. If the path
31542   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31543   # take no chances and rewrite it.
31544   # Note: m4 eats our [], so we need to use [ and ] instead.
31545   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31546   if test "x$has_forbidden_chars" != x; then
31547     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31548     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31549   fi
31550 
31551 
31552   windows_path="$new_path"
31553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31554     unix_path=`$CYGPATH -u "$windows_path"`
31555     new_path="$unix_path"
31556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31557     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31558     new_path="$unix_path"
31559   fi
31560 
31561   if test "x$path" != "x$new_path"; then
31562     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31563     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31564 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31565   fi
31566 
31567   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31568   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31569 
31570   else
31571     # We're on a posix platform. Hooray! :)
31572     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31573     has_space=`$ECHO "$path" | $GREP " "`
31574     if test "x$has_space" != x; then
31575       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31576 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31577       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31578     fi
31579 
31580     # Use eval to expand a potential ~
31581     eval path="$path"
31582     if test ! -f "$path" && test ! -d "$path"; then
31583       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31584     fi
31585 
31586     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31587   fi
31588 
31589 
31590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31591 
31592   # Input might be given as Windows format, start by converting to
31593   # unix format.
31594   path="$POTENTIAL_FREETYPE_LIB_PATH"
31595   new_path=`$CYGPATH -u "$path"`
31596 
31597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31600   # "foo.exe" is OK but "foo" is an error.
31601   #
31602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31603   # It is also a way to make sure we got the proper file name for the real test later on.
31604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31605   if test "x$test_shortpath" = x; then
31606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31607 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31608     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31609   fi
31610 
31611   # Call helper function which possibly converts this using DOS-style short mode.
31612   # If so, the updated path is stored in $new_path.
31613 
31614   input_path="$new_path"
31615   # Check if we need to convert this using DOS-style short mode. If the path
31616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31617   # take no chances and rewrite it.
31618   # Note: m4 eats our [], so we need to use [ and ] instead.
31619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31620   if test "x$has_forbidden_chars" != x; then
31621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31625       # Going to short mode and back again did indeed matter. Since short mode is
31626       # case insensitive, let's make it lowercase to improve readability.
31627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31628       # Now convert it back to Unix-stile (cygpath)
31629       input_path=`$CYGPATH -u "$shortmode_path"`
31630       new_path="$input_path"
31631     fi
31632   fi
31633 
31634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31635   if test "x$test_cygdrive_prefix" = x; then
31636     # As a simple fix, exclude /usr/bin since it's not a real path.
31637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31639       # a path prefixed by /cygdrive for fixpath to work.
31640       new_path="$CYGWIN_ROOT_PATH$input_path"
31641     fi
31642   fi
31643 
31644 
31645   if test "x$path" != "x$new_path"; then
31646     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31648 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31649   fi
31650 
31651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31652 
31653   path="$POTENTIAL_FREETYPE_LIB_PATH"
31654   has_colon=`$ECHO $path | $GREP ^.:`
31655   new_path="$path"
31656   if test "x$has_colon" = x; then
31657     # Not in mixed or Windows style, start by that.
31658     new_path=`cmd //c echo $path`
31659   fi
31660 
31661 
31662   input_path="$new_path"
31663   # Check if we need to convert this using DOS-style short mode. If the path
31664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31665   # take no chances and rewrite it.
31666   # Note: m4 eats our [], so we need to use [ and ] instead.
31667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31668   if test "x$has_forbidden_chars" != x; then
31669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31671   fi
31672 
31673 
31674   windows_path="$new_path"
31675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31676     unix_path=`$CYGPATH -u "$windows_path"`
31677     new_path="$unix_path"
31678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31680     new_path="$unix_path"
31681   fi
31682 
31683   if test "x$path" != "x$new_path"; then
31684     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31686 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31687   fi
31688 
31689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31691 
31692   else
31693     # We're on a posix platform. Hooray! :)
31694     path="$POTENTIAL_FREETYPE_LIB_PATH"
31695     has_space=`$ECHO "$path" | $GREP " "`
31696     if test "x$has_space" != x; then
31697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31698 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31699       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31700     fi
31701 
31702     # Use eval to expand a potential ~
31703     eval path="$path"
31704     if test ! -f "$path" && test ! -d "$path"; then
31705       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31706     fi
31707 
31708     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31709   fi
31710 
31711 
31712     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31713     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31714 $as_echo_n "checking for freetype includes... " >&6; }
31715     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31716 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31717     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31719 $as_echo_n "checking for freetype libraries... " >&6; }
31720     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31721 $as_echo "$FREETYPE_LIB_PATH" >&6; }
31722   fi
31723 
31724         if test "x$FOUND_FREETYPE" != xyes; then
31725           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31726         fi
31727       else
31728         # User specified only one of lib or include. This is an error.
31729         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31730           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31731 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31732           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31733         else
31734           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31735 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31736           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31737         fi
31738       fi
31739     else
31740       # User did not specify settings, but we need freetype. Try to locate it.
31741 
31742       if test "x$BUNDLE_FREETYPE" = x; then
31743         # If not specified, default is to bundle freetype only on windows
31744         if test "x$OPENJDK_TARGET_OS" = xwindows; then
31745           BUNDLE_FREETYPE=yes
31746         else
31747           BUNDLE_FREETYPE=no
31748         fi
31749       fi
31750 
31751       if test "x$FOUND_FREETYPE" != xyes; then
31752         # Check builddeps
31753 
31754 
31755   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31756     # Source the builddeps file again, to make sure it uses the latest variables!
31757     . $builddepsfile
31758     # Look for a target and build machine specific resource!
31759     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31760     if test "x$resource" = x; then
31761       # Ok, lets instead look for a target specific resource
31762       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31763     fi
31764     if test "x$resource" = x; then
31765       # Ok, lets instead look for a build specific resource
31766       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31767     fi
31768     if test "x$resource" = x; then
31769       # Ok, lets instead look for a generic resource
31770       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31771       resource=${builddep_freetype2}
31772     fi
31773     if test "x$resource" != x; then
31774       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31775 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31776       # If the resource in the builddeps.conf file is an existing directory,
31777       # for example /java/linux/cups
31778       if test -d ${resource}; then
31779         depdir=${resource}
31780       else
31781 
31782   # freetype2 is for example mymodule
31783   # $resource is for example libs/general/libmymod_1_2_3.zip
31784   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31785   # $with_builddeps_dir is for example /localhome/builddeps
31786   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31787   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31788   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31789   filename=`basename $resource`
31790   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31791   filebase=${filename%%.*}
31792   extension=${filename#*.}
31793   installdir=$with_builddeps_dir/$filebase
31794   if test ! -f $installdir/$filename.unpacked; then
31795     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31796 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31797     if test ! -d $installdir; then
31798       mkdir -p $installdir
31799     fi
31800     if test ! -d $installdir; then
31801       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31802     fi
31803     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31804     touch $tmpfile
31805     if test ! -f $tmpfile; then
31806       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31807     fi
31808 
31809   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31810   # $tmpfile is the local file name for the downloaded file.
31811   VALID_TOOL=no
31812   if test "x$BDEPS_FTP" = xwget; then
31813     VALID_TOOL=yes
31814     wget -O $tmpfile $with_builddeps_server/$resource
31815   fi
31816   if test "x$BDEPS_FTP" = xlftp; then
31817     VALID_TOOL=yes
31818     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31819   fi
31820   if test "x$BDEPS_FTP" = xftp; then
31821     VALID_TOOL=yes
31822     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31823     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31824     FTPUSERPWD=${FTPSERVER%%@*}
31825     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31826       FTPUSER=${userpwd%%:*}
31827       FTPPWD=${userpwd#*@}
31828       FTPSERVER=${FTPSERVER#*@}
31829     else
31830       FTPUSER=ftp
31831       FTPPWD=ftp
31832     fi
31833     # the "pass" command does not work on some
31834     # ftp clients (read ftp.exe) but if it works,
31835     # passive mode is better!
31836     ( \
31837         echo "user $FTPUSER $FTPPWD"        ; \
31838         echo "pass"                         ; \
31839         echo "bin"                          ; \
31840         echo "get $FTPPATH $tmpfile"              ; \
31841     ) | ftp -in $FTPSERVER
31842   fi
31843   if test "x$VALID_TOOL" != xyes; then
31844     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31845   fi
31846 
31847     mv $tmpfile $installdir/$filename
31848     if test ! -s $installdir/$filename; then
31849       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31850     fi
31851     case "$extension" in
31852       zip)  echo "Unzipping $installdir/$filename..."
31853         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31854         ;;
31855       tar.gz) echo "Untaring $installdir/$filename..."
31856         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31857         ;;
31858       tgz) echo "Untaring $installdir/$filename..."
31859         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31860         ;;
31861       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31862         ;;
31863     esac
31864   fi
31865   if test -f $installdir/$filename.unpacked; then
31866     depdir=$installdir
31867   fi
31868 
31869       fi
31870       # Source the builddeps file again, because in the previous command, the depdir
31871       # was updated to point at the current build dependency install directory.
31872       . $builddepsfile
31873       # Now extract variables from the builddeps.conf files.
31874       theroot=${builddep_freetype2_ROOT}
31875       thecflags=${builddep_freetype2_CFLAGS}
31876       thelibs=${builddep_freetype2_LIBS}
31877       if test "x$depdir" = x; then
31878         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31879       fi
31880       FREETYPE=$depdir
31881       if test "x$theroot" != x; then
31882         FREETYPE="$theroot"
31883       fi
31884       if test "x$thecflags" != x; then
31885         FREETYPE_CFLAGS="$thecflags"
31886       fi
31887       if test "x$thelibs" != x; then
31888         FREETYPE_LIBS="$thelibs"
31889       fi
31890       FOUND_FREETYPE=yes
31891       else FOUND_FREETYPE=no
31892 
31893     fi
31894     else FOUND_FREETYPE=no
31895 
31896   fi
31897 
31898         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31899         if test "x$FOUND_FREETYPE" = xyes; then
31900           if test "x$BUNDLE_FREETYPE" = xyes; then
31901             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31902 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31903             FOUND_FREETYPE=no
31904           else
31905             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31906 $as_echo_n "checking for freetype... " >&6; }
31907             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31908 $as_echo "yes (using builddeps)" >&6; }
31909           fi
31910         fi
31911       fi
31912 
31913       if test "x$FOUND_FREETYPE" != xyes; then
31914         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31915         if test "x$PKG_CONFIG" != x; then
31916 
31917 pkg_failed=no
31918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31919 $as_echo_n "checking for FREETYPE... " >&6; }
31920 
31921 if test -n "$FREETYPE_CFLAGS"; then
31922     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31923  elif test -n "$PKG_CONFIG"; then
31924     if test -n "$PKG_CONFIG" && \
31925     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31926   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31927   ac_status=$?
31928   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31929   test $ac_status = 0; }; then
31930   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31931 else
31932   pkg_failed=yes
31933 fi
31934  else
31935     pkg_failed=untried
31936 fi
31937 if test -n "$FREETYPE_LIBS"; then
31938     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31939  elif test -n "$PKG_CONFIG"; then
31940     if test -n "$PKG_CONFIG" && \
31941     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31942   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31943   ac_status=$?
31944   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31945   test $ac_status = 0; }; then
31946   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31947 else
31948   pkg_failed=yes
31949 fi
31950  else
31951     pkg_failed=untried
31952 fi
31953 
31954 
31955 
31956 if test $pkg_failed = yes; then
31957 
31958 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31959         _pkg_short_errors_supported=yes
31960 else
31961         _pkg_short_errors_supported=no
31962 fi
31963         if test $_pkg_short_errors_supported = yes; then
31964                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31965         else
31966                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31967         fi
31968         # Put the nasty error message in config.log where it belongs
31969         echo "$FREETYPE_PKG_ERRORS" >&5
31970 
31971         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31972 $as_echo "no" >&6; }
31973                 FOUND_FREETYPE=no
31974 elif test $pkg_failed = untried; then
31975         FOUND_FREETYPE=no
31976 else
31977         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
31978         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
31979         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31980 $as_echo "yes" >&6; }
31981         FOUND_FREETYPE=yes
31982 fi
31983           if test "x$FOUND_FREETYPE" = xyes; then
31984             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31985             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
31986             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31987             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31988               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
31989             fi
31990             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31991             if test "x$BUNDLE_FREETYPE" = xyes; then
31992               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
31993 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
31994               FOUND_FREETYPE=no
31995             else
31996               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31997 $as_echo_n "checking for freetype... " >&6; }
31998               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
31999 $as_echo "yes (using pkg-config)" >&6; }
32000             fi
32001           fi
32002         fi
32003       fi
32004 
32005       if test "x$FOUND_FREETYPE" != xyes; then
32006         # Check in well-known locations
32007         if test "x$OPENJDK_TARGET_OS" = xwindows; then
32008           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32009 
32010   windows_path="$FREETYPE_BASE_DIR"
32011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32012     unix_path=`$CYGPATH -u "$windows_path"`
32013     FREETYPE_BASE_DIR="$unix_path"
32014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32016     FREETYPE_BASE_DIR="$unix_path"
32017   fi
32018 
32019 
32020   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32021   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32022   METHOD="well-known location"
32023 
32024   # First check if the files exists.
32025   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32026     # We found an arbitrary include file. That's a good sign.
32027     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32028 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32029     FOUND_FREETYPE=yes
32030 
32031     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32032     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32033       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32034 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32035       FOUND_FREETYPE=no
32036     else
32037       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32038         # On Windows, we will need both .lib and .dll file.
32039         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32040           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32041 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32042           FOUND_FREETYPE=no
32043         fi
32044       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32045         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32046         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32047       fi
32048     fi
32049   fi
32050 
32051   if test "x$FOUND_FREETYPE" = xyes; then
32052 
32053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32054 
32055   # Input might be given as Windows format, start by converting to
32056   # unix format.
32057   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32058   new_path=`$CYGPATH -u "$path"`
32059 
32060   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32061   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32062   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32063   # "foo.exe" is OK but "foo" is an error.
32064   #
32065   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32066   # It is also a way to make sure we got the proper file name for the real test later on.
32067   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32068   if test "x$test_shortpath" = x; then
32069     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32070 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32071     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32072   fi
32073 
32074   # Call helper function which possibly converts this using DOS-style short mode.
32075   # If so, the updated path is stored in $new_path.
32076 
32077   input_path="$new_path"
32078   # Check if we need to convert this using DOS-style short mode. If the path
32079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32080   # take no chances and rewrite it.
32081   # Note: m4 eats our [], so we need to use [ and ] instead.
32082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32083   if test "x$has_forbidden_chars" != x; then
32084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32085     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32086     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32087     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32088       # Going to short mode and back again did indeed matter. Since short mode is
32089       # case insensitive, let's make it lowercase to improve readability.
32090       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32091       # Now convert it back to Unix-stile (cygpath)
32092       input_path=`$CYGPATH -u "$shortmode_path"`
32093       new_path="$input_path"
32094     fi
32095   fi
32096 
32097   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32098   if test "x$test_cygdrive_prefix" = x; then
32099     # As a simple fix, exclude /usr/bin since it's not a real path.
32100     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32101       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32102       # a path prefixed by /cygdrive for fixpath to work.
32103       new_path="$CYGWIN_ROOT_PATH$input_path"
32104     fi
32105   fi
32106 
32107 
32108   if test "x$path" != "x$new_path"; then
32109     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32111 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32112   fi
32113 
32114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32115 
32116   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32117   has_colon=`$ECHO $path | $GREP ^.:`
32118   new_path="$path"
32119   if test "x$has_colon" = x; then
32120     # Not in mixed or Windows style, start by that.
32121     new_path=`cmd //c echo $path`
32122   fi
32123 
32124 
32125   input_path="$new_path"
32126   # Check if we need to convert this using DOS-style short mode. If the path
32127   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32128   # take no chances and rewrite it.
32129   # Note: m4 eats our [], so we need to use [ and ] instead.
32130   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32131   if test "x$has_forbidden_chars" != x; then
32132     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32133     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32134   fi
32135 
32136 
32137   windows_path="$new_path"
32138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32139     unix_path=`$CYGPATH -u "$windows_path"`
32140     new_path="$unix_path"
32141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32142     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32143     new_path="$unix_path"
32144   fi
32145 
32146   if test "x$path" != "x$new_path"; then
32147     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32148     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32149 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32150   fi
32151 
32152   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32153   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32154 
32155   else
32156     # We're on a posix platform. Hooray! :)
32157     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32158     has_space=`$ECHO "$path" | $GREP " "`
32159     if test "x$has_space" != x; then
32160       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32161 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32162       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32163     fi
32164 
32165     # Use eval to expand a potential ~
32166     eval path="$path"
32167     if test ! -f "$path" && test ! -d "$path"; then
32168       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32169     fi
32170 
32171     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32172   fi
32173 
32174 
32175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32176 
32177   # Input might be given as Windows format, start by converting to
32178   # unix format.
32179   path="$POTENTIAL_FREETYPE_LIB_PATH"
32180   new_path=`$CYGPATH -u "$path"`
32181 
32182   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32183   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32184   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32185   # "foo.exe" is OK but "foo" is an error.
32186   #
32187   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32188   # It is also a way to make sure we got the proper file name for the real test later on.
32189   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32190   if test "x$test_shortpath" = x; then
32191     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32192 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32193     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32194   fi
32195 
32196   # Call helper function which possibly converts this using DOS-style short mode.
32197   # If so, the updated path is stored in $new_path.
32198 
32199   input_path="$new_path"
32200   # Check if we need to convert this using DOS-style short mode. If the path
32201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32202   # take no chances and rewrite it.
32203   # Note: m4 eats our [], so we need to use [ and ] instead.
32204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32205   if test "x$has_forbidden_chars" != x; then
32206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32207     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32208     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32209     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32210       # Going to short mode and back again did indeed matter. Since short mode is
32211       # case insensitive, let's make it lowercase to improve readability.
32212       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32213       # Now convert it back to Unix-stile (cygpath)
32214       input_path=`$CYGPATH -u "$shortmode_path"`
32215       new_path="$input_path"
32216     fi
32217   fi
32218 
32219   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32220   if test "x$test_cygdrive_prefix" = x; then
32221     # As a simple fix, exclude /usr/bin since it's not a real path.
32222     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32223       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32224       # a path prefixed by /cygdrive for fixpath to work.
32225       new_path="$CYGWIN_ROOT_PATH$input_path"
32226     fi
32227   fi
32228 
32229 
32230   if test "x$path" != "x$new_path"; then
32231     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32232     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32233 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32234   fi
32235 
32236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32237 
32238   path="$POTENTIAL_FREETYPE_LIB_PATH"
32239   has_colon=`$ECHO $path | $GREP ^.:`
32240   new_path="$path"
32241   if test "x$has_colon" = x; then
32242     # Not in mixed or Windows style, start by that.
32243     new_path=`cmd //c echo $path`
32244   fi
32245 
32246 
32247   input_path="$new_path"
32248   # Check if we need to convert this using DOS-style short mode. If the path
32249   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32250   # take no chances and rewrite it.
32251   # Note: m4 eats our [], so we need to use [ and ] instead.
32252   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32253   if test "x$has_forbidden_chars" != x; then
32254     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32255     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32256   fi
32257 
32258 
32259   windows_path="$new_path"
32260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32261     unix_path=`$CYGPATH -u "$windows_path"`
32262     new_path="$unix_path"
32263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32265     new_path="$unix_path"
32266   fi
32267 
32268   if test "x$path" != "x$new_path"; then
32269     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32271 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32272   fi
32273 
32274   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32275   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32276 
32277   else
32278     # We're on a posix platform. Hooray! :)
32279     path="$POTENTIAL_FREETYPE_LIB_PATH"
32280     has_space=`$ECHO "$path" | $GREP " "`
32281     if test "x$has_space" != x; then
32282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32283 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32284       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32285     fi
32286 
32287     # Use eval to expand a potential ~
32288     eval path="$path"
32289     if test ! -f "$path" && test ! -d "$path"; then
32290       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32291     fi
32292 
32293     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32294   fi
32295 
32296 
32297     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32298     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32299 $as_echo_n "checking for freetype includes... " >&6; }
32300     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32301 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32302     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32303     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32304 $as_echo_n "checking for freetype libraries... " >&6; }
32305     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32306 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32307   fi
32308 
32309           if test "x$FOUND_FREETYPE" != xyes; then
32310             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32311 
32312   windows_path="$FREETYPE_BASE_DIR"
32313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32314     unix_path=`$CYGPATH -u "$windows_path"`
32315     FREETYPE_BASE_DIR="$unix_path"
32316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32318     FREETYPE_BASE_DIR="$unix_path"
32319   fi
32320 
32321 
32322   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32323   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32324   METHOD="well-known location"
32325 
32326   # First check if the files exists.
32327   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32328     # We found an arbitrary include file. That's a good sign.
32329     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32330 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32331     FOUND_FREETYPE=yes
32332 
32333     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32334     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32335       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32336 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32337       FOUND_FREETYPE=no
32338     else
32339       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32340         # On Windows, we will need both .lib and .dll file.
32341         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32342           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32343 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32344           FOUND_FREETYPE=no
32345         fi
32346       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32347         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32348         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32349       fi
32350     fi
32351   fi
32352 
32353   if test "x$FOUND_FREETYPE" = xyes; then
32354 
32355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356 
32357   # Input might be given as Windows format, start by converting to
32358   # unix format.
32359   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32360   new_path=`$CYGPATH -u "$path"`
32361 
32362   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32363   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32364   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32365   # "foo.exe" is OK but "foo" is an error.
32366   #
32367   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32368   # It is also a way to make sure we got the proper file name for the real test later on.
32369   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32370   if test "x$test_shortpath" = x; then
32371     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32372 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32373     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32374   fi
32375 
32376   # Call helper function which possibly converts this using DOS-style short mode.
32377   # If so, the updated path is stored in $new_path.
32378 
32379   input_path="$new_path"
32380   # Check if we need to convert this using DOS-style short mode. If the path
32381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32382   # take no chances and rewrite it.
32383   # Note: m4 eats our [], so we need to use [ and ] instead.
32384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32385   if test "x$has_forbidden_chars" != x; then
32386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32387     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32388     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32389     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32390       # Going to short mode and back again did indeed matter. Since short mode is
32391       # case insensitive, let's make it lowercase to improve readability.
32392       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32393       # Now convert it back to Unix-stile (cygpath)
32394       input_path=`$CYGPATH -u "$shortmode_path"`
32395       new_path="$input_path"
32396     fi
32397   fi
32398 
32399   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32400   if test "x$test_cygdrive_prefix" = x; then
32401     # As a simple fix, exclude /usr/bin since it's not a real path.
32402     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32403       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32404       # a path prefixed by /cygdrive for fixpath to work.
32405       new_path="$CYGWIN_ROOT_PATH$input_path"
32406     fi
32407   fi
32408 
32409 
32410   if test "x$path" != "x$new_path"; then
32411     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32412     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32413 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32414   fi
32415 
32416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32417 
32418   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32419   has_colon=`$ECHO $path | $GREP ^.:`
32420   new_path="$path"
32421   if test "x$has_colon" = x; then
32422     # Not in mixed or Windows style, start by that.
32423     new_path=`cmd //c echo $path`
32424   fi
32425 
32426 
32427   input_path="$new_path"
32428   # Check if we need to convert this using DOS-style short mode. If the path
32429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32430   # take no chances and rewrite it.
32431   # Note: m4 eats our [], so we need to use [ and ] instead.
32432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32433   if test "x$has_forbidden_chars" != x; then
32434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32435     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32436   fi
32437 
32438 
32439   windows_path="$new_path"
32440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32441     unix_path=`$CYGPATH -u "$windows_path"`
32442     new_path="$unix_path"
32443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32445     new_path="$unix_path"
32446   fi
32447 
32448   if test "x$path" != "x$new_path"; then
32449     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32450     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32451 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32452   fi
32453 
32454   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32455   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32456 
32457   else
32458     # We're on a posix platform. Hooray! :)
32459     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32460     has_space=`$ECHO "$path" | $GREP " "`
32461     if test "x$has_space" != x; then
32462       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32463 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32464       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32465     fi
32466 
32467     # Use eval to expand a potential ~
32468     eval path="$path"
32469     if test ! -f "$path" && test ! -d "$path"; then
32470       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32471     fi
32472 
32473     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32474   fi
32475 
32476 
32477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32478 
32479   # Input might be given as Windows format, start by converting to
32480   # unix format.
32481   path="$POTENTIAL_FREETYPE_LIB_PATH"
32482   new_path=`$CYGPATH -u "$path"`
32483 
32484   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32485   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32486   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32487   # "foo.exe" is OK but "foo" is an error.
32488   #
32489   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32490   # It is also a way to make sure we got the proper file name for the real test later on.
32491   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32492   if test "x$test_shortpath" = x; then
32493     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32494 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32495     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32496   fi
32497 
32498   # Call helper function which possibly converts this using DOS-style short mode.
32499   # If so, the updated path is stored in $new_path.
32500 
32501   input_path="$new_path"
32502   # Check if we need to convert this using DOS-style short mode. If the path
32503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32504   # take no chances and rewrite it.
32505   # Note: m4 eats our [], so we need to use [ and ] instead.
32506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32507   if test "x$has_forbidden_chars" != x; then
32508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32512       # Going to short mode and back again did indeed matter. Since short mode is
32513       # case insensitive, let's make it lowercase to improve readability.
32514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32515       # Now convert it back to Unix-stile (cygpath)
32516       input_path=`$CYGPATH -u "$shortmode_path"`
32517       new_path="$input_path"
32518     fi
32519   fi
32520 
32521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32522   if test "x$test_cygdrive_prefix" = x; then
32523     # As a simple fix, exclude /usr/bin since it's not a real path.
32524     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32526       # a path prefixed by /cygdrive for fixpath to work.
32527       new_path="$CYGWIN_ROOT_PATH$input_path"
32528     fi
32529   fi
32530 
32531 
32532   if test "x$path" != "x$new_path"; then
32533     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32535 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32536   fi
32537 
32538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539 
32540   path="$POTENTIAL_FREETYPE_LIB_PATH"
32541   has_colon=`$ECHO $path | $GREP ^.:`
32542   new_path="$path"
32543   if test "x$has_colon" = x; then
32544     # Not in mixed or Windows style, start by that.
32545     new_path=`cmd //c echo $path`
32546   fi
32547 
32548 
32549   input_path="$new_path"
32550   # Check if we need to convert this using DOS-style short mode. If the path
32551   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32552   # take no chances and rewrite it.
32553   # Note: m4 eats our [], so we need to use [ and ] instead.
32554   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32555   if test "x$has_forbidden_chars" != x; then
32556     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32557     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32558   fi
32559 
32560 
32561   windows_path="$new_path"
32562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32563     unix_path=`$CYGPATH -u "$windows_path"`
32564     new_path="$unix_path"
32565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32567     new_path="$unix_path"
32568   fi
32569 
32570   if test "x$path" != "x$new_path"; then
32571     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32572     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32573 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32574   fi
32575 
32576   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32577   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32578 
32579   else
32580     # We're on a posix platform. Hooray! :)
32581     path="$POTENTIAL_FREETYPE_LIB_PATH"
32582     has_space=`$ECHO "$path" | $GREP " "`
32583     if test "x$has_space" != x; then
32584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32585 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32586       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32587     fi
32588 
32589     # Use eval to expand a potential ~
32590     eval path="$path"
32591     if test ! -f "$path" && test ! -d "$path"; then
32592       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32593     fi
32594 
32595     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32596   fi
32597 
32598 
32599     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32600     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32601 $as_echo_n "checking for freetype includes... " >&6; }
32602     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32603 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32604     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32605     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32606 $as_echo_n "checking for freetype libraries... " >&6; }
32607     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32608 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32609   fi
32610 
32611           fi
32612         else
32613           if test "x$SYS_ROOT" = "x/"; then
32614             FREETYPE_ROOT=
32615           else
32616             FREETYPE_ROOT="$SYS_ROOT"
32617           fi
32618           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32619 
32620   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32621   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32622   METHOD="well-known location"
32623 
32624   # First check if the files exists.
32625   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32626     # We found an arbitrary include file. That's a good sign.
32627     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32628 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32629     FOUND_FREETYPE=yes
32630 
32631     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32632     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32633       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32634 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32635       FOUND_FREETYPE=no
32636     else
32637       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32638         # On Windows, we will need both .lib and .dll file.
32639         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32640           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32641 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32642           FOUND_FREETYPE=no
32643         fi
32644       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32645         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32646         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32647       fi
32648     fi
32649   fi
32650 
32651   if test "x$FOUND_FREETYPE" = xyes; then
32652 
32653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32654 
32655   # Input might be given as Windows format, start by converting to
32656   # unix format.
32657   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32658   new_path=`$CYGPATH -u "$path"`
32659 
32660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32663   # "foo.exe" is OK but "foo" is an error.
32664   #
32665   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32666   # It is also a way to make sure we got the proper file name for the real test later on.
32667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32668   if test "x$test_shortpath" = x; then
32669     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32670 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32671     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32672   fi
32673 
32674   # Call helper function which possibly converts this using DOS-style short mode.
32675   # If so, the updated path is stored in $new_path.
32676 
32677   input_path="$new_path"
32678   # Check if we need to convert this using DOS-style short mode. If the path
32679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32680   # take no chances and rewrite it.
32681   # Note: m4 eats our [], so we need to use [ and ] instead.
32682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32683   if test "x$has_forbidden_chars" != x; then
32684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32688       # Going to short mode and back again did indeed matter. Since short mode is
32689       # case insensitive, let's make it lowercase to improve readability.
32690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32691       # Now convert it back to Unix-stile (cygpath)
32692       input_path=`$CYGPATH -u "$shortmode_path"`
32693       new_path="$input_path"
32694     fi
32695   fi
32696 
32697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32698   if test "x$test_cygdrive_prefix" = x; then
32699     # As a simple fix, exclude /usr/bin since it's not a real path.
32700     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32702       # a path prefixed by /cygdrive for fixpath to work.
32703       new_path="$CYGWIN_ROOT_PATH$input_path"
32704     fi
32705   fi
32706 
32707 
32708   if test "x$path" != "x$new_path"; then
32709     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32711 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32712   fi
32713 
32714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32715 
32716   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32717   has_colon=`$ECHO $path | $GREP ^.:`
32718   new_path="$path"
32719   if test "x$has_colon" = x; then
32720     # Not in mixed or Windows style, start by that.
32721     new_path=`cmd //c echo $path`
32722   fi
32723 
32724 
32725   input_path="$new_path"
32726   # Check if we need to convert this using DOS-style short mode. If the path
32727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32728   # take no chances and rewrite it.
32729   # Note: m4 eats our [], so we need to use [ and ] instead.
32730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32731   if test "x$has_forbidden_chars" != x; then
32732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32733     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32734   fi
32735 
32736 
32737   windows_path="$new_path"
32738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32739     unix_path=`$CYGPATH -u "$windows_path"`
32740     new_path="$unix_path"
32741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32743     new_path="$unix_path"
32744   fi
32745 
32746   if test "x$path" != "x$new_path"; then
32747     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32749 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32750   fi
32751 
32752   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32753   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32754 
32755   else
32756     # We're on a posix platform. Hooray! :)
32757     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32758     has_space=`$ECHO "$path" | $GREP " "`
32759     if test "x$has_space" != x; then
32760       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32761 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32762       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32763     fi
32764 
32765     # Use eval to expand a potential ~
32766     eval path="$path"
32767     if test ! -f "$path" && test ! -d "$path"; then
32768       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32769     fi
32770 
32771     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32772   fi
32773 
32774 
32775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32776 
32777   # Input might be given as Windows format, start by converting to
32778   # unix format.
32779   path="$POTENTIAL_FREETYPE_LIB_PATH"
32780   new_path=`$CYGPATH -u "$path"`
32781 
32782   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32783   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32784   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32785   # "foo.exe" is OK but "foo" is an error.
32786   #
32787   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32788   # It is also a way to make sure we got the proper file name for the real test later on.
32789   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32790   if test "x$test_shortpath" = x; then
32791     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32792 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32793     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32794   fi
32795 
32796   # Call helper function which possibly converts this using DOS-style short mode.
32797   # If so, the updated path is stored in $new_path.
32798 
32799   input_path="$new_path"
32800   # Check if we need to convert this using DOS-style short mode. If the path
32801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32802   # take no chances and rewrite it.
32803   # Note: m4 eats our [], so we need to use [ and ] instead.
32804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32805   if test "x$has_forbidden_chars" != x; then
32806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32807     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32808     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32809     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32810       # Going to short mode and back again did indeed matter. Since short mode is
32811       # case insensitive, let's make it lowercase to improve readability.
32812       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32813       # Now convert it back to Unix-stile (cygpath)
32814       input_path=`$CYGPATH -u "$shortmode_path"`
32815       new_path="$input_path"
32816     fi
32817   fi
32818 
32819   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32820   if test "x$test_cygdrive_prefix" = x; then
32821     # As a simple fix, exclude /usr/bin since it's not a real path.
32822     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32823       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32824       # a path prefixed by /cygdrive for fixpath to work.
32825       new_path="$CYGWIN_ROOT_PATH$input_path"
32826     fi
32827   fi
32828 
32829 
32830   if test "x$path" != "x$new_path"; then
32831     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32833 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32834   fi
32835 
32836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32837 
32838   path="$POTENTIAL_FREETYPE_LIB_PATH"
32839   has_colon=`$ECHO $path | $GREP ^.:`
32840   new_path="$path"
32841   if test "x$has_colon" = x; then
32842     # Not in mixed or Windows style, start by that.
32843     new_path=`cmd //c echo $path`
32844   fi
32845 
32846 
32847   input_path="$new_path"
32848   # Check if we need to convert this using DOS-style short mode. If the path
32849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32850   # take no chances and rewrite it.
32851   # Note: m4 eats our [], so we need to use [ and ] instead.
32852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32853   if test "x$has_forbidden_chars" != x; then
32854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32855     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32856   fi
32857 
32858 
32859   windows_path="$new_path"
32860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32861     unix_path=`$CYGPATH -u "$windows_path"`
32862     new_path="$unix_path"
32863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32865     new_path="$unix_path"
32866   fi
32867 
32868   if test "x$path" != "x$new_path"; then
32869     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32870     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32871 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32872   fi
32873 
32874   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32875   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32876 
32877   else
32878     # We're on a posix platform. Hooray! :)
32879     path="$POTENTIAL_FREETYPE_LIB_PATH"
32880     has_space=`$ECHO "$path" | $GREP " "`
32881     if test "x$has_space" != x; then
32882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32883 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32884       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32885     fi
32886 
32887     # Use eval to expand a potential ~
32888     eval path="$path"
32889     if test ! -f "$path" && test ! -d "$path"; then
32890       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32891     fi
32892 
32893     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32894   fi
32895 
32896 
32897     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32899 $as_echo_n "checking for freetype includes... " >&6; }
32900     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32901 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32902     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32904 $as_echo_n "checking for freetype libraries... " >&6; }
32905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32906 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32907   fi
32908 
32909 
32910           if test "x$FOUND_FREETYPE" != xyes; then
32911             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32912 
32913   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32914   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32915   METHOD="well-known location"
32916 
32917   # First check if the files exists.
32918   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32919     # We found an arbitrary include file. That's a good sign.
32920     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32921 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32922     FOUND_FREETYPE=yes
32923 
32924     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32925     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32926       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32927 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32928       FOUND_FREETYPE=no
32929     else
32930       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32931         # On Windows, we will need both .lib and .dll file.
32932         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32933           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32934 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32935           FOUND_FREETYPE=no
32936         fi
32937       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32938         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32939         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32940       fi
32941     fi
32942   fi
32943 
32944   if test "x$FOUND_FREETYPE" = xyes; then
32945 
32946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32947 
32948   # Input might be given as Windows format, start by converting to
32949   # unix format.
32950   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32951   new_path=`$CYGPATH -u "$path"`
32952 
32953   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32954   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32955   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32956   # "foo.exe" is OK but "foo" is an error.
32957   #
32958   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32959   # It is also a way to make sure we got the proper file name for the real test later on.
32960   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32961   if test "x$test_shortpath" = x; then
32962     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32963 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32964     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32965   fi
32966 
32967   # Call helper function which possibly converts this using DOS-style short mode.
32968   # If so, the updated path is stored in $new_path.
32969 
32970   input_path="$new_path"
32971   # Check if we need to convert this using DOS-style short mode. If the path
32972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32973   # take no chances and rewrite it.
32974   # Note: m4 eats our [], so we need to use [ and ] instead.
32975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32976   if test "x$has_forbidden_chars" != x; then
32977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32978     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32979     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32980     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32981       # Going to short mode and back again did indeed matter. Since short mode is
32982       # case insensitive, let's make it lowercase to improve readability.
32983       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32984       # Now convert it back to Unix-stile (cygpath)
32985       input_path=`$CYGPATH -u "$shortmode_path"`
32986       new_path="$input_path"
32987     fi
32988   fi
32989 
32990   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32991   if test "x$test_cygdrive_prefix" = x; then
32992     # As a simple fix, exclude /usr/bin since it's not a real path.
32993     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32994       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32995       # a path prefixed by /cygdrive for fixpath to work.
32996       new_path="$CYGWIN_ROOT_PATH$input_path"
32997     fi
32998   fi
32999 
33000 
33001   if test "x$path" != "x$new_path"; then
33002     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33004 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33005   fi
33006 
33007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33008 
33009   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33010   has_colon=`$ECHO $path | $GREP ^.:`
33011   new_path="$path"
33012   if test "x$has_colon" = x; then
33013     # Not in mixed or Windows style, start by that.
33014     new_path=`cmd //c echo $path`
33015   fi
33016 
33017 
33018   input_path="$new_path"
33019   # Check if we need to convert this using DOS-style short mode. If the path
33020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33021   # take no chances and rewrite it.
33022   # Note: m4 eats our [], so we need to use [ and ] instead.
33023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33024   if test "x$has_forbidden_chars" != x; then
33025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33026     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33027   fi
33028 
33029 
33030   windows_path="$new_path"
33031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33032     unix_path=`$CYGPATH -u "$windows_path"`
33033     new_path="$unix_path"
33034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33036     new_path="$unix_path"
33037   fi
33038 
33039   if test "x$path" != "x$new_path"; then
33040     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33042 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33043   fi
33044 
33045   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33046   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33047 
33048   else
33049     # We're on a posix platform. Hooray! :)
33050     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33051     has_space=`$ECHO "$path" | $GREP " "`
33052     if test "x$has_space" != x; then
33053       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33054 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33055       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33056     fi
33057 
33058     # Use eval to expand a potential ~
33059     eval path="$path"
33060     if test ! -f "$path" && test ! -d "$path"; then
33061       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33062     fi
33063 
33064     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33065   fi
33066 
33067 
33068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33069 
33070   # Input might be given as Windows format, start by converting to
33071   # unix format.
33072   path="$POTENTIAL_FREETYPE_LIB_PATH"
33073   new_path=`$CYGPATH -u "$path"`
33074 
33075   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33076   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33077   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33078   # "foo.exe" is OK but "foo" is an error.
33079   #
33080   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33081   # It is also a way to make sure we got the proper file name for the real test later on.
33082   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33083   if test "x$test_shortpath" = x; then
33084     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33085 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33086     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33087   fi
33088 
33089   # Call helper function which possibly converts this using DOS-style short mode.
33090   # If so, the updated path is stored in $new_path.
33091 
33092   input_path="$new_path"
33093   # Check if we need to convert this using DOS-style short mode. If the path
33094   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33095   # take no chances and rewrite it.
33096   # Note: m4 eats our [], so we need to use [ and ] instead.
33097   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33098   if test "x$has_forbidden_chars" != x; then
33099     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33100     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33101     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33102     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33103       # Going to short mode and back again did indeed matter. Since short mode is
33104       # case insensitive, let's make it lowercase to improve readability.
33105       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33106       # Now convert it back to Unix-stile (cygpath)
33107       input_path=`$CYGPATH -u "$shortmode_path"`
33108       new_path="$input_path"
33109     fi
33110   fi
33111 
33112   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33113   if test "x$test_cygdrive_prefix" = x; then
33114     # As a simple fix, exclude /usr/bin since it's not a real path.
33115     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33116       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33117       # a path prefixed by /cygdrive for fixpath to work.
33118       new_path="$CYGWIN_ROOT_PATH$input_path"
33119     fi
33120   fi
33121 
33122 
33123   if test "x$path" != "x$new_path"; then
33124     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33126 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33127   fi
33128 
33129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33130 
33131   path="$POTENTIAL_FREETYPE_LIB_PATH"
33132   has_colon=`$ECHO $path | $GREP ^.:`
33133   new_path="$path"
33134   if test "x$has_colon" = x; then
33135     # Not in mixed or Windows style, start by that.
33136     new_path=`cmd //c echo $path`
33137   fi
33138 
33139 
33140   input_path="$new_path"
33141   # Check if we need to convert this using DOS-style short mode. If the path
33142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33143   # take no chances and rewrite it.
33144   # Note: m4 eats our [], so we need to use [ and ] instead.
33145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33146   if test "x$has_forbidden_chars" != x; then
33147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33148     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33149   fi
33150 
33151 
33152   windows_path="$new_path"
33153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33154     unix_path=`$CYGPATH -u "$windows_path"`
33155     new_path="$unix_path"
33156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33157     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33158     new_path="$unix_path"
33159   fi
33160 
33161   if test "x$path" != "x$new_path"; then
33162     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33163     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33164 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33165   fi
33166 
33167   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33168   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33169 
33170   else
33171     # We're on a posix platform. Hooray! :)
33172     path="$POTENTIAL_FREETYPE_LIB_PATH"
33173     has_space=`$ECHO "$path" | $GREP " "`
33174     if test "x$has_space" != x; then
33175       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33176 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33177       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33178     fi
33179 
33180     # Use eval to expand a potential ~
33181     eval path="$path"
33182     if test ! -f "$path" && test ! -d "$path"; then
33183       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33184     fi
33185 
33186     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33187   fi
33188 
33189 
33190     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33191     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33192 $as_echo_n "checking for freetype includes... " >&6; }
33193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33194 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33195     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33196     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33197 $as_echo_n "checking for freetype libraries... " >&6; }
33198     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33199 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33200   fi
33201 
33202           fi
33203 
33204           if test "x$FOUND_FREETYPE" != xyes; then
33205             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33206             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33207 
33208   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33209   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33210   METHOD="well-known location"
33211 
33212   # First check if the files exists.
33213   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33214     # We found an arbitrary include file. That's a good sign.
33215     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33216 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33217     FOUND_FREETYPE=yes
33218 
33219     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33220     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33221       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33222 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33223       FOUND_FREETYPE=no
33224     else
33225       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33226         # On Windows, we will need both .lib and .dll file.
33227         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33228           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33229 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33230           FOUND_FREETYPE=no
33231         fi
33232       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33233         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33234         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33235       fi
33236     fi
33237   fi
33238 
33239   if test "x$FOUND_FREETYPE" = xyes; then
33240 
33241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33242 
33243   # Input might be given as Windows format, start by converting to
33244   # unix format.
33245   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33246   new_path=`$CYGPATH -u "$path"`
33247 
33248   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33249   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33250   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33251   # "foo.exe" is OK but "foo" is an error.
33252   #
33253   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33254   # It is also a way to make sure we got the proper file name for the real test later on.
33255   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33256   if test "x$test_shortpath" = x; then
33257     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33258 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33259     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33260   fi
33261 
33262   # Call helper function which possibly converts this using DOS-style short mode.
33263   # If so, the updated path is stored in $new_path.
33264 
33265   input_path="$new_path"
33266   # Check if we need to convert this using DOS-style short mode. If the path
33267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33268   # take no chances and rewrite it.
33269   # Note: m4 eats our [], so we need to use [ and ] instead.
33270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33271   if test "x$has_forbidden_chars" != x; then
33272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33276       # Going to short mode and back again did indeed matter. Since short mode is
33277       # case insensitive, let's make it lowercase to improve readability.
33278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33279       # Now convert it back to Unix-stile (cygpath)
33280       input_path=`$CYGPATH -u "$shortmode_path"`
33281       new_path="$input_path"
33282     fi
33283   fi
33284 
33285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33286   if test "x$test_cygdrive_prefix" = x; then
33287     # As a simple fix, exclude /usr/bin since it's not a real path.
33288     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33290       # a path prefixed by /cygdrive for fixpath to work.
33291       new_path="$CYGWIN_ROOT_PATH$input_path"
33292     fi
33293   fi
33294 
33295 
33296   if test "x$path" != "x$new_path"; then
33297     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33299 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33300   fi
33301 
33302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33303 
33304   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33305   has_colon=`$ECHO $path | $GREP ^.:`
33306   new_path="$path"
33307   if test "x$has_colon" = x; then
33308     # Not in mixed or Windows style, start by that.
33309     new_path=`cmd //c echo $path`
33310   fi
33311 
33312 
33313   input_path="$new_path"
33314   # Check if we need to convert this using DOS-style short mode. If the path
33315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33316   # take no chances and rewrite it.
33317   # Note: m4 eats our [], so we need to use [ and ] instead.
33318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33319   if test "x$has_forbidden_chars" != x; then
33320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33321     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33322   fi
33323 
33324 
33325   windows_path="$new_path"
33326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33327     unix_path=`$CYGPATH -u "$windows_path"`
33328     new_path="$unix_path"
33329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33331     new_path="$unix_path"
33332   fi
33333 
33334   if test "x$path" != "x$new_path"; then
33335     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33336     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33337 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33338   fi
33339 
33340   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33341   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33342 
33343   else
33344     # We're on a posix platform. Hooray! :)
33345     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33346     has_space=`$ECHO "$path" | $GREP " "`
33347     if test "x$has_space" != x; then
33348       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33349 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33350       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33351     fi
33352 
33353     # Use eval to expand a potential ~
33354     eval path="$path"
33355     if test ! -f "$path" && test ! -d "$path"; then
33356       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33357     fi
33358 
33359     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33360   fi
33361 
33362 
33363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33364 
33365   # Input might be given as Windows format, start by converting to
33366   # unix format.
33367   path="$POTENTIAL_FREETYPE_LIB_PATH"
33368   new_path=`$CYGPATH -u "$path"`
33369 
33370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33373   # "foo.exe" is OK but "foo" is an error.
33374   #
33375   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33376   # It is also a way to make sure we got the proper file name for the real test later on.
33377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33378   if test "x$test_shortpath" = x; then
33379     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33380 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33381     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33382   fi
33383 
33384   # Call helper function which possibly converts this using DOS-style short mode.
33385   # If so, the updated path is stored in $new_path.
33386 
33387   input_path="$new_path"
33388   # Check if we need to convert this using DOS-style short mode. If the path
33389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33390   # take no chances and rewrite it.
33391   # Note: m4 eats our [], so we need to use [ and ] instead.
33392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33393   if test "x$has_forbidden_chars" != x; then
33394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33395     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33396     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33397     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33398       # Going to short mode and back again did indeed matter. Since short mode is
33399       # case insensitive, let's make it lowercase to improve readability.
33400       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33401       # Now convert it back to Unix-stile (cygpath)
33402       input_path=`$CYGPATH -u "$shortmode_path"`
33403       new_path="$input_path"
33404     fi
33405   fi
33406 
33407   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33408   if test "x$test_cygdrive_prefix" = x; then
33409     # As a simple fix, exclude /usr/bin since it's not a real path.
33410     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33411       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33412       # a path prefixed by /cygdrive for fixpath to work.
33413       new_path="$CYGWIN_ROOT_PATH$input_path"
33414     fi
33415   fi
33416 
33417 
33418   if test "x$path" != "x$new_path"; then
33419     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33421 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33422   fi
33423 
33424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33425 
33426   path="$POTENTIAL_FREETYPE_LIB_PATH"
33427   has_colon=`$ECHO $path | $GREP ^.:`
33428   new_path="$path"
33429   if test "x$has_colon" = x; then
33430     # Not in mixed or Windows style, start by that.
33431     new_path=`cmd //c echo $path`
33432   fi
33433 
33434 
33435   input_path="$new_path"
33436   # Check if we need to convert this using DOS-style short mode. If the path
33437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33438   # take no chances and rewrite it.
33439   # Note: m4 eats our [], so we need to use [ and ] instead.
33440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33441   if test "x$has_forbidden_chars" != x; then
33442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33444   fi
33445 
33446 
33447   windows_path="$new_path"
33448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33449     unix_path=`$CYGPATH -u "$windows_path"`
33450     new_path="$unix_path"
33451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33453     new_path="$unix_path"
33454   fi
33455 
33456   if test "x$path" != "x$new_path"; then
33457     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33459 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33460   fi
33461 
33462   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33463   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33464 
33465   else
33466     # We're on a posix platform. Hooray! :)
33467     path="$POTENTIAL_FREETYPE_LIB_PATH"
33468     has_space=`$ECHO "$path" | $GREP " "`
33469     if test "x$has_space" != x; then
33470       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33471 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33472       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33473     fi
33474 
33475     # Use eval to expand a potential ~
33476     eval path="$path"
33477     if test ! -f "$path" && test ! -d "$path"; then
33478       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33479     fi
33480 
33481     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33482   fi
33483 
33484 
33485     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33486     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33487 $as_echo_n "checking for freetype includes... " >&6; }
33488     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33489 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33490     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33492 $as_echo_n "checking for freetype libraries... " >&6; }
33493     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33494 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33495   fi
33496 
33497             else
33498 
33499   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33500   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33501   METHOD="well-known location"
33502 
33503   # First check if the files exists.
33504   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33505     # We found an arbitrary include file. That's a good sign.
33506     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33507 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33508     FOUND_FREETYPE=yes
33509 
33510     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33511     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33512       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33513 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33514       FOUND_FREETYPE=no
33515     else
33516       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33517         # On Windows, we will need both .lib and .dll file.
33518         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33519           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33520 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33521           FOUND_FREETYPE=no
33522         fi
33523       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33524         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33525         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33526       fi
33527     fi
33528   fi
33529 
33530   if test "x$FOUND_FREETYPE" = xyes; then
33531 
33532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33533 
33534   # Input might be given as Windows format, start by converting to
33535   # unix format.
33536   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33537   new_path=`$CYGPATH -u "$path"`
33538 
33539   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33540   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33541   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33542   # "foo.exe" is OK but "foo" is an error.
33543   #
33544   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33545   # It is also a way to make sure we got the proper file name for the real test later on.
33546   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33547   if test "x$test_shortpath" = x; then
33548     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33549 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33550     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33551   fi
33552 
33553   # Call helper function which possibly converts this using DOS-style short mode.
33554   # If so, the updated path is stored in $new_path.
33555 
33556   input_path="$new_path"
33557   # Check if we need to convert this using DOS-style short mode. If the path
33558   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33559   # take no chances and rewrite it.
33560   # Note: m4 eats our [], so we need to use [ and ] instead.
33561   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33562   if test "x$has_forbidden_chars" != x; then
33563     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33564     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33565     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33566     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33567       # Going to short mode and back again did indeed matter. Since short mode is
33568       # case insensitive, let's make it lowercase to improve readability.
33569       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33570       # Now convert it back to Unix-stile (cygpath)
33571       input_path=`$CYGPATH -u "$shortmode_path"`
33572       new_path="$input_path"
33573     fi
33574   fi
33575 
33576   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33577   if test "x$test_cygdrive_prefix" = x; then
33578     # As a simple fix, exclude /usr/bin since it's not a real path.
33579     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33580       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33581       # a path prefixed by /cygdrive for fixpath to work.
33582       new_path="$CYGWIN_ROOT_PATH$input_path"
33583     fi
33584   fi
33585 
33586 
33587   if test "x$path" != "x$new_path"; then
33588     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33590 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33591   fi
33592 
33593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33594 
33595   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33596   has_colon=`$ECHO $path | $GREP ^.:`
33597   new_path="$path"
33598   if test "x$has_colon" = x; then
33599     # Not in mixed or Windows style, start by that.
33600     new_path=`cmd //c echo $path`
33601   fi
33602 
33603 
33604   input_path="$new_path"
33605   # Check if we need to convert this using DOS-style short mode. If the path
33606   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33607   # take no chances and rewrite it.
33608   # Note: m4 eats our [], so we need to use [ and ] instead.
33609   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33610   if test "x$has_forbidden_chars" != x; then
33611     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33612     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33613   fi
33614 
33615 
33616   windows_path="$new_path"
33617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33618     unix_path=`$CYGPATH -u "$windows_path"`
33619     new_path="$unix_path"
33620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33622     new_path="$unix_path"
33623   fi
33624 
33625   if test "x$path" != "x$new_path"; then
33626     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33627     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33628 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33629   fi
33630 
33631   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33632   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33633 
33634   else
33635     # We're on a posix platform. Hooray! :)
33636     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33637     has_space=`$ECHO "$path" | $GREP " "`
33638     if test "x$has_space" != x; then
33639       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33640 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33641       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33642     fi
33643 
33644     # Use eval to expand a potential ~
33645     eval path="$path"
33646     if test ! -f "$path" && test ! -d "$path"; then
33647       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33648     fi
33649 
33650     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33651   fi
33652 
33653 
33654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33655 
33656   # Input might be given as Windows format, start by converting to
33657   # unix format.
33658   path="$POTENTIAL_FREETYPE_LIB_PATH"
33659   new_path=`$CYGPATH -u "$path"`
33660 
33661   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33662   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33663   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33664   # "foo.exe" is OK but "foo" is an error.
33665   #
33666   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33667   # It is also a way to make sure we got the proper file name for the real test later on.
33668   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33669   if test "x$test_shortpath" = x; then
33670     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33671 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33672     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33673   fi
33674 
33675   # Call helper function which possibly converts this using DOS-style short mode.
33676   # If so, the updated path is stored in $new_path.
33677 
33678   input_path="$new_path"
33679   # Check if we need to convert this using DOS-style short mode. If the path
33680   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33681   # take no chances and rewrite it.
33682   # Note: m4 eats our [], so we need to use [ and ] instead.
33683   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33684   if test "x$has_forbidden_chars" != x; then
33685     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33686     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33687     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33688     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33689       # Going to short mode and back again did indeed matter. Since short mode is
33690       # case insensitive, let's make it lowercase to improve readability.
33691       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33692       # Now convert it back to Unix-stile (cygpath)
33693       input_path=`$CYGPATH -u "$shortmode_path"`
33694       new_path="$input_path"
33695     fi
33696   fi
33697 
33698   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33699   if test "x$test_cygdrive_prefix" = x; then
33700     # As a simple fix, exclude /usr/bin since it's not a real path.
33701     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33702       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33703       # a path prefixed by /cygdrive for fixpath to work.
33704       new_path="$CYGWIN_ROOT_PATH$input_path"
33705     fi
33706   fi
33707 
33708 
33709   if test "x$path" != "x$new_path"; then
33710     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33711     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33712 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33713   fi
33714 
33715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33716 
33717   path="$POTENTIAL_FREETYPE_LIB_PATH"
33718   has_colon=`$ECHO $path | $GREP ^.:`
33719   new_path="$path"
33720   if test "x$has_colon" = x; then
33721     # Not in mixed or Windows style, start by that.
33722     new_path=`cmd //c echo $path`
33723   fi
33724 
33725 
33726   input_path="$new_path"
33727   # Check if we need to convert this using DOS-style short mode. If the path
33728   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33729   # take no chances and rewrite it.
33730   # Note: m4 eats our [], so we need to use [ and ] instead.
33731   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33732   if test "x$has_forbidden_chars" != x; then
33733     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33734     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33735   fi
33736 
33737 
33738   windows_path="$new_path"
33739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33740     unix_path=`$CYGPATH -u "$windows_path"`
33741     new_path="$unix_path"
33742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33744     new_path="$unix_path"
33745   fi
33746 
33747   if test "x$path" != "x$new_path"; then
33748     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33749     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33750 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33751   fi
33752 
33753   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33754   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33755 
33756   else
33757     # We're on a posix platform. Hooray! :)
33758     path="$POTENTIAL_FREETYPE_LIB_PATH"
33759     has_space=`$ECHO "$path" | $GREP " "`
33760     if test "x$has_space" != x; then
33761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33762 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33763       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33764     fi
33765 
33766     # Use eval to expand a potential ~
33767     eval path="$path"
33768     if test ! -f "$path" && test ! -d "$path"; then
33769       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33770     fi
33771 
33772     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33773   fi
33774 
33775 
33776     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33777     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33778 $as_echo_n "checking for freetype includes... " >&6; }
33779     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33780 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33781     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33782     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33783 $as_echo_n "checking for freetype libraries... " >&6; }
33784     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33785 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33786   fi
33787 
33788               if test "x$FOUND_FREETYPE" != xyes; then
33789 
33790   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33791   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33792   METHOD="well-known location"
33793 
33794   # First check if the files exists.
33795   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33796     # We found an arbitrary include file. That's a good sign.
33797     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33798 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33799     FOUND_FREETYPE=yes
33800 
33801     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33802     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33803       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33804 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33805       FOUND_FREETYPE=no
33806     else
33807       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33808         # On Windows, we will need both .lib and .dll file.
33809         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33810           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33811 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33812           FOUND_FREETYPE=no
33813         fi
33814       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33815         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33816         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33817       fi
33818     fi
33819   fi
33820 
33821   if test "x$FOUND_FREETYPE" = xyes; then
33822 
33823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33824 
33825   # Input might be given as Windows format, start by converting to
33826   # unix format.
33827   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33828   new_path=`$CYGPATH -u "$path"`
33829 
33830   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33831   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33832   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33833   # "foo.exe" is OK but "foo" is an error.
33834   #
33835   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33836   # It is also a way to make sure we got the proper file name for the real test later on.
33837   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33838   if test "x$test_shortpath" = x; then
33839     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33840 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33841     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33842   fi
33843 
33844   # Call helper function which possibly converts this using DOS-style short mode.
33845   # If so, the updated path is stored in $new_path.
33846 
33847   input_path="$new_path"
33848   # Check if we need to convert this using DOS-style short mode. If the path
33849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33850   # take no chances and rewrite it.
33851   # Note: m4 eats our [], so we need to use [ and ] instead.
33852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33853   if test "x$has_forbidden_chars" != x; then
33854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33855     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33856     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33857     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33858       # Going to short mode and back again did indeed matter. Since short mode is
33859       # case insensitive, let's make it lowercase to improve readability.
33860       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33861       # Now convert it back to Unix-stile (cygpath)
33862       input_path=`$CYGPATH -u "$shortmode_path"`
33863       new_path="$input_path"
33864     fi
33865   fi
33866 
33867   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33868   if test "x$test_cygdrive_prefix" = x; then
33869     # As a simple fix, exclude /usr/bin since it's not a real path.
33870     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33871       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33872       # a path prefixed by /cygdrive for fixpath to work.
33873       new_path="$CYGWIN_ROOT_PATH$input_path"
33874     fi
33875   fi
33876 
33877 
33878   if test "x$path" != "x$new_path"; then
33879     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33880     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33881 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33882   fi
33883 
33884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33885 
33886   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33887   has_colon=`$ECHO $path | $GREP ^.:`
33888   new_path="$path"
33889   if test "x$has_colon" = x; then
33890     # Not in mixed or Windows style, start by that.
33891     new_path=`cmd //c echo $path`
33892   fi
33893 
33894 
33895   input_path="$new_path"
33896   # Check if we need to convert this using DOS-style short mode. If the path
33897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33898   # take no chances and rewrite it.
33899   # Note: m4 eats our [], so we need to use [ and ] instead.
33900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33901   if test "x$has_forbidden_chars" != x; then
33902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33903     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33904   fi
33905 
33906 
33907   windows_path="$new_path"
33908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33909     unix_path=`$CYGPATH -u "$windows_path"`
33910     new_path="$unix_path"
33911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33913     new_path="$unix_path"
33914   fi
33915 
33916   if test "x$path" != "x$new_path"; then
33917     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33919 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33920   fi
33921 
33922   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33923   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33924 
33925   else
33926     # We're on a posix platform. Hooray! :)
33927     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33928     has_space=`$ECHO "$path" | $GREP " "`
33929     if test "x$has_space" != x; then
33930       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33931 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33932       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33933     fi
33934 
33935     # Use eval to expand a potential ~
33936     eval path="$path"
33937     if test ! -f "$path" && test ! -d "$path"; then
33938       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33939     fi
33940 
33941     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33942   fi
33943 
33944 
33945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33946 
33947   # Input might be given as Windows format, start by converting to
33948   # unix format.
33949   path="$POTENTIAL_FREETYPE_LIB_PATH"
33950   new_path=`$CYGPATH -u "$path"`
33951 
33952   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33953   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33954   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33955   # "foo.exe" is OK but "foo" is an error.
33956   #
33957   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33958   # It is also a way to make sure we got the proper file name for the real test later on.
33959   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33960   if test "x$test_shortpath" = x; then
33961     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33962 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33963     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33964   fi
33965 
33966   # Call helper function which possibly converts this using DOS-style short mode.
33967   # If so, the updated path is stored in $new_path.
33968 
33969   input_path="$new_path"
33970   # Check if we need to convert this using DOS-style short mode. If the path
33971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33972   # take no chances and rewrite it.
33973   # Note: m4 eats our [], so we need to use [ and ] instead.
33974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33975   if test "x$has_forbidden_chars" != x; then
33976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33980       # Going to short mode and back again did indeed matter. Since short mode is
33981       # case insensitive, let's make it lowercase to improve readability.
33982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33983       # Now convert it back to Unix-stile (cygpath)
33984       input_path=`$CYGPATH -u "$shortmode_path"`
33985       new_path="$input_path"
33986     fi
33987   fi
33988 
33989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33990   if test "x$test_cygdrive_prefix" = x; then
33991     # As a simple fix, exclude /usr/bin since it's not a real path.
33992     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33994       # a path prefixed by /cygdrive for fixpath to work.
33995       new_path="$CYGWIN_ROOT_PATH$input_path"
33996     fi
33997   fi
33998 
33999 
34000   if test "x$path" != "x$new_path"; then
34001     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34003 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34004   fi
34005 
34006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34007 
34008   path="$POTENTIAL_FREETYPE_LIB_PATH"
34009   has_colon=`$ECHO $path | $GREP ^.:`
34010   new_path="$path"
34011   if test "x$has_colon" = x; then
34012     # Not in mixed or Windows style, start by that.
34013     new_path=`cmd //c echo $path`
34014   fi
34015 
34016 
34017   input_path="$new_path"
34018   # Check if we need to convert this using DOS-style short mode. If the path
34019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34020   # take no chances and rewrite it.
34021   # Note: m4 eats our [], so we need to use [ and ] instead.
34022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34023   if test "x$has_forbidden_chars" != x; then
34024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34025     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34026   fi
34027 
34028 
34029   windows_path="$new_path"
34030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34031     unix_path=`$CYGPATH -u "$windows_path"`
34032     new_path="$unix_path"
34033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34035     new_path="$unix_path"
34036   fi
34037 
34038   if test "x$path" != "x$new_path"; then
34039     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34041 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34042   fi
34043 
34044   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34045   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34046 
34047   else
34048     # We're on a posix platform. Hooray! :)
34049     path="$POTENTIAL_FREETYPE_LIB_PATH"
34050     has_space=`$ECHO "$path" | $GREP " "`
34051     if test "x$has_space" != x; then
34052       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34053 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34054       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34055     fi
34056 
34057     # Use eval to expand a potential ~
34058     eval path="$path"
34059     if test ! -f "$path" && test ! -d "$path"; then
34060       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34061     fi
34062 
34063     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34064   fi
34065 
34066 
34067     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34068     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34069 $as_echo_n "checking for freetype includes... " >&6; }
34070     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34071 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34072     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34073     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34074 $as_echo_n "checking for freetype libraries... " >&6; }
34075     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34076 $as_echo "$FREETYPE_LIB_PATH" >&6; }
34077   fi
34078 
34079               fi
34080             fi
34081           fi
34082         fi
34083       fi # end check in well-known locations
34084 
34085       if test "x$FOUND_FREETYPE" != xyes; then
34086 
34087   # Print a helpful message on how to acquire the necessary build dependency.
34088   # freetype is the help tag: freetype, cups, pulse, alsa etc
34089   MISSING_DEPENDENCY=freetype
34090 
34091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34092     cygwin_help $MISSING_DEPENDENCY
34093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34094     msys_help $MISSING_DEPENDENCY
34095   else
34096     PKGHANDLER_COMMAND=
34097 
34098     case $PKGHANDLER in
34099       apt-get)
34100         apt_help     $MISSING_DEPENDENCY ;;
34101       yum)
34102         yum_help     $MISSING_DEPENDENCY ;;
34103       port)
34104         port_help    $MISSING_DEPENDENCY ;;
34105       pkgutil)
34106         pkgutil_help $MISSING_DEPENDENCY ;;
34107       pkgadd)
34108         pkgadd_help  $MISSING_DEPENDENCY ;;
34109     esac
34110 
34111     if test "x$PKGHANDLER_COMMAND" != x; then
34112       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34113     fi
34114   fi
34115 
34116         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34117       fi
34118     fi # end user specified settings
34119 
34120     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34121     if test "x$FREETYPE_CFLAGS" = x; then
34122 
34123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34124 
34125   # Input might be given as Windows format, start by converting to
34126   # unix format.
34127   path="$FREETYPE_INCLUDE_PATH"
34128   new_path=`$CYGPATH -u "$path"`
34129 
34130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34133   # "foo.exe" is OK but "foo" is an error.
34134   #
34135   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34136   # It is also a way to make sure we got the proper file name for the real test later on.
34137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34138   if test "x$test_shortpath" = x; then
34139     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34140 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34141     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34142   fi
34143 
34144   # Call helper function which possibly converts this using DOS-style short mode.
34145   # If so, the updated path is stored in $new_path.
34146 
34147   input_path="$new_path"
34148   # Check if we need to convert this using DOS-style short mode. If the path
34149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34150   # take no chances and rewrite it.
34151   # Note: m4 eats our [], so we need to use [ and ] instead.
34152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34153   if test "x$has_forbidden_chars" != x; then
34154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34155     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34156     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34157     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34158       # Going to short mode and back again did indeed matter. Since short mode is
34159       # case insensitive, let's make it lowercase to improve readability.
34160       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34161       # Now convert it back to Unix-stile (cygpath)
34162       input_path=`$CYGPATH -u "$shortmode_path"`
34163       new_path="$input_path"
34164     fi
34165   fi
34166 
34167   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34168   if test "x$test_cygdrive_prefix" = x; then
34169     # As a simple fix, exclude /usr/bin since it's not a real path.
34170     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34171       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34172       # a path prefixed by /cygdrive for fixpath to work.
34173       new_path="$CYGWIN_ROOT_PATH$input_path"
34174     fi
34175   fi
34176 
34177 
34178   if test "x$path" != "x$new_path"; then
34179     FREETYPE_INCLUDE_PATH="$new_path"
34180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34181 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34182   fi
34183 
34184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34185 
34186   path="$FREETYPE_INCLUDE_PATH"
34187   has_colon=`$ECHO $path | $GREP ^.:`
34188   new_path="$path"
34189   if test "x$has_colon" = x; then
34190     # Not in mixed or Windows style, start by that.
34191     new_path=`cmd //c echo $path`
34192   fi
34193 
34194 
34195   input_path="$new_path"
34196   # Check if we need to convert this using DOS-style short mode. If the path
34197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34198   # take no chances and rewrite it.
34199   # Note: m4 eats our [], so we need to use [ and ] instead.
34200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34201   if test "x$has_forbidden_chars" != x; then
34202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34203     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34204   fi
34205 
34206 
34207   windows_path="$new_path"
34208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34209     unix_path=`$CYGPATH -u "$windows_path"`
34210     new_path="$unix_path"
34211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34213     new_path="$unix_path"
34214   fi
34215 
34216   if test "x$path" != "x$new_path"; then
34217     FREETYPE_INCLUDE_PATH="$new_path"
34218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34219 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34220   fi
34221 
34222   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34223   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34224 
34225   else
34226     # We're on a posix platform. Hooray! :)
34227     path="$FREETYPE_INCLUDE_PATH"
34228     has_space=`$ECHO "$path" | $GREP " "`
34229     if test "x$has_space" != x; then
34230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34231 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34232       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34233     fi
34234 
34235     # Use eval to expand a potential ~
34236     eval path="$path"
34237     if test ! -f "$path" && test ! -d "$path"; then
34238       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34239     fi
34240 
34241     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34242   fi
34243 
34244       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34245         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34246       else
34247         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34248       fi
34249     fi
34250 
34251     if test "x$FREETYPE_LIBS" = x; then
34252 
34253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34254 
34255   # Input might be given as Windows format, start by converting to
34256   # unix format.
34257   path="$FREETYPE_LIB_PATH"
34258   new_path=`$CYGPATH -u "$path"`
34259 
34260   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34261   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34262   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34263   # "foo.exe" is OK but "foo" is an error.
34264   #
34265   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34266   # It is also a way to make sure we got the proper file name for the real test later on.
34267   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34268   if test "x$test_shortpath" = x; then
34269     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34270 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34271     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34272   fi
34273 
34274   # Call helper function which possibly converts this using DOS-style short mode.
34275   # If so, the updated path is stored in $new_path.
34276 
34277   input_path="$new_path"
34278   # Check if we need to convert this using DOS-style short mode. If the path
34279   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34280   # take no chances and rewrite it.
34281   # Note: m4 eats our [], so we need to use [ and ] instead.
34282   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34283   if test "x$has_forbidden_chars" != x; then
34284     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34285     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34286     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34287     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34288       # Going to short mode and back again did indeed matter. Since short mode is
34289       # case insensitive, let's make it lowercase to improve readability.
34290       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34291       # Now convert it back to Unix-stile (cygpath)
34292       input_path=`$CYGPATH -u "$shortmode_path"`
34293       new_path="$input_path"
34294     fi
34295   fi
34296 
34297   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34298   if test "x$test_cygdrive_prefix" = x; then
34299     # As a simple fix, exclude /usr/bin since it's not a real path.
34300     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34301       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34302       # a path prefixed by /cygdrive for fixpath to work.
34303       new_path="$CYGWIN_ROOT_PATH$input_path"
34304     fi
34305   fi
34306 
34307 
34308   if test "x$path" != "x$new_path"; then
34309     FREETYPE_LIB_PATH="$new_path"
34310     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34311 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34312   fi
34313 
34314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34315 
34316   path="$FREETYPE_LIB_PATH"
34317   has_colon=`$ECHO $path | $GREP ^.:`
34318   new_path="$path"
34319   if test "x$has_colon" = x; then
34320     # Not in mixed or Windows style, start by that.
34321     new_path=`cmd //c echo $path`
34322   fi
34323 
34324 
34325   input_path="$new_path"
34326   # Check if we need to convert this using DOS-style short mode. If the path
34327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34328   # take no chances and rewrite it.
34329   # Note: m4 eats our [], so we need to use [ and ] instead.
34330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34331   if test "x$has_forbidden_chars" != x; then
34332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34333     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34334   fi
34335 
34336 
34337   windows_path="$new_path"
34338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34339     unix_path=`$CYGPATH -u "$windows_path"`
34340     new_path="$unix_path"
34341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34343     new_path="$unix_path"
34344   fi
34345 
34346   if test "x$path" != "x$new_path"; then
34347     FREETYPE_LIB_PATH="$new_path"
34348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34349 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34350   fi
34351 
34352   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34353   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34354 
34355   else
34356     # We're on a posix platform. Hooray! :)
34357     path="$FREETYPE_LIB_PATH"
34358     has_space=`$ECHO "$path" | $GREP " "`
34359     if test "x$has_space" != x; then
34360       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34361 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34362       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34363     fi
34364 
34365     # Use eval to expand a potential ~
34366     eval path="$path"
34367     if test ! -f "$path" && test ! -d "$path"; then
34368       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34369     fi
34370 
34371     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34372   fi
34373 
34374       if test "x$OPENJDK_TARGET_OS" = xwindows; then
34375         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34376       else
34377         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34378       fi
34379     fi
34380 
34381     # Try to compile it
34382     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34383 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
34384     ac_ext=cpp
34385 ac_cpp='$CXXCPP $CPPFLAGS'
34386 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34387 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34388 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34389 
34390     PREV_CXXCFLAGS="$CXXFLAGS"
34391     PREV_LIBS="$LIBS"
34392     PREV_CXX="$CXX"
34393     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34394     LIBS="$LIBS $FREETYPE_LIBS"
34395     CXX="$FIXPATH $CXX"
34396     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34397 /* end confdefs.h.  */
34398 
34399           #include<ft2build.h>
34400           #include FT_FREETYPE_H
34401           int main () {
34402             FT_Init_FreeType(NULL);
34403             return 0;
34404           }
34405 
34406 _ACEOF
34407 if ac_fn_cxx_try_link "$LINENO"; then :
34408 
34409           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34410 $as_echo "yes" >&6; }
34411 
34412 else
34413 
34414           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34415 $as_echo "no" >&6; }
34416           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34417 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34418           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34419 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34420 
34421 
34422   # Print a helpful message on how to acquire the necessary build dependency.
34423   # freetype is the help tag: freetype, cups, pulse, alsa etc
34424   MISSING_DEPENDENCY=freetype
34425 
34426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34427     cygwin_help $MISSING_DEPENDENCY
34428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34429     msys_help $MISSING_DEPENDENCY
34430   else
34431     PKGHANDLER_COMMAND=
34432 
34433     case $PKGHANDLER in
34434       apt-get)
34435         apt_help     $MISSING_DEPENDENCY ;;
34436       yum)
34437         yum_help     $MISSING_DEPENDENCY ;;
34438       port)
34439         port_help    $MISSING_DEPENDENCY ;;
34440       pkgutil)
34441         pkgutil_help $MISSING_DEPENDENCY ;;
34442       pkgadd)
34443         pkgadd_help  $MISSING_DEPENDENCY ;;
34444     esac
34445 
34446     if test "x$PKGHANDLER_COMMAND" != x; then
34447       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34448     fi
34449   fi
34450 
34451 
34452           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34453 
34454 
34455 fi
34456 rm -f core conftest.err conftest.$ac_objext \
34457     conftest$ac_exeext conftest.$ac_ext
34458     CXXCFLAGS="$PREV_CXXFLAGS"
34459     LIBS="$PREV_LIBS"
34460     CXX="$PREV_CXX"
34461     ac_ext=cpp
34462 ac_cpp='$CXXCPP $CPPFLAGS'
34463 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34464 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34465 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34466 
34467 
34468     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34469 $as_echo_n "checking if we should bundle freetype... " >&6; }
34470     if test "x$BUNDLE_FREETYPE" = xyes; then
34471       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34472     fi
34473     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34474 $as_echo "$BUNDLE_FREETYPE" >&6; }
34475 
34476   fi # end freetype needed
34477 
34478 
34479 
34480 
34481 
34482 
34483 
34484   ###############################################################################
34485   #
34486   # Check for alsa headers and libraries. Used on Linux/GNU systems.
34487   #
34488 
34489 # Check whether --with-alsa was given.
34490 if test "${with_alsa+set}" = set; then :
34491   withval=$with_alsa;
34492 fi
34493 
34494 
34495 # Check whether --with-alsa-include was given.
34496 if test "${with_alsa_include+set}" = set; then :
34497   withval=$with_alsa_include;
34498 fi
34499 
34500 
34501 # Check whether --with-alsa-lib was given.
34502 if test "${with_alsa_lib+set}" = set; then :
34503   withval=$with_alsa_lib;
34504 fi
34505 
34506 
34507   if test "x$ALSA_NOT_NEEDED" = xyes; then
34508     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34509       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34510 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34511     fi
34512     ALSA_CFLAGS=
34513     ALSA_LIBS=
34514   else
34515     ALSA_FOUND=no
34516 
34517     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34518       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34519     fi
34520 
34521     if test "x${with_alsa}" != x; then
34522       ALSA_LIBS="-L${with_alsa}/lib -lasound"
34523       ALSA_CFLAGS="-I${with_alsa}/include"
34524       ALSA_FOUND=yes
34525     fi
34526     if test "x${with_alsa_include}" != x; then
34527       ALSA_CFLAGS="-I${with_alsa_include}"
34528       ALSA_FOUND=yes
34529     fi
34530     if test "x${with_alsa_lib}" != x; then
34531       ALSA_LIBS="-L${with_alsa_lib} -lasound"
34532       ALSA_FOUND=yes
34533     fi
34534     if test "x$ALSA_FOUND" = xno; then
34535 
34536 
34537   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34538     # Source the builddeps file again, to make sure it uses the latest variables!
34539     . $builddepsfile
34540     # Look for a target and build machine specific resource!
34541     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34542     if test "x$resource" = x; then
34543       # Ok, lets instead look for a target specific resource
34544       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34545     fi
34546     if test "x$resource" = x; then
34547       # Ok, lets instead look for a build specific resource
34548       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34549     fi
34550     if test "x$resource" = x; then
34551       # Ok, lets instead look for a generic resource
34552       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34553       resource=${builddep_alsa}
34554     fi
34555     if test "x$resource" != x; then
34556       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34557 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34558       # If the resource in the builddeps.conf file is an existing directory,
34559       # for example /java/linux/cups
34560       if test -d ${resource}; then
34561         depdir=${resource}
34562       else
34563 
34564   # alsa is for example mymodule
34565   # $resource is for example libs/general/libmymod_1_2_3.zip
34566   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34567   # $with_builddeps_dir is for example /localhome/builddeps
34568   # depdir is the name of the variable into which we store the depdir, eg MYMOD
34569   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34570   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34571   filename=`basename $resource`
34572   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34573   filebase=${filename%%.*}
34574   extension=${filename#*.}
34575   installdir=$with_builddeps_dir/$filebase
34576   if test ! -f $installdir/$filename.unpacked; then
34577     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34578 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34579     if test ! -d $installdir; then
34580       mkdir -p $installdir
34581     fi
34582     if test ! -d $installdir; then
34583       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34584     fi
34585     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34586     touch $tmpfile
34587     if test ! -f $tmpfile; then
34588       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34589     fi
34590 
34591   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34592   # $tmpfile is the local file name for the downloaded file.
34593   VALID_TOOL=no
34594   if test "x$BDEPS_FTP" = xwget; then
34595     VALID_TOOL=yes
34596     wget -O $tmpfile $with_builddeps_server/$resource
34597   fi
34598   if test "x$BDEPS_FTP" = xlftp; then
34599     VALID_TOOL=yes
34600     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34601   fi
34602   if test "x$BDEPS_FTP" = xftp; then
34603     VALID_TOOL=yes
34604     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34605     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34606     FTPUSERPWD=${FTPSERVER%%@*}
34607     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34608       FTPUSER=${userpwd%%:*}
34609       FTPPWD=${userpwd#*@}
34610       FTPSERVER=${FTPSERVER#*@}
34611     else
34612       FTPUSER=ftp
34613       FTPPWD=ftp
34614     fi
34615     # the "pass" command does not work on some
34616     # ftp clients (read ftp.exe) but if it works,
34617     # passive mode is better!
34618     ( \
34619         echo "user $FTPUSER $FTPPWD"        ; \
34620         echo "pass"                         ; \
34621         echo "bin"                          ; \
34622         echo "get $FTPPATH $tmpfile"              ; \
34623     ) | ftp -in $FTPSERVER
34624   fi
34625   if test "x$VALID_TOOL" != xyes; then
34626     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34627   fi
34628 
34629     mv $tmpfile $installdir/$filename
34630     if test ! -s $installdir/$filename; then
34631       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34632     fi
34633     case "$extension" in
34634       zip)  echo "Unzipping $installdir/$filename..."
34635         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34636         ;;
34637       tar.gz) echo "Untaring $installdir/$filename..."
34638         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34639         ;;
34640       tgz) echo "Untaring $installdir/$filename..."
34641         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34642         ;;
34643       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34644         ;;
34645     esac
34646   fi
34647   if test -f $installdir/$filename.unpacked; then
34648     depdir=$installdir
34649   fi
34650 
34651       fi
34652       # Source the builddeps file again, because in the previous command, the depdir
34653       # was updated to point at the current build dependency install directory.
34654       . $builddepsfile
34655       # Now extract variables from the builddeps.conf files.
34656       theroot=${builddep_alsa_ROOT}
34657       thecflags=${builddep_alsa_CFLAGS}
34658       thelibs=${builddep_alsa_LIBS}
34659       if test "x$depdir" = x; then
34660         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34661       fi
34662       ALSA=$depdir
34663       if test "x$theroot" != x; then
34664         ALSA="$theroot"
34665       fi
34666       if test "x$thecflags" != x; then
34667         ALSA_CFLAGS="$thecflags"
34668       fi
34669       if test "x$thelibs" != x; then
34670         ALSA_LIBS="$thelibs"
34671       fi
34672       ALSA_FOUND=yes
34673       else ALSA_FOUND=no
34674 
34675     fi
34676     else ALSA_FOUND=no
34677 
34678   fi
34679 
34680     fi
34681     if test "x$ALSA_FOUND" = xno; then
34682 
34683 pkg_failed=no
34684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34685 $as_echo_n "checking for ALSA... " >&6; }
34686 
34687 if test -n "$ALSA_CFLAGS"; then
34688     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34689  elif test -n "$PKG_CONFIG"; then
34690     if test -n "$PKG_CONFIG" && \
34691     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34692   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34693   ac_status=$?
34694   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34695   test $ac_status = 0; }; then
34696   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34697 else
34698   pkg_failed=yes
34699 fi
34700  else
34701     pkg_failed=untried
34702 fi
34703 if test -n "$ALSA_LIBS"; then
34704     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34705  elif test -n "$PKG_CONFIG"; then
34706     if test -n "$PKG_CONFIG" && \
34707     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34708   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34709   ac_status=$?
34710   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34711   test $ac_status = 0; }; then
34712   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34713 else
34714   pkg_failed=yes
34715 fi
34716  else
34717     pkg_failed=untried
34718 fi
34719 
34720 
34721 
34722 if test $pkg_failed = yes; then
34723 
34724 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34725         _pkg_short_errors_supported=yes
34726 else
34727         _pkg_short_errors_supported=no
34728 fi
34729         if test $_pkg_short_errors_supported = yes; then
34730                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34731         else
34732                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34733         fi
34734         # Put the nasty error message in config.log where it belongs
34735         echo "$ALSA_PKG_ERRORS" >&5
34736 
34737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34738 $as_echo "no" >&6; }
34739                 ALSA_FOUND=no
34740 elif test $pkg_failed = untried; then
34741         ALSA_FOUND=no
34742 else
34743         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34744         ALSA_LIBS=$pkg_cv_ALSA_LIBS
34745         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34746 $as_echo "yes" >&6; }
34747         ALSA_FOUND=yes
34748 fi
34749     fi
34750     if test "x$ALSA_FOUND" = xno; then
34751       for ac_header in alsa/asoundlib.h
34752 do :
34753   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34754 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34755   cat >>confdefs.h <<_ACEOF
34756 #define HAVE_ALSA_ASOUNDLIB_H 1
34757 _ACEOF
34758 
34759             ALSA_FOUND=yes
34760             ALSA_CFLAGS=-Iignoreme
34761             ALSA_LIBS=-lasound
34762             DEFAULT_ALSA=yes
34763 
34764 else
34765   ALSA_FOUND=no
34766 fi
34767 
34768 done
34769 
34770     fi
34771     if test "x$ALSA_FOUND" = xno; then
34772 
34773   # Print a helpful message on how to acquire the necessary build dependency.
34774   # alsa is the help tag: freetype, cups, pulse, alsa etc
34775   MISSING_DEPENDENCY=alsa
34776 
34777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34778     cygwin_help $MISSING_DEPENDENCY
34779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34780     msys_help $MISSING_DEPENDENCY
34781   else
34782     PKGHANDLER_COMMAND=
34783 
34784     case $PKGHANDLER in
34785       apt-get)
34786         apt_help     $MISSING_DEPENDENCY ;;
34787       yum)
34788         yum_help     $MISSING_DEPENDENCY ;;
34789       port)
34790         port_help    $MISSING_DEPENDENCY ;;
34791       pkgutil)
34792         pkgutil_help $MISSING_DEPENDENCY ;;
34793       pkgadd)
34794         pkgadd_help  $MISSING_DEPENDENCY ;;
34795     esac
34796 
34797     if test "x$PKGHANDLER_COMMAND" != x; then
34798       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34799     fi
34800   fi
34801 
34802       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34803     fi
34804   fi
34805 
34806 
34807 
34808 
34809 
34810 
34811   ###############################################################################
34812   #
34813   # Check for the jpeg library
34814   #
34815 
34816   USE_EXTERNAL_LIBJPEG=true
34817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34818 $as_echo_n "checking for main in -ljpeg... " >&6; }
34819 if ${ac_cv_lib_jpeg_main+:} false; then :
34820   $as_echo_n "(cached) " >&6
34821 else
34822   ac_check_lib_save_LIBS=$LIBS
34823 LIBS="-ljpeg  $LIBS"
34824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34825 /* end confdefs.h.  */
34826 
34827 
34828 int
34829 main ()
34830 {
34831 return main ();
34832   ;
34833   return 0;
34834 }
34835 _ACEOF
34836 if ac_fn_cxx_try_link "$LINENO"; then :
34837   ac_cv_lib_jpeg_main=yes
34838 else
34839   ac_cv_lib_jpeg_main=no
34840 fi
34841 rm -f core conftest.err conftest.$ac_objext \
34842     conftest$ac_exeext conftest.$ac_ext
34843 LIBS=$ac_check_lib_save_LIBS
34844 fi
34845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34846 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
34847 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34848   cat >>confdefs.h <<_ACEOF
34849 #define HAVE_LIBJPEG 1
34850 _ACEOF
34851 
34852   LIBS="-ljpeg $LIBS"
34853 
34854 else
34855    USE_EXTERNAL_LIBJPEG=false
34856       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34857 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34858 
34859 fi
34860 
34861 
34862 
34863   ###############################################################################
34864   #
34865   # Check for the gif library
34866   #
34867 
34868 
34869 # Check whether --with-giflib was given.
34870 if test "${with_giflib+set}" = set; then :
34871   withval=$with_giflib;
34872 fi
34873 
34874 
34875 
34876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34877 $as_echo_n "checking for which giflib to use... " >&6; }
34878 
34879   # default is bundled
34880   DEFAULT_GIFLIB=bundled
34881 
34882   #
34883   # if user didn't specify, use DEFAULT_GIFLIB
34884   #
34885   if test "x${with_giflib}" = "x"; then
34886     with_giflib=${DEFAULT_GIFLIB}
34887   fi
34888 
34889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34890 $as_echo "${with_giflib}" >&6; }
34891 
34892   if test "x${with_giflib}" = "xbundled"; then
34893     USE_EXTERNAL_LIBGIF=false
34894   elif test "x${with_giflib}" = "xsystem"; then
34895     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34896 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34897 
34898 else
34899    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34900 fi
34901 
34902 
34903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34904 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34905 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34906   $as_echo_n "(cached) " >&6
34907 else
34908   ac_check_lib_save_LIBS=$LIBS
34909 LIBS="-lgif  $LIBS"
34910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34911 /* end confdefs.h.  */
34912 
34913 /* Override any GCC internal prototype to avoid an error.
34914    Use char because int might match the return type of a GCC
34915    builtin and then its argument prototype would still apply.  */
34916 #ifdef __cplusplus
34917 extern "C"
34918 #endif
34919 char DGifGetCode ();
34920 int
34921 main ()
34922 {
34923 return DGifGetCode ();
34924   ;
34925   return 0;
34926 }
34927 _ACEOF
34928 if ac_fn_cxx_try_link "$LINENO"; then :
34929   ac_cv_lib_gif_DGifGetCode=yes
34930 else
34931   ac_cv_lib_gif_DGifGetCode=no
34932 fi
34933 rm -f core conftest.err conftest.$ac_objext \
34934     conftest$ac_exeext conftest.$ac_ext
34935 LIBS=$ac_check_lib_save_LIBS
34936 fi
34937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34938 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34939 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34940   cat >>confdefs.h <<_ACEOF
34941 #define HAVE_LIBGIF 1
34942 _ACEOF
34943 
34944   LIBS="-lgif $LIBS"
34945 
34946 else
34947    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34948 fi
34949 
34950 
34951     USE_EXTERNAL_LIBGIF=true
34952   else
34953     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34954   fi
34955 
34956 
34957   ###############################################################################
34958   #
34959   # Check for the zlib library
34960   #
34961 
34962 
34963 # Check whether --with-zlib was given.
34964 if test "${with_zlib+set}" = set; then :
34965   withval=$with_zlib;
34966 fi
34967 
34968 
34969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34970 $as_echo_n "checking for compress in -lz... " >&6; }
34971 if ${ac_cv_lib_z_compress+:} false; then :
34972   $as_echo_n "(cached) " >&6
34973 else
34974   ac_check_lib_save_LIBS=$LIBS
34975 LIBS="-lz  $LIBS"
34976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34977 /* end confdefs.h.  */
34978 
34979 /* Override any GCC internal prototype to avoid an error.
34980    Use char because int might match the return type of a GCC
34981    builtin and then its argument prototype would still apply.  */
34982 #ifdef __cplusplus
34983 extern "C"
34984 #endif
34985 char compress ();
34986 int
34987 main ()
34988 {
34989 return compress ();
34990   ;
34991   return 0;
34992 }
34993 _ACEOF
34994 if ac_fn_cxx_try_link "$LINENO"; then :
34995   ac_cv_lib_z_compress=yes
34996 else
34997   ac_cv_lib_z_compress=no
34998 fi
34999 rm -f core conftest.err conftest.$ac_objext \
35000     conftest$ac_exeext conftest.$ac_ext
35001 LIBS=$ac_check_lib_save_LIBS
35002 fi
35003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35004 $as_echo "$ac_cv_lib_z_compress" >&6; }
35005 if test "x$ac_cv_lib_z_compress" = xyes; then :
35006    ZLIB_FOUND=yes
35007 else
35008    ZLIB_FOUND=no
35009 fi
35010 
35011 
35012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35013 $as_echo_n "checking for which zlib to use... " >&6; }
35014 
35015   DEFAULT_ZLIB=bundled
35016   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35017     #
35018     # On macosx default is system...on others default is
35019     #
35020     DEFAULT_ZLIB=system
35021   fi
35022 
35023   if test "x${ZLIB_FOUND}" != "xyes"; then
35024     #
35025     # If we don't find any system...set default to bundled
35026     #
35027     DEFAULT_ZLIB=bundled
35028   fi
35029 
35030   #
35031   # If user didn't specify, use DEFAULT_ZLIB
35032   #
35033   if test "x${with_zlib}" = "x"; then
35034     with_zlib=${DEFAULT_ZLIB}
35035   fi
35036 
35037   if test "x${with_zlib}" = "xbundled"; then
35038     USE_EXTERNAL_LIBZ=false
35039     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35040 $as_echo "bundled" >&6; }
35041   elif test "x${with_zlib}" = "xsystem"; then
35042     if test "x${ZLIB_FOUND}" = "xyes"; then
35043       USE_EXTERNAL_LIBZ=true
35044       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35045 $as_echo "system" >&6; }
35046     else
35047       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35048 $as_echo "system not found" >&6; }
35049       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35050     fi
35051   else
35052     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35053   fi
35054 
35055 
35056 
35057   ###############################################################################
35058   LIBZIP_CAN_USE_MMAP=true
35059 
35060 
35061 
35062   ###############################################################################
35063   #
35064   # Check if altzone exists in time.h
35065   #
35066 
35067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35068 /* end confdefs.h.  */
35069 #include <time.h>
35070 int
35071 main ()
35072 {
35073 return (int)altzone;
35074   ;
35075   return 0;
35076 }
35077 _ACEOF
35078 if ac_fn_cxx_try_link "$LINENO"; then :
35079   has_altzone=yes
35080 else
35081   has_altzone=no
35082 fi
35083 rm -f core conftest.err conftest.$ac_objext \
35084     conftest$ac_exeext conftest.$ac_ext
35085   if test "x$has_altzone" = xyes; then
35086 
35087 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35088 
35089   fi
35090 
35091   ###############################################################################
35092   #
35093   # Check the maths library
35094   #
35095 
35096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35097 $as_echo_n "checking for cos in -lm... " >&6; }
35098 if ${ac_cv_lib_m_cos+:} false; then :
35099   $as_echo_n "(cached) " >&6
35100 else
35101   ac_check_lib_save_LIBS=$LIBS
35102 LIBS="-lm  $LIBS"
35103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35104 /* end confdefs.h.  */
35105 
35106 /* Override any GCC internal prototype to avoid an error.
35107    Use char because int might match the return type of a GCC
35108    builtin and then its argument prototype would still apply.  */
35109 #ifdef __cplusplus
35110 extern "C"
35111 #endif
35112 char cos ();
35113 int
35114 main ()
35115 {
35116 return cos ();
35117   ;
35118   return 0;
35119 }
35120 _ACEOF
35121 if ac_fn_cxx_try_link "$LINENO"; then :
35122   ac_cv_lib_m_cos=yes
35123 else
35124   ac_cv_lib_m_cos=no
35125 fi
35126 rm -f core conftest.err conftest.$ac_objext \
35127     conftest$ac_exeext conftest.$ac_ext
35128 LIBS=$ac_check_lib_save_LIBS
35129 fi
35130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35131 $as_echo "$ac_cv_lib_m_cos" >&6; }
35132 if test "x$ac_cv_lib_m_cos" = xyes; then :
35133   cat >>confdefs.h <<_ACEOF
35134 #define HAVE_LIBM 1
35135 _ACEOF
35136 
35137   LIBS="-lm $LIBS"
35138 
35139 else
35140 
35141         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35142 $as_echo "$as_me: Maths library was not found" >&6;}
35143 
35144 
35145 fi
35146 
35147 
35148 
35149   ###############################################################################
35150   #
35151   # Check for libdl.so
35152 
35153   save_LIBS="$LIBS"
35154   LIBS=""
35155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35156 $as_echo_n "checking for dlopen in -ldl... " >&6; }
35157 if ${ac_cv_lib_dl_dlopen+:} false; then :
35158   $as_echo_n "(cached) " >&6
35159 else
35160   ac_check_lib_save_LIBS=$LIBS
35161 LIBS="-ldl  $LIBS"
35162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35163 /* end confdefs.h.  */
35164 
35165 /* Override any GCC internal prototype to avoid an error.
35166    Use char because int might match the return type of a GCC
35167    builtin and then its argument prototype would still apply.  */
35168 #ifdef __cplusplus
35169 extern "C"
35170 #endif
35171 char dlopen ();
35172 int
35173 main ()
35174 {
35175 return dlopen ();
35176   ;
35177   return 0;
35178 }
35179 _ACEOF
35180 if ac_fn_cxx_try_link "$LINENO"; then :
35181   ac_cv_lib_dl_dlopen=yes
35182 else
35183   ac_cv_lib_dl_dlopen=no
35184 fi
35185 rm -f core conftest.err conftest.$ac_objext \
35186     conftest$ac_exeext conftest.$ac_ext
35187 LIBS=$ac_check_lib_save_LIBS
35188 fi
35189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35190 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35191 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35192   cat >>confdefs.h <<_ACEOF
35193 #define HAVE_LIBDL 1
35194 _ACEOF
35195 
35196   LIBS="-ldl $LIBS"
35197 
35198 fi
35199 
35200   LIBDL="$LIBS"
35201 
35202   LIBS="$save_LIBS"
35203 
35204 
35205   ###############################################################################
35206   #
35207   # statically link libstdc++ before C++ ABI is stablized on Linux unless
35208   # dynamic build is configured on command line.
35209   #
35210 
35211 # Check whether --with-stdc++lib was given.
35212 if test "${with_stdc__lib+set}" = set; then :
35213   withval=$with_stdc__lib;
35214         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35215                 && test "x$with_stdc__lib" != xdefault; then
35216           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35217         fi
35218 
35219 else
35220   with_stdc__lib=default
35221 
35222 fi
35223 
35224 
35225   if test "x$OPENJDK_TARGET_OS" = xlinux; then
35226     # Test if -lstdc++ works.
35227     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35228 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35229     ac_ext=cpp
35230 ac_cpp='$CXXCPP $CPPFLAGS'
35231 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35232 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35233 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35234 
35235     OLD_CXXFLAGS="$CXXFLAGS"
35236     CXXFLAGS="$CXXFLAGS -lstdc++"
35237     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35238 /* end confdefs.h.  */
35239 
35240 int
35241 main ()
35242 {
35243 return 0;
35244   ;
35245   return 0;
35246 }
35247 _ACEOF
35248 if ac_fn_cxx_try_link "$LINENO"; then :
35249   has_dynamic_libstdcxx=yes
35250 else
35251   has_dynamic_libstdcxx=no
35252 fi
35253 rm -f core conftest.err conftest.$ac_objext \
35254     conftest$ac_exeext conftest.$ac_ext
35255     CXXFLAGS="$OLD_CXXFLAGS"
35256     ac_ext=cpp
35257 ac_cpp='$CXXCPP $CPPFLAGS'
35258 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35259 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35260 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35261 
35262     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35263 $as_echo "$has_dynamic_libstdcxx" >&6; }
35264 
35265     # Test if stdc++ can be linked statically.
35266     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35267 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35268     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35269     ac_ext=cpp
35270 ac_cpp='$CXXCPP $CPPFLAGS'
35271 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35272 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35273 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35274 
35275     OLD_LIBS="$LIBS"
35276     OLD_CXX="$CXX"
35277     LIBS="$STATIC_STDCXX_FLAGS"
35278     CXX="$CC"
35279     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35280 /* end confdefs.h.  */
35281 
35282 int
35283 main ()
35284 {
35285 return 0;
35286   ;
35287   return 0;
35288 }
35289 _ACEOF
35290 if ac_fn_cxx_try_link "$LINENO"; then :
35291   has_static_libstdcxx=yes
35292 else
35293   has_static_libstdcxx=no
35294 fi
35295 rm -f core conftest.err conftest.$ac_objext \
35296     conftest$ac_exeext conftest.$ac_ext
35297     LIBS="$OLD_LIBS"
35298     CXX="$OLD_CXX"
35299     ac_ext=cpp
35300 ac_cpp='$CXXCPP $CPPFLAGS'
35301 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35302 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35303 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35304 
35305     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35306 $as_echo "$has_static_libstdcxx" >&6; }
35307 
35308     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35309       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35310     fi
35311 
35312     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35313       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35314     fi
35315 
35316     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35317       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35318     fi
35319 
35320     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35321 $as_echo_n "checking how to link with libstdc++... " >&6; }
35322     # If dynamic was requested, it's available since it would fail above otherwise.
35323     # If dynamic wasn't requested, go with static unless it isn't available.
35324     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35325       LIBCXX="$LIBCXX -lstdc++"
35326       LDCXX="$CXX"
35327       STATIC_CXX_SETTING="STATIC_CXX=false"
35328       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35329 $as_echo "dynamic" >&6; }
35330     else
35331       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35332       LDCXX="$CC"
35333       STATIC_CXX_SETTING="STATIC_CXX=true"
35334       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35335 $as_echo "static" >&6; }
35336     fi
35337   fi
35338 
35339 
35340   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35341     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35342 
35343 pkg_failed=no
35344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35345 $as_echo_n "checking for LIBFFI... " >&6; }
35346 
35347 if test -n "$LIBFFI_CFLAGS"; then
35348     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35349  elif test -n "$PKG_CONFIG"; then
35350     if test -n "$PKG_CONFIG" && \
35351     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35352   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35353   ac_status=$?
35354   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35355   test $ac_status = 0; }; then
35356   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35357 else
35358   pkg_failed=yes
35359 fi
35360  else
35361     pkg_failed=untried
35362 fi
35363 if test -n "$LIBFFI_LIBS"; then
35364     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35365  elif test -n "$PKG_CONFIG"; then
35366     if test -n "$PKG_CONFIG" && \
35367     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35368   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35369   ac_status=$?
35370   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35371   test $ac_status = 0; }; then
35372   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35373 else
35374   pkg_failed=yes
35375 fi
35376  else
35377     pkg_failed=untried
35378 fi
35379 
35380 
35381 
35382 if test $pkg_failed = yes; then
35383 
35384 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35385         _pkg_short_errors_supported=yes
35386 else
35387         _pkg_short_errors_supported=no
35388 fi
35389         if test $_pkg_short_errors_supported = yes; then
35390                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35391         else
35392                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35393         fi
35394         # Put the nasty error message in config.log where it belongs
35395         echo "$LIBFFI_PKG_ERRORS" >&5
35396 
35397         as_fn_error $? "Package requirements (libffi) were not met:
35398 
35399 $LIBFFI_PKG_ERRORS
35400 
35401 Consider adjusting the PKG_CONFIG_PATH environment variable if you
35402 installed software in a non-standard prefix.
35403 
35404 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35405 and LIBFFI_LIBS to avoid the need to call pkg-config.
35406 See the pkg-config man page for more details.
35407 " "$LINENO" 5
35408 elif test $pkg_failed = untried; then
35409         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35410 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35411 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35412 is in your PATH or set the PKG_CONFIG environment variable to the full
35413 path to pkg-config.
35414 
35415 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35416 and LIBFFI_LIBS to avoid the need to call pkg-config.
35417 See the pkg-config man page for more details.
35418 
35419 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35420 See \`config.log' for more details" "$LINENO" 5; }
35421 else
35422         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35423         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35424         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35425 $as_echo "yes" >&6; }
35426         :
35427 fi
35428 
35429   fi
35430 
35431   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35432     # Extract the first word of "llvm-config", so it can be a program name with args.
35433 set dummy llvm-config; ac_word=$2
35434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35435 $as_echo_n "checking for $ac_word... " >&6; }
35436 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35437   $as_echo_n "(cached) " >&6
35438 else
35439   if test -n "$LLVM_CONFIG"; then
35440   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35441 else
35442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35443 for as_dir in $PATH
35444 do
35445   IFS=$as_save_IFS
35446   test -z "$as_dir" && as_dir=.
35447     for ac_exec_ext in '' $ac_executable_extensions; do
35448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35449     ac_cv_prog_LLVM_CONFIG="llvm-config"
35450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35451     break 2
35452   fi
35453 done
35454   done
35455 IFS=$as_save_IFS
35456 
35457 fi
35458 fi
35459 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35460 if test -n "$LLVM_CONFIG"; then
35461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35462 $as_echo "$LLVM_CONFIG" >&6; }
35463 else
35464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35465 $as_echo "no" >&6; }
35466 fi
35467 
35468 
35469 
35470     if test "x$LLVM_CONFIG" != xllvm-config; then
35471       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35472     fi
35473 
35474     llvm_components="jit mcjit engine nativecodegen native"
35475     unset LLVM_CFLAGS
35476     for flag in $("$LLVM_CONFIG" --cxxflags); do
35477       if echo "${flag}" | grep -q '^-[ID]'; then
35478         if test "${flag}" != "-D_DEBUG" ; then
35479           if test "${LLVM_CFLAGS}" != "" ; then
35480             LLVM_CFLAGS="${LLVM_CFLAGS} "
35481           fi
35482           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35483         fi
35484       fi
35485     done
35486     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35487     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35488 
35489     unset LLVM_LDFLAGS
35490     for flag in $("${LLVM_CONFIG}" --ldflags); do
35491       if echo "${flag}" | grep -q '^-L'; then
35492         if test "${LLVM_LDFLAGS}" != ""; then
35493           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35494         fi
35495         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35496       fi
35497     done
35498 
35499     unset LLVM_LIBS
35500     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35501       if echo "${flag}" | grep -q '^-l'; then
35502         if test "${LLVM_LIBS}" != ""; then
35503           LLVM_LIBS="${LLVM_LIBS} "
35504         fi
35505         LLVM_LIBS="${LLVM_LIBS}${flag}"
35506       fi
35507     done
35508 
35509 
35510 
35511 
35512   fi
35513 
35514   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35515   if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35516     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35517   fi
35518 
35519   # TODO better (platform agnostic) test
35520   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35521     LIBCXX="-lstdc++"
35522   fi
35523 
35524 
35525 
35526 
35527 
35528 ###############################################################################
35529 #
35530 # We need to do some final tweaking, when everything else is done.
35531 #
35532 ###############################################################################
35533 
35534 
35535   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35536 
35537 
35538   # The name of the Service Agent jar.
35539   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35540   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35541     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35542   fi
35543 
35544 
35545 
35546     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35547 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35548 
35549     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35550       ENABLE_INTREE_EC=yes
35551       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35552 $as_echo "yes" >&6; }
35553     else
35554       ENABLE_INTREE_EC=no
35555       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35556 $as_echo "no" >&6; }
35557     fi
35558 
35559 
35560 
35561 
35562 ###############################################################################
35563 #
35564 # Configure parts of the build that only affect the build performance,
35565 # not the result.
35566 #
35567 ###############################################################################
35568 
35569 
35570   # How many cores do we have on this build system?
35571 
35572 # Check whether --with-num-cores was given.
35573 if test "${with_num_cores+set}" = set; then :
35574   withval=$with_num_cores;
35575 fi
35576 
35577   if test "x$with_num_cores" = x; then
35578     # The number of cores were not specified, try to probe them.
35579 
35580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35581 $as_echo_n "checking for number of cores... " >&6; }
35582   NUM_CORES=1
35583   FOUND_CORES=no
35584 
35585   if test -f /proc/cpuinfo; then
35586     # Looks like a Linux (or cygwin) system
35587     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35588     FOUND_CORES=yes
35589   elif test -x /usr/sbin/psrinfo; then
35590     # Looks like a Solaris system
35591     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35592     FOUND_CORES=yes
35593   elif test -x /usr/sbin/system_profiler; then
35594     # Looks like a MacOSX system
35595     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35596     FOUND_CORES=yes
35597   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
35598     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
35599     FOUND_CORES=yes
35600   elif test -n "$NUMBER_OF_PROCESSORS"; then
35601     # On windows, look in the env
35602     NUM_CORES=$NUMBER_OF_PROCESSORS
35603     FOUND_CORES=yes
35604   fi
35605 
35606   if test "x$FOUND_CORES" = xyes; then
35607     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35608 $as_echo "$NUM_CORES" >&6; }
35609   else
35610     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35611 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
35612     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35613 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35614   fi
35615 
35616   else
35617     NUM_CORES=$with_num_cores
35618   fi
35619 
35620 
35621 
35622   # How much memory do we have on this build system?
35623 
35624 # Check whether --with-memory-size was given.
35625 if test "${with_memory_size+set}" = set; then :
35626   withval=$with_memory_size;
35627 fi
35628 
35629   if test "x$with_memory_size" = x; then
35630     # The memory size was not specified, try to probe it.
35631 
35632   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35633 $as_echo_n "checking for memory size... " >&6; }
35634   # Default to 1024 MB
35635   MEMORY_SIZE=1024
35636   FOUND_MEM=no
35637 
35638   if test -f /proc/meminfo; then
35639     # Looks like a Linux (or cygwin) system
35640     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35641     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35642     FOUND_MEM=yes
35643   elif test -x /usr/sbin/prtconf; then
35644     # Looks like a Solaris or AIX system
35645     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
35646     FOUND_MEM=yes
35647   elif test -x /usr/sbin/system_profiler; then
35648     # Looks like a MacOSX system
35649     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35650     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35651     FOUND_MEM=yes
35652   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35653     # Windows, but without cygwin
35654     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35655     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35656     FOUND_MEM=yes
35657   fi
35658 
35659   if test "x$FOUND_MEM" = xyes; then
35660     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35661 $as_echo "$MEMORY_SIZE MB" >&6; }
35662   else
35663     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35664 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35665     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35666 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35667   fi
35668 
35669   else
35670     MEMORY_SIZE=$with_memory_size
35671   fi
35672 
35673 
35674 
35675   # Provide a decent default number of parallel jobs for make depending on
35676   # number of cores, amount of memory and machine architecture.
35677 
35678 # Check whether --with-jobs was given.
35679 if test "${with_jobs+set}" = set; then :
35680   withval=$with_jobs;
35681 fi
35682 
35683   if test "x$with_jobs" = x; then
35684     # Number of jobs was not specified, calculate.
35685     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35686 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35687     # Approximate memory in GB, rounding up a bit.
35688     memory_gb=`expr $MEMORY_SIZE / 1100`
35689     # Pick the lowest of memory in gb and number of cores.
35690     if test "$memory_gb" -lt "$NUM_CORES"; then
35691       JOBS="$memory_gb"
35692     else
35693       JOBS="$NUM_CORES"
35694       # On bigger machines, leave some room for other processes to run
35695       if test "$JOBS" -gt "4"; then
35696         JOBS=`expr $JOBS '*' 90 / 100`
35697       fi
35698     fi
35699     # Cap number of jobs to 16
35700     if test "$JOBS" -gt "16"; then
35701       JOBS=16
35702     fi
35703     if test "$JOBS" -eq "0"; then
35704       JOBS=1
35705     fi
35706     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35707 $as_echo "$JOBS" >&6; }
35708   else
35709     JOBS=$with_jobs
35710   fi
35711 
35712 
35713 
35714 # Setup smart javac (after cores and memory have been setup)
35715 
35716 
35717 # Check whether --with-sjavac-server-java was given.
35718 if test "${with_sjavac_server_java+set}" = set; then :
35719   withval=$with_sjavac_server_java;
35720 fi
35721 
35722 
35723   if test "x$with_sjavac_server_java" != x; then
35724     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35725     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35726     if test "x$FOUND_VERSION" = x; then
35727       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35728     fi
35729   else
35730     SJAVAC_SERVER_JAVA=""
35731     # Hotspot specific options.
35732 
35733   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35734   $ECHO "Command: $JAVA -verbosegc -version" >&5
35735   OUTPUT=`$JAVA -verbosegc -version 2>&1`
35736   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35737   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35738   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35739     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35740     JVM_ARG_OK=true
35741   else
35742     $ECHO "Arg failed:" >&5
35743     $ECHO "$OUTPUT" >&5
35744     JVM_ARG_OK=false
35745   fi
35746 
35747     # JRockit specific options.
35748 
35749   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35750   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35751   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35752   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35753   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35754   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35755     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35756     JVM_ARG_OK=true
35757   else
35758     $ECHO "Arg failed:" >&5
35759     $ECHO "$OUTPUT" >&5
35760     JVM_ARG_OK=false
35761   fi
35762 
35763     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35764   fi
35765 
35766 
35767   if test "$MEMORY_SIZE" -gt "2500"; then
35768 
35769   $ECHO "Check if jvm arg is ok: -d64" >&5
35770   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35771   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35772   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35773   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35774   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35775     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35776     JVM_ARG_OK=true
35777   else
35778     $ECHO "Arg failed:" >&5
35779     $ECHO "$OUTPUT" >&5
35780     JVM_ARG_OK=false
35781   fi
35782 
35783     if test "$JVM_ARG_OK" = true; then
35784       JVM_64BIT=true
35785       JVM_ARG_OK=false
35786     fi
35787   fi
35788 
35789   if test "$JVM_64BIT" = true; then
35790     if test "$MEMORY_SIZE" -gt "17000"; then
35791 
35792   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35793   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35794   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35795   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35796   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35797   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35798     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35799     JVM_ARG_OK=true
35800   else
35801     $ECHO "Arg failed:" >&5
35802     $ECHO "$OUTPUT" >&5
35803     JVM_ARG_OK=false
35804   fi
35805 
35806     fi
35807     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35808 
35809   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35810   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35811   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35812   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35813   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35814   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35815     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35816     JVM_ARG_OK=true
35817   else
35818     $ECHO "Arg failed:" >&5
35819     $ECHO "$OUTPUT" >&5
35820     JVM_ARG_OK=false
35821   fi
35822 
35823     fi
35824     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35825 
35826   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35827   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35828   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35829   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35830   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35831   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35832     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35833     JVM_ARG_OK=true
35834   else
35835     $ECHO "Arg failed:" >&5
35836     $ECHO "$OUTPUT" >&5
35837     JVM_ARG_OK=false
35838   fi
35839 
35840     fi
35841     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35842 
35843   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35844   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35845   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35846   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35847   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35848   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35849     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35850     JVM_ARG_OK=true
35851   else
35852     $ECHO "Arg failed:" >&5
35853     $ECHO "$OUTPUT" >&5
35854     JVM_ARG_OK=false
35855   fi
35856 
35857     fi
35858   fi
35859   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35860 
35861   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35862   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35863   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35864   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35865   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35866   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35867     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35868     JVM_ARG_OK=true
35869   else
35870     $ECHO "Arg failed:" >&5
35871     $ECHO "$OUTPUT" >&5
35872     JVM_ARG_OK=false
35873   fi
35874 
35875   fi
35876   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35877 
35878   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35879   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35880   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35881   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35882   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35883   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35884     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35885     JVM_ARG_OK=true
35886   else
35887     $ECHO "Arg failed:" >&5
35888     $ECHO "$OUTPUT" >&5
35889     JVM_ARG_OK=false
35890   fi
35891 
35892   fi
35893   if test "$JVM_ARG_OK" = false; then
35894 
35895   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35896   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35897   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35898   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35899   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35900   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35901     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35902     JVM_ARG_OK=true
35903   else
35904     $ECHO "Arg failed:" >&5
35905     $ECHO "$OUTPUT" >&5
35906     JVM_ARG_OK=false
35907   fi
35908 
35909   fi
35910 
35911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35912 $as_echo_n "checking whether to use sjavac... " >&6; }
35913   # Check whether --enable-sjavac was given.
35914 if test "${enable_sjavac+set}" = set; then :
35915   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35916 else
35917   ENABLE_SJAVAC='no'
35918 fi
35919 
35920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35921 $as_echo "$ENABLE_SJAVAC" >&6; }
35922 
35923 
35924   if test "x$ENABLE_SJAVAC" = xyes; then
35925     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35926   else
35927     SJAVAC_SERVER_DIR=
35928   fi
35929 
35930 
35931 
35932 # Can the C/C++ compiler use precompiled headers?
35933 
35934 
35935   ###############################################################################
35936   #
35937   # Can the C/C++ compiler use precompiled headers?
35938   #
35939   # Check whether --enable-precompiled-headers was given.
35940 if test "${enable_precompiled_headers+set}" = set; then :
35941   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35942 else
35943   ENABLE_PRECOMPH=yes
35944 fi
35945 
35946 
35947   USE_PRECOMPILED_HEADER=1
35948   if test "x$ENABLE_PRECOMPH" = xno; then
35949     USE_PRECOMPILED_HEADER=0
35950   fi
35951 
35952   if test "x$ENABLE_PRECOMPH" = xyes; then
35953     # Check that the compiler actually supports precomp headers.
35954     if test "x$GCC" = xyes; then
35955       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35956 $as_echo_n "checking that precompiled headers work... " >&6; }
35957       echo "int alfa();" > conftest.h
35958       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35959       if test ! -f conftest.hpp.gch; then
35960         USE_PRECOMPILED_HEADER=0
35961         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35962 $as_echo "no" >&6; }
35963       else
35964         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35965 $as_echo "yes" >&6; }
35966       fi
35967       rm -f conftest.h conftest.hpp.gch
35968     fi
35969   fi
35970 
35971 
35972 
35973 
35974 # Setup use of ccache, if available
35975 
35976   # Check whether --enable-ccache was given.
35977 if test "${enable_ccache+set}" = set; then :
35978   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
35979 else
35980   ENABLE_CCACHE=yes
35981 fi
35982 
35983   if test "x$ENABLE_CCACHE" = xyes; then
35984     OLD_PATH="$PATH"
35985     if test "x$TOOLS_DIR" != x; then
35986       PATH=$TOOLS_DIR:$PATH
35987     fi
35988     # Extract the first word of "ccache", so it can be a program name with args.
35989 set dummy ccache; ac_word=$2
35990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35991 $as_echo_n "checking for $ac_word... " >&6; }
35992 if ${ac_cv_path_CCACHE+:} false; then :
35993   $as_echo_n "(cached) " >&6
35994 else
35995   case $CCACHE in
35996   [\\/]* | ?:[\\/]*)
35997   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
35998   ;;
35999   *)
36000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36001 for as_dir in $PATH
36002 do
36003   IFS=$as_save_IFS
36004   test -z "$as_dir" && as_dir=.
36005     for ac_exec_ext in '' $ac_executable_extensions; do
36006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36007     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36009     break 2
36010   fi
36011 done
36012   done
36013 IFS=$as_save_IFS
36014 
36015   ;;
36016 esac
36017 fi
36018 CCACHE=$ac_cv_path_CCACHE
36019 if test -n "$CCACHE"; then
36020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36021 $as_echo "$CCACHE" >&6; }
36022 else
36023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36024 $as_echo "no" >&6; }
36025 fi
36026 
36027 
36028     PATH="$OLD_PATH"
36029   else
36030     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
36031 $as_echo_n "checking for ccache... " >&6; }
36032     { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
36033 $as_echo "explicitly disabled" >&6; }
36034     CCACHE=
36035   fi
36036 
36037 
36038 
36039 # Check whether --with-ccache-dir was given.
36040 if test "${with_ccache_dir+set}" = set; then :
36041   withval=$with_ccache_dir;
36042 fi
36043 
36044 
36045   if test "x$with_ccache_dir" != x; then
36046     # When using a non home ccache directory, assume the use is to share ccache files
36047     # with other users. Thus change the umask.
36048     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36049   fi
36050   CCACHE_FOUND=""
36051   if test "x$CCACHE" != x; then
36052 
36053   if test "x$CCACHE" != x; then
36054     CCACHE_FOUND="true"
36055     # Only use ccache if it is 3.1.4 or later, which supports
36056     # precompiled headers.
36057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36058 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36059     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36060     if test "x$HAS_GOOD_CCACHE" = x; then
36061       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36062 $as_echo "no, disabling ccache" >&6; }
36063       CCACHE=
36064     else
36065       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36066 $as_echo "yes" >&6; }
36067       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36068 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36069       PUSHED_FLAGS="$CXXFLAGS"
36070       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36071       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36072 /* end confdefs.h.  */
36073 
36074 int
36075 main ()
36076 {
36077 
36078   ;
36079   return 0;
36080 }
36081 _ACEOF
36082 if ac_fn_cxx_try_compile "$LINENO"; then :
36083   CC_KNOWS_CCACHE_TRICK=yes
36084 else
36085   CC_KNOWS_CCACHE_TRICK=no
36086 fi
36087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36088       CXXFLAGS="$PUSHED_FLAGS"
36089       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36090         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36091 $as_echo "yes" >&6; }
36092       else
36093         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36094 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
36095         CCACHE=
36096       fi
36097     fi
36098   fi
36099 
36100   if test "x$CCACHE" != x; then
36101     CCACHE_SLOPPINESS=time_macros
36102     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36103     CCACHE_FLAGS=-fpch-preprocess
36104 
36105     if test "x$SET_CCACHE_DIR" != x; then
36106       mkdir -p $CCACHE_DIR > /dev/null 2>&1
36107       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36108     fi
36109   fi
36110 
36111   fi
36112 
36113 
36114 ###############################################################################
36115 #
36116 # And now the finish...
36117 #
36118 ###############################################################################
36119 
36120 # Check for some common pitfalls
36121 
36122   if test x"$OPENJDK_BUILD_OS" = xwindows; then
36123     file_to_test="$SRC_ROOT/LICENSE"
36124     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36125       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
36126     fi
36127   fi
36128 
36129 
36130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36131 $as_echo_n "checking if build directory is on local disk... " >&6; }
36132 
36133   # df -l lists only local disks; if the given directory is not found then
36134   # a non-zero exit code is given
36135   if test "x$DF" = x; then
36136     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36137       # msys does not have df; use Windows "net use" instead.
36138       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36139       if test "x$IS_NETWORK_DISK" = x; then
36140         OUTPUT_DIR_IS_LOCAL="yes"
36141       else
36142         OUTPUT_DIR_IS_LOCAL="no"
36143       fi
36144     else
36145       # No df here, say it's local
36146       OUTPUT_DIR_IS_LOCAL="yes"
36147     fi
36148   else
36149     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36150       OUTPUT_DIR_IS_LOCAL="yes"
36151     else
36152       OUTPUT_DIR_IS_LOCAL="no"
36153     fi
36154   fi
36155 
36156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36157 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36158 
36159 
36160 
36161   # Check if the user has any old-style ALT_ variables set.
36162   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36163 
36164   # Before generating output files, test if they exist. If they do, this is a reconfigure.
36165   # Since we can't properly handle the dependencies for this, warn the user about the situation
36166   if test -e $OUTPUT_ROOT/spec.gmk; then
36167     IS_RECONFIGURE=yes
36168   else
36169     IS_RECONFIGURE=no
36170   fi
36171 
36172   if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36173     HIDE_PERFORMANCE_HINTS=yes
36174   else
36175     HIDE_PERFORMANCE_HINTS=no
36176     # Hide it the next time around...
36177     $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36178   fi
36179 
36180 
36181 # At the end, call the custom hook. (Dummy macro if no custom sources available)
36182 
36183 
36184 # We're messing a bit with internal autoconf variables to put the config.status
36185 # in the output directory instead of the current directory.
36186 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36187 
36188 # Create the actual output files. Now the main work of configure is done.
36189 cat >confcache <<\_ACEOF
36190 # This file is a shell script that caches the results of configure
36191 # tests run on this system so they can be shared between configure
36192 # scripts and configure runs, see configure's option --config-cache.
36193 # It is not useful on other systems.  If it contains results you don't
36194 # want to keep, you may remove or edit it.
36195 #
36196 # config.status only pays attention to the cache file if you give it
36197 # the --recheck option to rerun configure.
36198 #
36199 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36200 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36201 # following values.
36202 
36203 _ACEOF
36204 
36205 # The following way of writing the cache mishandles newlines in values,
36206 # but we know of no workaround that is simple, portable, and efficient.
36207 # So, we kill variables containing newlines.
36208 # Ultrix sh set writes to stderr and can't be redirected directly,
36209 # and sets the high bit in the cache file unless we assign to the vars.
36210 (
36211   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36212     eval ac_val=\$$ac_var
36213     case $ac_val in #(
36214     *${as_nl}*)
36215       case $ac_var in #(
36216       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36217 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36218       esac
36219       case $ac_var in #(
36220       _ | IFS | as_nl) ;; #(
36221       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36222       *) { eval $ac_var=; unset $ac_var;} ;;
36223       esac ;;
36224     esac
36225   done
36226 
36227   (set) 2>&1 |
36228     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36229     *${as_nl}ac_space=\ *)
36230       # `set' does not quote correctly, so add quotes: double-quote
36231       # substitution turns \\\\ into \\, and sed turns \\ into \.
36232       sed -n \
36233         "s/'/'\\\\''/g;
36234           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36235       ;; #(
36236     *)
36237       # `set' quotes correctly as required by POSIX, so do not add quotes.
36238       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36239       ;;
36240     esac |
36241     sort
36242 ) |
36243   sed '
36244      /^ac_cv_env_/b end
36245      t clear
36246      :clear
36247      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36248      t end
36249      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36250      :end' >>confcache
36251 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36252   if test -w "$cache_file"; then
36253     if test "x$cache_file" != "x/dev/null"; then
36254       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36255 $as_echo "$as_me: updating cache $cache_file" >&6;}
36256       if test ! -f "$cache_file" || test -h "$cache_file"; then
36257         cat confcache >"$cache_file"
36258       else
36259         case $cache_file in #(
36260         */* | ?:*)
36261           mv -f confcache "$cache_file"$$ &&
36262           mv -f "$cache_file"$$ "$cache_file" ;; #(
36263         *)
36264           mv -f confcache "$cache_file" ;;
36265         esac
36266       fi
36267     fi
36268   else
36269     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36270 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36271   fi
36272 fi
36273 rm -f confcache
36274 
36275 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36276 # Let make expand exec_prefix.
36277 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36278 
36279 DEFS=-DHAVE_CONFIG_H
36280 
36281 ac_libobjs=
36282 ac_ltlibobjs=
36283 U=
36284 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36285   # 1. Remove the extension, and $U if already installed.
36286   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36287   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36288   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36289   #    will be set to the directory where LIBOBJS objects are built.
36290   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36291   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36292 done
36293 LIBOBJS=$ac_libobjs
36294 
36295 LTLIBOBJS=$ac_ltlibobjs
36296 
36297 
36298 
36299 : "${CONFIG_STATUS=./config.status}"
36300 ac_write_fail=0
36301 ac_clean_files_save=$ac_clean_files
36302 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36303 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36304 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36305 as_write_fail=0
36306 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36307 #! $SHELL
36308 # Generated by $as_me.
36309 # Run this file to recreate the current configuration.
36310 # Compiler output produced by configure, useful for debugging
36311 # configure, is in config.log if it exists.
36312 
36313 debug=false
36314 ac_cs_recheck=false
36315 ac_cs_silent=false
36316 
36317 SHELL=\${CONFIG_SHELL-$SHELL}
36318 export SHELL
36319 _ASEOF
36320 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36321 ## -------------------- ##
36322 ## M4sh Initialization. ##
36323 ## -------------------- ##
36324 
36325 # Be more Bourne compatible
36326 DUALCASE=1; export DUALCASE # for MKS sh
36327 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36328   emulate sh
36329   NULLCMD=:
36330   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36331   # is contrary to our usage.  Disable this feature.
36332   alias -g '${1+"$@"}'='"$@"'
36333   setopt NO_GLOB_SUBST
36334 else
36335   case `(set -o) 2>/dev/null` in #(
36336   *posix*) :
36337     set -o posix ;; #(
36338   *) :
36339      ;;
36340 esac
36341 fi
36342 
36343 
36344 as_nl='
36345 '
36346 export as_nl
36347 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36348 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36349 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36350 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36351 # Prefer a ksh shell builtin over an external printf program on Solaris,
36352 # but without wasting forks for bash or zsh.
36353 if test -z "$BASH_VERSION$ZSH_VERSION" \
36354     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36355   as_echo='print -r --'
36356   as_echo_n='print -rn --'
36357 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36358   as_echo='printf %s\n'
36359   as_echo_n='printf %s'
36360 else
36361   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36362     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36363     as_echo_n='/usr/ucb/echo -n'
36364   else
36365     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36366     as_echo_n_body='eval
36367       arg=$1;
36368       case $arg in #(
36369       *"$as_nl"*)
36370         expr "X$arg" : "X\\(.*\\)$as_nl";
36371         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36372       esac;
36373       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36374     '
36375     export as_echo_n_body
36376     as_echo_n='sh -c $as_echo_n_body as_echo'
36377   fi
36378   export as_echo_body
36379   as_echo='sh -c $as_echo_body as_echo'
36380 fi
36381 
36382 # The user is always right.
36383 if test "${PATH_SEPARATOR+set}" != set; then
36384   PATH_SEPARATOR=:
36385   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36386     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36387       PATH_SEPARATOR=';'
36388   }
36389 fi
36390 
36391 
36392 # IFS
36393 # We need space, tab and new line, in precisely that order.  Quoting is
36394 # there to prevent editors from complaining about space-tab.
36395 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36396 # splitting by setting IFS to empty value.)
36397 IFS=" ""        $as_nl"
36398 
36399 # Find who we are.  Look in the path if we contain no directory separator.
36400 as_myself=
36401 case $0 in #((
36402   *[\\/]* ) as_myself=$0 ;;
36403   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36404 for as_dir in $PATH
36405 do
36406   IFS=$as_save_IFS
36407   test -z "$as_dir" && as_dir=.
36408     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36409   done
36410 IFS=$as_save_IFS
36411 
36412      ;;
36413 esac
36414 # We did not find ourselves, most probably we were run as `sh COMMAND'
36415 # in which case we are not to be found in the path.
36416 if test "x$as_myself" = x; then
36417   as_myself=$0
36418 fi
36419 if test ! -f "$as_myself"; then
36420   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36421   exit 1
36422 fi
36423 
36424 # Unset variables that we do not need and which cause bugs (e.g. in
36425 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36426 # suppresses any "Segmentation fault" message there.  '((' could
36427 # trigger a bug in pdksh 5.2.14.
36428 for as_var in BASH_ENV ENV MAIL MAILPATH
36429 do eval test x\${$as_var+set} = xset \
36430   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36431 done
36432 PS1='$ '
36433 PS2='> '
36434 PS4='+ '
36435 
36436 # NLS nuisances.
36437 LC_ALL=C
36438 export LC_ALL
36439 LANGUAGE=C
36440 export LANGUAGE
36441 
36442 # CDPATH.
36443 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36444 
36445 
36446 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36447 # ----------------------------------------
36448 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36449 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36450 # script with STATUS, using 1 if that was 0.
36451 as_fn_error ()
36452 {
36453   as_status=$1; test $as_status -eq 0 && as_status=1
36454   if test "$4"; then
36455     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36456     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36457   fi
36458   $as_echo "$as_me: error: $2" >&2
36459   as_fn_exit $as_status
36460 } # as_fn_error
36461 
36462 
36463 # as_fn_set_status STATUS
36464 # -----------------------
36465 # Set $? to STATUS, without forking.
36466 as_fn_set_status ()
36467 {
36468   return $1
36469 } # as_fn_set_status
36470 
36471 # as_fn_exit STATUS
36472 # -----------------
36473 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36474 as_fn_exit ()
36475 {
36476   set +e
36477   as_fn_set_status $1
36478   exit $1
36479 } # as_fn_exit
36480 
36481 # as_fn_unset VAR
36482 # ---------------
36483 # Portably unset VAR.
36484 as_fn_unset ()
36485 {
36486   { eval $1=; unset $1;}
36487 }
36488 as_unset=as_fn_unset
36489 # as_fn_append VAR VALUE
36490 # ----------------------
36491 # Append the text in VALUE to the end of the definition contained in VAR. Take
36492 # advantage of any shell optimizations that allow amortized linear growth over
36493 # repeated appends, instead of the typical quadratic growth present in naive
36494 # implementations.
36495 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36496   eval 'as_fn_append ()
36497   {
36498     eval $1+=\$2
36499   }'
36500 else
36501   as_fn_append ()
36502   {
36503     eval $1=\$$1\$2
36504   }
36505 fi # as_fn_append
36506 
36507 # as_fn_arith ARG...
36508 # ------------------
36509 # Perform arithmetic evaluation on the ARGs, and store the result in the
36510 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36511 # must be portable across $(()) and expr.
36512 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36513   eval 'as_fn_arith ()
36514   {
36515     as_val=$(( $* ))
36516   }'
36517 else
36518   as_fn_arith ()
36519   {
36520     as_val=`expr "$@" || test $? -eq 1`
36521   }
36522 fi # as_fn_arith
36523 
36524 
36525 if expr a : '\(a\)' >/dev/null 2>&1 &&
36526    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36527   as_expr=expr
36528 else
36529   as_expr=false
36530 fi
36531 
36532 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36533   as_basename=basename
36534 else
36535   as_basename=false
36536 fi
36537 
36538 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36539   as_dirname=dirname
36540 else
36541   as_dirname=false
36542 fi
36543 
36544 as_me=`$as_basename -- "$0" ||
36545 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36546          X"$0" : 'X\(//\)$' \| \
36547          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36548 $as_echo X/"$0" |
36549     sed '/^.*\/\([^/][^/]*\)\/*$/{
36550             s//\1/
36551             q
36552           }
36553           /^X\/\(\/\/\)$/{
36554             s//\1/
36555             q
36556           }
36557           /^X\/\(\/\).*/{
36558             s//\1/
36559             q
36560           }
36561           s/.*/./; q'`
36562 
36563 # Avoid depending upon Character Ranges.
36564 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36565 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36566 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36567 as_cr_digits='0123456789'
36568 as_cr_alnum=$as_cr_Letters$as_cr_digits
36569 
36570 ECHO_C= ECHO_N= ECHO_T=
36571 case `echo -n x` in #(((((
36572 -n*)
36573   case `echo 'xy\c'` in
36574   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
36575   xy)  ECHO_C='\c';;
36576   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36577        ECHO_T=' ';;
36578   esac;;
36579 *)
36580   ECHO_N='-n';;
36581 esac
36582 
36583 rm -f conf$$ conf$$.exe conf$$.file
36584 if test -d conf$$.dir; then
36585   rm -f conf$$.dir/conf$$.file
36586 else
36587   rm -f conf$$.dir
36588   mkdir conf$$.dir 2>/dev/null
36589 fi
36590 if (echo >conf$$.file) 2>/dev/null; then
36591   if ln -s conf$$.file conf$$ 2>/dev/null; then
36592     as_ln_s='ln -s'
36593     # ... but there are two gotchas:
36594     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36595     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36596     # In both cases, we have to default to `cp -pR'.
36597     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36598       as_ln_s='cp -pR'
36599   elif ln conf$$.file conf$$ 2>/dev/null; then
36600     as_ln_s=ln
36601   else
36602     as_ln_s='cp -pR'
36603   fi
36604 else
36605   as_ln_s='cp -pR'
36606 fi
36607 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36608 rmdir conf$$.dir 2>/dev/null
36609 
36610 
36611 # as_fn_mkdir_p
36612 # -------------
36613 # Create "$as_dir" as a directory, including parents if necessary.
36614 as_fn_mkdir_p ()
36615 {
36616 
36617   case $as_dir in #(
36618   -*) as_dir=./$as_dir;;
36619   esac
36620   test -d "$as_dir" || eval $as_mkdir_p || {
36621     as_dirs=
36622     while :; do
36623       case $as_dir in #(
36624       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36625       *) as_qdir=$as_dir;;
36626       esac
36627       as_dirs="'$as_qdir' $as_dirs"
36628       as_dir=`$as_dirname -- "$as_dir" ||
36629 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36630          X"$as_dir" : 'X\(//\)[^/]' \| \
36631          X"$as_dir" : 'X\(//\)$' \| \
36632          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36633 $as_echo X"$as_dir" |
36634     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36635             s//\1/
36636             q
36637           }
36638           /^X\(\/\/\)[^/].*/{
36639             s//\1/
36640             q
36641           }
36642           /^X\(\/\/\)$/{
36643             s//\1/
36644             q
36645           }
36646           /^X\(\/\).*/{
36647             s//\1/
36648             q
36649           }
36650           s/.*/./; q'`
36651       test -d "$as_dir" && break
36652     done
36653     test -z "$as_dirs" || eval "mkdir $as_dirs"
36654   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36655 
36656 
36657 } # as_fn_mkdir_p
36658 if mkdir -p . 2>/dev/null; then
36659   as_mkdir_p='mkdir -p "$as_dir"'
36660 else
36661   test -d ./-p && rmdir ./-p
36662   as_mkdir_p=false
36663 fi
36664 
36665 
36666 # as_fn_executable_p FILE
36667 # -----------------------
36668 # Test if FILE is an executable regular file.
36669 as_fn_executable_p ()
36670 {
36671   test -f "$1" && test -x "$1"
36672 } # as_fn_executable_p
36673 as_test_x='test -x'
36674 as_executable_p=as_fn_executable_p
36675 
36676 # Sed expression to map a string onto a valid CPP name.
36677 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36678 
36679 # Sed expression to map a string onto a valid variable name.
36680 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36681 
36682 
36683 exec 6>&1
36684 ## ----------------------------------- ##
36685 ## Main body of $CONFIG_STATUS script. ##
36686 ## ----------------------------------- ##
36687 _ASEOF
36688 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36689 
36690 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36691 # Save the log message, to keep $0 and so on meaningful, and to
36692 # report actual input values of CONFIG_FILES etc. instead of their
36693 # values after options handling.
36694 ac_log="
36695 This file was extended by OpenJDK $as_me jdk8, which was
36696 generated by GNU Autoconf 2.69.  Invocation command line was
36697 
36698   CONFIG_FILES    = $CONFIG_FILES
36699   CONFIG_HEADERS  = $CONFIG_HEADERS
36700   CONFIG_LINKS    = $CONFIG_LINKS
36701   CONFIG_COMMANDS = $CONFIG_COMMANDS
36702   $ $0 $@
36703 
36704 on `(hostname || uname -n) 2>/dev/null | sed 1q`
36705 "
36706 
36707 _ACEOF
36708 
36709 case $ac_config_files in *"
36710 "*) set x $ac_config_files; shift; ac_config_files=$*;;
36711 esac
36712 
36713 case $ac_config_headers in *"
36714 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36715 esac
36716 
36717 
36718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36719 # Files that config.status was made for.
36720 config_files="$ac_config_files"
36721 config_headers="$ac_config_headers"
36722 
36723 _ACEOF
36724 
36725 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36726 ac_cs_usage="\
36727 \`$as_me' instantiates files and other configuration actions
36728 from templates according to the current configuration.  Unless the files
36729 and actions are specified as TAGs, all are instantiated by default.
36730 
36731 Usage: $0 [OPTION]... [TAG]...
36732 
36733   -h, --help       print this help, then exit
36734   -V, --version    print version number and configuration settings, then exit
36735       --config     print configuration, then exit
36736   -q, --quiet, --silent
36737                    do not print progress messages
36738   -d, --debug      don't remove temporary files
36739       --recheck    update $as_me by reconfiguring in the same conditions
36740       --file=FILE[:TEMPLATE]
36741                    instantiate the configuration file FILE
36742       --header=FILE[:TEMPLATE]
36743                    instantiate the configuration header FILE
36744 
36745 Configuration files:
36746 $config_files
36747 
36748 Configuration headers:
36749 $config_headers
36750 
36751 Report bugs to <build-dev@openjdk.java.net>.
36752 OpenJDK home page: <http://openjdk.java.net>."
36753 
36754 _ACEOF
36755 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36756 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36757 ac_cs_version="\\
36758 OpenJDK config.status jdk8
36759 configured by $0, generated by GNU Autoconf 2.69,
36760   with options \\"\$ac_cs_config\\"
36761 
36762 Copyright (C) 2012 Free Software Foundation, Inc.
36763 This config.status script is free software; the Free Software Foundation
36764 gives unlimited permission to copy, distribute and modify it."
36765 
36766 ac_pwd='$ac_pwd'
36767 srcdir='$srcdir'
36768 AWK='$AWK'
36769 test -n "\$AWK" || AWK=awk
36770 _ACEOF
36771 
36772 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36773 # The default lists apply if the user does not specify any file.
36774 ac_need_defaults=:
36775 while test $# != 0
36776 do
36777   case $1 in
36778   --*=?*)
36779     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36780     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36781     ac_shift=:
36782     ;;
36783   --*=)
36784     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36785     ac_optarg=
36786     ac_shift=:
36787     ;;
36788   *)
36789     ac_option=$1
36790     ac_optarg=$2
36791     ac_shift=shift
36792     ;;
36793   esac
36794 
36795   case $ac_option in
36796   # Handling of the options.
36797   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36798     ac_cs_recheck=: ;;
36799   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36800     $as_echo "$ac_cs_version"; exit ;;
36801   --config | --confi | --conf | --con | --co | --c )
36802     $as_echo "$ac_cs_config"; exit ;;
36803   --debug | --debu | --deb | --de | --d | -d )
36804     debug=: ;;
36805   --file | --fil | --fi | --f )
36806     $ac_shift
36807     case $ac_optarg in
36808     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36809     '') as_fn_error $? "missing file argument" ;;
36810     esac
36811     as_fn_append CONFIG_FILES " '$ac_optarg'"
36812     ac_need_defaults=false;;
36813   --header | --heade | --head | --hea )
36814     $ac_shift
36815     case $ac_optarg in
36816     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36817     esac
36818     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36819     ac_need_defaults=false;;
36820   --he | --h)
36821     # Conflict between --help and --header
36822     as_fn_error $? "ambiguous option: \`$1'
36823 Try \`$0 --help' for more information.";;
36824   --help | --hel | -h )
36825     $as_echo "$ac_cs_usage"; exit ;;
36826   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36827   | -silent | --silent | --silen | --sile | --sil | --si | --s)
36828     ac_cs_silent=: ;;
36829 
36830   # This is an error.
36831   -*) as_fn_error $? "unrecognized option: \`$1'
36832 Try \`$0 --help' for more information." ;;
36833 
36834   *) as_fn_append ac_config_targets " $1"
36835      ac_need_defaults=false ;;
36836 
36837   esac
36838   shift
36839 done
36840 
36841 ac_configure_extra_args=
36842 
36843 if $ac_cs_silent; then
36844   exec 6>/dev/null
36845   ac_configure_extra_args="$ac_configure_extra_args --silent"
36846 fi
36847 
36848 _ACEOF
36849 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36850 if \$ac_cs_recheck; then
36851   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36852   shift
36853   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36854   CONFIG_SHELL='$SHELL'
36855   export CONFIG_SHELL
36856   exec "\$@"
36857 fi
36858 
36859 _ACEOF
36860 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36861 exec 5>>config.log
36862 {
36863   echo
36864   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36865 ## Running $as_me. ##
36866 _ASBOX
36867   $as_echo "$ac_log"
36868 } >&5
36869 
36870 _ACEOF
36871 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36872 _ACEOF
36873 
36874 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36875 
36876 # Handling of arguments.
36877 for ac_config_target in $ac_config_targets
36878 do
36879   case $ac_config_target in
36880     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36881     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36882     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36883     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36884     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36885     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36886     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36887 
36888   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36889   esac
36890 done
36891 
36892 
36893 # If the user did not use the arguments to specify the items to instantiate,
36894 # then the envvar interface is used.  Set only those that are not.
36895 # We use the long form for the default assignment because of an extremely
36896 # bizarre bug on SunOS 4.1.3.
36897 if $ac_need_defaults; then
36898   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36899   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36900 fi
36901 
36902 # Have a temporary directory for convenience.  Make it in the build tree
36903 # simply because there is no reason against having it here, and in addition,
36904 # creating and moving files from /tmp can sometimes cause problems.
36905 # Hook for its removal unless debugging.
36906 # Note that there is a small window in which the directory will not be cleaned:
36907 # after its creation but before its name has been assigned to `$tmp'.
36908 $debug ||
36909 {
36910   tmp= ac_tmp=
36911   trap 'exit_status=$?
36912   : "${ac_tmp:=$tmp}"
36913   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36914 ' 0
36915   trap 'as_fn_exit 1' 1 2 13 15
36916 }
36917 # Create a (secure) tmp directory for tmp files.
36918 
36919 {
36920   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36921   test -d "$tmp"
36922 }  ||
36923 {
36924   tmp=./conf$$-$RANDOM
36925   (umask 077 && mkdir "$tmp")
36926 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36927 ac_tmp=$tmp
36928 
36929 # Set up the scripts for CONFIG_FILES section.
36930 # No need to generate them if there are no CONFIG_FILES.
36931 # This happens for instance with `./config.status config.h'.
36932 if test -n "$CONFIG_FILES"; then
36933 
36934 
36935 ac_cr=`echo X | tr X '\015'`
36936 # On cygwin, bash can eat \r inside `` if the user requested igncr.
36937 # But we know of no other shell where ac_cr would be empty at this
36938 # point, so we can use a bashism as a fallback.
36939 if test "x$ac_cr" = x; then
36940   eval ac_cr=\$\'\\r\'
36941 fi
36942 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36943 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36944   ac_cs_awk_cr='\\r'
36945 else
36946   ac_cs_awk_cr=$ac_cr
36947 fi
36948 
36949 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36950 _ACEOF
36951 
36952 
36953 {
36954   echo "cat >conf$$subs.awk <<_ACEOF" &&
36955   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36956   echo "_ACEOF"
36957 } >conf$$subs.sh ||
36958   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36959 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36960 ac_delim='%!_!# '
36961 for ac_last_try in false false false false false :; do
36962   . ./conf$$subs.sh ||
36963     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36964 
36965   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36966   if test $ac_delim_n = $ac_delim_num; then
36967     break
36968   elif $ac_last_try; then
36969     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36970   else
36971     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36972   fi
36973 done
36974 rm -f conf$$subs.sh
36975 
36976 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36977 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36978 _ACEOF
36979 sed -n '
36980 h
36981 s/^/S["/; s/!.*/"]=/
36982 p
36983 g
36984 s/^[^!]*!//
36985 :repl
36986 t repl
36987 s/'"$ac_delim"'$//
36988 t delim
36989 :nl
36990 h
36991 s/\(.\{148\}\)..*/\1/
36992 t more1
36993 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36994 p
36995 n
36996 b repl
36997 :more1
36998 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36999 p
37000 g
37001 s/.\{148\}//
37002 t nl
37003 :delim
37004 h
37005 s/\(.\{148\}\)..*/\1/
37006 t more2
37007 s/["\\]/\\&/g; s/^/"/; s/$/"/
37008 p
37009 b
37010 :more2
37011 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37012 p
37013 g
37014 s/.\{148\}//
37015 t delim
37016 ' <conf$$subs.awk | sed '
37017 /^[^""]/{
37018   N
37019   s/\n//
37020 }
37021 ' >>$CONFIG_STATUS || ac_write_fail=1
37022 rm -f conf$$subs.awk
37023 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37024 _ACAWK
37025 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37026   for (key in S) S_is_set[key] = 1
37027   FS = ""
37028 
37029 }
37030 {
37031   line = $ 0
37032   nfields = split(line, field, "@")
37033   substed = 0
37034   len = length(field[1])
37035   for (i = 2; i < nfields; i++) {
37036     key = field[i]
37037     keylen = length(key)
37038     if (S_is_set[key]) {
37039       value = S[key]
37040       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37041       len += length(value) + length(field[++i])
37042       substed = 1
37043     } else
37044       len += 1 + keylen
37045   }
37046 
37047   print line
37048 }
37049 
37050 _ACAWK
37051 _ACEOF
37052 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37053 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37054   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37055 else
37056   cat
37057 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37058   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37059 _ACEOF
37060 
37061 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37062 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37063 # trailing colons and then remove the whole line if VPATH becomes empty
37064 # (actually we leave an empty line to preserve line numbers).
37065 if test "x$srcdir" = x.; then
37066   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37067 h
37068 s///
37069 s/^/:/
37070 s/[      ]*$/:/
37071 s/:\$(srcdir):/:/g
37072 s/:\${srcdir}:/:/g
37073 s/:@srcdir@:/:/g
37074 s/^:*//
37075 s/:*$//
37076 x
37077 s/\(=[   ]*\).*/\1/
37078 G
37079 s/\n//
37080 s/^[^=]*=[       ]*$//
37081 }'
37082 fi
37083 
37084 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37085 fi # test -n "$CONFIG_FILES"
37086 
37087 # Set up the scripts for CONFIG_HEADERS section.
37088 # No need to generate them if there are no CONFIG_HEADERS.
37089 # This happens for instance with `./config.status Makefile'.
37090 if test -n "$CONFIG_HEADERS"; then
37091 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37092 BEGIN {
37093 _ACEOF
37094 
37095 # Transform confdefs.h into an awk script `defines.awk', embedded as
37096 # here-document in config.status, that substitutes the proper values into
37097 # config.h.in to produce config.h.
37098 
37099 # Create a delimiter string that does not exist in confdefs.h, to ease
37100 # handling of long lines.
37101 ac_delim='%!_!# '
37102 for ac_last_try in false false :; do
37103   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37104   if test -z "$ac_tt"; then
37105     break
37106   elif $ac_last_try; then
37107     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37108   else
37109     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37110   fi
37111 done
37112 
37113 # For the awk script, D is an array of macro values keyed by name,
37114 # likewise P contains macro parameters if any.  Preserve backslash
37115 # newline sequences.
37116 
37117 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37118 sed -n '
37119 s/.\{148\}/&'"$ac_delim"'/g
37120 t rset
37121 :rset
37122 s/^[     ]*#[    ]*define[       ][      ]*/ /
37123 t def
37124 d
37125 :def
37126 s/\\$//
37127 t bsnl
37128 s/["\\]/\\&/g
37129 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37130 D["\1"]=" \3"/p
37131 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37132 d
37133 :bsnl
37134 s/["\\]/\\&/g
37135 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37136 D["\1"]=" \3\\\\\\n"\\/p
37137 t cont
37138 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37139 t cont
37140 d
37141 :cont
37142 n
37143 s/.\{148\}/&'"$ac_delim"'/g
37144 t clear
37145 :clear
37146 s/\\$//
37147 t bsnlc
37148 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37149 d
37150 :bsnlc
37151 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37152 b cont
37153 ' <confdefs.h | sed '
37154 s/'"$ac_delim"'/"\\\
37155 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37156 
37157 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37158   for (key in D) D_is_set[key] = 1
37159   FS = ""
37160 }
37161 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37162   line = \$ 0
37163   split(line, arg, " ")
37164   if (arg[1] == "#") {
37165     defundef = arg[2]
37166     mac1 = arg[3]
37167   } else {
37168     defundef = substr(arg[1], 2)
37169     mac1 = arg[2]
37170   }
37171   split(mac1, mac2, "(") #)
37172   macro = mac2[1]
37173   prefix = substr(line, 1, index(line, defundef) - 1)
37174   if (D_is_set[macro]) {
37175     # Preserve the white space surrounding the "#".
37176     print prefix "define", macro P[macro] D[macro]
37177     next
37178   } else {
37179     # Replace #undef with comments.  This is necessary, for example,
37180     # in the case of _POSIX_SOURCE, which is predefined and required
37181     # on some systems where configure will not decide to define it.
37182     if (defundef == "undef") {
37183       print "/*", prefix defundef, macro, "*/"
37184       next
37185     }
37186   }
37187 }
37188 { print }
37189 _ACAWK
37190 _ACEOF
37191 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37192   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37193 fi # test -n "$CONFIG_HEADERS"
37194 
37195 
37196 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37197 shift
37198 for ac_tag
37199 do
37200   case $ac_tag in
37201   :[FHLC]) ac_mode=$ac_tag; continue;;
37202   esac
37203   case $ac_mode$ac_tag in
37204   :[FHL]*:*);;
37205   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37206   :[FH]-) ac_tag=-:-;;
37207   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37208   esac
37209   ac_save_IFS=$IFS
37210   IFS=:
37211   set x $ac_tag
37212   IFS=$ac_save_IFS
37213   shift
37214   ac_file=$1
37215   shift
37216 
37217   case $ac_mode in
37218   :L) ac_source=$1;;
37219   :[FH])
37220     ac_file_inputs=
37221     for ac_f
37222     do
37223       case $ac_f in
37224       -) ac_f="$ac_tmp/stdin";;
37225       *) # Look for the file first in the build tree, then in the source tree
37226          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37227          # because $ac_f cannot contain `:'.
37228          test -f "$ac_f" ||
37229            case $ac_f in
37230            [\\/$]*) false;;
37231            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37232            esac ||
37233            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37234       esac
37235       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37236       as_fn_append ac_file_inputs " '$ac_f'"
37237     done
37238 
37239     # Let's still pretend it is `configure' which instantiates (i.e., don't
37240     # use $as_me), people would be surprised to read:
37241     #    /* config.h.  Generated by config.status.  */
37242     configure_input='Generated from '`
37243           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37244         `' by configure.'
37245     if test x"$ac_file" != x-; then
37246       configure_input="$ac_file.  $configure_input"
37247       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37248 $as_echo "$as_me: creating $ac_file" >&6;}
37249     fi
37250     # Neutralize special characters interpreted by sed in replacement strings.
37251     case $configure_input in #(
37252     *\&* | *\|* | *\\* )
37253        ac_sed_conf_input=`$as_echo "$configure_input" |
37254        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37255     *) ac_sed_conf_input=$configure_input;;
37256     esac
37257 
37258     case $ac_tag in
37259     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37260       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37261     esac
37262     ;;
37263   esac
37264 
37265   ac_dir=`$as_dirname -- "$ac_file" ||
37266 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37267          X"$ac_file" : 'X\(//\)[^/]' \| \
37268          X"$ac_file" : 'X\(//\)$' \| \
37269          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37270 $as_echo X"$ac_file" |
37271     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37272             s//\1/
37273             q
37274           }
37275           /^X\(\/\/\)[^/].*/{
37276             s//\1/
37277             q
37278           }
37279           /^X\(\/\/\)$/{
37280             s//\1/
37281             q
37282           }
37283           /^X\(\/\).*/{
37284             s//\1/
37285             q
37286           }
37287           s/.*/./; q'`
37288   as_dir="$ac_dir"; as_fn_mkdir_p
37289   ac_builddir=.
37290 
37291 case "$ac_dir" in
37292 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37293 *)
37294   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37295   # A ".." for each directory in $ac_dir_suffix.
37296   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37297   case $ac_top_builddir_sub in
37298   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37299   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37300   esac ;;
37301 esac
37302 ac_abs_top_builddir=$ac_pwd
37303 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37304 # for backward compatibility:
37305 ac_top_builddir=$ac_top_build_prefix
37306 
37307 case $srcdir in
37308   .)  # We are building in place.
37309     ac_srcdir=.
37310     ac_top_srcdir=$ac_top_builddir_sub
37311     ac_abs_top_srcdir=$ac_pwd ;;
37312   [\\/]* | ?:[\\/]* )  # Absolute name.
37313     ac_srcdir=$srcdir$ac_dir_suffix;
37314     ac_top_srcdir=$srcdir
37315     ac_abs_top_srcdir=$srcdir ;;
37316   *) # Relative name.
37317     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37318     ac_top_srcdir=$ac_top_build_prefix$srcdir
37319     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37320 esac
37321 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37322 
37323 
37324   case $ac_mode in
37325   :F)
37326   #
37327   # CONFIG_FILE
37328   #
37329 
37330 _ACEOF
37331 
37332 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37333 # If the template does not know about datarootdir, expand it.
37334 # FIXME: This hack should be removed a few years after 2.60.
37335 ac_datarootdir_hack=; ac_datarootdir_seen=
37336 ac_sed_dataroot='
37337 /datarootdir/ {
37338   p
37339   q
37340 }
37341 /@datadir@/p
37342 /@docdir@/p
37343 /@infodir@/p
37344 /@localedir@/p
37345 /@mandir@/p'
37346 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37347 *datarootdir*) ac_datarootdir_seen=yes;;
37348 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37349   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37350 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37351 _ACEOF
37352 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37353   ac_datarootdir_hack='
37354   s&@datadir@&$datadir&g
37355   s&@docdir@&$docdir&g
37356   s&@infodir@&$infodir&g
37357   s&@localedir@&$localedir&g
37358   s&@mandir@&$mandir&g
37359   s&\\\${datarootdir}&$datarootdir&g' ;;
37360 esac
37361 _ACEOF
37362 
37363 # Neutralize VPATH when `$srcdir' = `.'.
37364 # Shell code in configure.ac might set extrasub.
37365 # FIXME: do we really want to maintain this feature?
37366 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37367 ac_sed_extra="$ac_vpsub
37368 $extrasub
37369 _ACEOF
37370 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37371 :t
37372 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37373 s|@configure_input@|$ac_sed_conf_input|;t t
37374 s&@top_builddir@&$ac_top_builddir_sub&;t t
37375 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37376 s&@srcdir@&$ac_srcdir&;t t
37377 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37378 s&@top_srcdir@&$ac_top_srcdir&;t t
37379 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37380 s&@builddir@&$ac_builddir&;t t
37381 s&@abs_builddir@&$ac_abs_builddir&;t t
37382 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37383 $ac_datarootdir_hack
37384 "
37385 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37386   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37387 
37388 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37389   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37390   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37391       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37392   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37393 which seems to be undefined.  Please make sure it is defined" >&5
37394 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37395 which seems to be undefined.  Please make sure it is defined" >&2;}
37396 
37397   rm -f "$ac_tmp/stdin"
37398   case $ac_file in
37399   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37400   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37401   esac \
37402   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37403  ;;
37404   :H)
37405   #
37406   # CONFIG_HEADER
37407   #
37408   if test x"$ac_file" != x-; then
37409     {
37410       $as_echo "/* $configure_input  */" \
37411       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37412     } >"$ac_tmp/config.h" \
37413       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37414     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37415       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37416 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37417     else
37418       rm -f "$ac_file"
37419       mv "$ac_tmp/config.h" "$ac_file" \
37420         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37421     fi
37422   else
37423     $as_echo "/* $configure_input  */" \
37424       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37425       || as_fn_error $? "could not create -" "$LINENO" 5
37426   fi
37427  ;;
37428 
37429 
37430   esac
37431 
37432 done # for ac_tag
37433 
37434 
37435 as_fn_exit 0
37436 _ACEOF
37437 ac_clean_files=$ac_clean_files_save
37438 
37439 test $ac_write_fail = 0 ||
37440   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37441 
37442 
37443 # configure is writing to config.log, and then calls config.status.
37444 # config.status does its own redirection, appending to config.log.
37445 # Unfortunately, on DOS this fails, as config.log is still kept open
37446 # by configure, so config.status won't be able to write to it; its
37447 # output is simply discarded.  So we exec the FD to /dev/null,
37448 # effectively closing config.log, so it can be properly (re)opened and
37449 # appended to by config.status.  When coming back to configure, we
37450 # need to make the FD available again.
37451 if test "$no_create" != yes; then
37452   ac_cs_success=:
37453   ac_config_status_args=
37454   test "$silent" = yes &&
37455     ac_config_status_args="$ac_config_status_args --quiet"
37456   exec 5>/dev/null
37457   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37458   exec 5>>config.log
37459   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37460   # would make configure fail if this is the last instruction.
37461   $ac_cs_success || as_fn_exit 1
37462 fi
37463 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37464   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37465 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37466 fi
37467 
37468 
37469 # Try to move the config.log file to the output directory.
37470 if test -e ./config.log; then
37471   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37472 fi
37473 
37474 # Make the compare script executable
37475 $CHMOD +x $OUTPUT_ROOT/compare.sh
37476 
37477 # Finally output some useful information to the user
37478 
37479   # Finally output some useful information to the user
37480 
37481   if test "x$CCACHE_FOUND" != x; then
37482     if  test "x$HAS_GOOD_CCACHE" = x; then
37483       CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37484       CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37485     else
37486       CCACHE_STATUS="installed and in use"
37487     fi
37488   else
37489     if test "x$GCC" = xyes; then
37490       CCACHE_STATUS="not installed (consider installing)"
37491       CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37492     else
37493       CCACHE_STATUS="not available for your system"
37494     fi
37495   fi
37496 
37497   printf "\n"
37498   printf "====================================================\n"
37499   printf "A new configuration has been successfully created in\n"
37500   printf "$OUTPUT_ROOT\n"
37501   if test "x$CONFIGURE_COMMAND_LINE" != x; then
37502     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37503   else
37504     printf "using default settings.\n"
37505   fi
37506 
37507   printf "\n"
37508   printf "Configuration summary:\n"
37509   printf "* Debug level:    $DEBUG_LEVEL\n"
37510   printf "* JDK variant:    $JDK_VARIANT\n"
37511   printf "* JVM variants:   $with_jvm_variants\n"
37512   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37513 
37514   printf "\n"
37515   printf "Tools summary:\n"
37516   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37517     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37518   fi
37519   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37520   printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37521   printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37522 
37523   printf "\n"
37524   printf "Build performance summary:\n"
37525   printf "* Cores to use:   $JOBS\n"
37526   printf "* Memory limit:   $MEMORY_SIZE MB\n"
37527   printf "* ccache status:  $CCACHE_STATUS\n"
37528   printf "\n"
37529 
37530   if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37531     printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37532     printf "$CCACHE_HELP_MSG\n"
37533 
37534   # Print a helpful message on how to acquire the necessary build dependency.
37535   # ccache is the help tag: freetype, cups, pulse, alsa etc
37536   MISSING_DEPENDENCY=ccache
37537 
37538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37539     cygwin_help $MISSING_DEPENDENCY
37540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37541     msys_help $MISSING_DEPENDENCY
37542   else
37543     PKGHANDLER_COMMAND=
37544 
37545     case $PKGHANDLER in
37546       apt-get)
37547         apt_help     $MISSING_DEPENDENCY ;;
37548       yum)
37549         yum_help     $MISSING_DEPENDENCY ;;
37550       port)
37551         port_help    $MISSING_DEPENDENCY ;;
37552       pkgutil)
37553         pkgutil_help $MISSING_DEPENDENCY ;;
37554       pkgadd)
37555         pkgadd_help  $MISSING_DEPENDENCY ;;
37556     esac
37557 
37558     if test "x$PKGHANDLER_COMMAND" != x; then
37559       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37560     fi
37561   fi
37562 
37563     printf "$HELP_MSG\n"
37564     printf "\n"
37565   fi
37566 
37567   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37568     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37569     printf "will result in longer build times.\n"
37570     printf "\n"
37571   fi
37572 
37573   if test "x$FOUND_ALT_VARIABLES" != "x"; then
37574     printf "WARNING: You have old-style ALT_ environment variables set.\n"
37575     printf "These are not respected, and will be ignored. It is recommended\n"
37576     printf "that you clean your environment. The following variables are set:\n"
37577     printf "$FOUND_ALT_VARIABLES\n"
37578     printf "\n"
37579   fi
37580 
37581   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37582     printf "WARNING: Your build output directory is not on a local disk.\n"
37583     printf "This will severely degrade build performance!\n"
37584     printf "It is recommended that you create an output directory on a local disk,\n"
37585     printf "and run the configure script again from that directory.\n"
37586     printf "\n"
37587   fi
37588 
37589   if test "x$IS_RECONFIGURE" = "xyes"; then
37590     printf "WARNING: The result of this configuration has overridden an older\n"
37591     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37592     printf "proper build. Failure to do so might result in strange build problems.\n"
37593     printf "\n"
37594   fi
37595