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 BOOT_JDK_BITS
 796 JAVAC_FLAGS
 797 BOOT_JDK_SOURCETARGET
 798 BOOT_JDK
 799 BOOT_TOOLSJAR
 800 BOOT_RTJAR
 801 JAVA_CHECK
 802 JAVAC_CHECK
 803 COOKED_BUILD_NUMBER
 804 COOKED_JDK_UPDATE_VERSION
 805 JDK_VERSION
 806 COPYRIGHT_YEAR
 807 MACOSX_BUNDLE_ID_BASE
 808 MACOSX_BUNDLE_NAME_BASE
 809 COMPANY_NAME
 810 JDK_RC_PLATFORM_NAME
 811 PRODUCT_SUFFIX
 812 PRODUCT_NAME
 813 LAUNCHER_NAME
 814 MILESTONE
 815 JDK_BUILD_NUMBER
 816 JDK_UPDATE_VERSION
 817 JDK_MICRO_VERSION
 818 JDK_MINOR_VERSION
 819 JDK_MAJOR_VERSION
 820 USER_RELEASE_SUFFIX
 821 COMPRESS_JARS
 822 UNLIMITED_CRYPTO
 823 CACERTS_FILE
 824 TEST_IN_BUILD
 825 BUILD_HEADLESS
 826 SUPPORT_HEADFUL
 827 SUPPORT_HEADLESS
 828 BDEPS_FTP
 829 BDEPS_UNZIP
 830 OS_VERSION_MICRO
 831 OS_VERSION_MINOR
 832 OS_VERSION_MAJOR
 833 PKG_CONFIG
 834 CODESIGN
 835 XATTR
 836 DSYMUTIL
 837 IS_GNU_TIME
 838 TIME
 839 STAT
 840 HG
 841 READELF
 842 LDD
 843 ZIP
 844 UNZIP
 845 FIND_DELETE
 846 MAKE
 847 CHECK_TOOLSDIR_MAKE
 848 CHECK_TOOLSDIR_GMAKE
 849 CHECK_MAKE
 850 CHECK_GMAKE
 851 PKGHANDLER
 852 OUTPUT_ROOT
 853 CONF_NAME
 854 SPEC
 855 BUILD_VARIANT_RELEASE
 856 DEBUG_CLASSFILES
 857 FASTDEBUG
 858 VARIANT
 859 DEBUG_LEVEL
 860 MACOSX_UNIVERSAL
 861 INCLUDE_SA
 862 JVM_VARIANT_CORE
 863 JVM_VARIANT_ZEROSHARK
 864 JVM_VARIANT_ZERO
 865 JVM_VARIANT_KERNEL
 866 JVM_VARIANT_MINIMAL1
 867 JVM_VARIANT_CLIENT
 868 JVM_VARIANT_SERVER
 869 JVM_VARIANTS
 870 JVM_INTERPRETER
 871 JDK_VARIANT
 872 SET_OPENJDK
 873 BUILD_LOG_WRAPPER
 874 BUILD_LOG_PREVIOUS
 875 BUILD_LOG
 876 SYS_ROOT
 877 PATH_SEP
 878 SRC_ROOT
 879 ZERO_ARCHDEF
 880 DEFINE_CROSS_COMPILE_ARCH
 881 LP64
 882 OPENJDK_TARGET_OS_EXPORT_DIR
 883 OPENJDK_TARGET_OS_API_DIR
 884 OPENJDK_TARGET_CPU_JLI_CFLAGS
 885 OPENJDK_TARGET_CPU_OSARCH
 886 OPENJDK_TARGET_CPU_ISADIR
 887 OPENJDK_TARGET_CPU_LIBDIR
 888 OPENJDK_TARGET_CPU_LEGACY_LIB
 889 OPENJDK_TARGET_CPU_LEGACY
 890 REQUIRED_OS_VERSION
 891 REQUIRED_OS_NAME
 892 COMPILE_TYPE
 893 OPENJDK_TARGET_CPU_ENDIAN
 894 OPENJDK_TARGET_CPU_BITS
 895 OPENJDK_TARGET_CPU_ARCH
 896 OPENJDK_TARGET_CPU
 897 OPENJDK_TARGET_OS_API
 898 OPENJDK_TARGET_OS
 899 OPENJDK_BUILD_CPU_ENDIAN
 900 OPENJDK_BUILD_CPU_BITS
 901 OPENJDK_BUILD_CPU_ARCH
 902 OPENJDK_BUILD_CPU
 903 OPENJDK_BUILD_OS_API
 904 OPENJDK_BUILD_OS
 905 OPENJDK_BUILD_AUTOCONF_NAME
 906 OPENJDK_TARGET_AUTOCONF_NAME
 907 target_os
 908 target_vendor
 909 target_cpu
 910 target
 911 host_os
 912 host_vendor
 913 host_cpu
 914 host
 915 build_os
 916 build_vendor
 917 build_cpu
 918 build
 919 SETFILE
 920 DF
 921 READLINK
 922 CYGPATH
 923 NAWK
 924 SED
 925 FGREP
 926 EGREP
 927 GREP
 928 AWK
 929 XARGS
 930 WHICH
 931 WC
 932 UNIQ
 933 UNAME
 934 TR
 935 TOUCH
 936 TEE
 937 TAR
 938 TAIL
 939 SORT
 940 SH
 941 RM
 942 PRINTF
 943 MV
 944 MKTEMP
 945 MKDIR
 946 LS
 947 LN
 948 HEAD
 949 FIND
 950 FILE
 951 EXPR
 952 ECHO
 953 DIRNAME
 954 DIFF
 955 DATE
 956 CUT
 957 CPIO
 958 CP
 959 COMM
 960 CMP
 961 CHMOD
 962 CAT
 963 BASH
 964 BASENAME
 965 DATE_WHEN_CONFIGURED
 966 CONFIGURE_COMMAND_LINE
 967 CUSTOM_MAKE_DIR
 968 target_alias
 969 host_alias
 970 build_alias
 971 LIBS
 972 ECHO_T
 973 ECHO_N
 974 ECHO_C
 975 DEFS
 976 mandir
 977 localedir
 978 libdir
 979 psdir
 980 pdfdir
 981 dvidir
 982 htmldir
 983 infodir
 984 docdir
 985 oldincludedir
 986 includedir
 987 localstatedir
 988 sharedstatedir
 989 sysconfdir
 990 datadir
 991 datarootdir
 992 libexecdir
 993 sbindir
 994 bindir
 995 program_transform_name
 996 prefix
 997 exec_prefix
 998 PACKAGE_URL
 999 PACKAGE_BUGREPORT
1000 PACKAGE_STRING
1001 PACKAGE_VERSION
1002 PACKAGE_TARNAME
1003 PACKAGE_NAME
1004 PATH_SEPARATOR
1005 SHELL'
1006 ac_subst_files=''
1007 ac_user_opts='
1008 enable_option_checking
1009 with_custom_make_dir
1010 with_target_bits
1011 with_sys_root
1012 with_tools_dir
1013 with_xcode_path
1014 with_devkit
1015 enable_openjdk_only
1016 with_jdk_variant
1017 with_jvm_interpreter
1018 with_jvm_variants
1019 enable_debug
1020 with_debug_level
1021 with_conf_name
1022 with_builddeps_conf
1023 with_builddeps_server
1024 with_builddeps_dir
1025 with_builddeps_group
1026 enable_headful
1027 enable_hotspot_test_in_build
1028 with_cacerts_file
1029 enable_unlimited_crypto
1030 with_milestone
1031 with_update_version
1032 with_user_release_suffix
1033 with_build_number
1034 with_copyright_year
1035 with_boot_jdk
1036 with_boot_jdk_jvmargs
1037 with_add_source_root
1038 with_override_source_root
1039 with_adds_and_overrides
1040 with_override_langtools
1041 with_override_corba
1042 with_override_jaxp
1043 with_override_jaxws
1044 with_override_hotspot
1045 with_override_nashorn
1046 with_override_jdk
1047 with_import_hotspot
1048 with_msvcr_dll
1049 with_dxsdk
1050 with_dxsdk_lib
1051 with_dxsdk_include
1052 with_jtreg
1053 with_extra_cflags
1054 with_extra_cxxflags
1055 with_extra_ldflags
1056 enable_debug_symbols
1057 enable_zip_debug_info
1058 enable_macosx_runtime_support
1059 with_x
1060 with_cups
1061 with_cups_include
1062 with_freetype
1063 with_freetype_include
1064 with_freetype_lib
1065 enable_freetype_bundling
1066 with_alsa
1067 with_alsa_include
1068 with_alsa_lib
1069 with_giflib
1070 with_zlib
1071 with_stdc__lib
1072 with_num_cores
1073 with_memory_size
1074 with_jobs
1075 with_sjavac_server_java
1076 enable_sjavac
1077 enable_precompiled_headers
1078 enable_ccache
1079 with_ccache_dir
1080 '
1081       ac_precious_vars='build_alias
1082 host_alias
1083 target_alias
1084 PKG_CONFIG
1085 CC
1086 CFLAGS
1087 LDFLAGS
1088 LIBS
1089 CPPFLAGS
1090 CXX
1091 CXXFLAGS
1092 CCC
1093 OBJC
1094 OBJCFLAGS
1095 CPP
1096 CXXCPP
1097 XMKMF
1098 FREETYPE_CFLAGS
1099 FREETYPE_LIBS
1100 ALSA_CFLAGS
1101 ALSA_LIBS
1102 LIBFFI_CFLAGS
1103 LIBFFI_LIBS'
1104 
1105 
1106 # Initialize some variables set by options.
1107 ac_init_help=
1108 ac_init_version=false
1109 ac_unrecognized_opts=
1110 ac_unrecognized_sep=
1111 # The variables have the same names as the options, with
1112 # dashes changed to underlines.
1113 cache_file=/dev/null
1114 exec_prefix=NONE
1115 no_create=
1116 no_recursion=
1117 prefix=NONE
1118 program_prefix=NONE
1119 program_suffix=NONE
1120 program_transform_name=s,x,x,
1121 silent=
1122 site=
1123 srcdir=
1124 verbose=
1125 x_includes=NONE
1126 x_libraries=NONE
1127 
1128 # Installation directory options.
1129 # These are left unexpanded so users can "make install exec_prefix=/foo"
1130 # and all the variables that are supposed to be based on exec_prefix
1131 # by default will actually change.
1132 # Use braces instead of parens because sh, perl, etc. also accept them.
1133 # (The list follows the same order as the GNU Coding Standards.)
1134 bindir='${exec_prefix}/bin'
1135 sbindir='${exec_prefix}/sbin'
1136 libexecdir='${exec_prefix}/libexec'
1137 datarootdir='${prefix}/share'
1138 datadir='${datarootdir}'
1139 sysconfdir='${prefix}/etc'
1140 sharedstatedir='${prefix}/com'
1141 localstatedir='${prefix}/var'
1142 includedir='${prefix}/include'
1143 oldincludedir='/usr/include'
1144 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1145 infodir='${datarootdir}/info'
1146 htmldir='${docdir}'
1147 dvidir='${docdir}'
1148 pdfdir='${docdir}'
1149 psdir='${docdir}'
1150 libdir='${exec_prefix}/lib'
1151 localedir='${datarootdir}/locale'
1152 mandir='${datarootdir}/man'
1153 
1154 ac_prev=
1155 ac_dashdash=
1156 for ac_option
1157 do
1158   # If the previous option needs an argument, assign it.
1159   if test -n "$ac_prev"; then
1160     eval $ac_prev=\$ac_option
1161     ac_prev=
1162     continue
1163   fi
1164 
1165   case $ac_option in
1166   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1167   *=)   ac_optarg= ;;
1168   *)    ac_optarg=yes ;;
1169   esac
1170 
1171   # Accept the important Cygnus configure options, so we can diagnose typos.
1172 
1173   case $ac_dashdash$ac_option in
1174   --)
1175     ac_dashdash=yes ;;
1176 
1177   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1178     ac_prev=bindir ;;
1179   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1180     bindir=$ac_optarg ;;
1181 
1182   -build | --build | --buil | --bui | --bu)
1183     ac_prev=build_alias ;;
1184   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1185     build_alias=$ac_optarg ;;
1186 
1187   -cache-file | --cache-file | --cache-fil | --cache-fi \
1188   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1189     ac_prev=cache_file ;;
1190   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1191   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1192     cache_file=$ac_optarg ;;
1193 
1194   --config-cache | -C)
1195     cache_file=config.cache ;;
1196 
1197   -datadir | --datadir | --datadi | --datad)
1198     ac_prev=datadir ;;
1199   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1200     datadir=$ac_optarg ;;
1201 
1202   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1203   | --dataroo | --dataro | --datar)
1204     ac_prev=datarootdir ;;
1205   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1206   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1207     datarootdir=$ac_optarg ;;
1208 
1209   -disable-* | --disable-*)
1210     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1211     # Reject names that are not valid shell variable names.
1212     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213       as_fn_error $? "invalid feature name: $ac_useropt"
1214     ac_useropt_orig=$ac_useropt
1215     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216     case $ac_user_opts in
1217       *"
1218 "enable_$ac_useropt"
1219 "*) ;;
1220       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1221          ac_unrecognized_sep=', ';;
1222     esac
1223     eval enable_$ac_useropt=no ;;
1224 
1225   -docdir | --docdir | --docdi | --doc | --do)
1226     ac_prev=docdir ;;
1227   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1228     docdir=$ac_optarg ;;
1229 
1230   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1231     ac_prev=dvidir ;;
1232   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1233     dvidir=$ac_optarg ;;
1234 
1235   -enable-* | --enable-*)
1236     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1237     # Reject names that are not valid shell variable names.
1238     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1239       as_fn_error $? "invalid feature name: $ac_useropt"
1240     ac_useropt_orig=$ac_useropt
1241     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1242     case $ac_user_opts in
1243       *"
1244 "enable_$ac_useropt"
1245 "*) ;;
1246       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1247          ac_unrecognized_sep=', ';;
1248     esac
1249     eval enable_$ac_useropt=\$ac_optarg ;;
1250 
1251   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1252   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1253   | --exec | --exe | --ex)
1254     ac_prev=exec_prefix ;;
1255   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1256   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1257   | --exec=* | --exe=* | --ex=*)
1258     exec_prefix=$ac_optarg ;;
1259 
1260   -gas | --gas | --ga | --g)
1261     # Obsolete; use --with-gas.
1262     with_gas=yes ;;
1263 
1264   -help | --help | --hel | --he | -h)
1265     ac_init_help=long ;;
1266   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1267     ac_init_help=recursive ;;
1268   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1269     ac_init_help=short ;;
1270 
1271   -host | --host | --hos | --ho)
1272     ac_prev=host_alias ;;
1273   -host=* | --host=* | --hos=* | --ho=*)
1274     host_alias=$ac_optarg ;;
1275 
1276   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1277     ac_prev=htmldir ;;
1278   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1279   | --ht=*)
1280     htmldir=$ac_optarg ;;
1281 
1282   -includedir | --includedir | --includedi | --included | --include \
1283   | --includ | --inclu | --incl | --inc)
1284     ac_prev=includedir ;;
1285   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1286   | --includ=* | --inclu=* | --incl=* | --inc=*)
1287     includedir=$ac_optarg ;;
1288 
1289   -infodir | --infodir | --infodi | --infod | --info | --inf)
1290     ac_prev=infodir ;;
1291   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1292     infodir=$ac_optarg ;;
1293 
1294   -libdir | --libdir | --libdi | --libd)
1295     ac_prev=libdir ;;
1296   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1297     libdir=$ac_optarg ;;
1298 
1299   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1300   | --libexe | --libex | --libe)
1301     ac_prev=libexecdir ;;
1302   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1303   | --libexe=* | --libex=* | --libe=*)
1304     libexecdir=$ac_optarg ;;
1305 
1306   -localedir | --localedir | --localedi | --localed | --locale)
1307     ac_prev=localedir ;;
1308   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1309     localedir=$ac_optarg ;;
1310 
1311   -localstatedir | --localstatedir | --localstatedi | --localstated \
1312   | --localstate | --localstat | --localsta | --localst | --locals)
1313     ac_prev=localstatedir ;;
1314   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1315   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1316     localstatedir=$ac_optarg ;;
1317 
1318   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1319     ac_prev=mandir ;;
1320   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1321     mandir=$ac_optarg ;;
1322 
1323   -nfp | --nfp | --nf)
1324     # Obsolete; use --without-fp.
1325     with_fp=no ;;
1326 
1327   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1328   | --no-cr | --no-c | -n)
1329     no_create=yes ;;
1330 
1331   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1332   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1333     no_recursion=yes ;;
1334 
1335   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1336   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1337   | --oldin | --oldi | --old | --ol | --o)
1338     ac_prev=oldincludedir ;;
1339   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1340   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1341   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1342     oldincludedir=$ac_optarg ;;
1343 
1344   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1345     ac_prev=prefix ;;
1346   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1347     prefix=$ac_optarg ;;
1348 
1349   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1350   | --program-pre | --program-pr | --program-p)
1351     ac_prev=program_prefix ;;
1352   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1353   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1354     program_prefix=$ac_optarg ;;
1355 
1356   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1357   | --program-suf | --program-su | --program-s)
1358     ac_prev=program_suffix ;;
1359   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1360   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1361     program_suffix=$ac_optarg ;;
1362 
1363   -program-transform-name | --program-transform-name \
1364   | --program-transform-nam | --program-transform-na \
1365   | --program-transform-n | --program-transform- \
1366   | --program-transform | --program-transfor \
1367   | --program-transfo | --program-transf \
1368   | --program-trans | --program-tran \
1369   | --progr-tra | --program-tr | --program-t)
1370     ac_prev=program_transform_name ;;
1371   -program-transform-name=* | --program-transform-name=* \
1372   | --program-transform-nam=* | --program-transform-na=* \
1373   | --program-transform-n=* | --program-transform-=* \
1374   | --program-transform=* | --program-transfor=* \
1375   | --program-transfo=* | --program-transf=* \
1376   | --program-trans=* | --program-tran=* \
1377   | --progr-tra=* | --program-tr=* | --program-t=*)
1378     program_transform_name=$ac_optarg ;;
1379 
1380   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1381     ac_prev=pdfdir ;;
1382   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1383     pdfdir=$ac_optarg ;;
1384 
1385   -psdir | --psdir | --psdi | --psd | --ps)
1386     ac_prev=psdir ;;
1387   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1388     psdir=$ac_optarg ;;
1389 
1390   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1391   | -silent | --silent | --silen | --sile | --sil)
1392     silent=yes ;;
1393 
1394   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1395     ac_prev=sbindir ;;
1396   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1397   | --sbi=* | --sb=*)
1398     sbindir=$ac_optarg ;;
1399 
1400   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1401   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1402   | --sharedst | --shareds | --shared | --share | --shar \
1403   | --sha | --sh)
1404     ac_prev=sharedstatedir ;;
1405   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1406   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1407   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1408   | --sha=* | --sh=*)
1409     sharedstatedir=$ac_optarg ;;
1410 
1411   -site | --site | --sit)
1412     ac_prev=site ;;
1413   -site=* | --site=* | --sit=*)
1414     site=$ac_optarg ;;
1415 
1416   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1417     ac_prev=srcdir ;;
1418   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1419     srcdir=$ac_optarg ;;
1420 
1421   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1422   | --syscon | --sysco | --sysc | --sys | --sy)
1423     ac_prev=sysconfdir ;;
1424   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1425   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1426     sysconfdir=$ac_optarg ;;
1427 
1428   -target | --target | --targe | --targ | --tar | --ta | --t)
1429     ac_prev=target_alias ;;
1430   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1431     target_alias=$ac_optarg ;;
1432 
1433   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1434     verbose=yes ;;
1435 
1436   -version | --version | --versio | --versi | --vers | -V)
1437     ac_init_version=: ;;
1438 
1439   -with-* | --with-*)
1440     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1441     # Reject names that are not valid shell variable names.
1442     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1443       as_fn_error $? "invalid package name: $ac_useropt"
1444     ac_useropt_orig=$ac_useropt
1445     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1446     case $ac_user_opts in
1447       *"
1448 "with_$ac_useropt"
1449 "*) ;;
1450       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1451          ac_unrecognized_sep=', ';;
1452     esac
1453     eval with_$ac_useropt=\$ac_optarg ;;
1454 
1455   -without-* | --without-*)
1456     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1457     # Reject names that are not valid shell variable names.
1458     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1459       as_fn_error $? "invalid package name: $ac_useropt"
1460     ac_useropt_orig=$ac_useropt
1461     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1462     case $ac_user_opts in
1463       *"
1464 "with_$ac_useropt"
1465 "*) ;;
1466       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1467          ac_unrecognized_sep=', ';;
1468     esac
1469     eval with_$ac_useropt=no ;;
1470 
1471   --x)
1472     # Obsolete; use --with-x.
1473     with_x=yes ;;
1474 
1475   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1476   | --x-incl | --x-inc | --x-in | --x-i)
1477     ac_prev=x_includes ;;
1478   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1479   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1480     x_includes=$ac_optarg ;;
1481 
1482   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1483   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1484     ac_prev=x_libraries ;;
1485   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1486   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1487     x_libraries=$ac_optarg ;;
1488 
1489   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1490 Try \`$0 --help' for more information"
1491     ;;
1492 
1493   *=*)
1494     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1495     # Reject names that are not valid shell variable names.
1496     case $ac_envvar in #(
1497       '' | [0-9]* | *[!_$as_cr_alnum]* )
1498       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1499     esac
1500     eval $ac_envvar=\$ac_optarg
1501     export $ac_envvar ;;
1502 
1503   *)
1504     # FIXME: should be removed in autoconf 3.0.
1505     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1506     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1507       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1508     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1509     ;;
1510 
1511   esac
1512 done
1513 
1514 if test -n "$ac_prev"; then
1515   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1516   as_fn_error $? "missing argument to $ac_option"
1517 fi
1518 
1519 if test -n "$ac_unrecognized_opts"; then
1520   case $enable_option_checking in
1521     no) ;;
1522     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1523     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1524   esac
1525 fi
1526 
1527 # Check all directory arguments for consistency.
1528 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1529                 datadir sysconfdir sharedstatedir localstatedir includedir \
1530                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1531                 libdir localedir mandir
1532 do
1533   eval ac_val=\$$ac_var
1534   # Remove trailing slashes.
1535   case $ac_val in
1536     */ )
1537       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1538       eval $ac_var=\$ac_val;;
1539   esac
1540   # Be sure to have absolute directory names.
1541   case $ac_val in
1542     [\\/$]* | ?:[\\/]* )  continue;;
1543     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1544   esac
1545   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1546 done
1547 
1548 # There might be people who depend on the old broken behavior: `$host'
1549 # used to hold the argument of --host etc.
1550 # FIXME: To remove some day.
1551 build=$build_alias
1552 host=$host_alias
1553 target=$target_alias
1554 
1555 # FIXME: To remove some day.
1556 if test "x$host_alias" != x; then
1557   if test "x$build_alias" = x; then
1558     cross_compiling=maybe
1559   elif test "x$build_alias" != "x$host_alias"; then
1560     cross_compiling=yes
1561   fi
1562 fi
1563 
1564 ac_tool_prefix=
1565 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1566 
1567 test "$silent" = yes && exec 6>/dev/null
1568 
1569 
1570 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1571 ac_ls_di=`ls -di .` &&
1572 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1573   as_fn_error $? "working directory cannot be determined"
1574 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1575   as_fn_error $? "pwd does not report name of working directory"
1576 
1577 
1578 # Find the source files, if location was not specified.
1579 if test -z "$srcdir"; then
1580   ac_srcdir_defaulted=yes
1581   # Try the directory containing this script, then the parent directory.
1582   ac_confdir=`$as_dirname -- "$as_myself" ||
1583 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1584          X"$as_myself" : 'X\(//\)[^/]' \| \
1585          X"$as_myself" : 'X\(//\)$' \| \
1586          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1587 $as_echo X"$as_myself" |
1588     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1589             s//\1/
1590             q
1591           }
1592           /^X\(\/\/\)[^/].*/{
1593             s//\1/
1594             q
1595           }
1596           /^X\(\/\/\)$/{
1597             s//\1/
1598             q
1599           }
1600           /^X\(\/\).*/{
1601             s//\1/
1602             q
1603           }
1604           s/.*/./; q'`
1605   srcdir=$ac_confdir
1606   if test ! -r "$srcdir/$ac_unique_file"; then
1607     srcdir=..
1608   fi
1609 else
1610   ac_srcdir_defaulted=no
1611 fi
1612 if test ! -r "$srcdir/$ac_unique_file"; then
1613   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1614   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1615 fi
1616 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1617 ac_abs_confdir=`(
1618         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1619         pwd)`
1620 # When building in place, set srcdir=.
1621 if test "$ac_abs_confdir" = "$ac_pwd"; then
1622   srcdir=.
1623 fi
1624 # Remove unnecessary trailing slashes from srcdir.
1625 # Double slashes in file names in object file debugging info
1626 # mess up M-x gdb in Emacs.
1627 case $srcdir in
1628 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1629 esac
1630 for ac_var in $ac_precious_vars; do
1631   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1632   eval ac_env_${ac_var}_value=\$${ac_var}
1633   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1634   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1635 done
1636 
1637 #
1638 # Report the --help message.
1639 #
1640 if test "$ac_init_help" = "long"; then
1641   # Omit some internal or obsolete options to make the list less imposing.
1642   # This message is too long to be a string in the A/UX 3.1 sh.
1643   cat <<_ACEOF
1644 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1645 
1646 Usage: $0 [OPTION]... [VAR=VALUE]...
1647 
1648 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1649 VAR=VALUE.  See below for descriptions of some of the useful variables.
1650 
1651 Defaults for the options are specified in brackets.
1652 
1653 Configuration:
1654   -h, --help              display this help and exit
1655       --help=short        display options specific to this package
1656       --help=recursive    display the short help of all the included packages
1657   -V, --version           display version information and exit
1658   -q, --quiet, --silent   do not print \`checking ...' messages
1659       --cache-file=FILE   cache test results in FILE [disabled]
1660   -C, --config-cache      alias for \`--cache-file=config.cache'
1661   -n, --no-create         do not create output files
1662       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1663 
1664 Installation directories:
1665   --prefix=PREFIX         install architecture-independent files in PREFIX
1666                           [$ac_default_prefix]
1667   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1668                           [PREFIX]
1669 
1670 By default, \`make install' will install all the files in
1671 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1672 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1673 for instance \`--prefix=\$HOME'.
1674 
1675 For better control, use the options below.
1676 
1677 Fine tuning of the installation directories:
1678   --bindir=DIR            user executables [EPREFIX/bin]
1679   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1680   --libexecdir=DIR        program executables [EPREFIX/libexec]
1681   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1682   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1683   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1684   --libdir=DIR            object code libraries [EPREFIX/lib]
1685   --includedir=DIR        C header files [PREFIX/include]
1686   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1687   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1688   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1689   --infodir=DIR           info documentation [DATAROOTDIR/info]
1690   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1691   --mandir=DIR            man documentation [DATAROOTDIR/man]
1692   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1693   --htmldir=DIR           html documentation [DOCDIR]
1694   --dvidir=DIR            dvi documentation [DOCDIR]
1695   --pdfdir=DIR            pdf documentation [DOCDIR]
1696   --psdir=DIR             ps documentation [DOCDIR]
1697 _ACEOF
1698 
1699   cat <<\_ACEOF
1700 
1701 X features:
1702   --x-includes=DIR    X include files are in DIR
1703   --x-libraries=DIR   X library files are in DIR
1704 
1705 System types:
1706   --build=BUILD     configure for building on BUILD [guessed]
1707   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1708   --target=TARGET   configure for building compilers for TARGET [HOST]
1709 _ACEOF
1710 fi
1711 
1712 if test -n "$ac_init_help"; then
1713   case $ac_init_help in
1714      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1715    esac
1716   cat <<\_ACEOF
1717 
1718 Optional Features:
1719   --disable-option-checking  ignore unrecognized --enable/--with options
1720   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1721   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1722   --enable-openjdk-only   suppress building custom source even if present
1723                           [disabled]
1724   --enable-debug          set the debug level to fastdebug (shorthand for
1725                           --with-debug-level=fastdebug) [disabled]
1726   --disable-headful       disable building headful support (graphical UI
1727                           support) [enabled]
1728   --enable-hotspot-test-in-build
1729                           run the Queens test after Hotspot build [disabled]
1730   --enable-unlimited-crypto
1731                           Enable unlimited crypto policy [disabled]
1732   --disable-debug-symbols disable generation of debug symbols [enabled]
1733   --disable-zip-debug-info
1734                           disable zipping of debug-info files [enabled]
1735   --enable-macosx-runtime-support
1736                           Deprecated. Option is kept for backwards
1737                           compatibility and is ignored
1738   --disable-freetype-bundling
1739                           disable bundling of the freetype library with the
1740                           build result [enabled on Windows or when using
1741                           --with-freetype, disabled otherwise]
1742   --enable-sjavac         use sjavac to do fast incremental compiles
1743                           [disabled]
1744   --disable-precompiled-headers
1745                           disable using precompiled headers when compiling C++
1746                           [enabled]
1747   --disable-ccache        disable using ccache to speed up recompilations
1748                           [enabled]
1749 
1750 Optional Packages:
1751   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1752   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1753   --with-custom-make-dir  use this directory for custom build/make files
1754   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1755                           support it), e.g. --with-target-bits=32 [guessed]
1756   --with-sys-root         pass this sys-root to the compilers and tools (for
1757                           cross-compiling)
1758   --with-tools-dir        search this directory for compilers and tools (for
1759                           cross-compiling)
1760   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1761                           10.9 and later)
1762   --with-devkit           use this directory as base for tools-dir and
1763                           sys-root (for cross-compiling)
1764   --with-jdk-variant      JDK variant to build (normal) [normal]
1765   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1766   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1767                           client, minimal1, kernel, zero, zeroshark, core)
1768                           [server]
1769   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1770                           [release]
1771   --with-conf-name        use this as the name of the configuration [generated
1772                           from important configuration options]
1773   --with-builddeps-conf   use this configuration file for the builddeps
1774   --with-builddeps-server download and use build dependencies from this server
1775                           url
1776   --with-builddeps-dir    store downloaded build dependencies here
1777                           [/localhome/builddeps]
1778   --with-builddeps-group  chgrp the downloaded build dependencies to this
1779                           group
1780   --with-cacerts-file     specify alternative cacerts file
1781   --with-milestone        Set milestone value for build [internal]
1782   --with-update-version   Set update version value for build [b00]
1783   --with-user-release-suffix
1784                           Add a custom string to the version string if build
1785                           number isn't set.[username_builddateb00]
1786   --with-build-number     Set build number value for build [b00]
1787   --with-copyright-year   Set copyright year value for build [current year]
1788   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1789   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1790                           invocations of the Boot JDK, overriding the default
1791                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1792                           -enableassertions"
1793   --with-add-source-root  for each and every source directory, look in this
1794                           additional source root for the same directory; if it
1795                           exists and have files in it, include it in the build
1796   --with-override-source-root
1797                           for each and every source directory, look in this
1798                           override source root for the same directory; if it
1799                           exists, use that directory instead and ignore the
1800                           directory in the original source root
1801   --with-adds-and-overrides
1802                           use the subdirs 'adds' and 'overrides' in the
1803                           specified directory as add-source-root and
1804                           override-source-root
1805   --with-override-langtools
1806                           use this langtools dir for the build
1807   --with-override-corba   use this corba dir for the build
1808   --with-override-jaxp    use this jaxp dir for the build
1809   --with-override-jaxws   use this jaxws dir for the build
1810   --with-override-hotspot use this hotspot dir for the build
1811   --with-override-nashorn use this nashorn dir for the build
1812   --with-override-jdk     use this jdk dir for the build
1813   --with-import-hotspot   import hotspot binaries from this jdk image or
1814                           hotspot build dist dir instead of building from
1815                           source
1816   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1817                           only) [probed]
1818   --with-dxsdk            Deprecated. Option is kept for backwards
1819                           compatibility and is ignored
1820   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1821                           compatibility and is ignored
1822   --with-dxsdk-include    Deprecated. Option is kept for backwards
1823                           compatibility and is ignored
1824   --with-jtreg            Regression Test Harness [probed]
1825   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1826   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1827   --with-extra-ldflags    extra flags to be used when linking jdk
1828   --with-x                use the X Window System
1829   --with-cups             specify prefix directory for the cups package
1830                           (expecting the headers under PATH/include)
1831   --with-cups-include     specify directory for the cups include files
1832   --with-freetype         specify prefix directory for the freetype package
1833                           (expecting the libraries under PATH/lib and the
1834                           headers under PATH/include)
1835   --with-freetype-include specify directory for the freetype include files
1836   --with-freetype-lib     specify directory for the freetype library
1837   --with-alsa             specify prefix directory for the alsa package
1838                           (expecting the libraries under PATH/lib and the
1839                           headers under PATH/include)
1840   --with-alsa-include     specify directory for the alsa include files
1841   --with-alsa-lib         specify directory for the alsa library
1842   --with-giflib           use giflib from build system or OpenJDK source
1843                           (system, bundled) [bundled]
1844   --with-zlib             use zlib from build system or OpenJDK source
1845                           (system, bundled) [bundled]
1846   --with-stdc++lib=<static>,<dynamic>,<default>
1847                           force linking of the C++ runtime on Linux to either
1848                           static or dynamic, default is static with dynamic as
1849                           fallback
1850   --with-num-cores        number of cores in the build system, e.g.
1851                           --with-num-cores=8 [probed]
1852   --with-memory-size      memory (in MB) available in the build system, e.g.
1853                           --with-memory-size=1024 [probed]
1854   --with-jobs             number of parallel jobs to let make run [calculated
1855                           based on cores and memory]
1856   --with-sjavac-server-java
1857                           use this java binary for running the sjavac
1858                           background server [Boot JDK java]
1859   --with-ccache-dir       where to store ccache files [~/.ccache]
1860 
1861 Some influential environment variables:
1862   PKG_CONFIG  path to pkg-config utility
1863   CC          C compiler command
1864   CFLAGS      C compiler flags
1865   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1866               nonstandard directory <lib dir>
1867   LIBS        libraries to pass to the linker, e.g. -l<library>
1868   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1869               you have headers in a nonstandard directory <include dir>
1870   CXX         C++ compiler command
1871   CXXFLAGS    C++ compiler flags
1872   OBJC        Objective C compiler command
1873   OBJCFLAGS   Objective C compiler flags
1874   CPP         C preprocessor
1875   CXXCPP      C++ preprocessor
1876   XMKMF       Path to xmkmf, Makefile generator for X Window System
1877   FREETYPE_CFLAGS
1878               C compiler flags for FREETYPE, overriding pkg-config
1879   FREETYPE_LIBS
1880               linker flags for FREETYPE, overriding pkg-config
1881   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1882   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1883   LIBFFI_CFLAGS
1884               C compiler flags for LIBFFI, overriding pkg-config
1885   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1886 
1887 Use these variables to override the choices made by `configure' or to help
1888 it to find libraries and programs with nonstandard names/locations.
1889 
1890 Report bugs to <build-dev@openjdk.java.net>.
1891 OpenJDK home page: <http://openjdk.java.net>.
1892 _ACEOF
1893 ac_status=$?
1894 fi
1895 
1896 if test "$ac_init_help" = "recursive"; then
1897   # If there are subdirs, report their specific --help.
1898   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1899     test -d "$ac_dir" ||
1900       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1901       continue
1902     ac_builddir=.
1903 
1904 case "$ac_dir" in
1905 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1906 *)
1907   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1908   # A ".." for each directory in $ac_dir_suffix.
1909   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1910   case $ac_top_builddir_sub in
1911   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1912   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1913   esac ;;
1914 esac
1915 ac_abs_top_builddir=$ac_pwd
1916 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1917 # for backward compatibility:
1918 ac_top_builddir=$ac_top_build_prefix
1919 
1920 case $srcdir in
1921   .)  # We are building in place.
1922     ac_srcdir=.
1923     ac_top_srcdir=$ac_top_builddir_sub
1924     ac_abs_top_srcdir=$ac_pwd ;;
1925   [\\/]* | ?:[\\/]* )  # Absolute name.
1926     ac_srcdir=$srcdir$ac_dir_suffix;
1927     ac_top_srcdir=$srcdir
1928     ac_abs_top_srcdir=$srcdir ;;
1929   *) # Relative name.
1930     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1931     ac_top_srcdir=$ac_top_build_prefix$srcdir
1932     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1933 esac
1934 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1935 
1936     cd "$ac_dir" || { ac_status=$?; continue; }
1937     # Check for guested configure.
1938     if test -f "$ac_srcdir/configure.gnu"; then
1939       echo &&
1940       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1941     elif test -f "$ac_srcdir/configure"; then
1942       echo &&
1943       $SHELL "$ac_srcdir/configure" --help=recursive
1944     else
1945       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1946     fi || ac_status=$?
1947     cd "$ac_pwd" || { ac_status=$?; break; }
1948   done
1949 fi
1950 
1951 test -n "$ac_init_help" && exit $ac_status
1952 if $ac_init_version; then
1953   cat <<\_ACEOF
1954 OpenJDK configure jdk8
1955 generated by GNU Autoconf 2.69
1956 
1957 Copyright (C) 2012 Free Software Foundation, Inc.
1958 This configure script is free software; the Free Software Foundation
1959 gives unlimited permission to copy, distribute and modify it.
1960 _ACEOF
1961   exit
1962 fi
1963 
1964 ## ------------------------ ##
1965 ## Autoconf initialization. ##
1966 ## ------------------------ ##
1967 
1968 # ac_fn_c_try_compile LINENO
1969 # --------------------------
1970 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1971 ac_fn_c_try_compile ()
1972 {
1973   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1974   rm -f conftest.$ac_objext
1975   if { { ac_try="$ac_compile"
1976 case "(($ac_try" in
1977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978   *) ac_try_echo=$ac_try;;
1979 esac
1980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981 $as_echo "$ac_try_echo"; } >&5
1982   (eval "$ac_compile") 2>conftest.err
1983   ac_status=$?
1984   if test -s conftest.err; then
1985     grep -v '^ *+' conftest.err >conftest.er1
1986     cat conftest.er1 >&5
1987     mv -f conftest.er1 conftest.err
1988   fi
1989   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1990   test $ac_status = 0; } && {
1991          test -z "$ac_c_werror_flag" ||
1992          test ! -s conftest.err
1993        } && test -s conftest.$ac_objext; then :
1994   ac_retval=0
1995 else
1996   $as_echo "$as_me: failed program was:" >&5
1997 sed 's/^/| /' conftest.$ac_ext >&5
1998 
1999         ac_retval=1
2000 fi
2001   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2002   as_fn_set_status $ac_retval
2003 
2004 } # ac_fn_c_try_compile
2005 
2006 # ac_fn_cxx_try_compile LINENO
2007 # ----------------------------
2008 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2009 ac_fn_cxx_try_compile ()
2010 {
2011   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012   rm -f conftest.$ac_objext
2013   if { { ac_try="$ac_compile"
2014 case "(($ac_try" in
2015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016   *) ac_try_echo=$ac_try;;
2017 esac
2018 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019 $as_echo "$ac_try_echo"; } >&5
2020   (eval "$ac_compile") 2>conftest.err
2021   ac_status=$?
2022   if test -s conftest.err; then
2023     grep -v '^ *+' conftest.err >conftest.er1
2024     cat conftest.er1 >&5
2025     mv -f conftest.er1 conftest.err
2026   fi
2027   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028   test $ac_status = 0; } && {
2029          test -z "$ac_cxx_werror_flag" ||
2030          test ! -s conftest.err
2031        } && test -s conftest.$ac_objext; then :
2032   ac_retval=0
2033 else
2034   $as_echo "$as_me: failed program was:" >&5
2035 sed 's/^/| /' conftest.$ac_ext >&5
2036 
2037         ac_retval=1
2038 fi
2039   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2040   as_fn_set_status $ac_retval
2041 
2042 } # ac_fn_cxx_try_compile
2043 
2044 # ac_fn_objc_try_compile LINENO
2045 # -----------------------------
2046 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2047 ac_fn_objc_try_compile ()
2048 {
2049   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2050   rm -f conftest.$ac_objext
2051   if { { ac_try="$ac_compile"
2052 case "(($ac_try" in
2053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2054   *) ac_try_echo=$ac_try;;
2055 esac
2056 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2057 $as_echo "$ac_try_echo"; } >&5
2058   (eval "$ac_compile") 2>conftest.err
2059   ac_status=$?
2060   if test -s conftest.err; then
2061     grep -v '^ *+' conftest.err >conftest.er1
2062     cat conftest.er1 >&5
2063     mv -f conftest.er1 conftest.err
2064   fi
2065   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2066   test $ac_status = 0; } && {
2067          test -z "$ac_objc_werror_flag" ||
2068          test ! -s conftest.err
2069        } && test -s conftest.$ac_objext; then :
2070   ac_retval=0
2071 else
2072   $as_echo "$as_me: failed program was:" >&5
2073 sed 's/^/| /' conftest.$ac_ext >&5
2074 
2075         ac_retval=1
2076 fi
2077   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2078   as_fn_set_status $ac_retval
2079 
2080 } # ac_fn_objc_try_compile
2081 
2082 # ac_fn_c_try_cpp LINENO
2083 # ----------------------
2084 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2085 ac_fn_c_try_cpp ()
2086 {
2087   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2088   if { { ac_try="$ac_cpp conftest.$ac_ext"
2089 case "(($ac_try" in
2090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2091   *) ac_try_echo=$ac_try;;
2092 esac
2093 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2094 $as_echo "$ac_try_echo"; } >&5
2095   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2096   ac_status=$?
2097   if test -s conftest.err; then
2098     grep -v '^ *+' conftest.err >conftest.er1
2099     cat conftest.er1 >&5
2100     mv -f conftest.er1 conftest.err
2101   fi
2102   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2103   test $ac_status = 0; } > conftest.i && {
2104          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2105          test ! -s conftest.err
2106        }; then :
2107   ac_retval=0
2108 else
2109   $as_echo "$as_me: failed program was:" >&5
2110 sed 's/^/| /' conftest.$ac_ext >&5
2111 
2112     ac_retval=1
2113 fi
2114   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2115   as_fn_set_status $ac_retval
2116 
2117 } # ac_fn_c_try_cpp
2118 
2119 # ac_fn_cxx_try_cpp LINENO
2120 # ------------------------
2121 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2122 ac_fn_cxx_try_cpp ()
2123 {
2124   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2125   if { { ac_try="$ac_cpp conftest.$ac_ext"
2126 case "(($ac_try" in
2127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2128   *) ac_try_echo=$ac_try;;
2129 esac
2130 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2131 $as_echo "$ac_try_echo"; } >&5
2132   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2133   ac_status=$?
2134   if test -s conftest.err; then
2135     grep -v '^ *+' conftest.err >conftest.er1
2136     cat conftest.er1 >&5
2137     mv -f conftest.er1 conftest.err
2138   fi
2139   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2140   test $ac_status = 0; } > conftest.i && {
2141          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2142          test ! -s conftest.err
2143        }; then :
2144   ac_retval=0
2145 else
2146   $as_echo "$as_me: failed program was:" >&5
2147 sed 's/^/| /' conftest.$ac_ext >&5
2148 
2149     ac_retval=1
2150 fi
2151   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2152   as_fn_set_status $ac_retval
2153 
2154 } # ac_fn_cxx_try_cpp
2155 
2156 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2157 # ---------------------------------------------------------
2158 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2159 # the include files in INCLUDES and setting the cache variable VAR
2160 # accordingly.
2161 ac_fn_cxx_check_header_mongrel ()
2162 {
2163   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2164   if eval \${$3+:} false; then :
2165   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2166 $as_echo_n "checking for $2... " >&6; }
2167 if eval \${$3+:} false; then :
2168   $as_echo_n "(cached) " >&6
2169 fi
2170 eval ac_res=\$$3
2171                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2172 $as_echo "$ac_res" >&6; }
2173 else
2174   # Is the header compilable?
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2176 $as_echo_n "checking $2 usability... " >&6; }
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178 /* end confdefs.h.  */
2179 $4
2180 #include <$2>
2181 _ACEOF
2182 if ac_fn_cxx_try_compile "$LINENO"; then :
2183   ac_header_compiler=yes
2184 else
2185   ac_header_compiler=no
2186 fi
2187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2189 $as_echo "$ac_header_compiler" >&6; }
2190 
2191 # Is the header present?
2192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2193 $as_echo_n "checking $2 presence... " >&6; }
2194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195 /* end confdefs.h.  */
2196 #include <$2>
2197 _ACEOF
2198 if ac_fn_cxx_try_cpp "$LINENO"; then :
2199   ac_header_preproc=yes
2200 else
2201   ac_header_preproc=no
2202 fi
2203 rm -f conftest.err conftest.i conftest.$ac_ext
2204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2205 $as_echo "$ac_header_preproc" >&6; }
2206 
2207 # So?  What about this header?
2208 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2209   yes:no: )
2210     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2211 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2212     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2213 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2214     ;;
2215   no:yes:* )
2216     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2217 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2218     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2219 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2220     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2221 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2223 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2224     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2225 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2226 ( $as_echo "## ----------------------------------------- ##
2227 ## Report this to build-dev@openjdk.java.net ##
2228 ## ----------------------------------------- ##"
2229      ) | sed "s/^/$as_me: WARNING:     /" >&2
2230     ;;
2231 esac
2232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2233 $as_echo_n "checking for $2... " >&6; }
2234 if eval \${$3+:} false; then :
2235   $as_echo_n "(cached) " >&6
2236 else
2237   eval "$3=\$ac_header_compiler"
2238 fi
2239 eval ac_res=\$$3
2240                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241 $as_echo "$ac_res" >&6; }
2242 fi
2243   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2244 
2245 } # ac_fn_cxx_check_header_mongrel
2246 
2247 # ac_fn_cxx_try_run LINENO
2248 # ------------------------
2249 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2250 # that executables *can* be run.
2251 ac_fn_cxx_try_run ()
2252 {
2253   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254   if { { ac_try="$ac_link"
2255 case "(($ac_try" in
2256   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2257   *) ac_try_echo=$ac_try;;
2258 esac
2259 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2260 $as_echo "$ac_try_echo"; } >&5
2261   (eval "$ac_link") 2>&5
2262   ac_status=$?
2263   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2264   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2265   { { case "(($ac_try" in
2266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2267   *) ac_try_echo=$ac_try;;
2268 esac
2269 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2270 $as_echo "$ac_try_echo"; } >&5
2271   (eval "$ac_try") 2>&5
2272   ac_status=$?
2273   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2274   test $ac_status = 0; }; }; then :
2275   ac_retval=0
2276 else
2277   $as_echo "$as_me: program exited with status $ac_status" >&5
2278        $as_echo "$as_me: failed program was:" >&5
2279 sed 's/^/| /' conftest.$ac_ext >&5
2280 
2281        ac_retval=$ac_status
2282 fi
2283   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2284   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2285   as_fn_set_status $ac_retval
2286 
2287 } # ac_fn_cxx_try_run
2288 
2289 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2290 # ---------------------------------------------------------
2291 # Tests whether HEADER exists and can be compiled using the include files in
2292 # INCLUDES, setting the cache variable VAR accordingly.
2293 ac_fn_cxx_check_header_compile ()
2294 {
2295   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2297 $as_echo_n "checking for $2... " >&6; }
2298 if eval \${$3+:} false; then :
2299   $as_echo_n "(cached) " >&6
2300 else
2301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302 /* end confdefs.h.  */
2303 $4
2304 #include <$2>
2305 _ACEOF
2306 if ac_fn_cxx_try_compile "$LINENO"; then :
2307   eval "$3=yes"
2308 else
2309   eval "$3=no"
2310 fi
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 fi
2313 eval ac_res=\$$3
2314                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315 $as_echo "$ac_res" >&6; }
2316   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2317 
2318 } # ac_fn_cxx_check_header_compile
2319 
2320 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2321 # ----------------------------------------------
2322 # Tries to find the compile-time value of EXPR in a program that includes
2323 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2324 # computed
2325 ac_fn_cxx_compute_int ()
2326 {
2327   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2328   if test "$cross_compiling" = yes; then
2329     # Depending upon the size, compute the lo and hi bounds.
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331 /* end confdefs.h.  */
2332 $4
2333 int
2334 main ()
2335 {
2336 static int test_array [1 - 2 * !(($2) >= 0)];
2337 test_array [0] = 0;
2338 return test_array [0];
2339 
2340   ;
2341   return 0;
2342 }
2343 _ACEOF
2344 if ac_fn_cxx_try_compile "$LINENO"; then :
2345   ac_lo=0 ac_mid=0
2346   while :; do
2347     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348 /* end confdefs.h.  */
2349 $4
2350 int
2351 main ()
2352 {
2353 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2354 test_array [0] = 0;
2355 return test_array [0];
2356 
2357   ;
2358   return 0;
2359 }
2360 _ACEOF
2361 if ac_fn_cxx_try_compile "$LINENO"; then :
2362   ac_hi=$ac_mid; break
2363 else
2364   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2365                         if test $ac_lo -le $ac_mid; then
2366                           ac_lo= ac_hi=
2367                           break
2368                         fi
2369                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2370 fi
2371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2372   done
2373 else
2374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375 /* end confdefs.h.  */
2376 $4
2377 int
2378 main ()
2379 {
2380 static int test_array [1 - 2 * !(($2) < 0)];
2381 test_array [0] = 0;
2382 return test_array [0];
2383 
2384   ;
2385   return 0;
2386 }
2387 _ACEOF
2388 if ac_fn_cxx_try_compile "$LINENO"; then :
2389   ac_hi=-1 ac_mid=-1
2390   while :; do
2391     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392 /* end confdefs.h.  */
2393 $4
2394 int
2395 main ()
2396 {
2397 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2398 test_array [0] = 0;
2399 return test_array [0];
2400 
2401   ;
2402   return 0;
2403 }
2404 _ACEOF
2405 if ac_fn_cxx_try_compile "$LINENO"; then :
2406   ac_lo=$ac_mid; break
2407 else
2408   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2409                         if test $ac_mid -le $ac_hi; then
2410                           ac_lo= ac_hi=
2411                           break
2412                         fi
2413                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2414 fi
2415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416   done
2417 else
2418   ac_lo= ac_hi=
2419 fi
2420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421 fi
2422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423 # Binary search between lo and hi bounds.
2424 while test "x$ac_lo" != "x$ac_hi"; do
2425   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2427 /* end confdefs.h.  */
2428 $4
2429 int
2430 main ()
2431 {
2432 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2433 test_array [0] = 0;
2434 return test_array [0];
2435 
2436   ;
2437   return 0;
2438 }
2439 _ACEOF
2440 if ac_fn_cxx_try_compile "$LINENO"; then :
2441   ac_hi=$ac_mid
2442 else
2443   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2444 fi
2445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2446 done
2447 case $ac_lo in #((
2448 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2449 '') ac_retval=1 ;;
2450 esac
2451   else
2452     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2453 /* end confdefs.h.  */
2454 $4
2455 static long int longval () { return $2; }
2456 static unsigned long int ulongval () { return $2; }
2457 #include <stdio.h>
2458 #include <stdlib.h>
2459 int
2460 main ()
2461 {
2462 
2463   FILE *f = fopen ("conftest.val", "w");
2464   if (! f)
2465     return 1;
2466   if (($2) < 0)
2467     {
2468       long int i = longval ();
2469       if (i != ($2))
2470         return 1;
2471       fprintf (f, "%ld", i);
2472     }
2473   else
2474     {
2475       unsigned long int i = ulongval ();
2476       if (i != ($2))
2477         return 1;
2478       fprintf (f, "%lu", i);
2479     }
2480   /* Do not output a trailing newline, as this causes \r\n confusion
2481      on some platforms.  */
2482   return ferror (f) || fclose (f) != 0;
2483 
2484   ;
2485   return 0;
2486 }
2487 _ACEOF
2488 if ac_fn_cxx_try_run "$LINENO"; then :
2489   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2490 else
2491   ac_retval=1
2492 fi
2493 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2494   conftest.$ac_objext conftest.beam conftest.$ac_ext
2495 rm -f conftest.val
2496 
2497   fi
2498   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2499   as_fn_set_status $ac_retval
2500 
2501 } # ac_fn_cxx_compute_int
2502 
2503 # ac_fn_cxx_try_link LINENO
2504 # -------------------------
2505 # Try to link conftest.$ac_ext, and return whether this succeeded.
2506 ac_fn_cxx_try_link ()
2507 {
2508   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2509   rm -f conftest.$ac_objext conftest$ac_exeext
2510   if { { ac_try="$ac_link"
2511 case "(($ac_try" in
2512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513   *) ac_try_echo=$ac_try;;
2514 esac
2515 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516 $as_echo "$ac_try_echo"; } >&5
2517   (eval "$ac_link") 2>conftest.err
2518   ac_status=$?
2519   if test -s conftest.err; then
2520     grep -v '^ *+' conftest.err >conftest.er1
2521     cat conftest.er1 >&5
2522     mv -f conftest.er1 conftest.err
2523   fi
2524   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2525   test $ac_status = 0; } && {
2526          test -z "$ac_cxx_werror_flag" ||
2527          test ! -s conftest.err
2528        } && test -s conftest$ac_exeext && {
2529          test "$cross_compiling" = yes ||
2530          test -x conftest$ac_exeext
2531        }; then :
2532   ac_retval=0
2533 else
2534   $as_echo "$as_me: failed program was:" >&5
2535 sed 's/^/| /' conftest.$ac_ext >&5
2536 
2537         ac_retval=1
2538 fi
2539   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2540   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2541   # interfere with the next link command; also delete a directory that is
2542   # left behind by Apple's compiler.  We do this before executing the actions.
2543   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2544   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545   as_fn_set_status $ac_retval
2546 
2547 } # ac_fn_cxx_try_link
2548 
2549 # ac_fn_cxx_check_func LINENO FUNC VAR
2550 # ------------------------------------
2551 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2552 ac_fn_cxx_check_func ()
2553 {
2554   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2556 $as_echo_n "checking for $2... " >&6; }
2557 if eval \${$3+:} false; then :
2558   $as_echo_n "(cached) " >&6
2559 else
2560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2561 /* end confdefs.h.  */
2562 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2563    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2564 #define $2 innocuous_$2
2565 
2566 /* System header to define __stub macros and hopefully few prototypes,
2567     which can conflict with char $2 (); below.
2568     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2569     <limits.h> exists even on freestanding compilers.  */
2570 
2571 #ifdef __STDC__
2572 # include <limits.h>
2573 #else
2574 # include <assert.h>
2575 #endif
2576 
2577 #undef $2
2578 
2579 /* Override any GCC internal prototype to avoid an error.
2580    Use char because int might match the return type of a GCC
2581    builtin and then its argument prototype would still apply.  */
2582 #ifdef __cplusplus
2583 extern "C"
2584 #endif
2585 char $2 ();
2586 /* The GNU C library defines this for functions which it implements
2587     to always fail with ENOSYS.  Some functions are actually named
2588     something starting with __ and the normal name is an alias.  */
2589 #if defined __stub_$2 || defined __stub___$2
2590 choke me
2591 #endif
2592 
2593 int
2594 main ()
2595 {
2596 return $2 ();
2597   ;
2598   return 0;
2599 }
2600 _ACEOF
2601 if ac_fn_cxx_try_link "$LINENO"; then :
2602   eval "$3=yes"
2603 else
2604   eval "$3=no"
2605 fi
2606 rm -f core conftest.err conftest.$ac_objext \
2607     conftest$ac_exeext conftest.$ac_ext
2608 fi
2609 eval ac_res=\$$3
2610                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2611 $as_echo "$ac_res" >&6; }
2612   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2613 
2614 } # ac_fn_cxx_check_func
2615 
2616 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2617 # -------------------------------------------------------
2618 # Tests whether HEADER exists and can be compiled using the include files in
2619 # INCLUDES, setting the cache variable VAR accordingly.
2620 ac_fn_c_check_header_compile ()
2621 {
2622   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2623   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2624 $as_echo_n "checking for $2... " >&6; }
2625 if eval \${$3+:} false; then :
2626   $as_echo_n "(cached) " >&6
2627 else
2628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2629 /* end confdefs.h.  */
2630 $4
2631 #include <$2>
2632 _ACEOF
2633 if ac_fn_c_try_compile "$LINENO"; then :
2634   eval "$3=yes"
2635 else
2636   eval "$3=no"
2637 fi
2638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2639 fi
2640 eval ac_res=\$$3
2641                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2642 $as_echo "$ac_res" >&6; }
2643   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2644 
2645 } # ac_fn_c_check_header_compile
2646 cat >config.log <<_ACEOF
2647 This file contains any messages produced by compilers while
2648 running configure, to aid debugging if configure makes a mistake.
2649 
2650 It was created by OpenJDK $as_me jdk8, which was
2651 generated by GNU Autoconf 2.69.  Invocation command line was
2652 
2653   $ $0 $@
2654 
2655 _ACEOF
2656 exec 5>>config.log
2657 {
2658 cat <<_ASUNAME
2659 ## --------- ##
2660 ## Platform. ##
2661 ## --------- ##
2662 
2663 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2664 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2665 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2666 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2667 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2668 
2669 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2670 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2671 
2672 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2673 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2674 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2675 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2676 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2677 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2678 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2679 
2680 _ASUNAME
2681 
2682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2683 for as_dir in $PATH
2684 do
2685   IFS=$as_save_IFS
2686   test -z "$as_dir" && as_dir=.
2687     $as_echo "PATH: $as_dir"
2688   done
2689 IFS=$as_save_IFS
2690 
2691 } >&5
2692 
2693 cat >&5 <<_ACEOF
2694 
2695 
2696 ## ----------- ##
2697 ## Core tests. ##
2698 ## ----------- ##
2699 
2700 _ACEOF
2701 
2702 
2703 # Keep a trace of the command line.
2704 # Strip out --no-create and --no-recursion so they do not pile up.
2705 # Strip out --silent because we don't want to record it for future runs.
2706 # Also quote any args containing shell meta-characters.
2707 # Make two passes to allow for proper duplicate-argument suppression.
2708 ac_configure_args=
2709 ac_configure_args0=
2710 ac_configure_args1=
2711 ac_must_keep_next=false
2712 for ac_pass in 1 2
2713 do
2714   for ac_arg
2715   do
2716     case $ac_arg in
2717     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2718     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2719     | -silent | --silent | --silen | --sile | --sil)
2720       continue ;;
2721     *\'*)
2722       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2723     esac
2724     case $ac_pass in
2725     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2726     2)
2727       as_fn_append ac_configure_args1 " '$ac_arg'"
2728       if test $ac_must_keep_next = true; then
2729         ac_must_keep_next=false # Got value, back to normal.
2730       else
2731         case $ac_arg in
2732           *=* | --config-cache | -C | -disable-* | --disable-* \
2733           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2734           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2735           | -with-* | --with-* | -without-* | --without-* | --x)
2736             case "$ac_configure_args0 " in
2737               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2738             esac
2739             ;;
2740           -* ) ac_must_keep_next=true ;;
2741         esac
2742       fi
2743       as_fn_append ac_configure_args " '$ac_arg'"
2744       ;;
2745     esac
2746   done
2747 done
2748 { ac_configure_args0=; unset ac_configure_args0;}
2749 { ac_configure_args1=; unset ac_configure_args1;}
2750 
2751 # When interrupted or exit'd, cleanup temporary files, and complete
2752 # config.log.  We remove comments because anyway the quotes in there
2753 # would cause problems or look ugly.
2754 # WARNING: Use '\'' to represent an apostrophe within the trap.
2755 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2756 trap 'exit_status=$?
2757   # Save into config.log some information that might help in debugging.
2758   {
2759     echo
2760 
2761     $as_echo "## ---------------- ##
2762 ## Cache variables. ##
2763 ## ---------------- ##"
2764     echo
2765     # The following way of writing the cache mishandles newlines in values,
2766 (
2767   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2768     eval ac_val=\$$ac_var
2769     case $ac_val in #(
2770     *${as_nl}*)
2771       case $ac_var in #(
2772       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2773 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2774       esac
2775       case $ac_var in #(
2776       _ | IFS | as_nl) ;; #(
2777       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2778       *) { eval $ac_var=; unset $ac_var;} ;;
2779       esac ;;
2780     esac
2781   done
2782   (set) 2>&1 |
2783     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2784     *${as_nl}ac_space=\ *)
2785       sed -n \
2786         "s/'\''/'\''\\\\'\'''\''/g;
2787           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2788       ;; #(
2789     *)
2790       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2791       ;;
2792     esac |
2793     sort
2794 )
2795     echo
2796 
2797     $as_echo "## ----------------- ##
2798 ## Output variables. ##
2799 ## ----------------- ##"
2800     echo
2801     for ac_var in $ac_subst_vars
2802     do
2803       eval ac_val=\$$ac_var
2804       case $ac_val in
2805       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2806       esac
2807       $as_echo "$ac_var='\''$ac_val'\''"
2808     done | sort
2809     echo
2810 
2811     if test -n "$ac_subst_files"; then
2812       $as_echo "## ------------------- ##
2813 ## File substitutions. ##
2814 ## ------------------- ##"
2815       echo
2816       for ac_var in $ac_subst_files
2817       do
2818         eval ac_val=\$$ac_var
2819         case $ac_val in
2820         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2821         esac
2822         $as_echo "$ac_var='\''$ac_val'\''"
2823       done | sort
2824       echo
2825     fi
2826 
2827     if test -s confdefs.h; then
2828       $as_echo "## ----------- ##
2829 ## confdefs.h. ##
2830 ## ----------- ##"
2831       echo
2832       cat confdefs.h
2833       echo
2834     fi
2835     test "$ac_signal" != 0 &&
2836       $as_echo "$as_me: caught signal $ac_signal"
2837     $as_echo "$as_me: exit $exit_status"
2838   } >&5
2839   rm -f core *.core core.conftest.* &&
2840     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2841     exit $exit_status
2842 ' 0
2843 for ac_signal in 1 2 13 15; do
2844   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2845 done
2846 ac_signal=0
2847 
2848 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2849 rm -f -r conftest* confdefs.h
2850 
2851 $as_echo "/* confdefs.h */" > confdefs.h
2852 
2853 # Predefined preprocessor variables.
2854 
2855 cat >>confdefs.h <<_ACEOF
2856 #define PACKAGE_NAME "$PACKAGE_NAME"
2857 _ACEOF
2858 
2859 cat >>confdefs.h <<_ACEOF
2860 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2861 _ACEOF
2862 
2863 cat >>confdefs.h <<_ACEOF
2864 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2865 _ACEOF
2866 
2867 cat >>confdefs.h <<_ACEOF
2868 #define PACKAGE_STRING "$PACKAGE_STRING"
2869 _ACEOF
2870 
2871 cat >>confdefs.h <<_ACEOF
2872 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2873 _ACEOF
2874 
2875 cat >>confdefs.h <<_ACEOF
2876 #define PACKAGE_URL "$PACKAGE_URL"
2877 _ACEOF
2878 
2879 
2880 # Let the site file select an alternate cache file if it wants to.
2881 # Prefer an explicitly selected file to automatically selected ones.
2882 ac_site_file1=NONE
2883 ac_site_file2=NONE
2884 if test -n "$CONFIG_SITE"; then
2885   # We do not want a PATH search for config.site.
2886   case $CONFIG_SITE in #((
2887     -*)  ac_site_file1=./$CONFIG_SITE;;
2888     */*) ac_site_file1=$CONFIG_SITE;;
2889     *)   ac_site_file1=./$CONFIG_SITE;;
2890   esac
2891 elif test "x$prefix" != xNONE; then
2892   ac_site_file1=$prefix/share/config.site
2893   ac_site_file2=$prefix/etc/config.site
2894 else
2895   ac_site_file1=$ac_default_prefix/share/config.site
2896   ac_site_file2=$ac_default_prefix/etc/config.site
2897 fi
2898 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2899 do
2900   test "x$ac_site_file" = xNONE && continue
2901   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2902     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2903 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2904     sed 's/^/| /' "$ac_site_file" >&5
2905     . "$ac_site_file" \
2906       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2907 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2908 as_fn_error $? "failed to load site script $ac_site_file
2909 See \`config.log' for more details" "$LINENO" 5; }
2910   fi
2911 done
2912 
2913 if test -r "$cache_file"; then
2914   # Some versions of bash will fail to source /dev/null (special files
2915   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2916   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2917     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2918 $as_echo "$as_me: loading cache $cache_file" >&6;}
2919     case $cache_file in
2920       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2921       *)                      . "./$cache_file";;
2922     esac
2923   fi
2924 else
2925   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2926 $as_echo "$as_me: creating cache $cache_file" >&6;}
2927   >$cache_file
2928 fi
2929 
2930 # Check that the precious variables saved in the cache have kept the same
2931 # value.
2932 ac_cache_corrupted=false
2933 for ac_var in $ac_precious_vars; do
2934   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2935   eval ac_new_set=\$ac_env_${ac_var}_set
2936   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2937   eval ac_new_val=\$ac_env_${ac_var}_value
2938   case $ac_old_set,$ac_new_set in
2939     set,)
2940       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2941 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2942       ac_cache_corrupted=: ;;
2943     ,set)
2944       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2945 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2946       ac_cache_corrupted=: ;;
2947     ,);;
2948     *)
2949       if test "x$ac_old_val" != "x$ac_new_val"; then
2950         # differences in whitespace do not lead to failure.
2951         ac_old_val_w=`echo x $ac_old_val`
2952         ac_new_val_w=`echo x $ac_new_val`
2953         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2954           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2955 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2956           ac_cache_corrupted=:
2957         else
2958           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2959 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2960           eval $ac_var=\$ac_old_val
2961         fi
2962         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2963 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2964         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2965 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2966       fi;;
2967   esac
2968   # Pass precious variables to config.status.
2969   if test "$ac_new_set" = set; then
2970     case $ac_new_val in
2971     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2972     *) ac_arg=$ac_var=$ac_new_val ;;
2973     esac
2974     case " $ac_configure_args " in
2975       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2976       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2977     esac
2978   fi
2979 done
2980 if $ac_cache_corrupted; then
2981   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2982 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2983   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2984 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2985   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2986 fi
2987 ## -------------------- ##
2988 ## Main body of script. ##
2989 ## -------------------- ##
2990 
2991 ac_ext=c
2992 ac_cpp='$CPP $CPPFLAGS'
2993 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2994 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2995 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2996 
2997 
2998 
2999 ac_aux_dir=
3000 for ac_dir in build-aux "$srcdir"/build-aux; do
3001   if test -f "$ac_dir/install-sh"; then
3002     ac_aux_dir=$ac_dir
3003     ac_install_sh="$ac_aux_dir/install-sh -c"
3004     break
3005   elif test -f "$ac_dir/install.sh"; then
3006     ac_aux_dir=$ac_dir
3007     ac_install_sh="$ac_aux_dir/install.sh -c"
3008     break
3009   elif test -f "$ac_dir/shtool"; then
3010     ac_aux_dir=$ac_dir
3011     ac_install_sh="$ac_aux_dir/shtool install -c"
3012     break
3013   fi
3014 done
3015 if test -z "$ac_aux_dir"; then
3016   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3017 fi
3018 
3019 # These three variables are undocumented and unsupported,
3020 # and are intended to be withdrawn in a future Autoconf release.
3021 # They can cause serious problems if a builder's source tree is in a directory
3022 # whose full name contains unusual characters.
3023 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3024 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3025 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3026 
3027 
3028 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3029 
3030 #
3031 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3032 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3033 #
3034 # This code is free software; you can redistribute it and/or modify it
3035 # under the terms of the GNU General Public License version 2 only, as
3036 # published by the Free Software Foundation.  Oracle designates this
3037 # particular file as subject to the "Classpath" exception as provided
3038 # by Oracle in the LICENSE file that accompanied this code.
3039 #
3040 # This code is distributed in the hope that it will be useful, but WITHOUT
3041 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3042 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3043 # version 2 for more details (a copy is included in the LICENSE file that
3044 # accompanied this code).
3045 #
3046 # You should have received a copy of the GNU General Public License version
3047 # 2 along with this work; if not, write to the Free Software Foundation,
3048 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3049 #
3050 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3051 # or visit www.oracle.com if you need additional information or have any
3052 # questions.
3053 #
3054 
3055 #
3056 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3057 #
3058 # This program is free software; you can redistribute it and/or modify
3059 # it under the terms of the GNU General Public License as published by
3060 # the Free Software Foundation; either version 2 of the License, or
3061 # (at your option) any later version.
3062 #
3063 # This program is distributed in the hope that it will be useful, but
3064 # WITHOUT ANY WARRANTY; without even the implied warranty of
3065 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3066 # General Public License for more details.
3067 #
3068 # You should have received a copy of the GNU General Public License
3069 # along with this program; if not, write to the Free Software
3070 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3071 #
3072 # As a special exception to the GNU General Public License, if you
3073 # distribute this file as part of a program that contains a
3074 # configuration script generated by Autoconf, you may include it under
3075 # the same distribution terms that you use for the rest of that program.
3076 
3077 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3078 # ----------------------------------
3079 # PKG_PROG_PKG_CONFIG
3080 
3081 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3082 #
3083 # Check to see whether a particular set of modules exists.  Similar
3084 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3085 #
3086 #
3087 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3088 # this or PKG_CHECK_MODULES is called, or make sure to call
3089 # PKG_CHECK_EXISTS manually
3090 # --------------------------------------------------------------
3091 
3092 
3093 
3094 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3095 # ---------------------------------------------
3096 # _PKG_CONFIG
3097 
3098 # _PKG_SHORT_ERRORS_SUPPORTED
3099 # -----------------------------
3100 # _PKG_SHORT_ERRORS_SUPPORTED
3101 
3102 
3103 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3104 # [ACTION-IF-NOT-FOUND])
3105 #
3106 #
3107 # Note that if there is a possibility the first call to
3108 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3109 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3110 #
3111 #
3112 # --------------------------------------------------------------
3113 # PKG_CHECK_MODULES
3114 
3115 
3116 # Include these first...
3117 #
3118 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3119 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3120 #
3121 # This code is free software; you can redistribute it and/or modify it
3122 # under the terms of the GNU General Public License version 2 only, as
3123 # published by the Free Software Foundation.  Oracle designates this
3124 # particular file as subject to the "Classpath" exception as provided
3125 # by Oracle in the LICENSE file that accompanied this code.
3126 #
3127 # This code is distributed in the hope that it will be useful, but WITHOUT
3128 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3129 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3130 # version 2 for more details (a copy is included in the LICENSE file that
3131 # accompanied this code).
3132 #
3133 # You should have received a copy of the GNU General Public License version
3134 # 2 along with this work; if not, write to the Free Software Foundation,
3135 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3136 #
3137 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3138 # or visit www.oracle.com if you need additional information or have any
3139 # questions.
3140 #
3141 
3142 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3143 # If so, then append $1 to $2 \
3144 # Also set JVM_ARG_OK to true/false depending on outcome.
3145 
3146 
3147 # Appends a string to a path variable, only adding the : when needed.
3148 
3149 
3150 # This will make sure the given variable points to a full and proper
3151 # path. This means:
3152 # 1) There will be no spaces in the path. On posix platforms,
3153 #    spaces in the path will result in an error. On Windows,
3154 #    the path will be rewritten using short-style to be space-free.
3155 # 2) The path will be absolute, and it will be in unix-style (on
3156 #     cygwin).
3157 # $1: The name of the variable to fix
3158 
3159 
3160 # This will make sure the given variable points to a executable
3161 # with a full and proper path. This means:
3162 # 1) There will be no spaces in the path. On posix platforms,
3163 #    spaces in the path will result in an error. On Windows,
3164 #    the path will be rewritten using short-style to be space-free.
3165 # 2) The path will be absolute, and it will be in unix-style (on
3166 #     cygwin).
3167 # Any arguments given to the executable is preserved.
3168 # If the input variable does not have a directory specification, then
3169 # it need to be in the PATH.
3170 # $1: The name of the variable to fix
3171 
3172 
3173 
3174 
3175 # Register a --with argument but mark it as deprecated
3176 # $1: The name of the with argument to deprecate, not including --with-
3177 
3178 
3179 # Register a --enable argument but mark it as deprecated
3180 # $1: The name of the with argument to deprecate, not including --enable-
3181 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3182 
3183 
3184 
3185 
3186 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3187 # $1: variable to check
3188 # $2: executable name to print in warning (optional)
3189 
3190 
3191 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3192 # Arguments as AC_PATH_PROG:
3193 # $1: variable to set
3194 # $2: executable name to look for
3195 
3196 
3197 # Setup the most fundamental tools that relies on not much else to set up,
3198 # but is used by much of the early bootstrap code.
3199 
3200 
3201 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3202 
3203 
3204 
3205 
3206 
3207 
3208 
3209 #%%% Simple tools %%%
3210 
3211 # Check if we have found a usable version of make
3212 # $1: the path to a potential make binary (or empty)
3213 # $2: the description on how we found this
3214 
3215 
3216 # Goes looking for a usable version of GNU make.
3217 
3218 
3219 
3220 
3221 
3222 
3223 # Check if build directory is on local disk. If not possible to determine,
3224 # we prefer to claim it's local.
3225 # Argument 1: directory to test
3226 # Argument 2: what to do if it is on local disk
3227 # Argument 3: what to do otherwise (remote disk or failure)
3228 
3229 
3230 # Check that source files have basic read permissions set. This might
3231 # not be the case in cygwin in certain conditions.
3232 
3233 
3234 
3235 
3236 #
3237 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3238 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3239 #
3240 # This code is free software; you can redistribute it and/or modify it
3241 # under the terms of the GNU General Public License version 2 only, as
3242 # published by the Free Software Foundation.  Oracle designates this
3243 # particular file as subject to the "Classpath" exception as provided
3244 # by Oracle in the LICENSE file that accompanied this code.
3245 #
3246 # This code is distributed in the hope that it will be useful, but WITHOUT
3247 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3248 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3249 # version 2 for more details (a copy is included in the LICENSE file that
3250 # accompanied this code).
3251 #
3252 # You should have received a copy of the GNU General Public License version
3253 # 2 along with this work; if not, write to the Free Software Foundation,
3254 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3255 #
3256 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3257 # or visit www.oracle.com if you need additional information or have any
3258 # questions.
3259 #
3260 
3261 
3262 
3263 
3264 
3265 # Helper function which possibly converts a path using DOS-style short mode.
3266 # If so, the updated path is stored in $new_path.
3267 # $1: The path to check
3268 
3269 
3270 # Helper function which possibly converts a path using DOS-style short mode.
3271 # If so, the updated path is stored in $new_path.
3272 # $1: The path to check
3273 
3274 
3275 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3276 # and could probably be heavily simplified. However, all changes in this
3277 # area tend to need lot of testing in different scenarios, and in lack of
3278 # proper unit testing, cleaning this up has not been deemed worth the effort
3279 # at the moment.
3280 
3281 
3282 
3283 
3284 
3285 
3286 
3287 
3288 
3289 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3290 
3291 
3292 
3293 
3294 #
3295 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3296 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3297 #
3298 # This code is free software; you can redistribute it and/or modify it
3299 # under the terms of the GNU General Public License version 2 only, as
3300 # published by the Free Software Foundation.  Oracle designates this
3301 # particular file as subject to the "Classpath" exception as provided
3302 # by Oracle in the LICENSE file that accompanied this code.
3303 #
3304 # This code is distributed in the hope that it will be useful, but WITHOUT
3305 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3306 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3307 # version 2 for more details (a copy is included in the LICENSE file that
3308 # accompanied this code).
3309 #
3310 # You should have received a copy of the GNU General Public License version
3311 # 2 along with this work; if not, write to the Free Software Foundation,
3312 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3313 #
3314 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3315 # or visit www.oracle.com if you need additional information or have any
3316 # questions.
3317 #
3318 
3319 
3320 
3321 
3322 
3323 
3324 
3325 
3326 
3327 
3328 
3329 # ... then the rest
3330 #
3331 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3332 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3333 #
3334 # This code is free software; you can redistribute it and/or modify it
3335 # under the terms of the GNU General Public License version 2 only, as
3336 # published by the Free Software Foundation.  Oracle designates this
3337 # particular file as subject to the "Classpath" exception as provided
3338 # by Oracle in the LICENSE file that accompanied this code.
3339 #
3340 # This code is distributed in the hope that it will be useful, but WITHOUT
3341 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3342 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3343 # version 2 for more details (a copy is included in the LICENSE file that
3344 # accompanied this code).
3345 #
3346 # You should have received a copy of the GNU General Public License version
3347 # 2 along with this work; if not, write to the Free Software Foundation,
3348 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3349 #
3350 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3351 # or visit www.oracle.com if you need additional information or have any
3352 # questions.
3353 #
3354 
3355 # Execute the check given as argument, and verify the result
3356 # If the Boot JDK was previously found, do nothing
3357 # $1 A command line (typically autoconf macro) to execute
3358 
3359 
3360 # Test: Is bootjdk explicitely set by command line arguments?
3361 
3362 
3363 # Test: Is bootjdk available from builddeps?
3364 
3365 
3366 # Test: Is $JAVA_HOME set?
3367 
3368 
3369 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3370 
3371 
3372 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3373 
3374 
3375 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3376 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3377 # $1 = Path to directory containing jdk installations.
3378 # $2 = String to append to the found JDK directory to get the proper JDK home
3379 
3380 
3381 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3382 # environmental variable as base for where to look.
3383 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3384 
3385 
3386 # Test: Is there a JDK installed in default, well-known locations?
3387 
3388 
3389 # Check that a command-line tool in the Boot JDK is correct
3390 # $1 = name of variable to assign
3391 # $2 = name of binary
3392 
3393 
3394 ###############################################################################
3395 #
3396 # We need a Boot JDK to bootstrap the build.
3397 #
3398 
3399 
3400 
3401 
3402 
3403 #
3404 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3405 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3406 #
3407 # This code is free software; you can redistribute it and/or modify it
3408 # under the terms of the GNU General Public License version 2 only, as
3409 # published by the Free Software Foundation.  Oracle designates this
3410 # particular file as subject to the "Classpath" exception as provided
3411 # by Oracle in the LICENSE file that accompanied this code.
3412 #
3413 # This code is distributed in the hope that it will be useful, but WITHOUT
3414 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3415 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3416 # version 2 for more details (a copy is included in the LICENSE file that
3417 # accompanied this code).
3418 #
3419 # You should have received a copy of the GNU General Public License version
3420 # 2 along with this work; if not, write to the Free Software Foundation,
3421 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3422 #
3423 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3424 # or visit www.oracle.com if you need additional information or have any
3425 # questions.
3426 #
3427 
3428 
3429 
3430 
3431 
3432 
3433 
3434 
3435 
3436 
3437 
3438 
3439 
3440 
3441 
3442 
3443 
3444 
3445 
3446 
3447 #
3448 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3449 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3450 #
3451 # This code is free software; you can redistribute it and/or modify it
3452 # under the terms of the GNU General Public License version 2 only, as
3453 # published by the Free Software Foundation.  Oracle designates this
3454 # particular file as subject to the "Classpath" exception as provided
3455 # by Oracle in the LICENSE file that accompanied this code.
3456 #
3457 # This code is distributed in the hope that it will be useful, but WITHOUT
3458 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3459 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3460 # version 2 for more details (a copy is included in the LICENSE file that
3461 # accompanied this code).
3462 #
3463 # You should have received a copy of the GNU General Public License version
3464 # 2 along with this work; if not, write to the Free Software Foundation,
3465 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3466 #
3467 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3468 # or visit www.oracle.com if you need additional information or have any
3469 # questions.
3470 #
3471 
3472 
3473 
3474 
3475 
3476 cygwin_help() {
3477   case $1 in
3478     unzip)
3479       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3480       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3481       ;;
3482     zip)
3483       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3484       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3485       ;;
3486     make)
3487       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3488       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3489       ;;
3490     freetype)
3491       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3492         HELP_MSG="To install freetype, run:
3493 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3494 chmod +x /tmp/freetype-setup.exe
3495 /tmp/freetype-setup.exe
3496 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3497 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3498       else
3499         HELP_MSG="You need to build a 64-bit version of freetype.
3500 This is not readily available.
3501 You can find source code and build instructions on
3502 http://www.freetype.org/
3503 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3504       fi
3505       ;;
3506   esac
3507 }
3508 
3509 msys_help() {
3510   PKGHANDLER_COMMAND=""
3511 }
3512 
3513 apt_help() {
3514   case $1 in
3515     devkit)
3516       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3517     openjdk)
3518       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3519     alsa)
3520       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3521     cups)
3522       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3523     freetype)
3524       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3525     pulse)
3526       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3527     x11)
3528       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3529     ccache)
3530       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3531   esac
3532 }
3533 
3534 yum_help() {
3535   case $1 in
3536     devkit)
3537       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3538     openjdk)
3539       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3540     alsa)
3541       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3542     cups)
3543       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3544     freetype)
3545       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3546     pulse)
3547       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3548     x11)
3549       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3550     ccache)
3551       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3552   esac
3553 }
3554 
3555 port_help() {
3556   PKGHANDLER_COMMAND=""
3557 }
3558 
3559 pkgutil_help() {
3560   PKGHANDLER_COMMAND=""
3561 }
3562 
3563 pkgadd_help() {
3564   PKGHANDLER_COMMAND=""
3565 }
3566 
3567 
3568 
3569 #
3570 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3571 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3572 #
3573 # This code is free software; you can redistribute it and/or modify it
3574 # under the terms of the GNU General Public License version 2 only, as
3575 # published by the Free Software Foundation.  Oracle designates this
3576 # particular file as subject to the "Classpath" exception as provided
3577 # by Oracle in the LICENSE file that accompanied this code.
3578 #
3579 # This code is distributed in the hope that it will be useful, but WITHOUT
3580 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3581 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3582 # version 2 for more details (a copy is included in the LICENSE file that
3583 # accompanied this code).
3584 #
3585 # You should have received a copy of the GNU General Public License version
3586 # 2 along with this work; if not, write to the Free Software Foundation,
3587 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3588 #
3589 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3590 # or visit www.oracle.com if you need additional information or have any
3591 # questions.
3592 #
3593 
3594 
3595 
3596 
3597 
3598 
3599 
3600 
3601 
3602 
3603 ###############################################################################
3604 #
3605 # Should we build only OpenJDK even if closed sources are present?
3606 #
3607 
3608 
3609 
3610 
3611 ###############################################################################
3612 #
3613 # Setup version numbers
3614 #
3615 
3616 
3617 
3618 
3619 
3620 
3621 # Support for customization of the build process. Some build files
3622 # will include counterparts from this location, if they exist. This allows
3623 # for a degree of customization of the build targets and the rules/recipes
3624 # to create them
3625 
3626 # Check whether --with-custom-make-dir was given.
3627 if test "${with_custom_make_dir+set}" = set; then :
3628   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3629 fi
3630 
3631 
3632 
3633 #
3634 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3635 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3636 #
3637 # This code is free software; you can redistribute it and/or modify it
3638 # under the terms of the GNU General Public License version 2 only, as
3639 # published by the Free Software Foundation.  Oracle designates this
3640 # particular file as subject to the "Classpath" exception as provided
3641 # by Oracle in the LICENSE file that accompanied this code.
3642 #
3643 # This code is distributed in the hope that it will be useful, but WITHOUT
3644 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3645 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3646 # version 2 for more details (a copy is included in the LICENSE file that
3647 # accompanied this code).
3648 #
3649 # You should have received a copy of the GNU General Public License version
3650 # 2 along with this work; if not, write to the Free Software Foundation,
3651 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3652 #
3653 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3654 # or visit www.oracle.com if you need additional information or have any
3655 # questions.
3656 #
3657 
3658 
3659 
3660 
3661 
3662 
3663 
3664 
3665 
3666 
3667 
3668 
3669 
3670 
3671 
3672 
3673 
3674 #
3675 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3676 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3677 #
3678 # This code is free software; you can redistribute it and/or modify it
3679 # under the terms of the GNU General Public License version 2 only, as
3680 # published by the Free Software Foundation.  Oracle designates this
3681 # particular file as subject to the "Classpath" exception as provided
3682 # by Oracle in the LICENSE file that accompanied this code.
3683 #
3684 # This code is distributed in the hope that it will be useful, but WITHOUT
3685 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3686 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3687 # version 2 for more details (a copy is included in the LICENSE file that
3688 # accompanied this code).
3689 #
3690 # You should have received a copy of the GNU General Public License version
3691 # 2 along with this work; if not, write to the Free Software Foundation,
3692 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3693 #
3694 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3695 # or visit www.oracle.com if you need additional information or have any
3696 # questions.
3697 #
3698 
3699 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3700 # Converts autoconf style CPU name to OpenJDK style, into
3701 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3702 
3703 
3704 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3705 # Converts autoconf style OS name to OpenJDK style, into
3706 # VAR_OS and VAR_OS_API.
3707 
3708 
3709 # Expects $host_os $host_cpu $build_os and $build_cpu
3710 # and $with_target_bits to have been setup!
3711 #
3712 # Translate the standard triplet(quadruplet) definition
3713 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3714 # OPENJDK_BUILD_OS, etc.
3715 
3716 
3717 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3718 # accordingly. Must be done after setting up build and target system, but before
3719 # doing anything else with these values.
3720 
3721 
3722 # Setup the legacy variables, for controlling the old makefiles.
3723 #
3724 
3725 
3726 
3727 
3728 #%%% Build and target systems %%%
3729 
3730 
3731 
3732 
3733 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3734 # Add -mX to various FLAGS variables.
3735 
3736 
3737 
3738 
3739 
3740 
3741 #
3742 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3743 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3744 #
3745 # This code is free software; you can redistribute it and/or modify it
3746 # under the terms of the GNU General Public License version 2 only, as
3747 # published by the Free Software Foundation.  Oracle designates this
3748 # particular file as subject to the "Classpath" exception as provided
3749 # by Oracle in the LICENSE file that accompanied this code.
3750 #
3751 # This code is distributed in the hope that it will be useful, but WITHOUT
3752 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3753 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3754 # version 2 for more details (a copy is included in the LICENSE file that
3755 # accompanied this code).
3756 #
3757 # You should have received a copy of the GNU General Public License version
3758 # 2 along with this work; if not, write to the Free Software Foundation,
3759 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3760 #
3761 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3762 # or visit www.oracle.com if you need additional information or have any
3763 # questions.
3764 #
3765 
3766 
3767 
3768 
3769 
3770 
3771 
3772 
3773 #
3774 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3775 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3776 #
3777 # This code is free software; you can redistribute it and/or modify it
3778 # under the terms of the GNU General Public License version 2 only, as
3779 # published by the Free Software Foundation.  Oracle designates this
3780 # particular file as subject to the "Classpath" exception as provided
3781 # by Oracle in the LICENSE file that accompanied this code.
3782 #
3783 # This code is distributed in the hope that it will be useful, but WITHOUT
3784 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3785 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3786 # version 2 for more details (a copy is included in the LICENSE file that
3787 # accompanied this code).
3788 #
3789 # You should have received a copy of the GNU General Public License version
3790 # 2 along with this work; if not, write to the Free Software Foundation,
3791 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3792 #
3793 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3794 # or visit www.oracle.com if you need additional information or have any
3795 # questions.
3796 #
3797 
3798 # $1 = compiler to test (CC or CXX)
3799 # $2 = human readable name of compiler (C or C++)
3800 
3801 
3802 
3803 
3804 
3805 # $1 = compiler to test (CC or CXX)
3806 # $2 = human readable name of compiler (C or C++)
3807 # $3 = list of compiler names to search for
3808 
3809 
3810 
3811 
3812 
3813 
3814 
3815 
3816 
3817 
3818 
3819 
3820 
3821 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3822 #                                   [RUN-IF-FALSE])
3823 # ------------------------------------------------------------
3824 # Check that the c and c++ compilers support an argument
3825 
3826 
3827 
3828 
3829 # Setup the JTREG paths
3830 
3831 
3832 #
3833 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3834 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3835 #
3836 # This code is free software; you can redistribute it and/or modify it
3837 # under the terms of the GNU General Public License version 2 only, as
3838 # published by the Free Software Foundation.  Oracle designates this
3839 # particular file as subject to the "Classpath" exception as provided
3840 # by Oracle in the LICENSE file that accompanied this code.
3841 #
3842 # This code is distributed in the hope that it will be useful, but WITHOUT
3843 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3844 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3845 # version 2 for more details (a copy is included in the LICENSE file that
3846 # accompanied this code).
3847 #
3848 # You should have received a copy of the GNU General Public License version
3849 # 2 along with this work; if not, write to the Free Software Foundation,
3850 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3851 #
3852 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3853 # or visit www.oracle.com if you need additional information or have any
3854 # questions.
3855 #
3856 
3857 
3858 
3859 
3860 
3861 
3862 
3863 # Check if the VS env variables were setup prior to running configure.
3864 # If not, then find vcvarsall.bat and run it automatically, and integrate
3865 # the set env variables into the spec file.
3866 
3867 
3868 
3869 
3870 
3871 
3872 
3873 
3874 
3875 
3876 
3877 # This line needs to be here, verbatim, after all includes and the dummy hook
3878 # definitions. It is replaced with custom functionality when building
3879 # custom sources.
3880 #CUSTOM_AUTOCONF_INCLUDE
3881 
3882 # Do not change or remove the following line, it is needed for consistency checks:
3883 DATE_WHEN_GENERATED=1449096260
3884 
3885 ###############################################################################
3886 #
3887 # Initialization / Boot-strapping
3888 #
3889 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3890 # thus it jumps back and forth, each time gaining something needed later on.
3891 #
3892 ###############################################################################
3893 
3894 # Basic initialization that must happen first of all
3895 
3896   # Save the original command line. This is passed to us by the wrapper configure script.
3897 
3898   DATE_WHEN_CONFIGURED=`LANG=C date`
3899 
3900   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3901 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3902   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3903 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3904 
3905 
3906 
3907   # Start with tools that do not need have cross compilation support
3908   # and can be expected to be found in the default PATH. These tools are
3909   # used by configure. Nor are these tools expected to be found in the
3910   # devkit from the builddeps server either, since they are
3911   # needed to download the devkit.
3912 
3913   # First are all the simple required tools.
3914 
3915   for ac_prog in basename
3916 do
3917   # Extract the first word of "$ac_prog", so it can be a program name with args.
3918 set dummy $ac_prog; ac_word=$2
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3920 $as_echo_n "checking for $ac_word... " >&6; }
3921 if ${ac_cv_path_BASENAME+:} false; then :
3922   $as_echo_n "(cached) " >&6
3923 else
3924   case $BASENAME in
3925   [\\/]* | ?:[\\/]*)
3926   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3927   ;;
3928   *)
3929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3930 for as_dir in $PATH
3931 do
3932   IFS=$as_save_IFS
3933   test -z "$as_dir" && as_dir=.
3934     for ac_exec_ext in '' $ac_executable_extensions; do
3935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3936     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3938     break 2
3939   fi
3940 done
3941   done
3942 IFS=$as_save_IFS
3943 
3944   ;;
3945 esac
3946 fi
3947 BASENAME=$ac_cv_path_BASENAME
3948 if test -n "$BASENAME"; then
3949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3950 $as_echo "$BASENAME" >&6; }
3951 else
3952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3953 $as_echo "no" >&6; }
3954 fi
3955 
3956 
3957   test -n "$BASENAME" && break
3958 done
3959 
3960 
3961   if test "x$BASENAME" = x; then
3962     if test "xbasename" = x; then
3963       PROG_NAME=basename
3964     else
3965       PROG_NAME=basename
3966     fi
3967     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3968 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3969     as_fn_error $? "Cannot continue" "$LINENO" 5
3970   fi
3971 
3972 
3973 
3974   for ac_prog in bash
3975 do
3976   # Extract the first word of "$ac_prog", so it can be a program name with args.
3977 set dummy $ac_prog; ac_word=$2
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3979 $as_echo_n "checking for $ac_word... " >&6; }
3980 if ${ac_cv_path_BASH+:} false; then :
3981   $as_echo_n "(cached) " >&6
3982 else
3983   case $BASH in
3984   [\\/]* | ?:[\\/]*)
3985   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3986   ;;
3987   *)
3988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3989 for as_dir in $PATH
3990 do
3991   IFS=$as_save_IFS
3992   test -z "$as_dir" && as_dir=.
3993     for ac_exec_ext in '' $ac_executable_extensions; do
3994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3995     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3997     break 2
3998   fi
3999 done
4000   done
4001 IFS=$as_save_IFS
4002 
4003   ;;
4004 esac
4005 fi
4006 BASH=$ac_cv_path_BASH
4007 if test -n "$BASH"; then
4008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4009 $as_echo "$BASH" >&6; }
4010 else
4011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012 $as_echo "no" >&6; }
4013 fi
4014 
4015 
4016   test -n "$BASH" && break
4017 done
4018 
4019 
4020   if test "x$BASH" = x; then
4021     if test "xbash" = x; then
4022       PROG_NAME=bash
4023     else
4024       PROG_NAME=bash
4025     fi
4026     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4027 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4028     as_fn_error $? "Cannot continue" "$LINENO" 5
4029   fi
4030 
4031 
4032 
4033   for ac_prog in cat
4034 do
4035   # Extract the first word of "$ac_prog", so it can be a program name with args.
4036 set dummy $ac_prog; ac_word=$2
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4038 $as_echo_n "checking for $ac_word... " >&6; }
4039 if ${ac_cv_path_CAT+:} false; then :
4040   $as_echo_n "(cached) " >&6
4041 else
4042   case $CAT in
4043   [\\/]* | ?:[\\/]*)
4044   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4045   ;;
4046   *)
4047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4048 for as_dir in $PATH
4049 do
4050   IFS=$as_save_IFS
4051   test -z "$as_dir" && as_dir=.
4052     for ac_exec_ext in '' $ac_executable_extensions; do
4053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4054     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4056     break 2
4057   fi
4058 done
4059   done
4060 IFS=$as_save_IFS
4061 
4062   ;;
4063 esac
4064 fi
4065 CAT=$ac_cv_path_CAT
4066 if test -n "$CAT"; then
4067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4068 $as_echo "$CAT" >&6; }
4069 else
4070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4071 $as_echo "no" >&6; }
4072 fi
4073 
4074 
4075   test -n "$CAT" && break
4076 done
4077 
4078 
4079   if test "x$CAT" = x; then
4080     if test "xcat" = x; then
4081       PROG_NAME=cat
4082     else
4083       PROG_NAME=cat
4084     fi
4085     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4086 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4087     as_fn_error $? "Cannot continue" "$LINENO" 5
4088   fi
4089 
4090 
4091 
4092   for ac_prog in chmod
4093 do
4094   # Extract the first word of "$ac_prog", so it can be a program name with args.
4095 set dummy $ac_prog; ac_word=$2
4096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4097 $as_echo_n "checking for $ac_word... " >&6; }
4098 if ${ac_cv_path_CHMOD+:} false; then :
4099   $as_echo_n "(cached) " >&6
4100 else
4101   case $CHMOD in
4102   [\\/]* | ?:[\\/]*)
4103   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4104   ;;
4105   *)
4106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4107 for as_dir in $PATH
4108 do
4109   IFS=$as_save_IFS
4110   test -z "$as_dir" && as_dir=.
4111     for ac_exec_ext in '' $ac_executable_extensions; do
4112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4113     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4115     break 2
4116   fi
4117 done
4118   done
4119 IFS=$as_save_IFS
4120 
4121   ;;
4122 esac
4123 fi
4124 CHMOD=$ac_cv_path_CHMOD
4125 if test -n "$CHMOD"; then
4126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4127 $as_echo "$CHMOD" >&6; }
4128 else
4129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4130 $as_echo "no" >&6; }
4131 fi
4132 
4133 
4134   test -n "$CHMOD" && break
4135 done
4136 
4137 
4138   if test "x$CHMOD" = x; then
4139     if test "xchmod" = x; then
4140       PROG_NAME=chmod
4141     else
4142       PROG_NAME=chmod
4143     fi
4144     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4145 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4146     as_fn_error $? "Cannot continue" "$LINENO" 5
4147   fi
4148 
4149 
4150 
4151   for ac_prog in cmp
4152 do
4153   # Extract the first word of "$ac_prog", so it can be a program name with args.
4154 set dummy $ac_prog; ac_word=$2
4155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4156 $as_echo_n "checking for $ac_word... " >&6; }
4157 if ${ac_cv_path_CMP+:} false; then :
4158   $as_echo_n "(cached) " >&6
4159 else
4160   case $CMP in
4161   [\\/]* | ?:[\\/]*)
4162   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4163   ;;
4164   *)
4165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4166 for as_dir in $PATH
4167 do
4168   IFS=$as_save_IFS
4169   test -z "$as_dir" && as_dir=.
4170     for ac_exec_ext in '' $ac_executable_extensions; do
4171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4172     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4174     break 2
4175   fi
4176 done
4177   done
4178 IFS=$as_save_IFS
4179 
4180   ;;
4181 esac
4182 fi
4183 CMP=$ac_cv_path_CMP
4184 if test -n "$CMP"; then
4185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4186 $as_echo "$CMP" >&6; }
4187 else
4188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4189 $as_echo "no" >&6; }
4190 fi
4191 
4192 
4193   test -n "$CMP" && break
4194 done
4195 
4196 
4197   if test "x$CMP" = x; then
4198     if test "xcmp" = x; then
4199       PROG_NAME=cmp
4200     else
4201       PROG_NAME=cmp
4202     fi
4203     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4204 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4205     as_fn_error $? "Cannot continue" "$LINENO" 5
4206   fi
4207 
4208 
4209 
4210   for ac_prog in comm
4211 do
4212   # Extract the first word of "$ac_prog", so it can be a program name with args.
4213 set dummy $ac_prog; ac_word=$2
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4215 $as_echo_n "checking for $ac_word... " >&6; }
4216 if ${ac_cv_path_COMM+:} false; then :
4217   $as_echo_n "(cached) " >&6
4218 else
4219   case $COMM in
4220   [\\/]* | ?:[\\/]*)
4221   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4222   ;;
4223   *)
4224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4225 for as_dir in $PATH
4226 do
4227   IFS=$as_save_IFS
4228   test -z "$as_dir" && as_dir=.
4229     for ac_exec_ext in '' $ac_executable_extensions; do
4230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4231     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4233     break 2
4234   fi
4235 done
4236   done
4237 IFS=$as_save_IFS
4238 
4239   ;;
4240 esac
4241 fi
4242 COMM=$ac_cv_path_COMM
4243 if test -n "$COMM"; then
4244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4245 $as_echo "$COMM" >&6; }
4246 else
4247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4248 $as_echo "no" >&6; }
4249 fi
4250 
4251 
4252   test -n "$COMM" && break
4253 done
4254 
4255 
4256   if test "x$COMM" = x; then
4257     if test "xcomm" = x; then
4258       PROG_NAME=comm
4259     else
4260       PROG_NAME=comm
4261     fi
4262     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4263 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4264     as_fn_error $? "Cannot continue" "$LINENO" 5
4265   fi
4266 
4267 
4268 
4269   for ac_prog in cp
4270 do
4271   # Extract the first word of "$ac_prog", so it can be a program name with args.
4272 set dummy $ac_prog; ac_word=$2
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4274 $as_echo_n "checking for $ac_word... " >&6; }
4275 if ${ac_cv_path_CP+:} false; then :
4276   $as_echo_n "(cached) " >&6
4277 else
4278   case $CP in
4279   [\\/]* | ?:[\\/]*)
4280   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4281   ;;
4282   *)
4283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4284 for as_dir in $PATH
4285 do
4286   IFS=$as_save_IFS
4287   test -z "$as_dir" && as_dir=.
4288     for ac_exec_ext in '' $ac_executable_extensions; do
4289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4290     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4292     break 2
4293   fi
4294 done
4295   done
4296 IFS=$as_save_IFS
4297 
4298   ;;
4299 esac
4300 fi
4301 CP=$ac_cv_path_CP
4302 if test -n "$CP"; then
4303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4304 $as_echo "$CP" >&6; }
4305 else
4306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4307 $as_echo "no" >&6; }
4308 fi
4309 
4310 
4311   test -n "$CP" && break
4312 done
4313 
4314 
4315   if test "x$CP" = x; then
4316     if test "xcp" = x; then
4317       PROG_NAME=cp
4318     else
4319       PROG_NAME=cp
4320     fi
4321     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4322 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4323     as_fn_error $? "Cannot continue" "$LINENO" 5
4324   fi
4325 
4326 
4327 
4328   for ac_prog in cpio
4329 do
4330   # Extract the first word of "$ac_prog", so it can be a program name with args.
4331 set dummy $ac_prog; ac_word=$2
4332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4333 $as_echo_n "checking for $ac_word... " >&6; }
4334 if ${ac_cv_path_CPIO+:} false; then :
4335   $as_echo_n "(cached) " >&6
4336 else
4337   case $CPIO in
4338   [\\/]* | ?:[\\/]*)
4339   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4340   ;;
4341   *)
4342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4343 for as_dir in $PATH
4344 do
4345   IFS=$as_save_IFS
4346   test -z "$as_dir" && as_dir=.
4347     for ac_exec_ext in '' $ac_executable_extensions; do
4348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4349     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4351     break 2
4352   fi
4353 done
4354   done
4355 IFS=$as_save_IFS
4356 
4357   ;;
4358 esac
4359 fi
4360 CPIO=$ac_cv_path_CPIO
4361 if test -n "$CPIO"; then
4362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4363 $as_echo "$CPIO" >&6; }
4364 else
4365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4366 $as_echo "no" >&6; }
4367 fi
4368 
4369 
4370   test -n "$CPIO" && break
4371 done
4372 
4373 
4374   if test "x$CPIO" = x; then
4375     if test "xcpio" = x; then
4376       PROG_NAME=cpio
4377     else
4378       PROG_NAME=cpio
4379     fi
4380     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4381 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4382     as_fn_error $? "Cannot continue" "$LINENO" 5
4383   fi
4384 
4385 
4386 
4387   for ac_prog in cut
4388 do
4389   # Extract the first word of "$ac_prog", so it can be a program name with args.
4390 set dummy $ac_prog; ac_word=$2
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4392 $as_echo_n "checking for $ac_word... " >&6; }
4393 if ${ac_cv_path_CUT+:} false; then :
4394   $as_echo_n "(cached) " >&6
4395 else
4396   case $CUT in
4397   [\\/]* | ?:[\\/]*)
4398   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4399   ;;
4400   *)
4401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4402 for as_dir in $PATH
4403 do
4404   IFS=$as_save_IFS
4405   test -z "$as_dir" && as_dir=.
4406     for ac_exec_ext in '' $ac_executable_extensions; do
4407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4408     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4410     break 2
4411   fi
4412 done
4413   done
4414 IFS=$as_save_IFS
4415 
4416   ;;
4417 esac
4418 fi
4419 CUT=$ac_cv_path_CUT
4420 if test -n "$CUT"; then
4421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4422 $as_echo "$CUT" >&6; }
4423 else
4424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4425 $as_echo "no" >&6; }
4426 fi
4427 
4428 
4429   test -n "$CUT" && break
4430 done
4431 
4432 
4433   if test "x$CUT" = x; then
4434     if test "xcut" = x; then
4435       PROG_NAME=cut
4436     else
4437       PROG_NAME=cut
4438     fi
4439     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4440 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4441     as_fn_error $? "Cannot continue" "$LINENO" 5
4442   fi
4443 
4444 
4445 
4446   for ac_prog in date
4447 do
4448   # Extract the first word of "$ac_prog", so it can be a program name with args.
4449 set dummy $ac_prog; ac_word=$2
4450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4451 $as_echo_n "checking for $ac_word... " >&6; }
4452 if ${ac_cv_path_DATE+:} false; then :
4453   $as_echo_n "(cached) " >&6
4454 else
4455   case $DATE in
4456   [\\/]* | ?:[\\/]*)
4457   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4458   ;;
4459   *)
4460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461 for as_dir in $PATH
4462 do
4463   IFS=$as_save_IFS
4464   test -z "$as_dir" && as_dir=.
4465     for ac_exec_ext in '' $ac_executable_extensions; do
4466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4467     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4469     break 2
4470   fi
4471 done
4472   done
4473 IFS=$as_save_IFS
4474 
4475   ;;
4476 esac
4477 fi
4478 DATE=$ac_cv_path_DATE
4479 if test -n "$DATE"; then
4480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4481 $as_echo "$DATE" >&6; }
4482 else
4483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4484 $as_echo "no" >&6; }
4485 fi
4486 
4487 
4488   test -n "$DATE" && break
4489 done
4490 
4491 
4492   if test "x$DATE" = x; then
4493     if test "xdate" = x; then
4494       PROG_NAME=date
4495     else
4496       PROG_NAME=date
4497     fi
4498     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4499 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4500     as_fn_error $? "Cannot continue" "$LINENO" 5
4501   fi
4502 
4503 
4504 
4505   for ac_prog in gdiff diff
4506 do
4507   # Extract the first word of "$ac_prog", so it can be a program name with args.
4508 set dummy $ac_prog; ac_word=$2
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510 $as_echo_n "checking for $ac_word... " >&6; }
4511 if ${ac_cv_path_DIFF+:} false; then :
4512   $as_echo_n "(cached) " >&6
4513 else
4514   case $DIFF in
4515   [\\/]* | ?:[\\/]*)
4516   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4517   ;;
4518   *)
4519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520 for as_dir in $PATH
4521 do
4522   IFS=$as_save_IFS
4523   test -z "$as_dir" && as_dir=.
4524     for ac_exec_ext in '' $ac_executable_extensions; do
4525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4526     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4528     break 2
4529   fi
4530 done
4531   done
4532 IFS=$as_save_IFS
4533 
4534   ;;
4535 esac
4536 fi
4537 DIFF=$ac_cv_path_DIFF
4538 if test -n "$DIFF"; then
4539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4540 $as_echo "$DIFF" >&6; }
4541 else
4542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4543 $as_echo "no" >&6; }
4544 fi
4545 
4546 
4547   test -n "$DIFF" && break
4548 done
4549 
4550 
4551   if test "x$DIFF" = x; then
4552     if test "xgdiff diff" = x; then
4553       PROG_NAME=diff
4554     else
4555       PROG_NAME=gdiff diff
4556     fi
4557     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4558 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4559     as_fn_error $? "Cannot continue" "$LINENO" 5
4560   fi
4561 
4562 
4563 
4564   for ac_prog in dirname
4565 do
4566   # Extract the first word of "$ac_prog", so it can be a program name with args.
4567 set dummy $ac_prog; ac_word=$2
4568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4569 $as_echo_n "checking for $ac_word... " >&6; }
4570 if ${ac_cv_path_DIRNAME+:} false; then :
4571   $as_echo_n "(cached) " >&6
4572 else
4573   case $DIRNAME in
4574   [\\/]* | ?:[\\/]*)
4575   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4576   ;;
4577   *)
4578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4579 for as_dir in $PATH
4580 do
4581   IFS=$as_save_IFS
4582   test -z "$as_dir" && as_dir=.
4583     for ac_exec_ext in '' $ac_executable_extensions; do
4584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4585     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4587     break 2
4588   fi
4589 done
4590   done
4591 IFS=$as_save_IFS
4592 
4593   ;;
4594 esac
4595 fi
4596 DIRNAME=$ac_cv_path_DIRNAME
4597 if test -n "$DIRNAME"; then
4598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4599 $as_echo "$DIRNAME" >&6; }
4600 else
4601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4602 $as_echo "no" >&6; }
4603 fi
4604 
4605 
4606   test -n "$DIRNAME" && break
4607 done
4608 
4609 
4610   if test "x$DIRNAME" = x; then
4611     if test "xdirname" = x; then
4612       PROG_NAME=dirname
4613     else
4614       PROG_NAME=dirname
4615     fi
4616     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4617 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4618     as_fn_error $? "Cannot continue" "$LINENO" 5
4619   fi
4620 
4621 
4622 
4623   for ac_prog in echo
4624 do
4625   # Extract the first word of "$ac_prog", so it can be a program name with args.
4626 set dummy $ac_prog; ac_word=$2
4627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628 $as_echo_n "checking for $ac_word... " >&6; }
4629 if ${ac_cv_path_ECHO+:} false; then :
4630   $as_echo_n "(cached) " >&6
4631 else
4632   case $ECHO in
4633   [\\/]* | ?:[\\/]*)
4634   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4635   ;;
4636   *)
4637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638 for as_dir in $PATH
4639 do
4640   IFS=$as_save_IFS
4641   test -z "$as_dir" && as_dir=.
4642     for ac_exec_ext in '' $ac_executable_extensions; do
4643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646     break 2
4647   fi
4648 done
4649   done
4650 IFS=$as_save_IFS
4651 
4652   ;;
4653 esac
4654 fi
4655 ECHO=$ac_cv_path_ECHO
4656 if test -n "$ECHO"; then
4657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4658 $as_echo "$ECHO" >&6; }
4659 else
4660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661 $as_echo "no" >&6; }
4662 fi
4663 
4664 
4665   test -n "$ECHO" && break
4666 done
4667 
4668 
4669   if test "x$ECHO" = x; then
4670     if test "xecho" = x; then
4671       PROG_NAME=echo
4672     else
4673       PROG_NAME=echo
4674     fi
4675     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4676 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4677     as_fn_error $? "Cannot continue" "$LINENO" 5
4678   fi
4679 
4680 
4681 
4682   for ac_prog in expr
4683 do
4684   # Extract the first word of "$ac_prog", so it can be a program name with args.
4685 set dummy $ac_prog; ac_word=$2
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687 $as_echo_n "checking for $ac_word... " >&6; }
4688 if ${ac_cv_path_EXPR+:} false; then :
4689   $as_echo_n "(cached) " >&6
4690 else
4691   case $EXPR in
4692   [\\/]* | ?:[\\/]*)
4693   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4694   ;;
4695   *)
4696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697 for as_dir in $PATH
4698 do
4699   IFS=$as_save_IFS
4700   test -z "$as_dir" && as_dir=.
4701     for ac_exec_ext in '' $ac_executable_extensions; do
4702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4703     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705     break 2
4706   fi
4707 done
4708   done
4709 IFS=$as_save_IFS
4710 
4711   ;;
4712 esac
4713 fi
4714 EXPR=$ac_cv_path_EXPR
4715 if test -n "$EXPR"; then
4716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4717 $as_echo "$EXPR" >&6; }
4718 else
4719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720 $as_echo "no" >&6; }
4721 fi
4722 
4723 
4724   test -n "$EXPR" && break
4725 done
4726 
4727 
4728   if test "x$EXPR" = x; then
4729     if test "xexpr" = x; then
4730       PROG_NAME=expr
4731     else
4732       PROG_NAME=expr
4733     fi
4734     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4735 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4736     as_fn_error $? "Cannot continue" "$LINENO" 5
4737   fi
4738 
4739 
4740 
4741   for ac_prog in file
4742 do
4743   # Extract the first word of "$ac_prog", so it can be a program name with args.
4744 set dummy $ac_prog; ac_word=$2
4745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746 $as_echo_n "checking for $ac_word... " >&6; }
4747 if ${ac_cv_path_FILE+:} false; then :
4748   $as_echo_n "(cached) " >&6
4749 else
4750   case $FILE in
4751   [\\/]* | ?:[\\/]*)
4752   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4753   ;;
4754   *)
4755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756 for as_dir in $PATH
4757 do
4758   IFS=$as_save_IFS
4759   test -z "$as_dir" && as_dir=.
4760     for ac_exec_ext in '' $ac_executable_extensions; do
4761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4762     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4764     break 2
4765   fi
4766 done
4767   done
4768 IFS=$as_save_IFS
4769 
4770   ;;
4771 esac
4772 fi
4773 FILE=$ac_cv_path_FILE
4774 if test -n "$FILE"; then
4775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4776 $as_echo "$FILE" >&6; }
4777 else
4778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779 $as_echo "no" >&6; }
4780 fi
4781 
4782 
4783   test -n "$FILE" && break
4784 done
4785 
4786 
4787   if test "x$FILE" = x; then
4788     if test "xfile" = x; then
4789       PROG_NAME=file
4790     else
4791       PROG_NAME=file
4792     fi
4793     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4794 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4795     as_fn_error $? "Cannot continue" "$LINENO" 5
4796   fi
4797 
4798 
4799 
4800   for ac_prog in find
4801 do
4802   # Extract the first word of "$ac_prog", so it can be a program name with args.
4803 set dummy $ac_prog; ac_word=$2
4804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4805 $as_echo_n "checking for $ac_word... " >&6; }
4806 if ${ac_cv_path_FIND+:} false; then :
4807   $as_echo_n "(cached) " >&6
4808 else
4809   case $FIND in
4810   [\\/]* | ?:[\\/]*)
4811   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4812   ;;
4813   *)
4814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4815 for as_dir in $PATH
4816 do
4817   IFS=$as_save_IFS
4818   test -z "$as_dir" && as_dir=.
4819     for ac_exec_ext in '' $ac_executable_extensions; do
4820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4821     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4823     break 2
4824   fi
4825 done
4826   done
4827 IFS=$as_save_IFS
4828 
4829   ;;
4830 esac
4831 fi
4832 FIND=$ac_cv_path_FIND
4833 if test -n "$FIND"; then
4834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4835 $as_echo "$FIND" >&6; }
4836 else
4837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4838 $as_echo "no" >&6; }
4839 fi
4840 
4841 
4842   test -n "$FIND" && break
4843 done
4844 
4845 
4846   if test "x$FIND" = x; then
4847     if test "xfind" = x; then
4848       PROG_NAME=find
4849     else
4850       PROG_NAME=find
4851     fi
4852     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4853 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4854     as_fn_error $? "Cannot continue" "$LINENO" 5
4855   fi
4856 
4857 
4858 
4859   for ac_prog in head
4860 do
4861   # Extract the first word of "$ac_prog", so it can be a program name with args.
4862 set dummy $ac_prog; ac_word=$2
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4864 $as_echo_n "checking for $ac_word... " >&6; }
4865 if ${ac_cv_path_HEAD+:} false; then :
4866   $as_echo_n "(cached) " >&6
4867 else
4868   case $HEAD in
4869   [\\/]* | ?:[\\/]*)
4870   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4871   ;;
4872   *)
4873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874 for as_dir in $PATH
4875 do
4876   IFS=$as_save_IFS
4877   test -z "$as_dir" && as_dir=.
4878     for ac_exec_ext in '' $ac_executable_extensions; do
4879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4880     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4882     break 2
4883   fi
4884 done
4885   done
4886 IFS=$as_save_IFS
4887 
4888   ;;
4889 esac
4890 fi
4891 HEAD=$ac_cv_path_HEAD
4892 if test -n "$HEAD"; then
4893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4894 $as_echo "$HEAD" >&6; }
4895 else
4896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4897 $as_echo "no" >&6; }
4898 fi
4899 
4900 
4901   test -n "$HEAD" && break
4902 done
4903 
4904 
4905   if test "x$HEAD" = x; then
4906     if test "xhead" = x; then
4907       PROG_NAME=head
4908     else
4909       PROG_NAME=head
4910     fi
4911     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4912 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4913     as_fn_error $? "Cannot continue" "$LINENO" 5
4914   fi
4915 
4916 
4917 
4918   for ac_prog in ln
4919 do
4920   # Extract the first word of "$ac_prog", so it can be a program name with args.
4921 set dummy $ac_prog; ac_word=$2
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4923 $as_echo_n "checking for $ac_word... " >&6; }
4924 if ${ac_cv_path_LN+:} false; then :
4925   $as_echo_n "(cached) " >&6
4926 else
4927   case $LN in
4928   [\\/]* | ?:[\\/]*)
4929   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4930   ;;
4931   *)
4932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4933 for as_dir in $PATH
4934 do
4935   IFS=$as_save_IFS
4936   test -z "$as_dir" && as_dir=.
4937     for ac_exec_ext in '' $ac_executable_extensions; do
4938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4939     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4941     break 2
4942   fi
4943 done
4944   done
4945 IFS=$as_save_IFS
4946 
4947   ;;
4948 esac
4949 fi
4950 LN=$ac_cv_path_LN
4951 if test -n "$LN"; then
4952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4953 $as_echo "$LN" >&6; }
4954 else
4955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956 $as_echo "no" >&6; }
4957 fi
4958 
4959 
4960   test -n "$LN" && break
4961 done
4962 
4963 
4964   if test "x$LN" = x; then
4965     if test "xln" = x; then
4966       PROG_NAME=ln
4967     else
4968       PROG_NAME=ln
4969     fi
4970     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4971 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4972     as_fn_error $? "Cannot continue" "$LINENO" 5
4973   fi
4974 
4975 
4976 
4977   for ac_prog in ls
4978 do
4979   # Extract the first word of "$ac_prog", so it can be a program name with args.
4980 set dummy $ac_prog; ac_word=$2
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4982 $as_echo_n "checking for $ac_word... " >&6; }
4983 if ${ac_cv_path_LS+:} false; then :
4984   $as_echo_n "(cached) " >&6
4985 else
4986   case $LS in
4987   [\\/]* | ?:[\\/]*)
4988   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4989   ;;
4990   *)
4991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4992 for as_dir in $PATH
4993 do
4994   IFS=$as_save_IFS
4995   test -z "$as_dir" && as_dir=.
4996     for ac_exec_ext in '' $ac_executable_extensions; do
4997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4998     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5000     break 2
5001   fi
5002 done
5003   done
5004 IFS=$as_save_IFS
5005 
5006   ;;
5007 esac
5008 fi
5009 LS=$ac_cv_path_LS
5010 if test -n "$LS"; then
5011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5012 $as_echo "$LS" >&6; }
5013 else
5014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5015 $as_echo "no" >&6; }
5016 fi
5017 
5018 
5019   test -n "$LS" && break
5020 done
5021 
5022 
5023   if test "x$LS" = x; then
5024     if test "xls" = x; then
5025       PROG_NAME=ls
5026     else
5027       PROG_NAME=ls
5028     fi
5029     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5030 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5031     as_fn_error $? "Cannot continue" "$LINENO" 5
5032   fi
5033 
5034 
5035 
5036   for ac_prog in mkdir
5037 do
5038   # Extract the first word of "$ac_prog", so it can be a program name with args.
5039 set dummy $ac_prog; ac_word=$2
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5041 $as_echo_n "checking for $ac_word... " >&6; }
5042 if ${ac_cv_path_MKDIR+:} false; then :
5043   $as_echo_n "(cached) " >&6
5044 else
5045   case $MKDIR in
5046   [\\/]* | ?:[\\/]*)
5047   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5048   ;;
5049   *)
5050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5051 for as_dir in $PATH
5052 do
5053   IFS=$as_save_IFS
5054   test -z "$as_dir" && as_dir=.
5055     for ac_exec_ext in '' $ac_executable_extensions; do
5056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5057     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5059     break 2
5060   fi
5061 done
5062   done
5063 IFS=$as_save_IFS
5064 
5065   ;;
5066 esac
5067 fi
5068 MKDIR=$ac_cv_path_MKDIR
5069 if test -n "$MKDIR"; then
5070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5071 $as_echo "$MKDIR" >&6; }
5072 else
5073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5074 $as_echo "no" >&6; }
5075 fi
5076 
5077 
5078   test -n "$MKDIR" && break
5079 done
5080 
5081 
5082   if test "x$MKDIR" = x; then
5083     if test "xmkdir" = x; then
5084       PROG_NAME=mkdir
5085     else
5086       PROG_NAME=mkdir
5087     fi
5088     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5089 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5090     as_fn_error $? "Cannot continue" "$LINENO" 5
5091   fi
5092 
5093 
5094 
5095   for ac_prog in mktemp
5096 do
5097   # Extract the first word of "$ac_prog", so it can be a program name with args.
5098 set dummy $ac_prog; ac_word=$2
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100 $as_echo_n "checking for $ac_word... " >&6; }
5101 if ${ac_cv_path_MKTEMP+:} false; then :
5102   $as_echo_n "(cached) " >&6
5103 else
5104   case $MKTEMP in
5105   [\\/]* | ?:[\\/]*)
5106   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5107   ;;
5108   *)
5109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110 for as_dir in $PATH
5111 do
5112   IFS=$as_save_IFS
5113   test -z "$as_dir" && as_dir=.
5114     for ac_exec_ext in '' $ac_executable_extensions; do
5115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5116     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5118     break 2
5119   fi
5120 done
5121   done
5122 IFS=$as_save_IFS
5123 
5124   ;;
5125 esac
5126 fi
5127 MKTEMP=$ac_cv_path_MKTEMP
5128 if test -n "$MKTEMP"; then
5129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5130 $as_echo "$MKTEMP" >&6; }
5131 else
5132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133 $as_echo "no" >&6; }
5134 fi
5135 
5136 
5137   test -n "$MKTEMP" && break
5138 done
5139 
5140 
5141   if test "x$MKTEMP" = x; then
5142     if test "xmktemp" = x; then
5143       PROG_NAME=mktemp
5144     else
5145       PROG_NAME=mktemp
5146     fi
5147     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5148 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5149     as_fn_error $? "Cannot continue" "$LINENO" 5
5150   fi
5151 
5152 
5153 
5154   for ac_prog in mv
5155 do
5156   # Extract the first word of "$ac_prog", so it can be a program name with args.
5157 set dummy $ac_prog; ac_word=$2
5158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5159 $as_echo_n "checking for $ac_word... " >&6; }
5160 if ${ac_cv_path_MV+:} false; then :
5161   $as_echo_n "(cached) " >&6
5162 else
5163   case $MV in
5164   [\\/]* | ?:[\\/]*)
5165   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5166   ;;
5167   *)
5168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5169 for as_dir in $PATH
5170 do
5171   IFS=$as_save_IFS
5172   test -z "$as_dir" && as_dir=.
5173     for ac_exec_ext in '' $ac_executable_extensions; do
5174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5175     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5177     break 2
5178   fi
5179 done
5180   done
5181 IFS=$as_save_IFS
5182 
5183   ;;
5184 esac
5185 fi
5186 MV=$ac_cv_path_MV
5187 if test -n "$MV"; then
5188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5189 $as_echo "$MV" >&6; }
5190 else
5191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5192 $as_echo "no" >&6; }
5193 fi
5194 
5195 
5196   test -n "$MV" && break
5197 done
5198 
5199 
5200   if test "x$MV" = x; then
5201     if test "xmv" = x; then
5202       PROG_NAME=mv
5203     else
5204       PROG_NAME=mv
5205     fi
5206     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5207 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5208     as_fn_error $? "Cannot continue" "$LINENO" 5
5209   fi
5210 
5211 
5212 
5213   for ac_prog in printf
5214 do
5215   # Extract the first word of "$ac_prog", so it can be a program name with args.
5216 set dummy $ac_prog; ac_word=$2
5217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5218 $as_echo_n "checking for $ac_word... " >&6; }
5219 if ${ac_cv_path_PRINTF+:} false; then :
5220   $as_echo_n "(cached) " >&6
5221 else
5222   case $PRINTF in
5223   [\\/]* | ?:[\\/]*)
5224   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5225   ;;
5226   *)
5227   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5228 for as_dir in $PATH
5229 do
5230   IFS=$as_save_IFS
5231   test -z "$as_dir" && as_dir=.
5232     for ac_exec_ext in '' $ac_executable_extensions; do
5233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5234     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5236     break 2
5237   fi
5238 done
5239   done
5240 IFS=$as_save_IFS
5241 
5242   ;;
5243 esac
5244 fi
5245 PRINTF=$ac_cv_path_PRINTF
5246 if test -n "$PRINTF"; then
5247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5248 $as_echo "$PRINTF" >&6; }
5249 else
5250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5251 $as_echo "no" >&6; }
5252 fi
5253 
5254 
5255   test -n "$PRINTF" && break
5256 done
5257 
5258 
5259   if test "x$PRINTF" = x; then
5260     if test "xprintf" = x; then
5261       PROG_NAME=printf
5262     else
5263       PROG_NAME=printf
5264     fi
5265     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5266 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5267     as_fn_error $? "Cannot continue" "$LINENO" 5
5268   fi
5269 
5270 
5271 
5272   for ac_prog in rm
5273 do
5274   # Extract the first word of "$ac_prog", so it can be a program name with args.
5275 set dummy $ac_prog; ac_word=$2
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277 $as_echo_n "checking for $ac_word... " >&6; }
5278 if ${ac_cv_path_RM+:} false; then :
5279   $as_echo_n "(cached) " >&6
5280 else
5281   case $RM in
5282   [\\/]* | ?:[\\/]*)
5283   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5284   ;;
5285   *)
5286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287 for as_dir in $PATH
5288 do
5289   IFS=$as_save_IFS
5290   test -z "$as_dir" && as_dir=.
5291     for ac_exec_ext in '' $ac_executable_extensions; do
5292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5293     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295     break 2
5296   fi
5297 done
5298   done
5299 IFS=$as_save_IFS
5300 
5301   ;;
5302 esac
5303 fi
5304 RM=$ac_cv_path_RM
5305 if test -n "$RM"; then
5306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5307 $as_echo "$RM" >&6; }
5308 else
5309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310 $as_echo "no" >&6; }
5311 fi
5312 
5313 
5314   test -n "$RM" && break
5315 done
5316 
5317 
5318   if test "x$RM" = x; then
5319     if test "xrm" = x; then
5320       PROG_NAME=rm
5321     else
5322       PROG_NAME=rm
5323     fi
5324     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5325 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5326     as_fn_error $? "Cannot continue" "$LINENO" 5
5327   fi
5328 
5329 
5330 
5331   for ac_prog in sh
5332 do
5333   # Extract the first word of "$ac_prog", so it can be a program name with args.
5334 set dummy $ac_prog; ac_word=$2
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5336 $as_echo_n "checking for $ac_word... " >&6; }
5337 if ${ac_cv_path_SH+:} false; then :
5338   $as_echo_n "(cached) " >&6
5339 else
5340   case $SH in
5341   [\\/]* | ?:[\\/]*)
5342   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5343   ;;
5344   *)
5345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5346 for as_dir in $PATH
5347 do
5348   IFS=$as_save_IFS
5349   test -z "$as_dir" && as_dir=.
5350     for ac_exec_ext in '' $ac_executable_extensions; do
5351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5352     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5354     break 2
5355   fi
5356 done
5357   done
5358 IFS=$as_save_IFS
5359 
5360   ;;
5361 esac
5362 fi
5363 SH=$ac_cv_path_SH
5364 if test -n "$SH"; then
5365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5366 $as_echo "$SH" >&6; }
5367 else
5368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5369 $as_echo "no" >&6; }
5370 fi
5371 
5372 
5373   test -n "$SH" && break
5374 done
5375 
5376 
5377   if test "x$SH" = x; then
5378     if test "xsh" = x; then
5379       PROG_NAME=sh
5380     else
5381       PROG_NAME=sh
5382     fi
5383     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5384 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5385     as_fn_error $? "Cannot continue" "$LINENO" 5
5386   fi
5387 
5388 
5389 
5390   for ac_prog in sort
5391 do
5392   # Extract the first word of "$ac_prog", so it can be a program name with args.
5393 set dummy $ac_prog; ac_word=$2
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395 $as_echo_n "checking for $ac_word... " >&6; }
5396 if ${ac_cv_path_SORT+:} false; then :
5397   $as_echo_n "(cached) " >&6
5398 else
5399   case $SORT in
5400   [\\/]* | ?:[\\/]*)
5401   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5402   ;;
5403   *)
5404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405 for as_dir in $PATH
5406 do
5407   IFS=$as_save_IFS
5408   test -z "$as_dir" && as_dir=.
5409     for ac_exec_ext in '' $ac_executable_extensions; do
5410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413     break 2
5414   fi
5415 done
5416   done
5417 IFS=$as_save_IFS
5418 
5419   ;;
5420 esac
5421 fi
5422 SORT=$ac_cv_path_SORT
5423 if test -n "$SORT"; then
5424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5425 $as_echo "$SORT" >&6; }
5426 else
5427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428 $as_echo "no" >&6; }
5429 fi
5430 
5431 
5432   test -n "$SORT" && break
5433 done
5434 
5435 
5436   if test "x$SORT" = x; then
5437     if test "xsort" = x; then
5438       PROG_NAME=sort
5439     else
5440       PROG_NAME=sort
5441     fi
5442     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5443 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5444     as_fn_error $? "Cannot continue" "$LINENO" 5
5445   fi
5446 
5447 
5448 
5449   for ac_prog in tail
5450 do
5451   # Extract the first word of "$ac_prog", so it can be a program name with args.
5452 set dummy $ac_prog; ac_word=$2
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454 $as_echo_n "checking for $ac_word... " >&6; }
5455 if ${ac_cv_path_TAIL+:} false; then :
5456   $as_echo_n "(cached) " >&6
5457 else
5458   case $TAIL in
5459   [\\/]* | ?:[\\/]*)
5460   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5461   ;;
5462   *)
5463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464 for as_dir in $PATH
5465 do
5466   IFS=$as_save_IFS
5467   test -z "$as_dir" && as_dir=.
5468     for ac_exec_ext in '' $ac_executable_extensions; do
5469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5470     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472     break 2
5473   fi
5474 done
5475   done
5476 IFS=$as_save_IFS
5477 
5478   ;;
5479 esac
5480 fi
5481 TAIL=$ac_cv_path_TAIL
5482 if test -n "$TAIL"; then
5483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5484 $as_echo "$TAIL" >&6; }
5485 else
5486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487 $as_echo "no" >&6; }
5488 fi
5489 
5490 
5491   test -n "$TAIL" && break
5492 done
5493 
5494 
5495   if test "x$TAIL" = x; then
5496     if test "xtail" = x; then
5497       PROG_NAME=tail
5498     else
5499       PROG_NAME=tail
5500     fi
5501     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5502 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5503     as_fn_error $? "Cannot continue" "$LINENO" 5
5504   fi
5505 
5506 
5507 
5508   for ac_prog in tar
5509 do
5510   # Extract the first word of "$ac_prog", so it can be a program name with args.
5511 set dummy $ac_prog; ac_word=$2
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513 $as_echo_n "checking for $ac_word... " >&6; }
5514 if ${ac_cv_path_TAR+:} false; then :
5515   $as_echo_n "(cached) " >&6
5516 else
5517   case $TAR in
5518   [\\/]* | ?:[\\/]*)
5519   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5520   ;;
5521   *)
5522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523 for as_dir in $PATH
5524 do
5525   IFS=$as_save_IFS
5526   test -z "$as_dir" && as_dir=.
5527     for ac_exec_ext in '' $ac_executable_extensions; do
5528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5529     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531     break 2
5532   fi
5533 done
5534   done
5535 IFS=$as_save_IFS
5536 
5537   ;;
5538 esac
5539 fi
5540 TAR=$ac_cv_path_TAR
5541 if test -n "$TAR"; then
5542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5543 $as_echo "$TAR" >&6; }
5544 else
5545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546 $as_echo "no" >&6; }
5547 fi
5548 
5549 
5550   test -n "$TAR" && break
5551 done
5552 
5553 
5554   if test "x$TAR" = x; then
5555     if test "xtar" = x; then
5556       PROG_NAME=tar
5557     else
5558       PROG_NAME=tar
5559     fi
5560     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5561 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5562     as_fn_error $? "Cannot continue" "$LINENO" 5
5563   fi
5564 
5565 
5566 
5567   for ac_prog in tee
5568 do
5569   # Extract the first word of "$ac_prog", so it can be a program name with args.
5570 set dummy $ac_prog; ac_word=$2
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5572 $as_echo_n "checking for $ac_word... " >&6; }
5573 if ${ac_cv_path_TEE+:} false; then :
5574   $as_echo_n "(cached) " >&6
5575 else
5576   case $TEE in
5577   [\\/]* | ?:[\\/]*)
5578   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5579   ;;
5580   *)
5581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5582 for as_dir in $PATH
5583 do
5584   IFS=$as_save_IFS
5585   test -z "$as_dir" && as_dir=.
5586     for ac_exec_ext in '' $ac_executable_extensions; do
5587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5588     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5590     break 2
5591   fi
5592 done
5593   done
5594 IFS=$as_save_IFS
5595 
5596   ;;
5597 esac
5598 fi
5599 TEE=$ac_cv_path_TEE
5600 if test -n "$TEE"; then
5601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5602 $as_echo "$TEE" >&6; }
5603 else
5604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5605 $as_echo "no" >&6; }
5606 fi
5607 
5608 
5609   test -n "$TEE" && break
5610 done
5611 
5612 
5613   if test "x$TEE" = x; then
5614     if test "xtee" = x; then
5615       PROG_NAME=tee
5616     else
5617       PROG_NAME=tee
5618     fi
5619     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5620 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5621     as_fn_error $? "Cannot continue" "$LINENO" 5
5622   fi
5623 
5624 
5625 
5626   for ac_prog in touch
5627 do
5628   # Extract the first word of "$ac_prog", so it can be a program name with args.
5629 set dummy $ac_prog; ac_word=$2
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5631 $as_echo_n "checking for $ac_word... " >&6; }
5632 if ${ac_cv_path_TOUCH+:} false; then :
5633   $as_echo_n "(cached) " >&6
5634 else
5635   case $TOUCH in
5636   [\\/]* | ?:[\\/]*)
5637   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5638   ;;
5639   *)
5640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641 for as_dir in $PATH
5642 do
5643   IFS=$as_save_IFS
5644   test -z "$as_dir" && as_dir=.
5645     for ac_exec_ext in '' $ac_executable_extensions; do
5646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5647     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5649     break 2
5650   fi
5651 done
5652   done
5653 IFS=$as_save_IFS
5654 
5655   ;;
5656 esac
5657 fi
5658 TOUCH=$ac_cv_path_TOUCH
5659 if test -n "$TOUCH"; then
5660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5661 $as_echo "$TOUCH" >&6; }
5662 else
5663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5664 $as_echo "no" >&6; }
5665 fi
5666 
5667 
5668   test -n "$TOUCH" && break
5669 done
5670 
5671 
5672   if test "x$TOUCH" = x; then
5673     if test "xtouch" = x; then
5674       PROG_NAME=touch
5675     else
5676       PROG_NAME=touch
5677     fi
5678     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5679 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5680     as_fn_error $? "Cannot continue" "$LINENO" 5
5681   fi
5682 
5683 
5684 
5685   for ac_prog in tr
5686 do
5687   # Extract the first word of "$ac_prog", so it can be a program name with args.
5688 set dummy $ac_prog; ac_word=$2
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5690 $as_echo_n "checking for $ac_word... " >&6; }
5691 if ${ac_cv_path_TR+:} false; then :
5692   $as_echo_n "(cached) " >&6
5693 else
5694   case $TR in
5695   [\\/]* | ?:[\\/]*)
5696   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5697   ;;
5698   *)
5699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5700 for as_dir in $PATH
5701 do
5702   IFS=$as_save_IFS
5703   test -z "$as_dir" && as_dir=.
5704     for ac_exec_ext in '' $ac_executable_extensions; do
5705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5706     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5708     break 2
5709   fi
5710 done
5711   done
5712 IFS=$as_save_IFS
5713 
5714   ;;
5715 esac
5716 fi
5717 TR=$ac_cv_path_TR
5718 if test -n "$TR"; then
5719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5720 $as_echo "$TR" >&6; }
5721 else
5722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5723 $as_echo "no" >&6; }
5724 fi
5725 
5726 
5727   test -n "$TR" && break
5728 done
5729 
5730 
5731   if test "x$TR" = x; then
5732     if test "xtr" = x; then
5733       PROG_NAME=tr
5734     else
5735       PROG_NAME=tr
5736     fi
5737     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5738 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5739     as_fn_error $? "Cannot continue" "$LINENO" 5
5740   fi
5741 
5742 
5743 
5744   for ac_prog in uname
5745 do
5746   # Extract the first word of "$ac_prog", so it can be a program name with args.
5747 set dummy $ac_prog; ac_word=$2
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5749 $as_echo_n "checking for $ac_word... " >&6; }
5750 if ${ac_cv_path_UNAME+:} false; then :
5751   $as_echo_n "(cached) " >&6
5752 else
5753   case $UNAME in
5754   [\\/]* | ?:[\\/]*)
5755   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5756   ;;
5757   *)
5758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5759 for as_dir in $PATH
5760 do
5761   IFS=$as_save_IFS
5762   test -z "$as_dir" && as_dir=.
5763     for ac_exec_ext in '' $ac_executable_extensions; do
5764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5765     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5767     break 2
5768   fi
5769 done
5770   done
5771 IFS=$as_save_IFS
5772 
5773   ;;
5774 esac
5775 fi
5776 UNAME=$ac_cv_path_UNAME
5777 if test -n "$UNAME"; then
5778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5779 $as_echo "$UNAME" >&6; }
5780 else
5781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5782 $as_echo "no" >&6; }
5783 fi
5784 
5785 
5786   test -n "$UNAME" && break
5787 done
5788 
5789 
5790   if test "x$UNAME" = x; then
5791     if test "xuname" = x; then
5792       PROG_NAME=uname
5793     else
5794       PROG_NAME=uname
5795     fi
5796     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5797 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5798     as_fn_error $? "Cannot continue" "$LINENO" 5
5799   fi
5800 
5801 
5802 
5803   for ac_prog in uniq
5804 do
5805   # Extract the first word of "$ac_prog", so it can be a program name with args.
5806 set dummy $ac_prog; ac_word=$2
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5808 $as_echo_n "checking for $ac_word... " >&6; }
5809 if ${ac_cv_path_UNIQ+:} false; then :
5810   $as_echo_n "(cached) " >&6
5811 else
5812   case $UNIQ in
5813   [\\/]* | ?:[\\/]*)
5814   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5815   ;;
5816   *)
5817   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5818 for as_dir in $PATH
5819 do
5820   IFS=$as_save_IFS
5821   test -z "$as_dir" && as_dir=.
5822     for ac_exec_ext in '' $ac_executable_extensions; do
5823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5824     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5826     break 2
5827   fi
5828 done
5829   done
5830 IFS=$as_save_IFS
5831 
5832   ;;
5833 esac
5834 fi
5835 UNIQ=$ac_cv_path_UNIQ
5836 if test -n "$UNIQ"; then
5837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5838 $as_echo "$UNIQ" >&6; }
5839 else
5840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5841 $as_echo "no" >&6; }
5842 fi
5843 
5844 
5845   test -n "$UNIQ" && break
5846 done
5847 
5848 
5849   if test "x$UNIQ" = x; then
5850     if test "xuniq" = x; then
5851       PROG_NAME=uniq
5852     else
5853       PROG_NAME=uniq
5854     fi
5855     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5856 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5857     as_fn_error $? "Cannot continue" "$LINENO" 5
5858   fi
5859 
5860 
5861 
5862   for ac_prog in wc
5863 do
5864   # Extract the first word of "$ac_prog", so it can be a program name with args.
5865 set dummy $ac_prog; ac_word=$2
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5867 $as_echo_n "checking for $ac_word... " >&6; }
5868 if ${ac_cv_path_WC+:} false; then :
5869   $as_echo_n "(cached) " >&6
5870 else
5871   case $WC in
5872   [\\/]* | ?:[\\/]*)
5873   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5874   ;;
5875   *)
5876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5877 for as_dir in $PATH
5878 do
5879   IFS=$as_save_IFS
5880   test -z "$as_dir" && as_dir=.
5881     for ac_exec_ext in '' $ac_executable_extensions; do
5882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5883     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5885     break 2
5886   fi
5887 done
5888   done
5889 IFS=$as_save_IFS
5890 
5891   ;;
5892 esac
5893 fi
5894 WC=$ac_cv_path_WC
5895 if test -n "$WC"; then
5896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5897 $as_echo "$WC" >&6; }
5898 else
5899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900 $as_echo "no" >&6; }
5901 fi
5902 
5903 
5904   test -n "$WC" && break
5905 done
5906 
5907 
5908   if test "x$WC" = x; then
5909     if test "xwc" = x; then
5910       PROG_NAME=wc
5911     else
5912       PROG_NAME=wc
5913     fi
5914     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5915 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5916     as_fn_error $? "Cannot continue" "$LINENO" 5
5917   fi
5918 
5919 
5920 
5921   for ac_prog in which
5922 do
5923   # Extract the first word of "$ac_prog", so it can be a program name with args.
5924 set dummy $ac_prog; ac_word=$2
5925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5926 $as_echo_n "checking for $ac_word... " >&6; }
5927 if ${ac_cv_path_WHICH+:} false; then :
5928   $as_echo_n "(cached) " >&6
5929 else
5930   case $WHICH in
5931   [\\/]* | ?:[\\/]*)
5932   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5933   ;;
5934   *)
5935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5936 for as_dir in $PATH
5937 do
5938   IFS=$as_save_IFS
5939   test -z "$as_dir" && as_dir=.
5940     for ac_exec_ext in '' $ac_executable_extensions; do
5941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5942     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5944     break 2
5945   fi
5946 done
5947   done
5948 IFS=$as_save_IFS
5949 
5950   ;;
5951 esac
5952 fi
5953 WHICH=$ac_cv_path_WHICH
5954 if test -n "$WHICH"; then
5955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5956 $as_echo "$WHICH" >&6; }
5957 else
5958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5959 $as_echo "no" >&6; }
5960 fi
5961 
5962 
5963   test -n "$WHICH" && break
5964 done
5965 
5966 
5967   if test "x$WHICH" = x; then
5968     if test "xwhich" = x; then
5969       PROG_NAME=which
5970     else
5971       PROG_NAME=which
5972     fi
5973     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5974 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5975     as_fn_error $? "Cannot continue" "$LINENO" 5
5976   fi
5977 
5978 
5979 
5980   for ac_prog in xargs
5981 do
5982   # Extract the first word of "$ac_prog", so it can be a program name with args.
5983 set dummy $ac_prog; ac_word=$2
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985 $as_echo_n "checking for $ac_word... " >&6; }
5986 if ${ac_cv_path_XARGS+:} false; then :
5987   $as_echo_n "(cached) " >&6
5988 else
5989   case $XARGS in
5990   [\\/]* | ?:[\\/]*)
5991   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5992   ;;
5993   *)
5994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995 for as_dir in $PATH
5996 do
5997   IFS=$as_save_IFS
5998   test -z "$as_dir" && as_dir=.
5999     for ac_exec_ext in '' $ac_executable_extensions; do
6000   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6001     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
6002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003     break 2
6004   fi
6005 done
6006   done
6007 IFS=$as_save_IFS
6008 
6009   ;;
6010 esac
6011 fi
6012 XARGS=$ac_cv_path_XARGS
6013 if test -n "$XARGS"; then
6014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6015 $as_echo "$XARGS" >&6; }
6016 else
6017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018 $as_echo "no" >&6; }
6019 fi
6020 
6021 
6022   test -n "$XARGS" && break
6023 done
6024 
6025 
6026   if test "x$XARGS" = x; then
6027     if test "xxargs" = x; then
6028       PROG_NAME=xargs
6029     else
6030       PROG_NAME=xargs
6031     fi
6032     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6033 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6034     as_fn_error $? "Cannot continue" "$LINENO" 5
6035   fi
6036 
6037 
6038 
6039   # Then required tools that require some special treatment.
6040   for ac_prog in gawk mawk nawk awk
6041 do
6042   # Extract the first word of "$ac_prog", so it can be a program name with args.
6043 set dummy $ac_prog; ac_word=$2
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6045 $as_echo_n "checking for $ac_word... " >&6; }
6046 if ${ac_cv_prog_AWK+:} false; then :
6047   $as_echo_n "(cached) " >&6
6048 else
6049   if test -n "$AWK"; then
6050   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6051 else
6052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053 for as_dir in $PATH
6054 do
6055   IFS=$as_save_IFS
6056   test -z "$as_dir" && as_dir=.
6057     for ac_exec_ext in '' $ac_executable_extensions; do
6058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6059     ac_cv_prog_AWK="$ac_prog"
6060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6061     break 2
6062   fi
6063 done
6064   done
6065 IFS=$as_save_IFS
6066 
6067 fi
6068 fi
6069 AWK=$ac_cv_prog_AWK
6070 if test -n "$AWK"; then
6071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6072 $as_echo "$AWK" >&6; }
6073 else
6074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6075 $as_echo "no" >&6; }
6076 fi
6077 
6078 
6079   test -n "$AWK" && break
6080 done
6081 
6082 
6083   if test "x$AWK" = x; then
6084     if test "x" = x; then
6085       PROG_NAME=awk
6086     else
6087       PROG_NAME=
6088     fi
6089     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6090 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6091     as_fn_error $? "Cannot continue" "$LINENO" 5
6092   fi
6093 
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6095 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6096 if ${ac_cv_path_GREP+:} false; then :
6097   $as_echo_n "(cached) " >&6
6098 else
6099   if test -z "$GREP"; then
6100   ac_path_GREP_found=false
6101   # Loop through the user's path and test for each of PROGNAME-LIST
6102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6103 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6104 do
6105   IFS=$as_save_IFS
6106   test -z "$as_dir" && as_dir=.
6107     for ac_prog in grep ggrep; do
6108     for ac_exec_ext in '' $ac_executable_extensions; do
6109       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6110       as_fn_executable_p "$ac_path_GREP" || continue
6111 # Check for GNU ac_path_GREP and select it if it is found.
6112   # Check for GNU $ac_path_GREP
6113 case `"$ac_path_GREP" --version 2>&1` in
6114 *GNU*)
6115   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6116 *)
6117   ac_count=0
6118   $as_echo_n 0123456789 >"conftest.in"
6119   while :
6120   do
6121     cat "conftest.in" "conftest.in" >"conftest.tmp"
6122     mv "conftest.tmp" "conftest.in"
6123     cp "conftest.in" "conftest.nl"
6124     $as_echo 'GREP' >> "conftest.nl"
6125     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6126     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6127     as_fn_arith $ac_count + 1 && ac_count=$as_val
6128     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6129       # Best one so far, save it but keep looking for a better one
6130       ac_cv_path_GREP="$ac_path_GREP"
6131       ac_path_GREP_max=$ac_count
6132     fi
6133     # 10*(2^10) chars as input seems more than enough
6134     test $ac_count -gt 10 && break
6135   done
6136   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6137 esac
6138 
6139       $ac_path_GREP_found && break 3
6140     done
6141   done
6142   done
6143 IFS=$as_save_IFS
6144   if test -z "$ac_cv_path_GREP"; then
6145     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6146   fi
6147 else
6148   ac_cv_path_GREP=$GREP
6149 fi
6150 
6151 fi
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6153 $as_echo "$ac_cv_path_GREP" >&6; }
6154  GREP="$ac_cv_path_GREP"
6155 
6156 
6157 
6158   if test "x$GREP" = x; then
6159     if test "x" = x; then
6160       PROG_NAME=grep
6161     else
6162       PROG_NAME=
6163     fi
6164     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6165 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6166     as_fn_error $? "Cannot continue" "$LINENO" 5
6167   fi
6168 
6169   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6170 $as_echo_n "checking for egrep... " >&6; }
6171 if ${ac_cv_path_EGREP+:} false; then :
6172   $as_echo_n "(cached) " >&6
6173 else
6174   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6175    then ac_cv_path_EGREP="$GREP -E"
6176    else
6177      if test -z "$EGREP"; then
6178   ac_path_EGREP_found=false
6179   # Loop through the user's path and test for each of PROGNAME-LIST
6180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6181 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6182 do
6183   IFS=$as_save_IFS
6184   test -z "$as_dir" && as_dir=.
6185     for ac_prog in egrep; do
6186     for ac_exec_ext in '' $ac_executable_extensions; do
6187       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6188       as_fn_executable_p "$ac_path_EGREP" || continue
6189 # Check for GNU ac_path_EGREP and select it if it is found.
6190   # Check for GNU $ac_path_EGREP
6191 case `"$ac_path_EGREP" --version 2>&1` in
6192 *GNU*)
6193   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6194 *)
6195   ac_count=0
6196   $as_echo_n 0123456789 >"conftest.in"
6197   while :
6198   do
6199     cat "conftest.in" "conftest.in" >"conftest.tmp"
6200     mv "conftest.tmp" "conftest.in"
6201     cp "conftest.in" "conftest.nl"
6202     $as_echo 'EGREP' >> "conftest.nl"
6203     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6204     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6205     as_fn_arith $ac_count + 1 && ac_count=$as_val
6206     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6207       # Best one so far, save it but keep looking for a better one
6208       ac_cv_path_EGREP="$ac_path_EGREP"
6209       ac_path_EGREP_max=$ac_count
6210     fi
6211     # 10*(2^10) chars as input seems more than enough
6212     test $ac_count -gt 10 && break
6213   done
6214   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6215 esac
6216 
6217       $ac_path_EGREP_found && break 3
6218     done
6219   done
6220   done
6221 IFS=$as_save_IFS
6222   if test -z "$ac_cv_path_EGREP"; then
6223     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6224   fi
6225 else
6226   ac_cv_path_EGREP=$EGREP
6227 fi
6228 
6229    fi
6230 fi
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6232 $as_echo "$ac_cv_path_EGREP" >&6; }
6233  EGREP="$ac_cv_path_EGREP"
6234 
6235 
6236 
6237   if test "x$EGREP" = x; then
6238     if test "x" = x; then
6239       PROG_NAME=egrep
6240     else
6241       PROG_NAME=
6242     fi
6243     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6244 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6245     as_fn_error $? "Cannot continue" "$LINENO" 5
6246   fi
6247 
6248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6249 $as_echo_n "checking for fgrep... " >&6; }
6250 if ${ac_cv_path_FGREP+:} false; then :
6251   $as_echo_n "(cached) " >&6
6252 else
6253   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6254    then ac_cv_path_FGREP="$GREP -F"
6255    else
6256      if test -z "$FGREP"; then
6257   ac_path_FGREP_found=false
6258   # Loop through the user's path and test for each of PROGNAME-LIST
6259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6261 do
6262   IFS=$as_save_IFS
6263   test -z "$as_dir" && as_dir=.
6264     for ac_prog in fgrep; do
6265     for ac_exec_ext in '' $ac_executable_extensions; do
6266       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6267       as_fn_executable_p "$ac_path_FGREP" || continue
6268 # Check for GNU ac_path_FGREP and select it if it is found.
6269   # Check for GNU $ac_path_FGREP
6270 case `"$ac_path_FGREP" --version 2>&1` in
6271 *GNU*)
6272   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6273 *)
6274   ac_count=0
6275   $as_echo_n 0123456789 >"conftest.in"
6276   while :
6277   do
6278     cat "conftest.in" "conftest.in" >"conftest.tmp"
6279     mv "conftest.tmp" "conftest.in"
6280     cp "conftest.in" "conftest.nl"
6281     $as_echo 'FGREP' >> "conftest.nl"
6282     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6283     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6284     as_fn_arith $ac_count + 1 && ac_count=$as_val
6285     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6286       # Best one so far, save it but keep looking for a better one
6287       ac_cv_path_FGREP="$ac_path_FGREP"
6288       ac_path_FGREP_max=$ac_count
6289     fi
6290     # 10*(2^10) chars as input seems more than enough
6291     test $ac_count -gt 10 && break
6292   done
6293   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6294 esac
6295 
6296       $ac_path_FGREP_found && break 3
6297     done
6298   done
6299   done
6300 IFS=$as_save_IFS
6301   if test -z "$ac_cv_path_FGREP"; then
6302     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6303   fi
6304 else
6305   ac_cv_path_FGREP=$FGREP
6306 fi
6307 
6308    fi
6309 fi
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6311 $as_echo "$ac_cv_path_FGREP" >&6; }
6312  FGREP="$ac_cv_path_FGREP"
6313 
6314 
6315 
6316   if test "x$FGREP" = x; then
6317     if test "x" = x; then
6318       PROG_NAME=fgrep
6319     else
6320       PROG_NAME=
6321     fi
6322     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6323 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6324     as_fn_error $? "Cannot continue" "$LINENO" 5
6325   fi
6326 
6327   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6328 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6329 if ${ac_cv_path_SED+:} false; then :
6330   $as_echo_n "(cached) " >&6
6331 else
6332             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6333      for ac_i in 1 2 3 4 5 6 7; do
6334        ac_script="$ac_script$as_nl$ac_script"
6335      done
6336      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6337      { ac_script=; unset ac_script;}
6338      if test -z "$SED"; then
6339   ac_path_SED_found=false
6340   # Loop through the user's path and test for each of PROGNAME-LIST
6341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6342 for as_dir in $PATH
6343 do
6344   IFS=$as_save_IFS
6345   test -z "$as_dir" && as_dir=.
6346     for ac_prog in sed gsed; do
6347     for ac_exec_ext in '' $ac_executable_extensions; do
6348       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6349       as_fn_executable_p "$ac_path_SED" || continue
6350 # Check for GNU ac_path_SED and select it if it is found.
6351   # Check for GNU $ac_path_SED
6352 case `"$ac_path_SED" --version 2>&1` in
6353 *GNU*)
6354   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6355 *)
6356   ac_count=0
6357   $as_echo_n 0123456789 >"conftest.in"
6358   while :
6359   do
6360     cat "conftest.in" "conftest.in" >"conftest.tmp"
6361     mv "conftest.tmp" "conftest.in"
6362     cp "conftest.in" "conftest.nl"
6363     $as_echo '' >> "conftest.nl"
6364     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6365     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6366     as_fn_arith $ac_count + 1 && ac_count=$as_val
6367     if test $ac_count -gt ${ac_path_SED_max-0}; then
6368       # Best one so far, save it but keep looking for a better one
6369       ac_cv_path_SED="$ac_path_SED"
6370       ac_path_SED_max=$ac_count
6371     fi
6372     # 10*(2^10) chars as input seems more than enough
6373     test $ac_count -gt 10 && break
6374   done
6375   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6376 esac
6377 
6378       $ac_path_SED_found && break 3
6379     done
6380   done
6381   done
6382 IFS=$as_save_IFS
6383   if test -z "$ac_cv_path_SED"; then
6384     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6385   fi
6386 else
6387   ac_cv_path_SED=$SED
6388 fi
6389 
6390 fi
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6392 $as_echo "$ac_cv_path_SED" >&6; }
6393  SED="$ac_cv_path_SED"
6394   rm -f conftest.sed
6395 
6396 
6397   if test "x$SED" = x; then
6398     if test "x" = x; then
6399       PROG_NAME=sed
6400     else
6401       PROG_NAME=
6402     fi
6403     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6404 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6405     as_fn_error $? "Cannot continue" "$LINENO" 5
6406   fi
6407 
6408 
6409   for ac_prog in nawk gawk awk
6410 do
6411   # Extract the first word of "$ac_prog", so it can be a program name with args.
6412 set dummy $ac_prog; ac_word=$2
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6414 $as_echo_n "checking for $ac_word... " >&6; }
6415 if ${ac_cv_path_NAWK+:} false; then :
6416   $as_echo_n "(cached) " >&6
6417 else
6418   case $NAWK in
6419   [\\/]* | ?:[\\/]*)
6420   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6421   ;;
6422   *)
6423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424 for as_dir in $PATH
6425 do
6426   IFS=$as_save_IFS
6427   test -z "$as_dir" && as_dir=.
6428     for ac_exec_ext in '' $ac_executable_extensions; do
6429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6430     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6432     break 2
6433   fi
6434 done
6435   done
6436 IFS=$as_save_IFS
6437 
6438   ;;
6439 esac
6440 fi
6441 NAWK=$ac_cv_path_NAWK
6442 if test -n "$NAWK"; then
6443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6444 $as_echo "$NAWK" >&6; }
6445 else
6446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447 $as_echo "no" >&6; }
6448 fi
6449 
6450 
6451   test -n "$NAWK" && break
6452 done
6453 
6454 
6455   if test "x$NAWK" = x; then
6456     if test "x" = x; then
6457       PROG_NAME=nawk
6458     else
6459       PROG_NAME=
6460     fi
6461     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6462 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6463     as_fn_error $? "Cannot continue" "$LINENO" 5
6464   fi
6465 
6466 
6467   # Always force rm.
6468   RM="$RM -f"
6469 
6470   # pwd behaves differently on various platforms and some don't support the -L flag.
6471   # Always use the bash builtin pwd to get uniform behavior.
6472   THEPWDCMD=pwd
6473 
6474   # These are not required on all platforms
6475   # Extract the first word of "cygpath", so it can be a program name with args.
6476 set dummy cygpath; ac_word=$2
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478 $as_echo_n "checking for $ac_word... " >&6; }
6479 if ${ac_cv_path_CYGPATH+:} false; then :
6480   $as_echo_n "(cached) " >&6
6481 else
6482   case $CYGPATH in
6483   [\\/]* | ?:[\\/]*)
6484   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6485   ;;
6486   *)
6487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488 for as_dir in $PATH
6489 do
6490   IFS=$as_save_IFS
6491   test -z "$as_dir" && as_dir=.
6492     for ac_exec_ext in '' $ac_executable_extensions; do
6493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496     break 2
6497   fi
6498 done
6499   done
6500 IFS=$as_save_IFS
6501 
6502   ;;
6503 esac
6504 fi
6505 CYGPATH=$ac_cv_path_CYGPATH
6506 if test -n "$CYGPATH"; then
6507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6508 $as_echo "$CYGPATH" >&6; }
6509 else
6510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511 $as_echo "no" >&6; }
6512 fi
6513 
6514 
6515   # Extract the first word of "readlink", so it can be a program name with args.
6516 set dummy readlink; ac_word=$2
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518 $as_echo_n "checking for $ac_word... " >&6; }
6519 if ${ac_cv_path_READLINK+:} false; then :
6520   $as_echo_n "(cached) " >&6
6521 else
6522   case $READLINK in
6523   [\\/]* | ?:[\\/]*)
6524   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6525   ;;
6526   *)
6527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528 for as_dir in $PATH
6529 do
6530   IFS=$as_save_IFS
6531   test -z "$as_dir" && as_dir=.
6532     for ac_exec_ext in '' $ac_executable_extensions; do
6533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6534     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536     break 2
6537   fi
6538 done
6539   done
6540 IFS=$as_save_IFS
6541 
6542   ;;
6543 esac
6544 fi
6545 READLINK=$ac_cv_path_READLINK
6546 if test -n "$READLINK"; then
6547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6548 $as_echo "$READLINK" >&6; }
6549 else
6550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551 $as_echo "no" >&6; }
6552 fi
6553 
6554 
6555   # Extract the first word of "df", so it can be a program name with args.
6556 set dummy df; ac_word=$2
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558 $as_echo_n "checking for $ac_word... " >&6; }
6559 if ${ac_cv_path_DF+:} false; then :
6560   $as_echo_n "(cached) " >&6
6561 else
6562   case $DF in
6563   [\\/]* | ?:[\\/]*)
6564   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6565   ;;
6566   *)
6567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568 for as_dir in $PATH
6569 do
6570   IFS=$as_save_IFS
6571   test -z "$as_dir" && as_dir=.
6572     for ac_exec_ext in '' $ac_executable_extensions; do
6573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576     break 2
6577   fi
6578 done
6579   done
6580 IFS=$as_save_IFS
6581 
6582   ;;
6583 esac
6584 fi
6585 DF=$ac_cv_path_DF
6586 if test -n "$DF"; then
6587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6588 $as_echo "$DF" >&6; }
6589 else
6590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591 $as_echo "no" >&6; }
6592 fi
6593 
6594 
6595   # Extract the first word of "SetFile", so it can be a program name with args.
6596 set dummy SetFile; ac_word=$2
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6598 $as_echo_n "checking for $ac_word... " >&6; }
6599 if ${ac_cv_path_SETFILE+:} false; then :
6600   $as_echo_n "(cached) " >&6
6601 else
6602   case $SETFILE in
6603   [\\/]* | ?:[\\/]*)
6604   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6605   ;;
6606   *)
6607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6608 for as_dir in $PATH
6609 do
6610   IFS=$as_save_IFS
6611   test -z "$as_dir" && as_dir=.
6612     for ac_exec_ext in '' $ac_executable_extensions; do
6613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6614     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6616     break 2
6617   fi
6618 done
6619   done
6620 IFS=$as_save_IFS
6621 
6622   ;;
6623 esac
6624 fi
6625 SETFILE=$ac_cv_path_SETFILE
6626 if test -n "$SETFILE"; then
6627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6628 $as_echo "$SETFILE" >&6; }
6629 else
6630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6631 $as_echo "no" >&6; }
6632 fi
6633 
6634 
6635 
6636 
6637 # Now we can determine OpenJDK build and target platforms. This is required to
6638 # have early on.
6639 # Make sure we can run config.sub.
6640 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6641   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6642 
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6644 $as_echo_n "checking build system type... " >&6; }
6645 if ${ac_cv_build+:} false; then :
6646   $as_echo_n "(cached) " >&6
6647 else
6648   ac_build_alias=$build_alias
6649 test "x$ac_build_alias" = x &&
6650   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6651 test "x$ac_build_alias" = x &&
6652   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6653 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6654   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6655 
6656 fi
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6658 $as_echo "$ac_cv_build" >&6; }
6659 case $ac_cv_build in
6660 *-*-*) ;;
6661 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6662 esac
6663 build=$ac_cv_build
6664 ac_save_IFS=$IFS; IFS='-'
6665 set x $ac_cv_build
6666 shift
6667 build_cpu=$1
6668 build_vendor=$2
6669 shift; shift
6670 # Remember, the first character of IFS is used to create $*,
6671 # except with old shells:
6672 build_os=$*
6673 IFS=$ac_save_IFS
6674 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6675 
6676 
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6678 $as_echo_n "checking host system type... " >&6; }
6679 if ${ac_cv_host+:} false; then :
6680   $as_echo_n "(cached) " >&6
6681 else
6682   if test "x$host_alias" = x; then
6683   ac_cv_host=$ac_cv_build
6684 else
6685   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6686     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6687 fi
6688 
6689 fi
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6691 $as_echo "$ac_cv_host" >&6; }
6692 case $ac_cv_host in
6693 *-*-*) ;;
6694 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6695 esac
6696 host=$ac_cv_host
6697 ac_save_IFS=$IFS; IFS='-'
6698 set x $ac_cv_host
6699 shift
6700 host_cpu=$1
6701 host_vendor=$2
6702 shift; shift
6703 # Remember, the first character of IFS is used to create $*,
6704 # except with old shells:
6705 host_os=$*
6706 IFS=$ac_save_IFS
6707 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6708 
6709 
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6711 $as_echo_n "checking target system type... " >&6; }
6712 if ${ac_cv_target+:} false; then :
6713   $as_echo_n "(cached) " >&6
6714 else
6715   if test "x$target_alias" = x; then
6716   ac_cv_target=$ac_cv_host
6717 else
6718   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6719     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6720 fi
6721 
6722 fi
6723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6724 $as_echo "$ac_cv_target" >&6; }
6725 case $ac_cv_target in
6726 *-*-*) ;;
6727 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6728 esac
6729 target=$ac_cv_target
6730 ac_save_IFS=$IFS; IFS='-'
6731 set x $ac_cv_target
6732 shift
6733 target_cpu=$1
6734 target_vendor=$2
6735 shift; shift
6736 # Remember, the first character of IFS is used to create $*,
6737 # except with old shells:
6738 target_os=$*
6739 IFS=$ac_save_IFS
6740 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6741 
6742 
6743 # The aliases save the names the user supplied, while $host etc.
6744 # will get canonicalized.
6745 test -n "$target_alias" &&
6746   test "$program_prefix$program_suffix$program_transform_name" = \
6747     NONENONEs,x,x, &&
6748   program_prefix=${target_alias}-
6749 
6750   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6751   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6752   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6753   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6754   # to use the configure naming style.
6755 
6756 
6757 
6758 
6759 
6760   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6761   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6762   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6763   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6764   OPENJDK_TARGET_AUTOCONF_NAME="$host"
6765   OPENJDK_BUILD_AUTOCONF_NAME="$build"
6766 
6767 
6768 
6769   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6770 
6771   case "$build_os" in
6772     *linux*)
6773       VAR_OS=linux
6774       VAR_OS_API=posix
6775       VAR_OS_ENV=linux
6776       ;;
6777     *solaris*)
6778       VAR_OS=solaris
6779       VAR_OS_API=posix
6780       VAR_OS_ENV=solaris
6781       ;;
6782     *darwin*)
6783       VAR_OS=macosx
6784       VAR_OS_API=posix
6785       VAR_OS_ENV=macosx
6786       ;;
6787     *bsd*)
6788       VAR_OS=bsd
6789       VAR_OS_API=posix
6790       VAR_OS_ENV=bsd
6791       ;;
6792     *cygwin*)
6793       VAR_OS=windows
6794       VAR_OS_API=winapi
6795       VAR_OS_ENV=windows.cygwin
6796       ;;
6797     *mingw*)
6798       VAR_OS=windows
6799       VAR_OS_API=winapi
6800       VAR_OS_ENV=windows.msys
6801       ;;
6802     *aix*)
6803       VAR_OS=aix
6804       VAR_OS_API=posix
6805       VAR_OS_ENV=aix
6806       ;;
6807     *)
6808       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6809       ;;
6810   esac
6811 
6812 
6813   # First argument is the cpu name from the trip/quad
6814   case "$build_cpu" in
6815     x86_64)
6816       VAR_CPU=x86_64
6817       VAR_CPU_ARCH=x86
6818       VAR_CPU_BITS=64
6819       VAR_CPU_ENDIAN=little
6820       ;;
6821     i?86)
6822       VAR_CPU=x86
6823       VAR_CPU_ARCH=x86
6824       VAR_CPU_BITS=32
6825       VAR_CPU_ENDIAN=little
6826       ;;
6827     arm*)
6828       VAR_CPU=arm
6829       VAR_CPU_ARCH=arm
6830       VAR_CPU_BITS=32
6831       VAR_CPU_ENDIAN=little
6832       ;;
6833     aarch64)
6834       VAR_CPU=aarch64
6835       VAR_CPU_ARCH=aarch64
6836       VAR_CPU_BITS=64
6837       VAR_CPU_ENDIAN=little
6838       ;;
6839     powerpc)
6840       VAR_CPU=ppc
6841       VAR_CPU_ARCH=ppc
6842       VAR_CPU_BITS=32
6843       VAR_CPU_ENDIAN=big
6844       ;;
6845     powerpc64)
6846       VAR_CPU=ppc64
6847       VAR_CPU_ARCH=ppc
6848       VAR_CPU_BITS=64
6849       VAR_CPU_ENDIAN=big
6850       ;;
6851     powerpc64le)
6852       VAR_CPU=ppc64
6853       VAR_CPU_ARCH=ppc
6854       VAR_CPU_BITS=64
6855       VAR_CPU_ENDIAN=little
6856       ;;
6857     s390)
6858       VAR_CPU=s390
6859       VAR_CPU_ARCH=s390
6860       VAR_CPU_BITS=32
6861       VAR_CPU_ENDIAN=big
6862       ;;
6863     s390x)
6864       VAR_CPU=s390x
6865       VAR_CPU_ARCH=s390
6866       VAR_CPU_BITS=64
6867       VAR_CPU_ENDIAN=big
6868       ;;
6869     sparc)
6870       VAR_CPU=sparc
6871       VAR_CPU_ARCH=sparc
6872       VAR_CPU_BITS=32
6873       VAR_CPU_ENDIAN=big
6874       ;;
6875     sparcv9|sparc64)
6876       VAR_CPU=sparcv9
6877       VAR_CPU_ARCH=sparc
6878       VAR_CPU_BITS=64
6879       VAR_CPU_ENDIAN=big
6880       ;;
6881     *)
6882       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6883       ;;
6884   esac
6885 
6886   # ..and setup our own variables. (Do this explicitely to facilitate searching)
6887   OPENJDK_BUILD_OS="$VAR_OS"
6888   OPENJDK_BUILD_OS_API="$VAR_OS_API"
6889   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6890   OPENJDK_BUILD_CPU="$VAR_CPU"
6891   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6892   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6893   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6894 
6895 
6896 
6897 
6898 
6899 
6900 
6901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6902 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6904 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6905 
6906   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6907 
6908   case "$host_os" in
6909     *linux*)
6910       VAR_OS=linux
6911       VAR_OS_API=posix
6912       VAR_OS_ENV=linux
6913       ;;
6914     *solaris*)
6915       VAR_OS=solaris
6916       VAR_OS_API=posix
6917       VAR_OS_ENV=solaris
6918       ;;
6919     *darwin*)
6920       VAR_OS=macosx
6921       VAR_OS_API=posix
6922       VAR_OS_ENV=macosx
6923       ;;
6924     *bsd*)
6925       VAR_OS=bsd
6926       VAR_OS_API=posix
6927       VAR_OS_ENV=bsd
6928       ;;
6929     *cygwin*)
6930       VAR_OS=windows
6931       VAR_OS_API=winapi
6932       VAR_OS_ENV=windows.cygwin
6933       ;;
6934     *mingw*)
6935       VAR_OS=windows
6936       VAR_OS_API=winapi
6937       VAR_OS_ENV=windows.msys
6938       ;;
6939     *aix*)
6940       VAR_OS=aix
6941       VAR_OS_API=posix
6942       VAR_OS_ENV=aix
6943       ;;
6944     *)
6945       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6946       ;;
6947   esac
6948 
6949 
6950   # First argument is the cpu name from the trip/quad
6951   case "$host_cpu" in
6952     x86_64)
6953       VAR_CPU=x86_64
6954       VAR_CPU_ARCH=x86
6955       VAR_CPU_BITS=64
6956       VAR_CPU_ENDIAN=little
6957       ;;
6958     i?86)
6959       VAR_CPU=x86
6960       VAR_CPU_ARCH=x86
6961       VAR_CPU_BITS=32
6962       VAR_CPU_ENDIAN=little
6963       ;;
6964     arm*)
6965       VAR_CPU=arm
6966       VAR_CPU_ARCH=arm
6967       VAR_CPU_BITS=32
6968       VAR_CPU_ENDIAN=little
6969       ;;
6970     aarch64)
6971       VAR_CPU=aarch64
6972       VAR_CPU_ARCH=aarch64
6973       VAR_CPU_BITS=64
6974       VAR_CPU_ENDIAN=little
6975       ;;
6976     powerpc)
6977       VAR_CPU=ppc
6978       VAR_CPU_ARCH=ppc
6979       VAR_CPU_BITS=32
6980       VAR_CPU_ENDIAN=big
6981       ;;
6982     powerpc64)
6983       VAR_CPU=ppc64
6984       VAR_CPU_ARCH=ppc
6985       VAR_CPU_BITS=64
6986       VAR_CPU_ENDIAN=big
6987       ;;
6988     powerpc64le)
6989       VAR_CPU=ppc64
6990       VAR_CPU_ARCH=ppc
6991       VAR_CPU_BITS=64
6992       VAR_CPU_ENDIAN=little
6993       ;;
6994     s390)
6995       VAR_CPU=s390
6996       VAR_CPU_ARCH=s390
6997       VAR_CPU_BITS=32
6998       VAR_CPU_ENDIAN=big
6999       ;;
7000     s390x)
7001       VAR_CPU=s390x
7002       VAR_CPU_ARCH=s390
7003       VAR_CPU_BITS=64
7004       VAR_CPU_ENDIAN=big
7005       ;;
7006     sparc)
7007       VAR_CPU=sparc
7008       VAR_CPU_ARCH=sparc
7009       VAR_CPU_BITS=32
7010       VAR_CPU_ENDIAN=big
7011       ;;
7012     sparcv9|sparc64)
7013       VAR_CPU=sparcv9
7014       VAR_CPU_ARCH=sparc
7015       VAR_CPU_BITS=64
7016       VAR_CPU_ENDIAN=big
7017       ;;
7018     *)
7019       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
7020       ;;
7021   esac
7022 
7023   # ... and setup our own variables. (Do this explicitely to facilitate searching)
7024   OPENJDK_TARGET_OS="$VAR_OS"
7025   OPENJDK_TARGET_OS_API="$VAR_OS_API"
7026   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
7027   OPENJDK_TARGET_CPU="$VAR_CPU"
7028   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
7029   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
7030   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
7031 
7032 
7033 
7034 
7035 
7036 
7037 
7038   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7039 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
7040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7041 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7042 
7043 
7044 
7045 # Check whether --with-target-bits was given.
7046 if test "${with_target_bits+set}" = set; then :
7047   withval=$with_target_bits;
7048 fi
7049 
7050 
7051   # We have three types of compiles:
7052   # native  == normal compilation, target system == build system
7053   # cross   == traditional cross compilation, target system != build system; special toolchain needed
7054   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7055   #
7056   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7057     # We're doing a proper cross-compilation
7058     COMPILE_TYPE="cross"
7059   else
7060     COMPILE_TYPE="native"
7061   fi
7062 
7063   if test "x$with_target_bits" != x; then
7064     if test "x$COMPILE_TYPE" = "xcross"; then
7065       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7066     fi
7067 
7068     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7069       # A reduced build is requested
7070       COMPILE_TYPE="reduced"
7071       OPENJDK_TARGET_CPU_BITS=32
7072       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7073         OPENJDK_TARGET_CPU=x86
7074       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7075         OPENJDK_TARGET_CPU=sparc
7076       else
7077         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7078       fi
7079     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7080       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
7081     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7082       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7083 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7084     else
7085       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7086     fi
7087   fi
7088 
7089 
7090   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7091 $as_echo_n "checking compilation type... " >&6; }
7092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7093 $as_echo "$COMPILE_TYPE" >&6; }
7094 
7095 
7096   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7097     REQUIRED_OS_NAME=SunOS
7098     REQUIRED_OS_VERSION=5.10
7099   fi
7100   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7101     REQUIRED_OS_NAME=Linux
7102     REQUIRED_OS_VERSION=2.6
7103   fi
7104   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7105     REQUIRED_OS_NAME=Windows
7106     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7107       REQUIRED_OS_VERSION=5.2
7108     else
7109       REQUIRED_OS_VERSION=5.1
7110     fi
7111   fi
7112   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7113     REQUIRED_OS_NAME=Darwin
7114     REQUIRED_OS_VERSION=11.2
7115   fi
7116 
7117 
7118 
7119 
7120 
7121   # Also store the legacy naming of the cpu.
7122   # Ie i586 and amd64 instead of x86 and x86_64
7123   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7124   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7125     OPENJDK_TARGET_CPU_LEGACY="i586"
7126   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7127     # On all platforms except MacOSX replace x86_64 with amd64.
7128     OPENJDK_TARGET_CPU_LEGACY="amd64"
7129   fi
7130 
7131 
7132   # And the second legacy naming of the cpu.
7133   # Ie i386 and amd64 instead of x86 and x86_64.
7134   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7135   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7136     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7137   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7138     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7139   fi
7140 
7141 
7142   # This is the name of the cpu (but using i386 and amd64 instead of
7143   # x86 and x86_64, respectively), preceeded by a /, to be used when
7144   # locating libraries. On macosx, it's empty, though.
7145   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7146   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7147     OPENJDK_TARGET_CPU_LIBDIR=""
7148   fi
7149 
7150 
7151   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7152   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7153   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7154   OPENJDK_TARGET_CPU_ISADIR=""
7155   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7156     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7157       OPENJDK_TARGET_CPU_ISADIR="/amd64"
7158     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7159       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7160     fi
7161   fi
7162 
7163 
7164   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7165   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7166   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7167     # On linux only, we replace x86 with i386.
7168     OPENJDK_TARGET_CPU_OSARCH="i386"
7169   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7170     # On all platforms except macosx, we replace x86_64 with amd64.
7171     OPENJDK_TARGET_CPU_OSARCH="amd64"
7172   fi
7173 
7174 
7175   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7176   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7177     OPENJDK_TARGET_CPU_JLI="i386"
7178   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7179     # On all platforms except macosx, we replace x86_64 with amd64.
7180     OPENJDK_TARGET_CPU_JLI="amd64"
7181   fi
7182   # Now setup the -D flags for building libjli.
7183   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7184   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7185     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7186       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7187     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7188       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7189     fi
7190   fi
7191 
7192 
7193   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7194   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7195     OPENJDK_TARGET_OS_API_DIR="solaris"
7196   fi
7197   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7198     OPENJDK_TARGET_OS_API_DIR="windows"
7199   fi
7200 
7201 
7202   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7203       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7204   else
7205       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7206   fi
7207 
7208 
7209   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7210     A_LP64="LP64:="
7211     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7212     # unpack200.exe
7213     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7214       ADD_LP64="-D_LP64=1"
7215     fi
7216   fi
7217   LP64=$A_LP64
7218 
7219 
7220   if test "x$COMPILE_TYPE" = "xcross"; then
7221     # FIXME: ... or should this include reduced builds..?
7222     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7223   else
7224     DEFINE_CROSS_COMPILE_ARCH=""
7225   fi
7226 
7227 
7228   # ZERO_ARCHDEF is used to enable architecture-specific code
7229   case "${OPENJDK_TARGET_CPU}" in
7230     ppc)     ZERO_ARCHDEF=PPC32 ;;
7231     ppc64)   ZERO_ARCHDEF=PPC64 ;;
7232     s390*)   ZERO_ARCHDEF=S390  ;;
7233     sparc*)  ZERO_ARCHDEF=SPARC ;;
7234     x86_64*) ZERO_ARCHDEF=AMD64 ;;
7235     x86)     ZERO_ARCHDEF=IA32  ;;
7236     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7237   esac
7238 
7239 
7240 
7241 
7242 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7243 
7244   # Locate the directory of this script.
7245   SCRIPT="$0"
7246   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7247 
7248   # Where is the source? It is located two levels above the configure script.
7249   CURDIR="$PWD"
7250   cd "$AUTOCONF_DIR/../.."
7251   SRC_ROOT="`$THEPWDCMD -L`"
7252 
7253   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7254     PATH_SEP=";"
7255 
7256   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7257   if test $SRC_ROOT_LENGTH -gt 100; then
7258     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7259   fi
7260 
7261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7262     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7263 $as_echo_n "checking cygwin release... " >&6; }
7264     CYGWIN_VERSION=`$UNAME -r`
7265     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7266 $as_echo "$CYGWIN_VERSION" >&6; }
7267     WINDOWS_ENV_VENDOR='cygwin'
7268     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7269 
7270     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
7271     if test "x$CYGWIN_VERSION_OLD" != x; then
7272       { $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
7273 $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;}
7274       as_fn_error $? "Cannot continue" "$LINENO" 5
7275     fi
7276     if test "x$CYGPATH" = x; then
7277       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7278     fi
7279     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7280 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7281     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7282     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7283     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7284     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7285     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7286 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7287     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7288     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7289     if test "x$test_cygdrive_prefix" = x; then
7290       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7291     fi
7292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7293     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7294 $as_echo_n "checking msys release... " >&6; }
7295     MSYS_VERSION=`$UNAME -r`
7296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7297 $as_echo "$MSYS_VERSION" >&6; }
7298 
7299     WINDOWS_ENV_VENDOR='msys'
7300     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7301 
7302     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7303 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7304     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7305     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7306 
7307   windows_path="$MSYS_ROOT_PATH"
7308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7309     unix_path=`$CYGPATH -u "$windows_path"`
7310     MSYS_ROOT_PATH="$unix_path"
7311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7313     MSYS_ROOT_PATH="$unix_path"
7314   fi
7315 
7316     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7317 $as_echo "$MSYS_ROOT_PATH" >&6; }
7318     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7319   else
7320     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7321   fi
7322 
7323   # Test if windows or unix (cygwin/msys) find is first in path.
7324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7325 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7326   FIND_BINARY_OUTPUT=`find --version 2>&1`
7327   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7328     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7329 $as_echo "unix style" >&6; }
7330   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7331     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7332 $as_echo "Windows" >&6; }
7333     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7334 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7335     { $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
7336 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7337     as_fn_error $? "Cannot continue" "$LINENO" 5
7338   else
7339     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7340 $as_echo "unknown" >&6; }
7341     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7342 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7343   fi
7344 
7345   else
7346     PATH_SEP=":"
7347   fi
7348 
7349 
7350 
7351   cd "$CURDIR"
7352 
7353 
7354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7355 
7356   # Input might be given as Windows format, start by converting to
7357   # unix format.
7358   path="$SRC_ROOT"
7359   new_path=`$CYGPATH -u "$path"`
7360 
7361   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7362   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7363   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7364   # "foo.exe" is OK but "foo" is an error.
7365   #
7366   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7367   # It is also a way to make sure we got the proper file name for the real test later on.
7368   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7369   if test "x$test_shortpath" = x; then
7370     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7371 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7372     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7373   fi
7374 
7375   # Call helper function which possibly converts this using DOS-style short mode.
7376   # If so, the updated path is stored in $new_path.
7377 
7378   input_path="$new_path"
7379   # Check if we need to convert this using DOS-style short mode. If the path
7380   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7381   # take no chances and rewrite it.
7382   # Note: m4 eats our [], so we need to use [ and ] instead.
7383   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7384   if test "x$has_forbidden_chars" != x; then
7385     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7386     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7387     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7388     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7389       # Going to short mode and back again did indeed matter. Since short mode is
7390       # case insensitive, let's make it lowercase to improve readability.
7391       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7392       # Now convert it back to Unix-stile (cygpath)
7393       input_path=`$CYGPATH -u "$shortmode_path"`
7394       new_path="$input_path"
7395     fi
7396   fi
7397 
7398   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7399   if test "x$test_cygdrive_prefix" = x; then
7400     # As a simple fix, exclude /usr/bin since it's not a real path.
7401     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7402       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7403       # a path prefixed by /cygdrive for fixpath to work.
7404       new_path="$CYGWIN_ROOT_PATH$input_path"
7405     fi
7406   fi
7407 
7408 
7409   if test "x$path" != "x$new_path"; then
7410     SRC_ROOT="$new_path"
7411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7412 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7413   fi
7414 
7415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7416 
7417   path="$SRC_ROOT"
7418   has_colon=`$ECHO $path | $GREP ^.:`
7419   new_path="$path"
7420   if test "x$has_colon" = x; then
7421     # Not in mixed or Windows style, start by that.
7422     new_path=`cmd //c echo $path`
7423   fi
7424 
7425 
7426   input_path="$new_path"
7427   # Check if we need to convert this using DOS-style short mode. If the path
7428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7429   # take no chances and rewrite it.
7430   # Note: m4 eats our [], so we need to use [ and ] instead.
7431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7432   if test "x$has_forbidden_chars" != x; then
7433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7434     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7435   fi
7436 
7437 
7438   windows_path="$new_path"
7439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7440     unix_path=`$CYGPATH -u "$windows_path"`
7441     new_path="$unix_path"
7442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7444     new_path="$unix_path"
7445   fi
7446 
7447   if test "x$path" != "x$new_path"; then
7448     SRC_ROOT="$new_path"
7449     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7450 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7451   fi
7452 
7453   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7454   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7455 
7456   else
7457     # We're on a posix platform. Hooray! :)
7458     path="$SRC_ROOT"
7459     has_space=`$ECHO "$path" | $GREP " "`
7460     if test "x$has_space" != x; then
7461       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7462 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7463       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7464     fi
7465 
7466     # Use eval to expand a potential ~
7467     eval path="$path"
7468     if test ! -f "$path" && test ! -d "$path"; then
7469       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7470     fi
7471 
7472     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7473   fi
7474 
7475 
7476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7477 
7478   # Input might be given as Windows format, start by converting to
7479   # unix format.
7480   path="$CURDIR"
7481   new_path=`$CYGPATH -u "$path"`
7482 
7483   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7484   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7485   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7486   # "foo.exe" is OK but "foo" is an error.
7487   #
7488   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7489   # It is also a way to make sure we got the proper file name for the real test later on.
7490   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7491   if test "x$test_shortpath" = x; then
7492     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7493 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7494     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7495   fi
7496 
7497   # Call helper function which possibly converts this using DOS-style short mode.
7498   # If so, the updated path is stored in $new_path.
7499 
7500   input_path="$new_path"
7501   # Check if we need to convert this using DOS-style short mode. If the path
7502   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7503   # take no chances and rewrite it.
7504   # Note: m4 eats our [], so we need to use [ and ] instead.
7505   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7506   if test "x$has_forbidden_chars" != x; then
7507     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7508     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7509     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7510     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7511       # Going to short mode and back again did indeed matter. Since short mode is
7512       # case insensitive, let's make it lowercase to improve readability.
7513       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7514       # Now convert it back to Unix-stile (cygpath)
7515       input_path=`$CYGPATH -u "$shortmode_path"`
7516       new_path="$input_path"
7517     fi
7518   fi
7519 
7520   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7521   if test "x$test_cygdrive_prefix" = x; then
7522     # As a simple fix, exclude /usr/bin since it's not a real path.
7523     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7524       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7525       # a path prefixed by /cygdrive for fixpath to work.
7526       new_path="$CYGWIN_ROOT_PATH$input_path"
7527     fi
7528   fi
7529 
7530 
7531   if test "x$path" != "x$new_path"; then
7532     CURDIR="$new_path"
7533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7534 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7535   fi
7536 
7537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7538 
7539   path="$CURDIR"
7540   has_colon=`$ECHO $path | $GREP ^.:`
7541   new_path="$path"
7542   if test "x$has_colon" = x; then
7543     # Not in mixed or Windows style, start by that.
7544     new_path=`cmd //c echo $path`
7545   fi
7546 
7547 
7548   input_path="$new_path"
7549   # Check if we need to convert this using DOS-style short mode. If the path
7550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7551   # take no chances and rewrite it.
7552   # Note: m4 eats our [], so we need to use [ and ] instead.
7553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7554   if test "x$has_forbidden_chars" != x; then
7555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7556     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7557   fi
7558 
7559 
7560   windows_path="$new_path"
7561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7562     unix_path=`$CYGPATH -u "$windows_path"`
7563     new_path="$unix_path"
7564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7566     new_path="$unix_path"
7567   fi
7568 
7569   if test "x$path" != "x$new_path"; then
7570     CURDIR="$new_path"
7571     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7572 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7573   fi
7574 
7575   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7576   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7577 
7578   else
7579     # We're on a posix platform. Hooray! :)
7580     path="$CURDIR"
7581     has_space=`$ECHO "$path" | $GREP " "`
7582     if test "x$has_space" != x; then
7583       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7584 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7585       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7586     fi
7587 
7588     # Use eval to expand a potential ~
7589     eval path="$path"
7590     if test ! -f "$path" && test ! -d "$path"; then
7591       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7592     fi
7593 
7594     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7595   fi
7596 
7597 
7598   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7599     # Add extra search paths on solaris for utilities like ar and as etc...
7600     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7601   fi
7602 
7603   # You can force the sys-root if the sys-root encoded into the cross compiler tools
7604   # is not correct.
7605 
7606 # Check whether --with-sys-root was given.
7607 if test "${with_sys_root+set}" = set; then :
7608   withval=$with_sys_root;
7609 fi
7610 
7611 
7612   if test "x$with_sys_root" != x; then
7613     SYS_ROOT=$with_sys_root
7614   else
7615     SYS_ROOT=/
7616   fi
7617 
7618 
7619 
7620 # Check whether --with-tools-dir was given.
7621 if test "${with_tools_dir+set}" = set; then :
7622   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7623 
7624 fi
7625 
7626 
7627   # Xcode version will be validated later
7628 
7629 # Check whether --with-xcode-path was given.
7630 if test "${with_xcode_path+set}" = set; then :
7631   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
7632 
7633 fi
7634 
7635 
7636 
7637 # Check whether --with-devkit was given.
7638 if test "${with_devkit+set}" = set; then :
7639   withval=$with_devkit;
7640         if test "x$with_sys_root" != x; then
7641           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7642         fi
7643 
7644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7645 
7646   # Input might be given as Windows format, start by converting to
7647   # unix format.
7648   path="$with_devkit"
7649   new_path=`$CYGPATH -u "$path"`
7650 
7651   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7652   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7653   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7654   # "foo.exe" is OK but "foo" is an error.
7655   #
7656   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7657   # It is also a way to make sure we got the proper file name for the real test later on.
7658   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7659   if test "x$test_shortpath" = x; then
7660     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7661 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7662     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7663   fi
7664 
7665   # Call helper function which possibly converts this using DOS-style short mode.
7666   # If so, the updated path is stored in $new_path.
7667 
7668   input_path="$new_path"
7669   # Check if we need to convert this using DOS-style short mode. If the path
7670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7671   # take no chances and rewrite it.
7672   # Note: m4 eats our [], so we need to use [ and ] instead.
7673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7674   if test "x$has_forbidden_chars" != x; then
7675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7676     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7677     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7678     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7679       # Going to short mode and back again did indeed matter. Since short mode is
7680       # case insensitive, let's make it lowercase to improve readability.
7681       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7682       # Now convert it back to Unix-stile (cygpath)
7683       input_path=`$CYGPATH -u "$shortmode_path"`
7684       new_path="$input_path"
7685     fi
7686   fi
7687 
7688   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7689   if test "x$test_cygdrive_prefix" = x; then
7690     # As a simple fix, exclude /usr/bin since it's not a real path.
7691     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7692       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7693       # a path prefixed by /cygdrive for fixpath to work.
7694       new_path="$CYGWIN_ROOT_PATH$input_path"
7695     fi
7696   fi
7697 
7698 
7699   if test "x$path" != "x$new_path"; then
7700     with_devkit="$new_path"
7701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7702 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7703   fi
7704 
7705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7706 
7707   path="$with_devkit"
7708   has_colon=`$ECHO $path | $GREP ^.:`
7709   new_path="$path"
7710   if test "x$has_colon" = x; then
7711     # Not in mixed or Windows style, start by that.
7712     new_path=`cmd //c echo $path`
7713   fi
7714 
7715 
7716   input_path="$new_path"
7717   # Check if we need to convert this using DOS-style short mode. If the path
7718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7719   # take no chances and rewrite it.
7720   # Note: m4 eats our [], so we need to use [ and ] instead.
7721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7722   if test "x$has_forbidden_chars" != x; then
7723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7725   fi
7726 
7727 
7728   windows_path="$new_path"
7729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7730     unix_path=`$CYGPATH -u "$windows_path"`
7731     new_path="$unix_path"
7732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7734     new_path="$unix_path"
7735   fi
7736 
7737   if test "x$path" != "x$new_path"; then
7738     with_devkit="$new_path"
7739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7740 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7741   fi
7742 
7743   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7744   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7745 
7746   else
7747     # We're on a posix platform. Hooray! :)
7748     path="$with_devkit"
7749     has_space=`$ECHO "$path" | $GREP " "`
7750     if test "x$has_space" != x; then
7751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7752 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7753       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7754     fi
7755 
7756     # Use eval to expand a potential ~
7757     eval path="$path"
7758     if test ! -f "$path" && test ! -d "$path"; then
7759       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7760     fi
7761 
7762     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7763   fi
7764 
7765 
7766   if test "x$TOOLS_DIR" = x; then
7767     TOOLS_DIR="$with_devkit/bin"
7768   else
7769     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7770   fi
7771 
7772         if test -d "$with_devkit/$host_alias/libc"; then
7773           SYS_ROOT=$with_devkit/$host_alias/libc
7774         elif test -d "$with_devkit/$host/sys-root"; then
7775           SYS_ROOT=$with_devkit/$host/sys-root
7776         fi
7777 
7778 fi
7779 
7780 
7781 
7782   # Setup default logging of stdout and stderr to build.log in the output root.
7783   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7784   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7785   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7786 
7787 
7788 
7789 
7790 
7791 # Check if it's a pure open build or if custom sources are to be used.
7792 
7793   # Check whether --enable-openjdk-only was given.
7794 if test "${enable_openjdk_only+set}" = set; then :
7795   enableval=$enable_openjdk_only;
7796 else
7797   enable_openjdk_only="no"
7798 fi
7799 
7800 
7801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7802 $as_echo_n "checking for presence of closed sources... " >&6; }
7803   if test -d "$SRC_ROOT/jdk/src/closed"; then
7804     CLOSED_SOURCE_PRESENT=yes
7805   else
7806     CLOSED_SOURCE_PRESENT=no
7807   fi
7808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7809 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7810 
7811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7812 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7813   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7815 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7816 
7817   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7818     OPENJDK=true
7819     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7820       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7821 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7822     fi
7823   else
7824     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7825       OPENJDK=true
7826     else
7827       OPENJDK=false
7828     fi
7829   fi
7830 
7831   if test "x$OPENJDK" = "xtrue"; then
7832     SET_OPENJDK="OPENJDK=true"
7833   fi
7834 
7835 
7836 
7837 
7838 # These are needed to be able to create a configuration name (and thus the output directory)
7839 
7840   ###############################################################################
7841   #
7842   # Check which variant of the JDK that we want to build.
7843   # Currently we have:
7844   #    normal:   standard edition
7845   # but the custom make system may add other variants
7846   #
7847   # Effectively the JDK variant gives a name to a specific set of
7848   # modules to compile into the JDK. In the future, these modules
7849   # might even be Jigsaw modules.
7850   #
7851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7852 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7853 
7854 # Check whether --with-jdk-variant was given.
7855 if test "${with_jdk_variant+set}" = set; then :
7856   withval=$with_jdk_variant;
7857 fi
7858 
7859 
7860   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7861     JDK_VARIANT="normal"
7862   else
7863     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7864   fi
7865 
7866 
7867 
7868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7869 $as_echo "$JDK_VARIANT" >&6; }
7870 
7871 
7872 ###############################################################################
7873 #
7874 # Check which interpreter of the JVM we want to build.
7875 # Currently we have:
7876 #    template: Template interpreter (the default)
7877 #    cpp     : C++ interpreter
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7879 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7880 
7881 # Check whether --with-jvm-interpreter was given.
7882 if test "${with_jvm_interpreter+set}" = set; then :
7883   withval=$with_jvm_interpreter;
7884 fi
7885 
7886 
7887 if test "x$with_jvm_interpreter" = x; then
7888      with_jvm_interpreter="template"
7889 fi
7890 
7891 JVM_INTERPRETER="$with_jvm_interpreter"
7892 
7893 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7894    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7895 fi
7896 
7897 
7898 
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7900 $as_echo "$with_jvm_interpreter" >&6; }
7901 
7902 
7903 
7904   ###############################################################################
7905   #
7906   # Check which variants of the JVM that we want to build.
7907   # Currently we have:
7908   #    server: normal interpreter and a tiered C1/C2 compiler
7909   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7910   #    minimal1: reduced form of client with optional VM services and features stripped out
7911   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7912   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7913   #    zero: no machine code interpreter, no compiler
7914   #    zeroshark: zero interpreter and shark/llvm compiler backend
7915 #    core: interpreter only, no compiler (only works on some platforms)
7916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7917 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7918 
7919 # Check whether --with-jvm-variants was given.
7920 if test "${with_jvm_variants+set}" = set; then :
7921   withval=$with_jvm_variants;
7922 fi
7923 
7924 
7925   if test "x$with_jvm_variants" = x; then
7926     with_jvm_variants="server"
7927   fi
7928 
7929   JVM_VARIANTS=",$with_jvm_variants,"
7930   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,//'`
7931 
7932   if test "x$TEST_VARIANTS" != "x,"; then
7933      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7934   fi
7935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7936 $as_echo "$with_jvm_variants" >&6; }
7937 
7938   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7939   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7940   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7941   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7942   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7943   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7944   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7945 
7946   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7947     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7948       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7949     fi
7950   fi
7951   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7952     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7953       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7954     fi
7955   fi
7956   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7957     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7958       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7959     fi
7960   fi
7961 
7962   # Replace the commas with AND for use in the build directory name.
7963   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
7964   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/'`
7965   if test "x$COUNT_VARIANTS" != "x,1"; then
7966     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7967   else
7968     BUILDING_MULTIPLE_JVM_VARIANTS=no
7969   fi
7970 
7971 
7972 
7973 
7974 
7975 
7976 
7977 
7978 
7979 
7980   INCLUDE_SA=true
7981   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7982     INCLUDE_SA=false
7983   fi
7984   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7985     INCLUDE_SA=false
7986   fi
7987   if test "x$VAR_CPU" = xppc64 ; then
7988     INCLUDE_SA=false
7989   fi
7990   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
7991     INCLUDE_SA=false
7992   fi
7993 
7994 
7995   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7996     MACOSX_UNIVERSAL="false"
7997   fi
7998 
7999 
8000 
8001 
8002   ###############################################################################
8003   #
8004   # Set the debug level
8005   #    release: no debug information, all optimizations, no asserts.
8006   #    fastdebug: debug information (-g), all optimizations, all asserts
8007   #    slowdebug: debug information (-g), no optimizations, all asserts
8008   #
8009   DEBUG_LEVEL="release"
8010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
8011 $as_echo_n "checking which debug level to use... " >&6; }
8012   # Check whether --enable-debug was given.
8013 if test "${enable_debug+set}" = set; then :
8014   enableval=$enable_debug;
8015         ENABLE_DEBUG="${enableval}"
8016         DEBUG_LEVEL="fastdebug"
8017 
8018 else
8019   ENABLE_DEBUG="no"
8020 fi
8021 
8022 
8023 
8024 # Check whether --with-debug-level was given.
8025 if test "${with_debug_level+set}" = set; then :
8026   withval=$with_debug_level;
8027         DEBUG_LEVEL="${withval}"
8028         if test "x$ENABLE_DEBUG" = xyes; then
8029           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
8030         fi
8031 
8032 fi
8033 
8034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8035 $as_echo "$DEBUG_LEVEL" >&6; }
8036 
8037   if test "x$DEBUG_LEVEL" != xrelease && \
8038       test "x$DEBUG_LEVEL" != xfastdebug && \
8039       test "x$DEBUG_LEVEL" != xslowdebug; then
8040     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8041   fi
8042 
8043 
8044   ###############################################################################
8045   #
8046   # Setup legacy vars/targets and new vars to deal with different debug levels.
8047   #
8048 
8049   case $DEBUG_LEVEL in
8050     release )
8051       VARIANT="OPT"
8052       FASTDEBUG="false"
8053       DEBUG_CLASSFILES="false"
8054       BUILD_VARIANT_RELEASE=""
8055       HOTSPOT_DEBUG_LEVEL="product"
8056       HOTSPOT_EXPORT="product"
8057       ;;
8058     fastdebug )
8059       VARIANT="DBG"
8060       FASTDEBUG="true"
8061       DEBUG_CLASSFILES="true"
8062       BUILD_VARIANT_RELEASE="-fastdebug"
8063       HOTSPOT_DEBUG_LEVEL="fastdebug"
8064       HOTSPOT_EXPORT="fastdebug"
8065       ;;
8066     slowdebug )
8067       VARIANT="DBG"
8068       FASTDEBUG="false"
8069       DEBUG_CLASSFILES="true"
8070       BUILD_VARIANT_RELEASE="-debug"
8071       HOTSPOT_DEBUG_LEVEL="jvmg"
8072       HOTSPOT_EXPORT="debug"
8073       ;;
8074   esac
8075 
8076   #####
8077   # Generate the legacy makefile targets for hotspot.
8078   # The hotspot api for selecting the build artifacts, really, needs to be improved.
8079   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8080   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8081   # But until then ...
8082   HOTSPOT_TARGET=""
8083 
8084   if test "x$JVM_VARIANT_SERVER" = xtrue; then
8085     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8086   fi
8087 
8088   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8089     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8090   fi
8091 
8092   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8093     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8094   fi
8095 
8096   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8097     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8098   fi
8099 
8100   if test "x$JVM_VARIANT_ZERO" = xtrue; then
8101     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8102   fi
8103 
8104   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8105     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8106   fi
8107 
8108   if test "x$JVM_VARIANT_CORE" = xtrue; then
8109     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8110   fi
8111 
8112   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8113 
8114   # On Macosx universal binaries are produced, but they only contain
8115   # 64 bit intel. This invalidates control of which jvms are built
8116   # from configure, but only server is valid anyway. Fix this
8117   # when hotspot makefiles are rewritten.
8118   if test "x$MACOSX_UNIVERSAL" = xtrue; then
8119     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8120   fi
8121 
8122   #####
8123 
8124 
8125 
8126 
8127 
8128 
8129 
8130 
8131 # With basic setup done, call the custom early hook.
8132 
8133 
8134 # To properly create a configuration name, we need to have the OpenJDK target
8135 # and options (variants and debug level) parsed.
8136 
8137 
8138 
8139 # Check whether --with-conf-name was given.
8140 if test "${with_conf_name+set}" = set; then :
8141   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8142 fi
8143 
8144 
8145   # Test from where we are running configure, in or outside of src root.
8146   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8147       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8148       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8149     # We are running configure from the src root.
8150     # Create a default ./build/target-variant-debuglevel output root.
8151     if test "x${CONF_NAME}" = x; then
8152       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8153     fi
8154     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8155     $MKDIR -p "$OUTPUT_ROOT"
8156     if test ! -d "$OUTPUT_ROOT"; then
8157       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8158     fi
8159   else
8160     # We are running configure from outside of the src dir.
8161     # Then use the current directory as output dir!
8162     # If configuration is situated in normal build directory, just use the build
8163     # directory name as configuration name, otherwise use the complete path.
8164     if test "x${CONF_NAME}" = x; then
8165       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8166     fi
8167     OUTPUT_ROOT="$CURDIR"
8168 
8169     # WARNING: This might be a bad thing to do. You need to be sure you want to
8170     # have a configuration in this directory. Do some sanity checks!
8171 
8172     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8173       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8174       # other files
8175       files_present=`$LS $OUTPUT_ROOT`
8176       # Configure has already touched config.log and confdefs.h in the current dir when this check
8177       # is performed.
8178       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8179       | $TR -d '\n'`
8180       if test "x$filtered_files" != x; then
8181         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8182 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8183         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8184 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8185         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8186 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8187         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8188 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8189         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8190 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8191         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8192 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8193         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8194 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8195         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8196       fi
8197     fi
8198   fi
8199   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8200 $as_echo_n "checking what configuration name to use... " >&6; }
8201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8202 $as_echo "$CONF_NAME" >&6; }
8203 
8204 
8205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8206 
8207   # Input might be given as Windows format, start by converting to
8208   # unix format.
8209   path="$OUTPUT_ROOT"
8210   new_path=`$CYGPATH -u "$path"`
8211 
8212   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8213   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8214   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8215   # "foo.exe" is OK but "foo" is an error.
8216   #
8217   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8218   # It is also a way to make sure we got the proper file name for the real test later on.
8219   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8220   if test "x$test_shortpath" = x; then
8221     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8222 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8223     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8224   fi
8225 
8226   # Call helper function which possibly converts this using DOS-style short mode.
8227   # If so, the updated path is stored in $new_path.
8228 
8229   input_path="$new_path"
8230   # Check if we need to convert this using DOS-style short mode. If the path
8231   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8232   # take no chances and rewrite it.
8233   # Note: m4 eats our [], so we need to use [ and ] instead.
8234   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8235   if test "x$has_forbidden_chars" != x; then
8236     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8237     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8238     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8239     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8240       # Going to short mode and back again did indeed matter. Since short mode is
8241       # case insensitive, let's make it lowercase to improve readability.
8242       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8243       # Now convert it back to Unix-stile (cygpath)
8244       input_path=`$CYGPATH -u "$shortmode_path"`
8245       new_path="$input_path"
8246     fi
8247   fi
8248 
8249   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8250   if test "x$test_cygdrive_prefix" = x; then
8251     # As a simple fix, exclude /usr/bin since it's not a real path.
8252     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8253       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8254       # a path prefixed by /cygdrive for fixpath to work.
8255       new_path="$CYGWIN_ROOT_PATH$input_path"
8256     fi
8257   fi
8258 
8259 
8260   if test "x$path" != "x$new_path"; then
8261     OUTPUT_ROOT="$new_path"
8262     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8263 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8264   fi
8265 
8266   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8267 
8268   path="$OUTPUT_ROOT"
8269   has_colon=`$ECHO $path | $GREP ^.:`
8270   new_path="$path"
8271   if test "x$has_colon" = x; then
8272     # Not in mixed or Windows style, start by that.
8273     new_path=`cmd //c echo $path`
8274   fi
8275 
8276 
8277   input_path="$new_path"
8278   # Check if we need to convert this using DOS-style short mode. If the path
8279   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8280   # take no chances and rewrite it.
8281   # Note: m4 eats our [], so we need to use [ and ] instead.
8282   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8283   if test "x$has_forbidden_chars" != x; then
8284     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8285     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8286   fi
8287 
8288 
8289   windows_path="$new_path"
8290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8291     unix_path=`$CYGPATH -u "$windows_path"`
8292     new_path="$unix_path"
8293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8295     new_path="$unix_path"
8296   fi
8297 
8298   if test "x$path" != "x$new_path"; then
8299     OUTPUT_ROOT="$new_path"
8300     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8301 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8302   fi
8303 
8304   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8305   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8306 
8307   else
8308     # We're on a posix platform. Hooray! :)
8309     path="$OUTPUT_ROOT"
8310     has_space=`$ECHO "$path" | $GREP " "`
8311     if test "x$has_space" != x; then
8312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8313 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8314       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8315     fi
8316 
8317     # Use eval to expand a potential ~
8318     eval path="$path"
8319     if test ! -f "$path" && test ! -d "$path"; then
8320       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8321     fi
8322 
8323     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8324   fi
8325 
8326 
8327   SPEC=$OUTPUT_ROOT/spec.gmk
8328 
8329   CONF_NAME=$CONF_NAME
8330 
8331   OUTPUT_ROOT=$OUTPUT_ROOT
8332 
8333 
8334   # Most of the probed defines are put into config.h
8335   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8336 
8337   # The spec.gmk file contains all variables for the make system.
8338   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8339 
8340   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8341   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8342 
8343   # The bootcycle-spec.gmk file contains support for boot cycle builds.
8344   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8345 
8346   # The compare.sh is used to compare the build output to other builds.
8347   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8348 
8349   # Spec.sh is currently used by compare-objects.sh
8350   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8351 
8352   # The generated Makefile knows where the spec.gmk is and where the source is.
8353   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8354   # which will look for generated configurations
8355   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8356 
8357 
8358   # Save the arguments given to us
8359   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8360 
8361 
8362 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8363 
8364   for ac_prog in apt-get yum port pkgutil pkgadd
8365 do
8366   # Extract the first word of "$ac_prog", so it can be a program name with args.
8367 set dummy $ac_prog; ac_word=$2
8368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369 $as_echo_n "checking for $ac_word... " >&6; }
8370 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8371   $as_echo_n "(cached) " >&6
8372 else
8373   if test -n "$PKGHANDLER"; then
8374   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8375 else
8376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8377 for as_dir in $PATH
8378 do
8379   IFS=$as_save_IFS
8380   test -z "$as_dir" && as_dir=.
8381     for ac_exec_ext in '' $ac_executable_extensions; do
8382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8383     ac_cv_prog_PKGHANDLER="$ac_prog"
8384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8385     break 2
8386   fi
8387 done
8388   done
8389 IFS=$as_save_IFS
8390 
8391 fi
8392 fi
8393 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8394 if test -n "$PKGHANDLER"; then
8395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8396 $as_echo "$PKGHANDLER" >&6; }
8397 else
8398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8399 $as_echo "no" >&6; }
8400 fi
8401 
8402 
8403   test -n "$PKGHANDLER" && break
8404 done
8405 
8406 
8407 
8408 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8409 
8410 
8411   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8412   if test "x$MAKE" != x; then
8413     # User has supplied a make, test it.
8414     if test ! -f "$MAKE"; then
8415       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8416     fi
8417 
8418   MAKE_CANDIDATE=""$MAKE""
8419   DESCRIPTION="user supplied MAKE=$MAKE"
8420   if test "x$MAKE_CANDIDATE" != x; then
8421     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8422 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8423     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8424     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8425     if test "x$IS_GNU_MAKE" = x; then
8426       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8427 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8428     else
8429       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8430       if test "x$IS_MODERN_MAKE" = x; then
8431         { $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
8432 $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;}
8433       else
8434         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8435           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8436             MAKE_EXPECTED_ENV='cygwin'
8437           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8438             MAKE_EXPECTED_ENV='msys'
8439           else
8440             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8441           fi
8442           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8443           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8444         else
8445           # Not relevant for non-Windows
8446           IS_MAKE_CORRECT_ENV=true
8447         fi
8448         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8449           { $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
8450 $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;}
8451         else
8452           FOUND_MAKE=$MAKE_CANDIDATE
8453 
8454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8455 
8456   # First separate the path from the arguments. This will split at the first
8457   # space.
8458   complete="$FOUND_MAKE"
8459   path="${complete%% *}"
8460   tmp="$complete EOL"
8461   arguments="${tmp#* }"
8462 
8463   # Input might be given as Windows format, start by converting to
8464   # unix format.
8465   new_path=`$CYGPATH -u "$path"`
8466 
8467   # Now try to locate executable using which
8468   new_path=`$WHICH "$new_path" 2> /dev/null`
8469   # bat and cmd files are not always considered executable in cygwin causing which
8470   # to not find them
8471   if test "x$new_path" = x \
8472       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8473       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8474     new_path=`$CYGPATH -u "$path"`
8475   fi
8476   if test "x$new_path" = x; then
8477     # Oops. Which didn't find the executable.
8478     # The splitting of arguments from the executable at a space might have been incorrect,
8479     # since paths with space are more likely in Windows. Give it another try with the whole
8480     # argument.
8481     path="$complete"
8482     arguments="EOL"
8483     new_path=`$CYGPATH -u "$path"`
8484     new_path=`$WHICH "$new_path" 2> /dev/null`
8485     # bat and cmd files are not always considered executable in cygwin causing which
8486     # to not find them
8487     if test "x$new_path" = x \
8488         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8489         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8490       new_path=`$CYGPATH -u "$path"`
8491     fi
8492     if test "x$new_path" = x; then
8493       # It's still not found. Now this is an unrecoverable error.
8494       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8495 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8496       has_space=`$ECHO "$complete" | $GREP " "`
8497       if test "x$has_space" != x; then
8498         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8499 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8500       fi
8501       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8502     fi
8503   fi
8504 
8505   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8506   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8507   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8508   # "foo.exe" is OK but "foo" is an error.
8509   #
8510   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8511   # It is also a way to make sure we got the proper file name for the real test later on.
8512   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8513   if test "x$test_shortpath" = x; then
8514     # Short path failed, file does not exist as specified.
8515     # Try adding .exe or .cmd
8516     if test -f "${new_path}.exe"; then
8517       input_to_shortpath="${new_path}.exe"
8518     elif test -f "${new_path}.cmd"; then
8519       input_to_shortpath="${new_path}.cmd"
8520     else
8521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8522 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8523       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8524 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8525       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8526     fi
8527   else
8528     input_to_shortpath="$new_path"
8529   fi
8530 
8531   # Call helper function which possibly converts this using DOS-style short mode.
8532   # If so, the updated path is stored in $new_path.
8533   new_path="$input_to_shortpath"
8534 
8535   input_path="$input_to_shortpath"
8536   # Check if we need to convert this using DOS-style short mode. If the path
8537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8538   # take no chances and rewrite it.
8539   # Note: m4 eats our [], so we need to use [ and ] instead.
8540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8541   if test "x$has_forbidden_chars" != x; then
8542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8546       # Going to short mode and back again did indeed matter. Since short mode is
8547       # case insensitive, let's make it lowercase to improve readability.
8548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8549       # Now convert it back to Unix-stile (cygpath)
8550       input_path=`$CYGPATH -u "$shortmode_path"`
8551       new_path="$input_path"
8552     fi
8553   fi
8554 
8555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8556   if test "x$test_cygdrive_prefix" = x; then
8557     # As a simple fix, exclude /usr/bin since it's not a real path.
8558     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8560       # a path prefixed by /cygdrive for fixpath to work.
8561       new_path="$CYGWIN_ROOT_PATH$input_path"
8562     fi
8563   fi
8564 
8565   # remove trailing .exe if any
8566   new_path="${new_path/%.exe/}"
8567 
8568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8569 
8570   # First separate the path from the arguments. This will split at the first
8571   # space.
8572   complete="$FOUND_MAKE"
8573   path="${complete%% *}"
8574   tmp="$complete EOL"
8575   arguments="${tmp#* }"
8576 
8577   # Input might be given as Windows format, start by converting to
8578   # unix format.
8579   new_path="$path"
8580 
8581   windows_path="$new_path"
8582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8583     unix_path=`$CYGPATH -u "$windows_path"`
8584     new_path="$unix_path"
8585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8587     new_path="$unix_path"
8588   fi
8589 
8590 
8591   # Now try to locate executable using which
8592   new_path=`$WHICH "$new_path" 2> /dev/null`
8593 
8594   if test "x$new_path" = x; then
8595     # Oops. Which didn't find the executable.
8596     # The splitting of arguments from the executable at a space might have been incorrect,
8597     # since paths with space are more likely in Windows. Give it another try with the whole
8598     # argument.
8599     path="$complete"
8600     arguments="EOL"
8601     new_path="$path"
8602 
8603   windows_path="$new_path"
8604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8605     unix_path=`$CYGPATH -u "$windows_path"`
8606     new_path="$unix_path"
8607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8609     new_path="$unix_path"
8610   fi
8611 
8612 
8613     new_path=`$WHICH "$new_path" 2> /dev/null`
8614 
8615     if test "x$new_path" = x; then
8616       # It's still not found. Now this is an unrecoverable error.
8617       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8618 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8619       has_space=`$ECHO "$complete" | $GREP " "`
8620       if test "x$has_space" != x; then
8621         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8622 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8623       fi
8624       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8625     fi
8626   fi
8627 
8628   # Now new_path has a complete unix path to the binary
8629   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8630     # Keep paths in /bin as-is, but remove trailing .exe if any
8631     new_path="${new_path/%.exe/}"
8632     # Do not save /bin paths to all_fixpath_prefixes!
8633   else
8634     # Not in mixed or Windows style, start by that.
8635     new_path=`cmd //c echo $new_path`
8636 
8637   input_path="$new_path"
8638   # Check if we need to convert this using DOS-style short mode. If the path
8639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8640   # take no chances and rewrite it.
8641   # Note: m4 eats our [], so we need to use [ and ] instead.
8642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8643   if test "x$has_forbidden_chars" != x; then
8644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8645     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8646   fi
8647 
8648     # Output is in $new_path
8649 
8650   windows_path="$new_path"
8651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8652     unix_path=`$CYGPATH -u "$windows_path"`
8653     new_path="$unix_path"
8654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8656     new_path="$unix_path"
8657   fi
8658 
8659     # remove trailing .exe if any
8660     new_path="${new_path/%.exe/}"
8661 
8662     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8663     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8664   fi
8665 
8666   else
8667     # We're on a posix platform. Hooray! :)
8668     # First separate the path from the arguments. This will split at the first
8669     # space.
8670     complete="$FOUND_MAKE"
8671     path="${complete%% *}"
8672     tmp="$complete EOL"
8673     arguments="${tmp#* }"
8674 
8675     # Cannot rely on the command "which" here since it doesn't always work.
8676     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8677     if test -z "$is_absolute_path"; then
8678       # Path to executable is not absolute. Find it.
8679       IFS_save="$IFS"
8680       IFS=:
8681       for p in $PATH; do
8682         if test -f "$p/$path" && test -x "$p/$path"; then
8683           new_path="$p/$path"
8684           break
8685         fi
8686       done
8687       IFS="$IFS_save"
8688     else
8689       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8690 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8691       new_path="$path"
8692     fi
8693 
8694     if test "x$new_path" = x; then
8695       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8696 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8697       has_space=`$ECHO "$complete" | $GREP " "`
8698       if test "x$has_space" != x; then
8699         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8700 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8701       fi
8702       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8703     fi
8704   fi
8705 
8706   # Now join together the path and the arguments once again
8707   if test "x$arguments" != xEOL; then
8708     new_complete="$new_path ${arguments% *}"
8709   else
8710     new_complete="$new_path"
8711   fi
8712 
8713   if test "x$complete" != "x$new_complete"; then
8714     FOUND_MAKE="$new_complete"
8715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8716 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8717   fi
8718 
8719         fi
8720       fi
8721     fi
8722   fi
8723 
8724     if test "x$FOUND_MAKE" = x; then
8725       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8726     fi
8727   else
8728     # Try our hardest to locate a correct version of GNU make
8729     for ac_prog in gmake
8730 do
8731   # Extract the first word of "$ac_prog", so it can be a program name with args.
8732 set dummy $ac_prog; ac_word=$2
8733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734 $as_echo_n "checking for $ac_word... " >&6; }
8735 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8736   $as_echo_n "(cached) " >&6
8737 else
8738   case $CHECK_GMAKE in
8739   [\\/]* | ?:[\\/]*)
8740   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8741   ;;
8742   *)
8743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744 for as_dir in $PATH
8745 do
8746   IFS=$as_save_IFS
8747   test -z "$as_dir" && as_dir=.
8748     for ac_exec_ext in '' $ac_executable_extensions; do
8749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8750     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8752     break 2
8753   fi
8754 done
8755   done
8756 IFS=$as_save_IFS
8757 
8758   ;;
8759 esac
8760 fi
8761 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8762 if test -n "$CHECK_GMAKE"; then
8763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8764 $as_echo "$CHECK_GMAKE" >&6; }
8765 else
8766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8767 $as_echo "no" >&6; }
8768 fi
8769 
8770 
8771   test -n "$CHECK_GMAKE" && break
8772 done
8773 
8774 
8775   MAKE_CANDIDATE=""$CHECK_GMAKE""
8776   DESCRIPTION="gmake in PATH"
8777   if test "x$MAKE_CANDIDATE" != x; then
8778     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8779 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8780     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8781     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8782     if test "x$IS_GNU_MAKE" = x; then
8783       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8784 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8785     else
8786       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8787       if test "x$IS_MODERN_MAKE" = x; then
8788         { $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
8789 $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;}
8790       else
8791         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8792           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8793             MAKE_EXPECTED_ENV='cygwin'
8794           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8795             MAKE_EXPECTED_ENV='msys'
8796           else
8797             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8798           fi
8799           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8800           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8801         else
8802           # Not relevant for non-Windows
8803           IS_MAKE_CORRECT_ENV=true
8804         fi
8805         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8806           { $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
8807 $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;}
8808         else
8809           FOUND_MAKE=$MAKE_CANDIDATE
8810 
8811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8812 
8813   # First separate the path from the arguments. This will split at the first
8814   # space.
8815   complete="$FOUND_MAKE"
8816   path="${complete%% *}"
8817   tmp="$complete EOL"
8818   arguments="${tmp#* }"
8819 
8820   # Input might be given as Windows format, start by converting to
8821   # unix format.
8822   new_path=`$CYGPATH -u "$path"`
8823 
8824   # Now try to locate executable using which
8825   new_path=`$WHICH "$new_path" 2> /dev/null`
8826   # bat and cmd files are not always considered executable in cygwin causing which
8827   # to not find them
8828   if test "x$new_path" = x \
8829       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8830       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8831     new_path=`$CYGPATH -u "$path"`
8832   fi
8833   if test "x$new_path" = x; then
8834     # Oops. Which didn't find the executable.
8835     # The splitting of arguments from the executable at a space might have been incorrect,
8836     # since paths with space are more likely in Windows. Give it another try with the whole
8837     # argument.
8838     path="$complete"
8839     arguments="EOL"
8840     new_path=`$CYGPATH -u "$path"`
8841     new_path=`$WHICH "$new_path" 2> /dev/null`
8842     # bat and cmd files are not always considered executable in cygwin causing which
8843     # to not find them
8844     if test "x$new_path" = x \
8845         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8846         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8847       new_path=`$CYGPATH -u "$path"`
8848     fi
8849     if test "x$new_path" = x; then
8850       # It's still not found. Now this is an unrecoverable error.
8851       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8852 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8853       has_space=`$ECHO "$complete" | $GREP " "`
8854       if test "x$has_space" != x; then
8855         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8856 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8857       fi
8858       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8859     fi
8860   fi
8861 
8862   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8863   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8864   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8865   # "foo.exe" is OK but "foo" is an error.
8866   #
8867   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8868   # It is also a way to make sure we got the proper file name for the real test later on.
8869   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8870   if test "x$test_shortpath" = x; then
8871     # Short path failed, file does not exist as specified.
8872     # Try adding .exe or .cmd
8873     if test -f "${new_path}.exe"; then
8874       input_to_shortpath="${new_path}.exe"
8875     elif test -f "${new_path}.cmd"; then
8876       input_to_shortpath="${new_path}.cmd"
8877     else
8878       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8879 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8880       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8881 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8882       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8883     fi
8884   else
8885     input_to_shortpath="$new_path"
8886   fi
8887 
8888   # Call helper function which possibly converts this using DOS-style short mode.
8889   # If so, the updated path is stored in $new_path.
8890   new_path="$input_to_shortpath"
8891 
8892   input_path="$input_to_shortpath"
8893   # Check if we need to convert this using DOS-style short mode. If the path
8894   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8895   # take no chances and rewrite it.
8896   # Note: m4 eats our [], so we need to use [ and ] instead.
8897   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8898   if test "x$has_forbidden_chars" != x; then
8899     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8900     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8901     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8902     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8903       # Going to short mode and back again did indeed matter. Since short mode is
8904       # case insensitive, let's make it lowercase to improve readability.
8905       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8906       # Now convert it back to Unix-stile (cygpath)
8907       input_path=`$CYGPATH -u "$shortmode_path"`
8908       new_path="$input_path"
8909     fi
8910   fi
8911 
8912   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8913   if test "x$test_cygdrive_prefix" = x; then
8914     # As a simple fix, exclude /usr/bin since it's not a real path.
8915     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8916       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8917       # a path prefixed by /cygdrive for fixpath to work.
8918       new_path="$CYGWIN_ROOT_PATH$input_path"
8919     fi
8920   fi
8921 
8922   # remove trailing .exe if any
8923   new_path="${new_path/%.exe/}"
8924 
8925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8926 
8927   # First separate the path from the arguments. This will split at the first
8928   # space.
8929   complete="$FOUND_MAKE"
8930   path="${complete%% *}"
8931   tmp="$complete EOL"
8932   arguments="${tmp#* }"
8933 
8934   # Input might be given as Windows format, start by converting to
8935   # unix format.
8936   new_path="$path"
8937 
8938   windows_path="$new_path"
8939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8940     unix_path=`$CYGPATH -u "$windows_path"`
8941     new_path="$unix_path"
8942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8944     new_path="$unix_path"
8945   fi
8946 
8947 
8948   # Now try to locate executable using which
8949   new_path=`$WHICH "$new_path" 2> /dev/null`
8950 
8951   if test "x$new_path" = x; then
8952     # Oops. Which didn't find the executable.
8953     # The splitting of arguments from the executable at a space might have been incorrect,
8954     # since paths with space are more likely in Windows. Give it another try with the whole
8955     # argument.
8956     path="$complete"
8957     arguments="EOL"
8958     new_path="$path"
8959 
8960   windows_path="$new_path"
8961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8962     unix_path=`$CYGPATH -u "$windows_path"`
8963     new_path="$unix_path"
8964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8966     new_path="$unix_path"
8967   fi
8968 
8969 
8970     new_path=`$WHICH "$new_path" 2> /dev/null`
8971 
8972     if test "x$new_path" = x; then
8973       # It's still not found. Now this is an unrecoverable error.
8974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8975 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8976       has_space=`$ECHO "$complete" | $GREP " "`
8977       if test "x$has_space" != x; then
8978         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8979 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8980       fi
8981       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8982     fi
8983   fi
8984 
8985   # Now new_path has a complete unix path to the binary
8986   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8987     # Keep paths in /bin as-is, but remove trailing .exe if any
8988     new_path="${new_path/%.exe/}"
8989     # Do not save /bin paths to all_fixpath_prefixes!
8990   else
8991     # Not in mixed or Windows style, start by that.
8992     new_path=`cmd //c echo $new_path`
8993 
8994   input_path="$new_path"
8995   # Check if we need to convert this using DOS-style short mode. If the path
8996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8997   # take no chances and rewrite it.
8998   # Note: m4 eats our [], so we need to use [ and ] instead.
8999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9000   if test "x$has_forbidden_chars" != x; then
9001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9002     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9003   fi
9004 
9005     # Output is in $new_path
9006 
9007   windows_path="$new_path"
9008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9009     unix_path=`$CYGPATH -u "$windows_path"`
9010     new_path="$unix_path"
9011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9013     new_path="$unix_path"
9014   fi
9015 
9016     # remove trailing .exe if any
9017     new_path="${new_path/%.exe/}"
9018 
9019     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9020     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9021   fi
9022 
9023   else
9024     # We're on a posix platform. Hooray! :)
9025     # First separate the path from the arguments. This will split at the first
9026     # space.
9027     complete="$FOUND_MAKE"
9028     path="${complete%% *}"
9029     tmp="$complete EOL"
9030     arguments="${tmp#* }"
9031 
9032     # Cannot rely on the command "which" here since it doesn't always work.
9033     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9034     if test -z "$is_absolute_path"; then
9035       # Path to executable is not absolute. Find it.
9036       IFS_save="$IFS"
9037       IFS=:
9038       for p in $PATH; do
9039         if test -f "$p/$path" && test -x "$p/$path"; then
9040           new_path="$p/$path"
9041           break
9042         fi
9043       done
9044       IFS="$IFS_save"
9045     else
9046       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9047 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9048       new_path="$path"
9049     fi
9050 
9051     if test "x$new_path" = x; then
9052       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9053 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9054       has_space=`$ECHO "$complete" | $GREP " "`
9055       if test "x$has_space" != x; then
9056         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9057 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9058       fi
9059       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9060     fi
9061   fi
9062 
9063   # Now join together the path and the arguments once again
9064   if test "x$arguments" != xEOL; then
9065     new_complete="$new_path ${arguments% *}"
9066   else
9067     new_complete="$new_path"
9068   fi
9069 
9070   if test "x$complete" != "x$new_complete"; then
9071     FOUND_MAKE="$new_complete"
9072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9073 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9074   fi
9075 
9076         fi
9077       fi
9078     fi
9079   fi
9080 
9081 
9082     if test "x$FOUND_MAKE" = x; then
9083       for ac_prog in make
9084 do
9085   # Extract the first word of "$ac_prog", so it can be a program name with args.
9086 set dummy $ac_prog; ac_word=$2
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9088 $as_echo_n "checking for $ac_word... " >&6; }
9089 if ${ac_cv_path_CHECK_MAKE+:} false; then :
9090   $as_echo_n "(cached) " >&6
9091 else
9092   case $CHECK_MAKE in
9093   [\\/]* | ?:[\\/]*)
9094   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9095   ;;
9096   *)
9097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9098 for as_dir in $PATH
9099 do
9100   IFS=$as_save_IFS
9101   test -z "$as_dir" && as_dir=.
9102     for ac_exec_ext in '' $ac_executable_extensions; do
9103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9104     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9106     break 2
9107   fi
9108 done
9109   done
9110 IFS=$as_save_IFS
9111 
9112   ;;
9113 esac
9114 fi
9115 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9116 if test -n "$CHECK_MAKE"; then
9117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9118 $as_echo "$CHECK_MAKE" >&6; }
9119 else
9120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9121 $as_echo "no" >&6; }
9122 fi
9123 
9124 
9125   test -n "$CHECK_MAKE" && break
9126 done
9127 
9128 
9129   MAKE_CANDIDATE=""$CHECK_MAKE""
9130   DESCRIPTION="make in PATH"
9131   if test "x$MAKE_CANDIDATE" != x; then
9132     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9133 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9134     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9135     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9136     if test "x$IS_GNU_MAKE" = x; then
9137       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9138 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9139     else
9140       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9141       if test "x$IS_MODERN_MAKE" = x; then
9142         { $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
9143 $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;}
9144       else
9145         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9146           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9147             MAKE_EXPECTED_ENV='cygwin'
9148           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9149             MAKE_EXPECTED_ENV='msys'
9150           else
9151             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9152           fi
9153           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9154           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9155         else
9156           # Not relevant for non-Windows
9157           IS_MAKE_CORRECT_ENV=true
9158         fi
9159         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9160           { $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
9161 $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;}
9162         else
9163           FOUND_MAKE=$MAKE_CANDIDATE
9164 
9165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9166 
9167   # First separate the path from the arguments. This will split at the first
9168   # space.
9169   complete="$FOUND_MAKE"
9170   path="${complete%% *}"
9171   tmp="$complete EOL"
9172   arguments="${tmp#* }"
9173 
9174   # Input might be given as Windows format, start by converting to
9175   # unix format.
9176   new_path=`$CYGPATH -u "$path"`
9177 
9178   # Now try to locate executable using which
9179   new_path=`$WHICH "$new_path" 2> /dev/null`
9180   # bat and cmd files are not always considered executable in cygwin causing which
9181   # to not find them
9182   if test "x$new_path" = x \
9183       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9184       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9185     new_path=`$CYGPATH -u "$path"`
9186   fi
9187   if test "x$new_path" = x; then
9188     # Oops. Which didn't find the executable.
9189     # The splitting of arguments from the executable at a space might have been incorrect,
9190     # since paths with space are more likely in Windows. Give it another try with the whole
9191     # argument.
9192     path="$complete"
9193     arguments="EOL"
9194     new_path=`$CYGPATH -u "$path"`
9195     new_path=`$WHICH "$new_path" 2> /dev/null`
9196     # bat and cmd files are not always considered executable in cygwin causing which
9197     # to not find them
9198     if test "x$new_path" = x \
9199         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9200         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9201       new_path=`$CYGPATH -u "$path"`
9202     fi
9203     if test "x$new_path" = x; then
9204       # It's still not found. Now this is an unrecoverable error.
9205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9206 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9207       has_space=`$ECHO "$complete" | $GREP " "`
9208       if test "x$has_space" != x; then
9209         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9210 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9211       fi
9212       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9213     fi
9214   fi
9215 
9216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9219   # "foo.exe" is OK but "foo" is an error.
9220   #
9221   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9222   # It is also a way to make sure we got the proper file name for the real test later on.
9223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9224   if test "x$test_shortpath" = x; then
9225     # Short path failed, file does not exist as specified.
9226     # Try adding .exe or .cmd
9227     if test -f "${new_path}.exe"; then
9228       input_to_shortpath="${new_path}.exe"
9229     elif test -f "${new_path}.cmd"; then
9230       input_to_shortpath="${new_path}.cmd"
9231     else
9232       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9233 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9234       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9235 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9236       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9237     fi
9238   else
9239     input_to_shortpath="$new_path"
9240   fi
9241 
9242   # Call helper function which possibly converts this using DOS-style short mode.
9243   # If so, the updated path is stored in $new_path.
9244   new_path="$input_to_shortpath"
9245 
9246   input_path="$input_to_shortpath"
9247   # Check if we need to convert this using DOS-style short mode. If the path
9248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9249   # take no chances and rewrite it.
9250   # Note: m4 eats our [], so we need to use [ and ] instead.
9251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9252   if test "x$has_forbidden_chars" != x; then
9253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9254     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9255     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9256     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9257       # Going to short mode and back again did indeed matter. Since short mode is
9258       # case insensitive, let's make it lowercase to improve readability.
9259       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9260       # Now convert it back to Unix-stile (cygpath)
9261       input_path=`$CYGPATH -u "$shortmode_path"`
9262       new_path="$input_path"
9263     fi
9264   fi
9265 
9266   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9267   if test "x$test_cygdrive_prefix" = x; then
9268     # As a simple fix, exclude /usr/bin since it's not a real path.
9269     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9270       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9271       # a path prefixed by /cygdrive for fixpath to work.
9272       new_path="$CYGWIN_ROOT_PATH$input_path"
9273     fi
9274   fi
9275 
9276   # remove trailing .exe if any
9277   new_path="${new_path/%.exe/}"
9278 
9279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9280 
9281   # First separate the path from the arguments. This will split at the first
9282   # space.
9283   complete="$FOUND_MAKE"
9284   path="${complete%% *}"
9285   tmp="$complete EOL"
9286   arguments="${tmp#* }"
9287 
9288   # Input might be given as Windows format, start by converting to
9289   # unix format.
9290   new_path="$path"
9291 
9292   windows_path="$new_path"
9293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9294     unix_path=`$CYGPATH -u "$windows_path"`
9295     new_path="$unix_path"
9296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9298     new_path="$unix_path"
9299   fi
9300 
9301 
9302   # Now try to locate executable using which
9303   new_path=`$WHICH "$new_path" 2> /dev/null`
9304 
9305   if test "x$new_path" = x; then
9306     # Oops. Which didn't find the executable.
9307     # The splitting of arguments from the executable at a space might have been incorrect,
9308     # since paths with space are more likely in Windows. Give it another try with the whole
9309     # argument.
9310     path="$complete"
9311     arguments="EOL"
9312     new_path="$path"
9313 
9314   windows_path="$new_path"
9315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9316     unix_path=`$CYGPATH -u "$windows_path"`
9317     new_path="$unix_path"
9318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9320     new_path="$unix_path"
9321   fi
9322 
9323 
9324     new_path=`$WHICH "$new_path" 2> /dev/null`
9325 
9326     if test "x$new_path" = x; then
9327       # It's still not found. Now this is an unrecoverable error.
9328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9329 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9330       has_space=`$ECHO "$complete" | $GREP " "`
9331       if test "x$has_space" != x; then
9332         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9333 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9334       fi
9335       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9336     fi
9337   fi
9338 
9339   # Now new_path has a complete unix path to the binary
9340   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9341     # Keep paths in /bin as-is, but remove trailing .exe if any
9342     new_path="${new_path/%.exe/}"
9343     # Do not save /bin paths to all_fixpath_prefixes!
9344   else
9345     # Not in mixed or Windows style, start by that.
9346     new_path=`cmd //c echo $new_path`
9347 
9348   input_path="$new_path"
9349   # Check if we need to convert this using DOS-style short mode. If the path
9350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9351   # take no chances and rewrite it.
9352   # Note: m4 eats our [], so we need to use [ and ] instead.
9353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9354   if test "x$has_forbidden_chars" != x; then
9355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9357   fi
9358 
9359     # Output is in $new_path
9360 
9361   windows_path="$new_path"
9362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9363     unix_path=`$CYGPATH -u "$windows_path"`
9364     new_path="$unix_path"
9365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9367     new_path="$unix_path"
9368   fi
9369 
9370     # remove trailing .exe if any
9371     new_path="${new_path/%.exe/}"
9372 
9373     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9374     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9375   fi
9376 
9377   else
9378     # We're on a posix platform. Hooray! :)
9379     # First separate the path from the arguments. This will split at the first
9380     # space.
9381     complete="$FOUND_MAKE"
9382     path="${complete%% *}"
9383     tmp="$complete EOL"
9384     arguments="${tmp#* }"
9385 
9386     # Cannot rely on the command "which" here since it doesn't always work.
9387     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9388     if test -z "$is_absolute_path"; then
9389       # Path to executable is not absolute. Find it.
9390       IFS_save="$IFS"
9391       IFS=:
9392       for p in $PATH; do
9393         if test -f "$p/$path" && test -x "$p/$path"; then
9394           new_path="$p/$path"
9395           break
9396         fi
9397       done
9398       IFS="$IFS_save"
9399     else
9400       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9401 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9402       new_path="$path"
9403     fi
9404 
9405     if test "x$new_path" = x; then
9406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9407 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9408       has_space=`$ECHO "$complete" | $GREP " "`
9409       if test "x$has_space" != x; then
9410         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9411 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9412       fi
9413       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9414     fi
9415   fi
9416 
9417   # Now join together the path and the arguments once again
9418   if test "x$arguments" != xEOL; then
9419     new_complete="$new_path ${arguments% *}"
9420   else
9421     new_complete="$new_path"
9422   fi
9423 
9424   if test "x$complete" != "x$new_complete"; then
9425     FOUND_MAKE="$new_complete"
9426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9427 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9428   fi
9429 
9430         fi
9431       fi
9432     fi
9433   fi
9434 
9435     fi
9436 
9437     if test "x$FOUND_MAKE" = x; then
9438       if test "x$TOOLS_DIR" != x; then
9439         # We have a tools-dir, check that as well before giving up.
9440         OLD_PATH=$PATH
9441         PATH=$TOOLS_DIR:$PATH
9442         for ac_prog in gmake
9443 do
9444   # Extract the first word of "$ac_prog", so it can be a program name with args.
9445 set dummy $ac_prog; ac_word=$2
9446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9447 $as_echo_n "checking for $ac_word... " >&6; }
9448 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9449   $as_echo_n "(cached) " >&6
9450 else
9451   case $CHECK_TOOLSDIR_GMAKE in
9452   [\\/]* | ?:[\\/]*)
9453   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9454   ;;
9455   *)
9456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9457 for as_dir in $PATH
9458 do
9459   IFS=$as_save_IFS
9460   test -z "$as_dir" && as_dir=.
9461     for ac_exec_ext in '' $ac_executable_extensions; do
9462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9463     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9465     break 2
9466   fi
9467 done
9468   done
9469 IFS=$as_save_IFS
9470 
9471   ;;
9472 esac
9473 fi
9474 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9475 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9477 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9478 else
9479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480 $as_echo "no" >&6; }
9481 fi
9482 
9483 
9484   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9485 done
9486 
9487 
9488   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9489   DESCRIPTION="gmake in tools-dir"
9490   if test "x$MAKE_CANDIDATE" != x; then
9491     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9492 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9493     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9494     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9495     if test "x$IS_GNU_MAKE" = x; then
9496       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9497 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9498     else
9499       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9500       if test "x$IS_MODERN_MAKE" = x; then
9501         { $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
9502 $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;}
9503       else
9504         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9505           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9506             MAKE_EXPECTED_ENV='cygwin'
9507           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9508             MAKE_EXPECTED_ENV='msys'
9509           else
9510             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9511           fi
9512           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9513           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9514         else
9515           # Not relevant for non-Windows
9516           IS_MAKE_CORRECT_ENV=true
9517         fi
9518         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9519           { $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
9520 $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;}
9521         else
9522           FOUND_MAKE=$MAKE_CANDIDATE
9523 
9524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9525 
9526   # First separate the path from the arguments. This will split at the first
9527   # space.
9528   complete="$FOUND_MAKE"
9529   path="${complete%% *}"
9530   tmp="$complete EOL"
9531   arguments="${tmp#* }"
9532 
9533   # Input might be given as Windows format, start by converting to
9534   # unix format.
9535   new_path=`$CYGPATH -u "$path"`
9536 
9537   # Now try to locate executable using which
9538   new_path=`$WHICH "$new_path" 2> /dev/null`
9539   # bat and cmd files are not always considered executable in cygwin causing which
9540   # to not find them
9541   if test "x$new_path" = x \
9542       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9543       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9544     new_path=`$CYGPATH -u "$path"`
9545   fi
9546   if test "x$new_path" = x; then
9547     # Oops. Which didn't find the executable.
9548     # The splitting of arguments from the executable at a space might have been incorrect,
9549     # since paths with space are more likely in Windows. Give it another try with the whole
9550     # argument.
9551     path="$complete"
9552     arguments="EOL"
9553     new_path=`$CYGPATH -u "$path"`
9554     new_path=`$WHICH "$new_path" 2> /dev/null`
9555     # bat and cmd files are not always considered executable in cygwin causing which
9556     # to not find them
9557     if test "x$new_path" = x \
9558         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9559         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9560       new_path=`$CYGPATH -u "$path"`
9561     fi
9562     if test "x$new_path" = x; then
9563       # It's still not found. Now this is an unrecoverable error.
9564       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9565 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9566       has_space=`$ECHO "$complete" | $GREP " "`
9567       if test "x$has_space" != x; then
9568         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9569 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9570       fi
9571       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9572     fi
9573   fi
9574 
9575   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9576   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9577   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9578   # "foo.exe" is OK but "foo" is an error.
9579   #
9580   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9581   # It is also a way to make sure we got the proper file name for the real test later on.
9582   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9583   if test "x$test_shortpath" = x; then
9584     # Short path failed, file does not exist as specified.
9585     # Try adding .exe or .cmd
9586     if test -f "${new_path}.exe"; then
9587       input_to_shortpath="${new_path}.exe"
9588     elif test -f "${new_path}.cmd"; then
9589       input_to_shortpath="${new_path}.cmd"
9590     else
9591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9592 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9593       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9594 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9595       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9596     fi
9597   else
9598     input_to_shortpath="$new_path"
9599   fi
9600 
9601   # Call helper function which possibly converts this using DOS-style short mode.
9602   # If so, the updated path is stored in $new_path.
9603   new_path="$input_to_shortpath"
9604 
9605   input_path="$input_to_shortpath"
9606   # Check if we need to convert this using DOS-style short mode. If the path
9607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9608   # take no chances and rewrite it.
9609   # Note: m4 eats our [], so we need to use [ and ] instead.
9610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9611   if test "x$has_forbidden_chars" != x; then
9612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9613     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9614     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9615     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9616       # Going to short mode and back again did indeed matter. Since short mode is
9617       # case insensitive, let's make it lowercase to improve readability.
9618       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9619       # Now convert it back to Unix-stile (cygpath)
9620       input_path=`$CYGPATH -u "$shortmode_path"`
9621       new_path="$input_path"
9622     fi
9623   fi
9624 
9625   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9626   if test "x$test_cygdrive_prefix" = x; then
9627     # As a simple fix, exclude /usr/bin since it's not a real path.
9628     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9629       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9630       # a path prefixed by /cygdrive for fixpath to work.
9631       new_path="$CYGWIN_ROOT_PATH$input_path"
9632     fi
9633   fi
9634 
9635   # remove trailing .exe if any
9636   new_path="${new_path/%.exe/}"
9637 
9638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9639 
9640   # First separate the path from the arguments. This will split at the first
9641   # space.
9642   complete="$FOUND_MAKE"
9643   path="${complete%% *}"
9644   tmp="$complete EOL"
9645   arguments="${tmp#* }"
9646 
9647   # Input might be given as Windows format, start by converting to
9648   # unix format.
9649   new_path="$path"
9650 
9651   windows_path="$new_path"
9652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9653     unix_path=`$CYGPATH -u "$windows_path"`
9654     new_path="$unix_path"
9655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9657     new_path="$unix_path"
9658   fi
9659 
9660 
9661   # Now try to locate executable using which
9662   new_path=`$WHICH "$new_path" 2> /dev/null`
9663 
9664   if test "x$new_path" = x; then
9665     # Oops. Which didn't find the executable.
9666     # The splitting of arguments from the executable at a space might have been incorrect,
9667     # since paths with space are more likely in Windows. Give it another try with the whole
9668     # argument.
9669     path="$complete"
9670     arguments="EOL"
9671     new_path="$path"
9672 
9673   windows_path="$new_path"
9674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9675     unix_path=`$CYGPATH -u "$windows_path"`
9676     new_path="$unix_path"
9677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9679     new_path="$unix_path"
9680   fi
9681 
9682 
9683     new_path=`$WHICH "$new_path" 2> /dev/null`
9684 
9685     if test "x$new_path" = x; then
9686       # It's still not found. Now this is an unrecoverable error.
9687       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9688 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9689       has_space=`$ECHO "$complete" | $GREP " "`
9690       if test "x$has_space" != x; then
9691         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9692 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9693       fi
9694       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9695     fi
9696   fi
9697 
9698   # Now new_path has a complete unix path to the binary
9699   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9700     # Keep paths in /bin as-is, but remove trailing .exe if any
9701     new_path="${new_path/%.exe/}"
9702     # Do not save /bin paths to all_fixpath_prefixes!
9703   else
9704     # Not in mixed or Windows style, start by that.
9705     new_path=`cmd //c echo $new_path`
9706 
9707   input_path="$new_path"
9708   # Check if we need to convert this using DOS-style short mode. If the path
9709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9710   # take no chances and rewrite it.
9711   # Note: m4 eats our [], so we need to use [ and ] instead.
9712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9713   if test "x$has_forbidden_chars" != x; then
9714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9715     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9716   fi
9717 
9718     # Output is in $new_path
9719 
9720   windows_path="$new_path"
9721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9722     unix_path=`$CYGPATH -u "$windows_path"`
9723     new_path="$unix_path"
9724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9726     new_path="$unix_path"
9727   fi
9728 
9729     # remove trailing .exe if any
9730     new_path="${new_path/%.exe/}"
9731 
9732     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9733     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9734   fi
9735 
9736   else
9737     # We're on a posix platform. Hooray! :)
9738     # First separate the path from the arguments. This will split at the first
9739     # space.
9740     complete="$FOUND_MAKE"
9741     path="${complete%% *}"
9742     tmp="$complete EOL"
9743     arguments="${tmp#* }"
9744 
9745     # Cannot rely on the command "which" here since it doesn't always work.
9746     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9747     if test -z "$is_absolute_path"; then
9748       # Path to executable is not absolute. Find it.
9749       IFS_save="$IFS"
9750       IFS=:
9751       for p in $PATH; do
9752         if test -f "$p/$path" && test -x "$p/$path"; then
9753           new_path="$p/$path"
9754           break
9755         fi
9756       done
9757       IFS="$IFS_save"
9758     else
9759       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9760 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9761       new_path="$path"
9762     fi
9763 
9764     if test "x$new_path" = x; then
9765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9766 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9767       has_space=`$ECHO "$complete" | $GREP " "`
9768       if test "x$has_space" != x; then
9769         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9770 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9771       fi
9772       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9773     fi
9774   fi
9775 
9776   # Now join together the path and the arguments once again
9777   if test "x$arguments" != xEOL; then
9778     new_complete="$new_path ${arguments% *}"
9779   else
9780     new_complete="$new_path"
9781   fi
9782 
9783   if test "x$complete" != "x$new_complete"; then
9784     FOUND_MAKE="$new_complete"
9785     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9786 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9787   fi
9788 
9789         fi
9790       fi
9791     fi
9792   fi
9793 
9794         if test "x$FOUND_MAKE" = x; then
9795           for ac_prog in make
9796 do
9797   # Extract the first word of "$ac_prog", so it can be a program name with args.
9798 set dummy $ac_prog; ac_word=$2
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800 $as_echo_n "checking for $ac_word... " >&6; }
9801 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9802   $as_echo_n "(cached) " >&6
9803 else
9804   case $CHECK_TOOLSDIR_MAKE in
9805   [\\/]* | ?:[\\/]*)
9806   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9807   ;;
9808   *)
9809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9810 for as_dir in $PATH
9811 do
9812   IFS=$as_save_IFS
9813   test -z "$as_dir" && as_dir=.
9814     for ac_exec_ext in '' $ac_executable_extensions; do
9815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9816     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9818     break 2
9819   fi
9820 done
9821   done
9822 IFS=$as_save_IFS
9823 
9824   ;;
9825 esac
9826 fi
9827 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9828 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9830 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9831 else
9832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833 $as_echo "no" >&6; }
9834 fi
9835 
9836 
9837   test -n "$CHECK_TOOLSDIR_MAKE" && break
9838 done
9839 
9840 
9841   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9842   DESCRIPTION="make in tools-dir"
9843   if test "x$MAKE_CANDIDATE" != x; then
9844     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9845 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9846     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9847     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9848     if test "x$IS_GNU_MAKE" = x; then
9849       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9850 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9851     else
9852       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9853       if test "x$IS_MODERN_MAKE" = x; then
9854         { $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
9855 $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;}
9856       else
9857         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9858           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9859             MAKE_EXPECTED_ENV='cygwin'
9860           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9861             MAKE_EXPECTED_ENV='msys'
9862           else
9863             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9864           fi
9865           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9866           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9867         else
9868           # Not relevant for non-Windows
9869           IS_MAKE_CORRECT_ENV=true
9870         fi
9871         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9872           { $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
9873 $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;}
9874         else
9875           FOUND_MAKE=$MAKE_CANDIDATE
9876 
9877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9878 
9879   # First separate the path from the arguments. This will split at the first
9880   # space.
9881   complete="$FOUND_MAKE"
9882   path="${complete%% *}"
9883   tmp="$complete EOL"
9884   arguments="${tmp#* }"
9885 
9886   # Input might be given as Windows format, start by converting to
9887   # unix format.
9888   new_path=`$CYGPATH -u "$path"`
9889 
9890   # Now try to locate executable using which
9891   new_path=`$WHICH "$new_path" 2> /dev/null`
9892   # bat and cmd files are not always considered executable in cygwin causing which
9893   # to not find them
9894   if test "x$new_path" = x \
9895       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9896       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9897     new_path=`$CYGPATH -u "$path"`
9898   fi
9899   if test "x$new_path" = x; then
9900     # Oops. Which didn't find the executable.
9901     # The splitting of arguments from the executable at a space might have been incorrect,
9902     # since paths with space are more likely in Windows. Give it another try with the whole
9903     # argument.
9904     path="$complete"
9905     arguments="EOL"
9906     new_path=`$CYGPATH -u "$path"`
9907     new_path=`$WHICH "$new_path" 2> /dev/null`
9908     # bat and cmd files are not always considered executable in cygwin causing which
9909     # to not find them
9910     if test "x$new_path" = x \
9911         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9912         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9913       new_path=`$CYGPATH -u "$path"`
9914     fi
9915     if test "x$new_path" = x; then
9916       # It's still not found. Now this is an unrecoverable error.
9917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9918 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9919       has_space=`$ECHO "$complete" | $GREP " "`
9920       if test "x$has_space" != x; then
9921         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9922 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9923       fi
9924       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9925     fi
9926   fi
9927 
9928   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9929   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9930   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9931   # "foo.exe" is OK but "foo" is an error.
9932   #
9933   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9934   # It is also a way to make sure we got the proper file name for the real test later on.
9935   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9936   if test "x$test_shortpath" = x; then
9937     # Short path failed, file does not exist as specified.
9938     # Try adding .exe or .cmd
9939     if test -f "${new_path}.exe"; then
9940       input_to_shortpath="${new_path}.exe"
9941     elif test -f "${new_path}.cmd"; then
9942       input_to_shortpath="${new_path}.cmd"
9943     else
9944       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9945 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9946       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9947 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9948       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9949     fi
9950   else
9951     input_to_shortpath="$new_path"
9952   fi
9953 
9954   # Call helper function which possibly converts this using DOS-style short mode.
9955   # If so, the updated path is stored in $new_path.
9956   new_path="$input_to_shortpath"
9957 
9958   input_path="$input_to_shortpath"
9959   # Check if we need to convert this using DOS-style short mode. If the path
9960   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9961   # take no chances and rewrite it.
9962   # Note: m4 eats our [], so we need to use [ and ] instead.
9963   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9964   if test "x$has_forbidden_chars" != x; then
9965     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9966     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9967     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9968     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9969       # Going to short mode and back again did indeed matter. Since short mode is
9970       # case insensitive, let's make it lowercase to improve readability.
9971       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9972       # Now convert it back to Unix-stile (cygpath)
9973       input_path=`$CYGPATH -u "$shortmode_path"`
9974       new_path="$input_path"
9975     fi
9976   fi
9977 
9978   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9979   if test "x$test_cygdrive_prefix" = x; then
9980     # As a simple fix, exclude /usr/bin since it's not a real path.
9981     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9982       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9983       # a path prefixed by /cygdrive for fixpath to work.
9984       new_path="$CYGWIN_ROOT_PATH$input_path"
9985     fi
9986   fi
9987 
9988   # remove trailing .exe if any
9989   new_path="${new_path/%.exe/}"
9990 
9991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9992 
9993   # First separate the path from the arguments. This will split at the first
9994   # space.
9995   complete="$FOUND_MAKE"
9996   path="${complete%% *}"
9997   tmp="$complete EOL"
9998   arguments="${tmp#* }"
9999 
10000   # Input might be given as Windows format, start by converting to
10001   # unix format.
10002   new_path="$path"
10003 
10004   windows_path="$new_path"
10005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10006     unix_path=`$CYGPATH -u "$windows_path"`
10007     new_path="$unix_path"
10008   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10009     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10010     new_path="$unix_path"
10011   fi
10012 
10013 
10014   # Now try to locate executable using which
10015   new_path=`$WHICH "$new_path" 2> /dev/null`
10016 
10017   if test "x$new_path" = x; then
10018     # Oops. Which didn't find the executable.
10019     # The splitting of arguments from the executable at a space might have been incorrect,
10020     # since paths with space are more likely in Windows. Give it another try with the whole
10021     # argument.
10022     path="$complete"
10023     arguments="EOL"
10024     new_path="$path"
10025 
10026   windows_path="$new_path"
10027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10028     unix_path=`$CYGPATH -u "$windows_path"`
10029     new_path="$unix_path"
10030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10031     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10032     new_path="$unix_path"
10033   fi
10034 
10035 
10036     new_path=`$WHICH "$new_path" 2> /dev/null`
10037 
10038     if test "x$new_path" = x; then
10039       # It's still not found. Now this is an unrecoverable error.
10040       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10041 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10042       has_space=`$ECHO "$complete" | $GREP " "`
10043       if test "x$has_space" != x; then
10044         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10045 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10046       fi
10047       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10048     fi
10049   fi
10050 
10051   # Now new_path has a complete unix path to the binary
10052   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10053     # Keep paths in /bin as-is, but remove trailing .exe if any
10054     new_path="${new_path/%.exe/}"
10055     # Do not save /bin paths to all_fixpath_prefixes!
10056   else
10057     # Not in mixed or Windows style, start by that.
10058     new_path=`cmd //c echo $new_path`
10059 
10060   input_path="$new_path"
10061   # Check if we need to convert this using DOS-style short mode. If the path
10062   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10063   # take no chances and rewrite it.
10064   # Note: m4 eats our [], so we need to use [ and ] instead.
10065   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10066   if test "x$has_forbidden_chars" != x; then
10067     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10068     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10069   fi
10070 
10071     # Output is in $new_path
10072 
10073   windows_path="$new_path"
10074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10075     unix_path=`$CYGPATH -u "$windows_path"`
10076     new_path="$unix_path"
10077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10079     new_path="$unix_path"
10080   fi
10081 
10082     # remove trailing .exe if any
10083     new_path="${new_path/%.exe/}"
10084 
10085     # Save the first 10 bytes of this path to the storage, so fixpath can work.
10086     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10087   fi
10088 
10089   else
10090     # We're on a posix platform. Hooray! :)
10091     # First separate the path from the arguments. This will split at the first
10092     # space.
10093     complete="$FOUND_MAKE"
10094     path="${complete%% *}"
10095     tmp="$complete EOL"
10096     arguments="${tmp#* }"
10097 
10098     # Cannot rely on the command "which" here since it doesn't always work.
10099     is_absolute_path=`$ECHO "$path" | $GREP ^/`
10100     if test -z "$is_absolute_path"; then
10101       # Path to executable is not absolute. Find it.
10102       IFS_save="$IFS"
10103       IFS=:
10104       for p in $PATH; do
10105         if test -f "$p/$path" && test -x "$p/$path"; then
10106           new_path="$p/$path"
10107           break
10108         fi
10109       done
10110       IFS="$IFS_save"
10111     else
10112       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10113 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10114       new_path="$path"
10115     fi
10116 
10117     if test "x$new_path" = x; then
10118       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10119 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10120       has_space=`$ECHO "$complete" | $GREP " "`
10121       if test "x$has_space" != x; then
10122         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10123 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10124       fi
10125       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10126     fi
10127   fi
10128 
10129   # Now join together the path and the arguments once again
10130   if test "x$arguments" != xEOL; then
10131     new_complete="$new_path ${arguments% *}"
10132   else
10133     new_complete="$new_path"
10134   fi
10135 
10136   if test "x$complete" != "x$new_complete"; then
10137     FOUND_MAKE="$new_complete"
10138     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10139 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10140   fi
10141 
10142         fi
10143       fi
10144     fi
10145   fi
10146 
10147         fi
10148         PATH=$OLD_PATH
10149       fi
10150     fi
10151 
10152     if test "x$FOUND_MAKE" = x; then
10153       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
10154     fi
10155   fi
10156 
10157   MAKE=$FOUND_MAKE
10158 
10159   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10160 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10161 
10162 
10163 
10164   # Test if find supports -delete
10165   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10166 $as_echo_n "checking if find supports -delete... " >&6; }
10167   FIND_DELETE="-delete"
10168 
10169   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10170 
10171   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10172 
10173   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10174   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10175     # No, it does not.
10176     rm $DELETEDIR/TestIfFindSupportsDelete
10177     FIND_DELETE="-exec rm \{\} \+"
10178     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179 $as_echo "no" >&6; }
10180   else
10181     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10182 $as_echo "yes" >&6; }
10183   fi
10184   rmdir $DELETEDIR
10185 
10186 
10187 
10188   # These tools might not be installed by default,
10189   # need hint on how to install them.
10190 
10191   for ac_prog in unzip
10192 do
10193   # Extract the first word of "$ac_prog", so it can be a program name with args.
10194 set dummy $ac_prog; ac_word=$2
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10196 $as_echo_n "checking for $ac_word... " >&6; }
10197 if ${ac_cv_path_UNZIP+:} false; then :
10198   $as_echo_n "(cached) " >&6
10199 else
10200   case $UNZIP in
10201   [\\/]* | ?:[\\/]*)
10202   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10203   ;;
10204   *)
10205   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10206 for as_dir in $PATH
10207 do
10208   IFS=$as_save_IFS
10209   test -z "$as_dir" && as_dir=.
10210     for ac_exec_ext in '' $ac_executable_extensions; do
10211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10212     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10214     break 2
10215   fi
10216 done
10217   done
10218 IFS=$as_save_IFS
10219 
10220   ;;
10221 esac
10222 fi
10223 UNZIP=$ac_cv_path_UNZIP
10224 if test -n "$UNZIP"; then
10225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10226 $as_echo "$UNZIP" >&6; }
10227 else
10228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10229 $as_echo "no" >&6; }
10230 fi
10231 
10232 
10233   test -n "$UNZIP" && break
10234 done
10235 
10236 
10237   if test "x$UNZIP" = x; then
10238     if test "xunzip" = x; then
10239       PROG_NAME=unzip
10240     else
10241       PROG_NAME=unzip
10242     fi
10243     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10244 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10245     as_fn_error $? "Cannot continue" "$LINENO" 5
10246   fi
10247 
10248 
10249 
10250   for ac_prog in zip
10251 do
10252   # Extract the first word of "$ac_prog", so it can be a program name with args.
10253 set dummy $ac_prog; ac_word=$2
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10255 $as_echo_n "checking for $ac_word... " >&6; }
10256 if ${ac_cv_path_ZIP+:} false; then :
10257   $as_echo_n "(cached) " >&6
10258 else
10259   case $ZIP in
10260   [\\/]* | ?:[\\/]*)
10261   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10262   ;;
10263   *)
10264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10265 for as_dir in $PATH
10266 do
10267   IFS=$as_save_IFS
10268   test -z "$as_dir" && as_dir=.
10269     for ac_exec_ext in '' $ac_executable_extensions; do
10270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10271     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10273     break 2
10274   fi
10275 done
10276   done
10277 IFS=$as_save_IFS
10278 
10279   ;;
10280 esac
10281 fi
10282 ZIP=$ac_cv_path_ZIP
10283 if test -n "$ZIP"; then
10284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10285 $as_echo "$ZIP" >&6; }
10286 else
10287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10288 $as_echo "no" >&6; }
10289 fi
10290 
10291 
10292   test -n "$ZIP" && break
10293 done
10294 
10295 
10296   if test "x$ZIP" = x; then
10297     if test "xzip" = x; then
10298       PROG_NAME=zip
10299     else
10300       PROG_NAME=zip
10301     fi
10302     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10303 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10304     as_fn_error $? "Cannot continue" "$LINENO" 5
10305   fi
10306 
10307 
10308 
10309   # Non-required basic tools
10310 
10311   # Extract the first word of "ldd", so it can be a program name with args.
10312 set dummy ldd; ac_word=$2
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314 $as_echo_n "checking for $ac_word... " >&6; }
10315 if ${ac_cv_path_LDD+:} false; then :
10316   $as_echo_n "(cached) " >&6
10317 else
10318   case $LDD in
10319   [\\/]* | ?:[\\/]*)
10320   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10321   ;;
10322   *)
10323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324 for as_dir in $PATH
10325 do
10326   IFS=$as_save_IFS
10327   test -z "$as_dir" && as_dir=.
10328     for ac_exec_ext in '' $ac_executable_extensions; do
10329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10330     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332     break 2
10333   fi
10334 done
10335   done
10336 IFS=$as_save_IFS
10337 
10338   ;;
10339 esac
10340 fi
10341 LDD=$ac_cv_path_LDD
10342 if test -n "$LDD"; then
10343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10344 $as_echo "$LDD" >&6; }
10345 else
10346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347 $as_echo "no" >&6; }
10348 fi
10349 
10350 
10351   if test "x$LDD" = "x"; then
10352     # List shared lib dependencies is used for
10353     # debug output and checking for forbidden dependencies.
10354     # We can build without it.
10355     LDD="true"
10356   fi
10357   for ac_prog in readelf greadelf
10358 do
10359   # Extract the first word of "$ac_prog", so it can be a program name with args.
10360 set dummy $ac_prog; ac_word=$2
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10362 $as_echo_n "checking for $ac_word... " >&6; }
10363 if ${ac_cv_path_READELF+:} false; then :
10364   $as_echo_n "(cached) " >&6
10365 else
10366   case $READELF in
10367   [\\/]* | ?:[\\/]*)
10368   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10369   ;;
10370   *)
10371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10372 for as_dir in $PATH
10373 do
10374   IFS=$as_save_IFS
10375   test -z "$as_dir" && as_dir=.
10376     for ac_exec_ext in '' $ac_executable_extensions; do
10377   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10378     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10379     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10380     break 2
10381   fi
10382 done
10383   done
10384 IFS=$as_save_IFS
10385 
10386   ;;
10387 esac
10388 fi
10389 READELF=$ac_cv_path_READELF
10390 if test -n "$READELF"; then
10391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10392 $as_echo "$READELF" >&6; }
10393 else
10394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10395 $as_echo "no" >&6; }
10396 fi
10397 
10398 
10399   test -n "$READELF" && break
10400 done
10401 
10402   # Extract the first word of "hg", so it can be a program name with args.
10403 set dummy hg; ac_word=$2
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10405 $as_echo_n "checking for $ac_word... " >&6; }
10406 if ${ac_cv_path_HG+:} false; then :
10407   $as_echo_n "(cached) " >&6
10408 else
10409   case $HG in
10410   [\\/]* | ?:[\\/]*)
10411   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10412   ;;
10413   *)
10414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10415 for as_dir in $PATH
10416 do
10417   IFS=$as_save_IFS
10418   test -z "$as_dir" && as_dir=.
10419     for ac_exec_ext in '' $ac_executable_extensions; do
10420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10421     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10423     break 2
10424   fi
10425 done
10426   done
10427 IFS=$as_save_IFS
10428 
10429   ;;
10430 esac
10431 fi
10432 HG=$ac_cv_path_HG
10433 if test -n "$HG"; then
10434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10435 $as_echo "$HG" >&6; }
10436 else
10437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10438 $as_echo "no" >&6; }
10439 fi
10440 
10441 
10442   # Extract the first word of "stat", so it can be a program name with args.
10443 set dummy stat; ac_word=$2
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10445 $as_echo_n "checking for $ac_word... " >&6; }
10446 if ${ac_cv_path_STAT+:} false; then :
10447   $as_echo_n "(cached) " >&6
10448 else
10449   case $STAT in
10450   [\\/]* | ?:[\\/]*)
10451   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10452   ;;
10453   *)
10454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10455 for as_dir in $PATH
10456 do
10457   IFS=$as_save_IFS
10458   test -z "$as_dir" && as_dir=.
10459     for ac_exec_ext in '' $ac_executable_extensions; do
10460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10461     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10463     break 2
10464   fi
10465 done
10466   done
10467 IFS=$as_save_IFS
10468 
10469   ;;
10470 esac
10471 fi
10472 STAT=$ac_cv_path_STAT
10473 if test -n "$STAT"; then
10474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10475 $as_echo "$STAT" >&6; }
10476 else
10477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10478 $as_echo "no" >&6; }
10479 fi
10480 
10481 
10482   # Extract the first word of "time", so it can be a program name with args.
10483 set dummy time; ac_word=$2
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10485 $as_echo_n "checking for $ac_word... " >&6; }
10486 if ${ac_cv_path_TIME+:} false; then :
10487   $as_echo_n "(cached) " >&6
10488 else
10489   case $TIME in
10490   [\\/]* | ?:[\\/]*)
10491   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10492   ;;
10493   *)
10494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10495 for as_dir in $PATH
10496 do
10497   IFS=$as_save_IFS
10498   test -z "$as_dir" && as_dir=.
10499     for ac_exec_ext in '' $ac_executable_extensions; do
10500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10501     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10503     break 2
10504   fi
10505 done
10506   done
10507 IFS=$as_save_IFS
10508 
10509   ;;
10510 esac
10511 fi
10512 TIME=$ac_cv_path_TIME
10513 if test -n "$TIME"; then
10514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10515 $as_echo "$TIME" >&6; }
10516 else
10517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518 $as_echo "no" >&6; }
10519 fi
10520 
10521 
10522   # Check if it's GNU time
10523   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10524   if test "x$IS_GNU_TIME" != x; then
10525     IS_GNU_TIME=yes
10526   else
10527     IS_GNU_TIME=no
10528   fi
10529 
10530 
10531   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10532 
10533   for ac_prog in comm
10534 do
10535   # Extract the first word of "$ac_prog", so it can be a program name with args.
10536 set dummy $ac_prog; ac_word=$2
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10538 $as_echo_n "checking for $ac_word... " >&6; }
10539 if ${ac_cv_path_COMM+:} false; then :
10540   $as_echo_n "(cached) " >&6
10541 else
10542   case $COMM in
10543   [\\/]* | ?:[\\/]*)
10544   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10545   ;;
10546   *)
10547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10548 for as_dir in $PATH
10549 do
10550   IFS=$as_save_IFS
10551   test -z "$as_dir" && as_dir=.
10552     for ac_exec_ext in '' $ac_executable_extensions; do
10553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10554     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10556     break 2
10557   fi
10558 done
10559   done
10560 IFS=$as_save_IFS
10561 
10562   ;;
10563 esac
10564 fi
10565 COMM=$ac_cv_path_COMM
10566 if test -n "$COMM"; then
10567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10568 $as_echo "$COMM" >&6; }
10569 else
10570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10571 $as_echo "no" >&6; }
10572 fi
10573 
10574 
10575   test -n "$COMM" && break
10576 done
10577 
10578 
10579   if test "x$COMM" = x; then
10580     if test "xcomm" = x; then
10581       PROG_NAME=comm
10582     else
10583       PROG_NAME=comm
10584     fi
10585     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10586 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10587     as_fn_error $? "Cannot continue" "$LINENO" 5
10588   fi
10589 
10590 
10591   fi
10592 
10593   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10594 
10595   for ac_prog in dsymutil
10596 do
10597   # Extract the first word of "$ac_prog", so it can be a program name with args.
10598 set dummy $ac_prog; ac_word=$2
10599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10600 $as_echo_n "checking for $ac_word... " >&6; }
10601 if ${ac_cv_path_DSYMUTIL+:} false; then :
10602   $as_echo_n "(cached) " >&6
10603 else
10604   case $DSYMUTIL in
10605   [\\/]* | ?:[\\/]*)
10606   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10607   ;;
10608   *)
10609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10610 for as_dir in $PATH
10611 do
10612   IFS=$as_save_IFS
10613   test -z "$as_dir" && as_dir=.
10614     for ac_exec_ext in '' $ac_executable_extensions; do
10615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10616     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10618     break 2
10619   fi
10620 done
10621   done
10622 IFS=$as_save_IFS
10623 
10624   ;;
10625 esac
10626 fi
10627 DSYMUTIL=$ac_cv_path_DSYMUTIL
10628 if test -n "$DSYMUTIL"; then
10629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10630 $as_echo "$DSYMUTIL" >&6; }
10631 else
10632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633 $as_echo "no" >&6; }
10634 fi
10635 
10636 
10637   test -n "$DSYMUTIL" && break
10638 done
10639 
10640 
10641   if test "x$DSYMUTIL" = x; then
10642     if test "xdsymutil" = x; then
10643       PROG_NAME=dsymutil
10644     else
10645       PROG_NAME=dsymutil
10646     fi
10647     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10648 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10649     as_fn_error $? "Cannot continue" "$LINENO" 5
10650   fi
10651 
10652 
10653 
10654   for ac_prog in xattr
10655 do
10656   # Extract the first word of "$ac_prog", so it can be a program name with args.
10657 set dummy $ac_prog; ac_word=$2
10658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10659 $as_echo_n "checking for $ac_word... " >&6; }
10660 if ${ac_cv_path_XATTR+:} false; then :
10661   $as_echo_n "(cached) " >&6
10662 else
10663   case $XATTR in
10664   [\\/]* | ?:[\\/]*)
10665   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10666   ;;
10667   *)
10668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10669 for as_dir in $PATH
10670 do
10671   IFS=$as_save_IFS
10672   test -z "$as_dir" && as_dir=.
10673     for ac_exec_ext in '' $ac_executable_extensions; do
10674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10675     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10677     break 2
10678   fi
10679 done
10680   done
10681 IFS=$as_save_IFS
10682 
10683   ;;
10684 esac
10685 fi
10686 XATTR=$ac_cv_path_XATTR
10687 if test -n "$XATTR"; then
10688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10689 $as_echo "$XATTR" >&6; }
10690 else
10691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10692 $as_echo "no" >&6; }
10693 fi
10694 
10695 
10696   test -n "$XATTR" && break
10697 done
10698 
10699 
10700   if test "x$XATTR" = x; then
10701     if test "xxattr" = x; then
10702       PROG_NAME=xattr
10703     else
10704       PROG_NAME=xattr
10705     fi
10706     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10707 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10708     as_fn_error $? "Cannot continue" "$LINENO" 5
10709   fi
10710 
10711 
10712     # Extract the first word of "codesign", so it can be a program name with args.
10713 set dummy codesign; ac_word=$2
10714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10715 $as_echo_n "checking for $ac_word... " >&6; }
10716 if ${ac_cv_path_CODESIGN+:} false; then :
10717   $as_echo_n "(cached) " >&6
10718 else
10719   case $CODESIGN in
10720   [\\/]* | ?:[\\/]*)
10721   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10722   ;;
10723   *)
10724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10725 for as_dir in $PATH
10726 do
10727   IFS=$as_save_IFS
10728   test -z "$as_dir" && as_dir=.
10729     for ac_exec_ext in '' $ac_executable_extensions; do
10730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10731     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10733     break 2
10734   fi
10735 done
10736   done
10737 IFS=$as_save_IFS
10738 
10739   ;;
10740 esac
10741 fi
10742 CODESIGN=$ac_cv_path_CODESIGN
10743 if test -n "$CODESIGN"; then
10744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10745 $as_echo "$CODESIGN" >&6; }
10746 else
10747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10748 $as_echo "no" >&6; }
10749 fi
10750 
10751 
10752     if test "x$CODESIGN" != "x"; then
10753       # Verify that the openjdk_codesign certificate is present
10754       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10755 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10756       rm -f codesign-testfile
10757       touch codesign-testfile
10758       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10759       rm -f codesign-testfile
10760       if test "x$CODESIGN" = x; then
10761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10762 $as_echo "no" >&6; }
10763       else
10764         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10765 $as_echo "yes" >&6; }
10766       fi
10767     fi
10768   fi
10769 
10770 
10771 # Check if pkg-config is available.
10772 
10773 
10774 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10775         if test -n "$ac_tool_prefix"; then
10776   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10777 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10779 $as_echo_n "checking for $ac_word... " >&6; }
10780 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10781   $as_echo_n "(cached) " >&6
10782 else
10783   case $PKG_CONFIG in
10784   [\\/]* | ?:[\\/]*)
10785   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10786   ;;
10787   *)
10788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10789 for as_dir in $PATH
10790 do
10791   IFS=$as_save_IFS
10792   test -z "$as_dir" && as_dir=.
10793     for ac_exec_ext in '' $ac_executable_extensions; do
10794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10795     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10797     break 2
10798   fi
10799 done
10800   done
10801 IFS=$as_save_IFS
10802 
10803   ;;
10804 esac
10805 fi
10806 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10807 if test -n "$PKG_CONFIG"; then
10808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10809 $as_echo "$PKG_CONFIG" >&6; }
10810 else
10811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10812 $as_echo "no" >&6; }
10813 fi
10814 
10815 
10816 fi
10817 if test -z "$ac_cv_path_PKG_CONFIG"; then
10818   ac_pt_PKG_CONFIG=$PKG_CONFIG
10819   # Extract the first word of "pkg-config", so it can be a program name with args.
10820 set dummy pkg-config; ac_word=$2
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10822 $as_echo_n "checking for $ac_word... " >&6; }
10823 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10824   $as_echo_n "(cached) " >&6
10825 else
10826   case $ac_pt_PKG_CONFIG in
10827   [\\/]* | ?:[\\/]*)
10828   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10829   ;;
10830   *)
10831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10832 for as_dir in $PATH
10833 do
10834   IFS=$as_save_IFS
10835   test -z "$as_dir" && as_dir=.
10836     for ac_exec_ext in '' $ac_executable_extensions; do
10837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10838     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10840     break 2
10841   fi
10842 done
10843   done
10844 IFS=$as_save_IFS
10845 
10846   ;;
10847 esac
10848 fi
10849 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10850 if test -n "$ac_pt_PKG_CONFIG"; then
10851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10852 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10853 else
10854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10855 $as_echo "no" >&6; }
10856 fi
10857 
10858   if test "x$ac_pt_PKG_CONFIG" = x; then
10859     PKG_CONFIG=""
10860   else
10861     case $cross_compiling:$ac_tool_warned in
10862 yes:)
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10864 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10865 ac_tool_warned=yes ;;
10866 esac
10867     PKG_CONFIG=$ac_pt_PKG_CONFIG
10868   fi
10869 else
10870   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10871 fi
10872 
10873 fi
10874 if test -n "$PKG_CONFIG"; then
10875         _pkg_min_version=0.9.0
10876         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10877 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10878         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10879                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10880 $as_echo "yes" >&6; }
10881         else
10882                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10883 $as_echo "no" >&6; }
10884                 PKG_CONFIG=""
10885         fi
10886 
10887 fi
10888 
10889 # After basic tools have been setup, we can check build os specific details.
10890 
10891   ###############################################################################
10892 
10893   # Note that this is the build platform OS version!
10894 
10895   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10896   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10897   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10898   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10899 
10900 
10901 
10902 
10903 
10904 # Setup builddeps, for automatic downloading of tools we need.
10905 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10906 # boot-jdk setup, but we need to have basic tools setup first.
10907 
10908 
10909 # Check whether --with-builddeps-conf was given.
10910 if test "${with_builddeps_conf+set}" = set; then :
10911   withval=$with_builddeps_conf;
10912 fi
10913 
10914 
10915 
10916 # Check whether --with-builddeps-server was given.
10917 if test "${with_builddeps_server+set}" = set; then :
10918   withval=$with_builddeps_server;
10919 fi
10920 
10921 
10922 
10923 # Check whether --with-builddeps-dir was given.
10924 if test "${with_builddeps_dir+set}" = set; then :
10925   withval=$with_builddeps_dir;
10926 else
10927   with_builddeps_dir=/localhome/builddeps
10928 fi
10929 
10930 
10931 
10932 # Check whether --with-builddeps-group was given.
10933 if test "${with_builddeps_group+set}" = set; then :
10934   withval=$with_builddeps_group;
10935 fi
10936 
10937 
10938 
10939 
10940   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10941     if test "x$with_builddeps_conf" != x; then
10942       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10943 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10944       builddepsfile=$with_builddeps_conf
10945       if test -s $builddepsfile; then
10946         . $builddepsfile
10947         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10948 $as_echo "loaded!" >&6; }
10949       else
10950         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10951       fi
10952     else
10953       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10954 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10955       builddepsfile=`mktemp`
10956       touch $builddepsfile
10957       # Put all found confs into a single file.
10958       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10959       # Source the file to acquire the variables
10960       if test -s $builddepsfile; then
10961         . $builddepsfile
10962         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10963 $as_echo "found at least one!" >&6; }
10964       else
10965         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10966       fi
10967     fi
10968     # Create build and target names that use _ instead of "-" and ".".
10969     # This is necessary to use them in variable names.
10970     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10971     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10972     # Extract rewrite information for build and target
10973     eval rewritten_build=\${REWRITE_${build_var}}
10974     if test "x$rewritten_build" = x; then
10975       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10976       echo Build stays the same $rewritten_build
10977     else
10978       echo Rewriting build for builddeps into $rewritten_build
10979     fi
10980     eval rewritten_target=\${REWRITE_${target_var}}
10981     if test "x$rewritten_target" = x; then
10982       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10983       echo Target stays the same $rewritten_target
10984     else
10985       echo Rewriting target for builddeps into $rewritten_target
10986     fi
10987     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10988     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10989   fi
10990   for ac_prog in 7z unzip
10991 do
10992   # Extract the first word of "$ac_prog", so it can be a program name with args.
10993 set dummy $ac_prog; ac_word=$2
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10995 $as_echo_n "checking for $ac_word... " >&6; }
10996 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10997   $as_echo_n "(cached) " >&6
10998 else
10999   if test -n "$BDEPS_UNZIP"; then
11000   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
11001 else
11002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003 for as_dir in $PATH
11004 do
11005   IFS=$as_save_IFS
11006   test -z "$as_dir" && as_dir=.
11007     for ac_exec_ext in '' $ac_executable_extensions; do
11008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11009     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
11010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11011     break 2
11012   fi
11013 done
11014   done
11015 IFS=$as_save_IFS
11016 
11017 fi
11018 fi
11019 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11020 if test -n "$BDEPS_UNZIP"; then
11021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11022 $as_echo "$BDEPS_UNZIP" >&6; }
11023 else
11024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025 $as_echo "no" >&6; }
11026 fi
11027 
11028 
11029   test -n "$BDEPS_UNZIP" && break
11030 done
11031 
11032   if test "x$BDEPS_UNZIP" = x7z; then
11033     BDEPS_UNZIP="7z x"
11034   fi
11035 
11036   for ac_prog in wget lftp ftp
11037 do
11038   # Extract the first word of "$ac_prog", so it can be a program name with args.
11039 set dummy $ac_prog; ac_word=$2
11040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11041 $as_echo_n "checking for $ac_word... " >&6; }
11042 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11043   $as_echo_n "(cached) " >&6
11044 else
11045   if test -n "$BDEPS_FTP"; then
11046   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11047 else
11048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11049 for as_dir in $PATH
11050 do
11051   IFS=$as_save_IFS
11052   test -z "$as_dir" && as_dir=.
11053     for ac_exec_ext in '' $ac_executable_extensions; do
11054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11055     ac_cv_prog_BDEPS_FTP="$ac_prog"
11056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11057     break 2
11058   fi
11059 done
11060   done
11061 IFS=$as_save_IFS
11062 
11063 fi
11064 fi
11065 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11066 if test -n "$BDEPS_FTP"; then
11067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11068 $as_echo "$BDEPS_FTP" >&6; }
11069 else
11070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11071 $as_echo "no" >&6; }
11072 fi
11073 
11074 
11075   test -n "$BDEPS_FTP" && break
11076 done
11077 
11078 
11079 
11080 ###############################################################################
11081 #
11082 # Determine OpenJDK variants, options and version numbers.
11083 #
11084 ###############################################################################
11085 
11086 # We need build & target for this.
11087 
11088 
11089   ###############################################################################
11090   #
11091   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11092   # We always build headless support.
11093   #
11094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11095 $as_echo_n "checking headful support... " >&6; }
11096   # Check whether --enable-headful was given.
11097 if test "${enable_headful+set}" = set; then :
11098   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11099 else
11100   SUPPORT_HEADFUL=yes
11101 fi
11102 
11103 
11104   SUPPORT_HEADLESS=yes
11105   BUILD_HEADLESS="BUILD_HEADLESS:=true"
11106 
11107   if test "x$SUPPORT_HEADFUL" = xyes; then
11108     # We are building both headful and headless.
11109     headful_msg="include support for both headful and headless"
11110   fi
11111 
11112   if test "x$SUPPORT_HEADFUL" = xno; then
11113     # Thus we are building headless only.
11114     BUILD_HEADLESS="BUILD_HEADLESS:=true"
11115     headful_msg="headless only"
11116   fi
11117 
11118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11119 $as_echo "$headful_msg" >&6; }
11120 
11121 
11122 
11123 
11124 
11125   # Control wether Hotspot runs Queens test after build.
11126   # Check whether --enable-hotspot-test-in-build was given.
11127 if test "${enable_hotspot_test_in_build+set}" = set; then :
11128   enableval=$enable_hotspot_test_in_build;
11129 else
11130   enable_hotspot_test_in_build=no
11131 fi
11132 
11133   if test "x$enable_hotspot_test_in_build" = "xyes"; then
11134     TEST_IN_BUILD=true
11135   else
11136     TEST_IN_BUILD=false
11137   fi
11138 
11139 
11140   ###############################################################################
11141   #
11142   # Choose cacerts source file
11143   #
11144 
11145 # Check whether --with-cacerts-file was given.
11146 if test "${with_cacerts_file+set}" = set; then :
11147   withval=$with_cacerts_file;
11148 fi
11149 
11150   if test "x$with_cacerts_file" != x; then
11151     CACERTS_FILE=$with_cacerts_file
11152   else
11153     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11154   fi
11155 
11156 
11157   ###############################################################################
11158   #
11159   # Enable or disable unlimited crypto
11160   #
11161   # Check whether --enable-unlimited-crypto was given.
11162 if test "${enable_unlimited_crypto+set}" = set; then :
11163   enableval=$enable_unlimited_crypto;
11164 else
11165   enable_unlimited_crypto=no
11166 fi
11167 
11168   if test "x$enable_unlimited_crypto" = "xyes"; then
11169     UNLIMITED_CRYPTO=true
11170   else
11171     UNLIMITED_CRYPTO=false
11172   fi
11173 
11174 
11175   ###############################################################################
11176   #
11177   # Enable or disable the elliptic curve crypto implementation
11178   #
11179 
11180 
11181   ###############################################################################
11182   #
11183   # Compress jars
11184   #
11185   COMPRESS_JARS=false
11186 
11187 
11188 
11189 
11190   # Source the version numbers
11191   . $AUTOCONF_DIR/version-numbers
11192 
11193   # Get the settings from parameters
11194 
11195 # Check whether --with-milestone was given.
11196 if test "${with_milestone+set}" = set; then :
11197   withval=$with_milestone;
11198 fi
11199 
11200   if test "x$with_milestone" = xyes; then
11201     as_fn_error $? "Milestone must have a value" "$LINENO" 5
11202   elif test "x$with_milestone" != x; then
11203     MILESTONE="$with_milestone"
11204   fi
11205   if test "x$MILESTONE" = x; then
11206     MILESTONE=internal
11207   fi
11208 
11209 
11210 # Check whether --with-update-version was given.
11211 if test "${with_update_version+set}" = set; then :
11212   withval=$with_update_version;
11213 fi
11214 
11215   if test "x$with_update_version" = xyes; then
11216     as_fn_error $? "Update version must have a value" "$LINENO" 5
11217   elif test "x$with_update_version" != x; then
11218     JDK_UPDATE_VERSION="$with_update_version"
11219     # On macosx 10.7, it's not possible to set --with-update-version=0X due
11220     # to a bug in expr (which reduces it to just X). To work around this, we
11221     # always add a 0 to one digit update versions.
11222     if test "${#JDK_UPDATE_VERSION}" = "1"; then
11223       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11224     fi
11225   fi
11226 
11227 
11228 # Check whether --with-user-release-suffix was given.
11229 if test "${with_user_release_suffix+set}" = set; then :
11230   withval=$with_user_release_suffix;
11231 fi
11232 
11233   if test "x$with_user_release_suffix" = xyes; then
11234     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11235   elif test "x$with_user_release_suffix" != x; then
11236     USER_RELEASE_SUFFIX="$with_user_release_suffix"
11237   fi
11238 
11239 
11240 # Check whether --with-build-number was given.
11241 if test "${with_build_number+set}" = set; then :
11242   withval=$with_build_number;
11243 fi
11244 
11245   if test "x$with_build_number" = xyes; then
11246     as_fn_error $? "Build number must have a value" "$LINENO" 5
11247   elif test "x$with_build_number" != x; then
11248     JDK_BUILD_NUMBER="$with_build_number"
11249   fi
11250   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11251   if test "x$JDK_BUILD_NUMBER" = x; then
11252     JDK_BUILD_NUMBER=b00
11253     if test "x$USER_RELEASE_SUFFIX" = x; then
11254       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11255       # Avoid [:alnum:] since it depends on the locale.
11256       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11257       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11258     fi
11259   fi
11260 
11261   # Now set the JDK version, milestone, build number etc.
11262 
11263 
11264 
11265 
11266 
11267 
11268 
11269 
11270 
11271 
11272 
11273 
11274 
11275 
11276 
11277 
11278 # Check whether --with-copyright-year was given.
11279 if test "${with_copyright_year+set}" = set; then :
11280   withval=$with_copyright_year;
11281 fi
11282 
11283   if test "x$with_copyright_year" = xyes; then
11284     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
11285   elif test "x$with_copyright_year" != x; then
11286     COPYRIGHT_YEAR="$with_copyright_year"
11287   else
11288     COPYRIGHT_YEAR=`date +'%Y'`
11289   fi
11290 
11291 
11292   if test "x$JDK_UPDATE_VERSION" != x; then
11293     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11294   else
11295     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11296   fi
11297 
11298 
11299   # The cooked update version used to encode trailing letters in the update
11300   # version into a trailing number. That is no longer needed, but need to
11301   # keep the format in 8u for compatibility.
11302   COOKED_JDK_UPDATE_VERSION="${JDK_UPDATE_VERSION}0"
11303 
11304 
11305   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11306 
11307 
11308 
11309 ###############################################################################
11310 #
11311 # Setup BootJDK, used to bootstrap the build.
11312 #
11313 ###############################################################################
11314 
11315 
11316   BOOT_JDK_FOUND=no
11317 
11318 # Check whether --with-boot-jdk was given.
11319 if test "${with_boot_jdk+set}" = set; then :
11320   withval=$with_boot_jdk;
11321 fi
11322 
11323 
11324   # We look for the Boot JDK through various means, going from more certain to
11325   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11326   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11327   # must check if this is indeed valid; otherwise we'll continue looking.
11328 
11329   # Test: Is bootjdk explicitely set by command line arguments?
11330 
11331   if test "x$BOOT_JDK_FOUND" = xno; then
11332     # Now execute the test
11333 
11334   if test "x$with_boot_jdk" != x; then
11335     BOOT_JDK=$with_boot_jdk
11336     BOOT_JDK_FOUND=maybe
11337     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11338 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11339   fi
11340 
11341 
11342     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11343     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11344       # Do we have a bin/java?
11345       if test ! -x "$BOOT_JDK/bin/java"; then
11346         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11347 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11348         BOOT_JDK_FOUND=no
11349       else
11350         # Do we have a bin/javac?
11351         if test ! -x "$BOOT_JDK/bin/javac"; then
11352           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11354           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11355 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11356           BOOT_JDK_FOUND=no
11357         else
11358           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11359           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11360             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11361 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11362             BOOT_JDK_FOUND=no
11363           else
11364             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11365             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11366 
11367             # Extra M4 quote needed to protect [] in grep expression.
11368             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11369             if test "x$FOUND_VERSION_78" = x; then
11370               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11371 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11372               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11373 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11374               BOOT_JDK_FOUND=no
11375             else
11376               # We're done! :-)
11377               BOOT_JDK_FOUND=yes
11378 
11379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11380 
11381   # Input might be given as Windows format, start by converting to
11382   # unix format.
11383   path="$BOOT_JDK"
11384   new_path=`$CYGPATH -u "$path"`
11385 
11386   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11387   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11388   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11389   # "foo.exe" is OK but "foo" is an error.
11390   #
11391   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11392   # It is also a way to make sure we got the proper file name for the real test later on.
11393   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11394   if test "x$test_shortpath" = x; then
11395     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11397     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11398   fi
11399 
11400   # Call helper function which possibly converts this using DOS-style short mode.
11401   # If so, the updated path is stored in $new_path.
11402 
11403   input_path="$new_path"
11404   # Check if we need to convert this using DOS-style short mode. If the path
11405   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11406   # take no chances and rewrite it.
11407   # Note: m4 eats our [], so we need to use [ and ] instead.
11408   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11409   if test "x$has_forbidden_chars" != x; then
11410     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11411     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11412     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11413     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11414       # Going to short mode and back again did indeed matter. Since short mode is
11415       # case insensitive, let's make it lowercase to improve readability.
11416       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11417       # Now convert it back to Unix-stile (cygpath)
11418       input_path=`$CYGPATH -u "$shortmode_path"`
11419       new_path="$input_path"
11420     fi
11421   fi
11422 
11423   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11424   if test "x$test_cygdrive_prefix" = x; then
11425     # As a simple fix, exclude /usr/bin since it's not a real path.
11426     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11427       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11428       # a path prefixed by /cygdrive for fixpath to work.
11429       new_path="$CYGWIN_ROOT_PATH$input_path"
11430     fi
11431   fi
11432 
11433 
11434   if test "x$path" != "x$new_path"; then
11435     BOOT_JDK="$new_path"
11436     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11437 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11438   fi
11439 
11440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11441 
11442   path="$BOOT_JDK"
11443   has_colon=`$ECHO $path | $GREP ^.:`
11444   new_path="$path"
11445   if test "x$has_colon" = x; then
11446     # Not in mixed or Windows style, start by that.
11447     new_path=`cmd //c echo $path`
11448   fi
11449 
11450 
11451   input_path="$new_path"
11452   # Check if we need to convert this using DOS-style short mode. If the path
11453   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11454   # take no chances and rewrite it.
11455   # Note: m4 eats our [], so we need to use [ and ] instead.
11456   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11457   if test "x$has_forbidden_chars" != x; then
11458     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11459     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11460   fi
11461 
11462 
11463   windows_path="$new_path"
11464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11465     unix_path=`$CYGPATH -u "$windows_path"`
11466     new_path="$unix_path"
11467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11469     new_path="$unix_path"
11470   fi
11471 
11472   if test "x$path" != "x$new_path"; then
11473     BOOT_JDK="$new_path"
11474     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11475 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11476   fi
11477 
11478   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11479   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11480 
11481   else
11482     # We're on a posix platform. Hooray! :)
11483     path="$BOOT_JDK"
11484     has_space=`$ECHO "$path" | $GREP " "`
11485     if test "x$has_space" != x; then
11486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11487 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11488       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11489     fi
11490 
11491     # Use eval to expand a potential ~
11492     eval path="$path"
11493     if test ! -f "$path" && test ! -d "$path"; then
11494       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11495     fi
11496 
11497     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11498   fi
11499 
11500               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11501 $as_echo_n "checking for Boot JDK... " >&6; }
11502               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11503 $as_echo "$BOOT_JDK" >&6; }
11504               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11505 $as_echo_n "checking Boot JDK version... " >&6; }
11506               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11507               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11508 $as_echo "$BOOT_JDK_VERSION" >&6; }
11509             fi # end check jdk version
11510           fi # end check rt.jar
11511         fi # end check javac
11512       fi # end check java
11513     fi # end check boot jdk found
11514   fi
11515 
11516   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11517     # Having specified an argument which is incorrect will produce an instant failure;
11518     # we should not go on looking
11519     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11520   fi
11521 
11522   # Test: Is bootjdk available from builddeps?
11523 
11524   if test "x$BOOT_JDK_FOUND" = xno; then
11525     # Now execute the test
11526 
11527 
11528 
11529   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11530     # Source the builddeps file again, to make sure it uses the latest variables!
11531     . $builddepsfile
11532     # Look for a target and build machine specific resource!
11533     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11534     if test "x$resource" = x; then
11535       # Ok, lets instead look for a target specific resource
11536       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11537     fi
11538     if test "x$resource" = x; then
11539       # Ok, lets instead look for a build specific resource
11540       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11541     fi
11542     if test "x$resource" = x; then
11543       # Ok, lets instead look for a generic resource
11544       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11545       resource=${builddep_bootjdk}
11546     fi
11547     if test "x$resource" != x; then
11548       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11549 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11550       # If the resource in the builddeps.conf file is an existing directory,
11551       # for example /java/linux/cups
11552       if test -d ${resource}; then
11553         depdir=${resource}
11554       else
11555 
11556   # bootjdk is for example mymodule
11557   # $resource is for example libs/general/libmymod_1_2_3.zip
11558   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11559   # $with_builddeps_dir is for example /localhome/builddeps
11560   # depdir is the name of the variable into which we store the depdir, eg MYMOD
11561   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11562   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11563   filename=`basename $resource`
11564   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11565   filebase=${filename%%.*}
11566   extension=${filename#*.}
11567   installdir=$with_builddeps_dir/$filebase
11568   if test ! -f $installdir/$filename.unpacked; then
11569     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11570 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11571     if test ! -d $installdir; then
11572       mkdir -p $installdir
11573     fi
11574     if test ! -d $installdir; then
11575       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11576     fi
11577     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11578     touch $tmpfile
11579     if test ! -f $tmpfile; then
11580       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11581     fi
11582 
11583   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11584   # $tmpfile is the local file name for the downloaded file.
11585   VALID_TOOL=no
11586   if test "x$BDEPS_FTP" = xwget; then
11587     VALID_TOOL=yes
11588     wget -O $tmpfile $with_builddeps_server/$resource
11589   fi
11590   if test "x$BDEPS_FTP" = xlftp; then
11591     VALID_TOOL=yes
11592     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11593   fi
11594   if test "x$BDEPS_FTP" = xftp; then
11595     VALID_TOOL=yes
11596     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11597     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11598     FTPUSERPWD=${FTPSERVER%%@*}
11599     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11600       FTPUSER=${userpwd%%:*}
11601       FTPPWD=${userpwd#*@}
11602       FTPSERVER=${FTPSERVER#*@}
11603     else
11604       FTPUSER=ftp
11605       FTPPWD=ftp
11606     fi
11607     # the "pass" command does not work on some
11608     # ftp clients (read ftp.exe) but if it works,
11609     # passive mode is better!
11610     ( \
11611         echo "user $FTPUSER $FTPPWD"        ; \
11612         echo "pass"                         ; \
11613         echo "bin"                          ; \
11614         echo "get $FTPPATH $tmpfile"              ; \
11615     ) | ftp -in $FTPSERVER
11616   fi
11617   if test "x$VALID_TOOL" != xyes; then
11618     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11619   fi
11620 
11621     mv $tmpfile $installdir/$filename
11622     if test ! -s $installdir/$filename; then
11623       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11624     fi
11625     case "$extension" in
11626       zip)  echo "Unzipping $installdir/$filename..."
11627         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11628         ;;
11629       tar.gz) echo "Untaring $installdir/$filename..."
11630         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11631         ;;
11632       tgz) echo "Untaring $installdir/$filename..."
11633         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11634         ;;
11635       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11636         ;;
11637     esac
11638   fi
11639   if test -f $installdir/$filename.unpacked; then
11640     depdir=$installdir
11641   fi
11642 
11643       fi
11644       # Source the builddeps file again, because in the previous command, the depdir
11645       # was updated to point at the current build dependency install directory.
11646       . $builddepsfile
11647       # Now extract variables from the builddeps.conf files.
11648       theroot=${builddep_bootjdk_ROOT}
11649       thecflags=${builddep_bootjdk_CFLAGS}
11650       thelibs=${builddep_bootjdk_LIBS}
11651       if test "x$depdir" = x; then
11652         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11653       fi
11654       BOOT_JDK=$depdir
11655       if test "x$theroot" != x; then
11656         BOOT_JDK="$theroot"
11657       fi
11658       if test "x$thecflags" != x; then
11659         BOOT_JDK_CFLAGS="$thecflags"
11660       fi
11661       if test "x$thelibs" != x; then
11662         BOOT_JDK_LIBS="$thelibs"
11663       fi
11664       BOOT_JDK_FOUND=maybe
11665       else BOOT_JDK_FOUND=no
11666 
11667     fi
11668     else BOOT_JDK_FOUND=no
11669 
11670   fi
11671 
11672 
11673 
11674     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11675     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11676       # Do we have a bin/java?
11677       if test ! -x "$BOOT_JDK/bin/java"; then
11678         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11679 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11680         BOOT_JDK_FOUND=no
11681       else
11682         # Do we have a bin/javac?
11683         if test ! -x "$BOOT_JDK/bin/javac"; then
11684           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11685 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11686           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11687 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11688           BOOT_JDK_FOUND=no
11689         else
11690           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11691           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11692             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11693 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11694             BOOT_JDK_FOUND=no
11695           else
11696             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11697             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11698 
11699             # Extra M4 quote needed to protect [] in grep expression.
11700             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11701             if test "x$FOUND_VERSION_78" = x; then
11702               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11704               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11705 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11706               BOOT_JDK_FOUND=no
11707             else
11708               # We're done! :-)
11709               BOOT_JDK_FOUND=yes
11710 
11711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11712 
11713   # Input might be given as Windows format, start by converting to
11714   # unix format.
11715   path="$BOOT_JDK"
11716   new_path=`$CYGPATH -u "$path"`
11717 
11718   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11719   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11720   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11721   # "foo.exe" is OK but "foo" is an error.
11722   #
11723   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11724   # It is also a way to make sure we got the proper file name for the real test later on.
11725   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11726   if test "x$test_shortpath" = x; then
11727     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11728 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11729     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11730   fi
11731 
11732   # Call helper function which possibly converts this using DOS-style short mode.
11733   # If so, the updated path is stored in $new_path.
11734 
11735   input_path="$new_path"
11736   # Check if we need to convert this using DOS-style short mode. If the path
11737   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11738   # take no chances and rewrite it.
11739   # Note: m4 eats our [], so we need to use [ and ] instead.
11740   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11741   if test "x$has_forbidden_chars" != x; then
11742     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11743     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11744     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11745     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11746       # Going to short mode and back again did indeed matter. Since short mode is
11747       # case insensitive, let's make it lowercase to improve readability.
11748       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11749       # Now convert it back to Unix-stile (cygpath)
11750       input_path=`$CYGPATH -u "$shortmode_path"`
11751       new_path="$input_path"
11752     fi
11753   fi
11754 
11755   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11756   if test "x$test_cygdrive_prefix" = x; then
11757     # As a simple fix, exclude /usr/bin since it's not a real path.
11758     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11759       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11760       # a path prefixed by /cygdrive for fixpath to work.
11761       new_path="$CYGWIN_ROOT_PATH$input_path"
11762     fi
11763   fi
11764 
11765 
11766   if test "x$path" != "x$new_path"; then
11767     BOOT_JDK="$new_path"
11768     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11769 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11770   fi
11771 
11772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11773 
11774   path="$BOOT_JDK"
11775   has_colon=`$ECHO $path | $GREP ^.:`
11776   new_path="$path"
11777   if test "x$has_colon" = x; then
11778     # Not in mixed or Windows style, start by that.
11779     new_path=`cmd //c echo $path`
11780   fi
11781 
11782 
11783   input_path="$new_path"
11784   # Check if we need to convert this using DOS-style short mode. If the path
11785   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11786   # take no chances and rewrite it.
11787   # Note: m4 eats our [], so we need to use [ and ] instead.
11788   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11789   if test "x$has_forbidden_chars" != x; then
11790     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11791     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11792   fi
11793 
11794 
11795   windows_path="$new_path"
11796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11797     unix_path=`$CYGPATH -u "$windows_path"`
11798     new_path="$unix_path"
11799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11801     new_path="$unix_path"
11802   fi
11803 
11804   if test "x$path" != "x$new_path"; then
11805     BOOT_JDK="$new_path"
11806     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11807 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11808   fi
11809 
11810   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11811   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11812 
11813   else
11814     # We're on a posix platform. Hooray! :)
11815     path="$BOOT_JDK"
11816     has_space=`$ECHO "$path" | $GREP " "`
11817     if test "x$has_space" != x; then
11818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11819 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11820       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11821     fi
11822 
11823     # Use eval to expand a potential ~
11824     eval path="$path"
11825     if test ! -f "$path" && test ! -d "$path"; then
11826       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11827     fi
11828 
11829     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11830   fi
11831 
11832               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11833 $as_echo_n "checking for Boot JDK... " >&6; }
11834               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11835 $as_echo "$BOOT_JDK" >&6; }
11836               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11837 $as_echo_n "checking Boot JDK version... " >&6; }
11838               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11839               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11840 $as_echo "$BOOT_JDK_VERSION" >&6; }
11841             fi # end check jdk version
11842           fi # end check rt.jar
11843         fi # end check javac
11844       fi # end check java
11845     fi # end check boot jdk found
11846   fi
11847 
11848 
11849   # Test: Is $JAVA_HOME set?
11850 
11851   if test "x$BOOT_JDK_FOUND" = xno; then
11852     # Now execute the test
11853 
11854   if test "x$JAVA_HOME" != x; then
11855     JAVA_HOME_PROCESSED="$JAVA_HOME"
11856 
11857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11858 
11859   # Input might be given as Windows format, start by converting to
11860   # unix format.
11861   path="$JAVA_HOME_PROCESSED"
11862   new_path=`$CYGPATH -u "$path"`
11863 
11864   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11865   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11866   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11867   # "foo.exe" is OK but "foo" is an error.
11868   #
11869   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11870   # It is also a way to make sure we got the proper file name for the real test later on.
11871   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11872   if test "x$test_shortpath" = x; then
11873     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11874 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11875     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11876   fi
11877 
11878   # Call helper function which possibly converts this using DOS-style short mode.
11879   # If so, the updated path is stored in $new_path.
11880 
11881   input_path="$new_path"
11882   # Check if we need to convert this using DOS-style short mode. If the path
11883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11884   # take no chances and rewrite it.
11885   # Note: m4 eats our [], so we need to use [ and ] instead.
11886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11887   if test "x$has_forbidden_chars" != x; then
11888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11889     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11890     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11891     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11892       # Going to short mode and back again did indeed matter. Since short mode is
11893       # case insensitive, let's make it lowercase to improve readability.
11894       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11895       # Now convert it back to Unix-stile (cygpath)
11896       input_path=`$CYGPATH -u "$shortmode_path"`
11897       new_path="$input_path"
11898     fi
11899   fi
11900 
11901   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11902   if test "x$test_cygdrive_prefix" = x; then
11903     # As a simple fix, exclude /usr/bin since it's not a real path.
11904     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11905       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11906       # a path prefixed by /cygdrive for fixpath to work.
11907       new_path="$CYGWIN_ROOT_PATH$input_path"
11908     fi
11909   fi
11910 
11911 
11912   if test "x$path" != "x$new_path"; then
11913     JAVA_HOME_PROCESSED="$new_path"
11914     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11915 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11916   fi
11917 
11918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11919 
11920   path="$JAVA_HOME_PROCESSED"
11921   has_colon=`$ECHO $path | $GREP ^.:`
11922   new_path="$path"
11923   if test "x$has_colon" = x; then
11924     # Not in mixed or Windows style, start by that.
11925     new_path=`cmd //c echo $path`
11926   fi
11927 
11928 
11929   input_path="$new_path"
11930   # Check if we need to convert this using DOS-style short mode. If the path
11931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11932   # take no chances and rewrite it.
11933   # Note: m4 eats our [], so we need to use [ and ] instead.
11934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11935   if test "x$has_forbidden_chars" != x; then
11936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11937     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11938   fi
11939 
11940 
11941   windows_path="$new_path"
11942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11943     unix_path=`$CYGPATH -u "$windows_path"`
11944     new_path="$unix_path"
11945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11947     new_path="$unix_path"
11948   fi
11949 
11950   if test "x$path" != "x$new_path"; then
11951     JAVA_HOME_PROCESSED="$new_path"
11952     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11953 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11954   fi
11955 
11956   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11957   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11958 
11959   else
11960     # We're on a posix platform. Hooray! :)
11961     path="$JAVA_HOME_PROCESSED"
11962     has_space=`$ECHO "$path" | $GREP " "`
11963     if test "x$has_space" != x; then
11964       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11965 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11966       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11967     fi
11968 
11969     # Use eval to expand a potential ~
11970     eval path="$path"
11971     if test ! -f "$path" && test ! -d "$path"; then
11972       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11973     fi
11974 
11975     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11976   fi
11977 
11978     if test ! -d "$JAVA_HOME_PROCESSED"; then
11979       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11980 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11981     else
11982       # Aha, the user has set a JAVA_HOME
11983       # let us use that as the Boot JDK.
11984       BOOT_JDK="$JAVA_HOME_PROCESSED"
11985       BOOT_JDK_FOUND=maybe
11986       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11987 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11988     fi
11989   fi
11990 
11991 
11992     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11993     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11994       # Do we have a bin/java?
11995       if test ! -x "$BOOT_JDK/bin/java"; then
11996         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11997 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11998         BOOT_JDK_FOUND=no
11999       else
12000         # Do we have a bin/javac?
12001         if test ! -x "$BOOT_JDK/bin/javac"; then
12002           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12004           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12005 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12006           BOOT_JDK_FOUND=no
12007         else
12008           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12009           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12010             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12011 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12012             BOOT_JDK_FOUND=no
12013           else
12014             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12015             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12016 
12017             # Extra M4 quote needed to protect [] in grep expression.
12018             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12019             if test "x$FOUND_VERSION_78" = x; then
12020               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12021 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12022               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12023 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12024               BOOT_JDK_FOUND=no
12025             else
12026               # We're done! :-)
12027               BOOT_JDK_FOUND=yes
12028 
12029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12030 
12031   # Input might be given as Windows format, start by converting to
12032   # unix format.
12033   path="$BOOT_JDK"
12034   new_path=`$CYGPATH -u "$path"`
12035 
12036   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12037   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12038   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12039   # "foo.exe" is OK but "foo" is an error.
12040   #
12041   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12042   # It is also a way to make sure we got the proper file name for the real test later on.
12043   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12044   if test "x$test_shortpath" = x; then
12045     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12046 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12047     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12048   fi
12049 
12050   # Call helper function which possibly converts this using DOS-style short mode.
12051   # If so, the updated path is stored in $new_path.
12052 
12053   input_path="$new_path"
12054   # Check if we need to convert this using DOS-style short mode. If the path
12055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12056   # take no chances and rewrite it.
12057   # Note: m4 eats our [], so we need to use [ and ] instead.
12058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12059   if test "x$has_forbidden_chars" != x; then
12060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12061     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12062     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12063     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12064       # Going to short mode and back again did indeed matter. Since short mode is
12065       # case insensitive, let's make it lowercase to improve readability.
12066       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12067       # Now convert it back to Unix-stile (cygpath)
12068       input_path=`$CYGPATH -u "$shortmode_path"`
12069       new_path="$input_path"
12070     fi
12071   fi
12072 
12073   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12074   if test "x$test_cygdrive_prefix" = x; then
12075     # As a simple fix, exclude /usr/bin since it's not a real path.
12076     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12077       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12078       # a path prefixed by /cygdrive for fixpath to work.
12079       new_path="$CYGWIN_ROOT_PATH$input_path"
12080     fi
12081   fi
12082 
12083 
12084   if test "x$path" != "x$new_path"; then
12085     BOOT_JDK="$new_path"
12086     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12087 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12088   fi
12089 
12090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12091 
12092   path="$BOOT_JDK"
12093   has_colon=`$ECHO $path | $GREP ^.:`
12094   new_path="$path"
12095   if test "x$has_colon" = x; then
12096     # Not in mixed or Windows style, start by that.
12097     new_path=`cmd //c echo $path`
12098   fi
12099 
12100 
12101   input_path="$new_path"
12102   # Check if we need to convert this using DOS-style short mode. If the path
12103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12104   # take no chances and rewrite it.
12105   # Note: m4 eats our [], so we need to use [ and ] instead.
12106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12107   if test "x$has_forbidden_chars" != x; then
12108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12109     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12110   fi
12111 
12112 
12113   windows_path="$new_path"
12114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12115     unix_path=`$CYGPATH -u "$windows_path"`
12116     new_path="$unix_path"
12117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12119     new_path="$unix_path"
12120   fi
12121 
12122   if test "x$path" != "x$new_path"; then
12123     BOOT_JDK="$new_path"
12124     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12125 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12126   fi
12127 
12128   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12129   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12130 
12131   else
12132     # We're on a posix platform. Hooray! :)
12133     path="$BOOT_JDK"
12134     has_space=`$ECHO "$path" | $GREP " "`
12135     if test "x$has_space" != x; then
12136       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12137 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12138       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12139     fi
12140 
12141     # Use eval to expand a potential ~
12142     eval path="$path"
12143     if test ! -f "$path" && test ! -d "$path"; then
12144       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12145     fi
12146 
12147     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12148   fi
12149 
12150               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12151 $as_echo_n "checking for Boot JDK... " >&6; }
12152               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12153 $as_echo "$BOOT_JDK" >&6; }
12154               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12155 $as_echo_n "checking Boot JDK version... " >&6; }
12156               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12157               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12158 $as_echo "$BOOT_JDK_VERSION" >&6; }
12159             fi # end check jdk version
12160           fi # end check rt.jar
12161         fi # end check javac
12162       fi # end check java
12163     fi # end check boot jdk found
12164   fi
12165 
12166 
12167   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12168 
12169   if test "x$BOOT_JDK_FOUND" = xno; then
12170     # Now execute the test
12171 
12172   if test -x /usr/libexec/java_home; then
12173     BOOT_JDK=`/usr/libexec/java_home`
12174     BOOT_JDK_FOUND=maybe
12175     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12176 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12177   fi
12178 
12179 
12180     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12181     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12182       # Do we have a bin/java?
12183       if test ! -x "$BOOT_JDK/bin/java"; then
12184         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12186         BOOT_JDK_FOUND=no
12187       else
12188         # Do we have a bin/javac?
12189         if test ! -x "$BOOT_JDK/bin/javac"; then
12190           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12192           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12193 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12194           BOOT_JDK_FOUND=no
12195         else
12196           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12197           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12198             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12199 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12200             BOOT_JDK_FOUND=no
12201           else
12202             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12203             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12204 
12205             # Extra M4 quote needed to protect [] in grep expression.
12206             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12207             if test "x$FOUND_VERSION_78" = x; then
12208               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12209 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12210               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12211 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12212               BOOT_JDK_FOUND=no
12213             else
12214               # We're done! :-)
12215               BOOT_JDK_FOUND=yes
12216 
12217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12218 
12219   # Input might be given as Windows format, start by converting to
12220   # unix format.
12221   path="$BOOT_JDK"
12222   new_path=`$CYGPATH -u "$path"`
12223 
12224   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12225   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12226   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12227   # "foo.exe" is OK but "foo" is an error.
12228   #
12229   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12230   # It is also a way to make sure we got the proper file name for the real test later on.
12231   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12232   if test "x$test_shortpath" = x; then
12233     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12234 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12235     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12236   fi
12237 
12238   # Call helper function which possibly converts this using DOS-style short mode.
12239   # If so, the updated path is stored in $new_path.
12240 
12241   input_path="$new_path"
12242   # Check if we need to convert this using DOS-style short mode. If the path
12243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12244   # take no chances and rewrite it.
12245   # Note: m4 eats our [], so we need to use [ and ] instead.
12246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12247   if test "x$has_forbidden_chars" != x; then
12248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12249     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12250     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12251     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12252       # Going to short mode and back again did indeed matter. Since short mode is
12253       # case insensitive, let's make it lowercase to improve readability.
12254       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12255       # Now convert it back to Unix-stile (cygpath)
12256       input_path=`$CYGPATH -u "$shortmode_path"`
12257       new_path="$input_path"
12258     fi
12259   fi
12260 
12261   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12262   if test "x$test_cygdrive_prefix" = x; then
12263     # As a simple fix, exclude /usr/bin since it's not a real path.
12264     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12265       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12266       # a path prefixed by /cygdrive for fixpath to work.
12267       new_path="$CYGWIN_ROOT_PATH$input_path"
12268     fi
12269   fi
12270 
12271 
12272   if test "x$path" != "x$new_path"; then
12273     BOOT_JDK="$new_path"
12274     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12275 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12276   fi
12277 
12278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12279 
12280   path="$BOOT_JDK"
12281   has_colon=`$ECHO $path | $GREP ^.:`
12282   new_path="$path"
12283   if test "x$has_colon" = x; then
12284     # Not in mixed or Windows style, start by that.
12285     new_path=`cmd //c echo $path`
12286   fi
12287 
12288 
12289   input_path="$new_path"
12290   # Check if we need to convert this using DOS-style short mode. If the path
12291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12292   # take no chances and rewrite it.
12293   # Note: m4 eats our [], so we need to use [ and ] instead.
12294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12295   if test "x$has_forbidden_chars" != x; then
12296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12297     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12298   fi
12299 
12300 
12301   windows_path="$new_path"
12302   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12303     unix_path=`$CYGPATH -u "$windows_path"`
12304     new_path="$unix_path"
12305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12306     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12307     new_path="$unix_path"
12308   fi
12309 
12310   if test "x$path" != "x$new_path"; then
12311     BOOT_JDK="$new_path"
12312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12313 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12314   fi
12315 
12316   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12317   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12318 
12319   else
12320     # We're on a posix platform. Hooray! :)
12321     path="$BOOT_JDK"
12322     has_space=`$ECHO "$path" | $GREP " "`
12323     if test "x$has_space" != x; then
12324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12325 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12326       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12327     fi
12328 
12329     # Use eval to expand a potential ~
12330     eval path="$path"
12331     if test ! -f "$path" && test ! -d "$path"; then
12332       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12333     fi
12334 
12335     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12336   fi
12337 
12338               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12339 $as_echo_n "checking for Boot JDK... " >&6; }
12340               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12341 $as_echo "$BOOT_JDK" >&6; }
12342               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12343 $as_echo_n "checking Boot JDK version... " >&6; }
12344               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12345               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12346 $as_echo "$BOOT_JDK_VERSION" >&6; }
12347             fi # end check jdk version
12348           fi # end check rt.jar
12349         fi # end check javac
12350       fi # end check java
12351     fi # end check boot jdk found
12352   fi
12353 
12354 
12355   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12356 
12357   if test "x$BOOT_JDK_FOUND" = xno; then
12358     # Now execute the test
12359 
12360   # Extract the first word of "javac", so it can be a program name with args.
12361 set dummy javac; ac_word=$2
12362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12363 $as_echo_n "checking for $ac_word... " >&6; }
12364 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12365   $as_echo_n "(cached) " >&6
12366 else
12367   case $JAVAC_CHECK in
12368   [\\/]* | ?:[\\/]*)
12369   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12370   ;;
12371   *)
12372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12373 for as_dir in $PATH
12374 do
12375   IFS=$as_save_IFS
12376   test -z "$as_dir" && as_dir=.
12377     for ac_exec_ext in '' $ac_executable_extensions; do
12378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12379     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12381     break 2
12382   fi
12383 done
12384   done
12385 IFS=$as_save_IFS
12386 
12387   ;;
12388 esac
12389 fi
12390 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12391 if test -n "$JAVAC_CHECK"; then
12392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12393 $as_echo "$JAVAC_CHECK" >&6; }
12394 else
12395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12396 $as_echo "no" >&6; }
12397 fi
12398 
12399 
12400   # Extract the first word of "java", so it can be a program name with args.
12401 set dummy java; ac_word=$2
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12403 $as_echo_n "checking for $ac_word... " >&6; }
12404 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12405   $as_echo_n "(cached) " >&6
12406 else
12407   case $JAVA_CHECK in
12408   [\\/]* | ?:[\\/]*)
12409   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12410   ;;
12411   *)
12412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12413 for as_dir in $PATH
12414 do
12415   IFS=$as_save_IFS
12416   test -z "$as_dir" && as_dir=.
12417     for ac_exec_ext in '' $ac_executable_extensions; do
12418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12419     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12421     break 2
12422   fi
12423 done
12424   done
12425 IFS=$as_save_IFS
12426 
12427   ;;
12428 esac
12429 fi
12430 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12431 if test -n "$JAVA_CHECK"; then
12432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12433 $as_echo "$JAVA_CHECK" >&6; }
12434 else
12435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12436 $as_echo "no" >&6; }
12437 fi
12438 
12439 
12440   BINARY="$JAVAC_CHECK"
12441   if test "x$JAVAC_CHECK" = x; then
12442     BINARY="$JAVA_CHECK"
12443   fi
12444   if test "x$BINARY" != x; then
12445     # So there is a java(c) binary, it might be part of a JDK.
12446     # Lets find the JDK/JRE directory by following symbolic links.
12447     # Linux/GNU systems often have links from /usr/bin/java to
12448     # /etc/alternatives/java to the real JDK binary.
12449 
12450   if test "x$OPENJDK_BUILD_OS" != xwindows; then
12451     # Follow a chain of symbolic links. Use readlink
12452     # where it exists, else fall back to horribly
12453     # complicated shell code.
12454     if test "x$READLINK_TESTED" != yes; then
12455       # On MacOSX there is a readlink tool with a different
12456       # purpose than the GNU readlink tool. Check the found readlink.
12457       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12458       if test "x$ISGNU" = x; then
12459         # A readlink that we do not know how to use.
12460         # Are there other non-GNU readlinks out there?
12461         READLINK_TESTED=yes
12462         READLINK=
12463       fi
12464     fi
12465 
12466     if test "x$READLINK" != x; then
12467       BINARY=`$READLINK -f $BINARY`
12468     else
12469       # Save the current directory for restoring afterwards
12470       STARTDIR=$PWD
12471       COUNTER=0
12472       sym_link_dir=`$DIRNAME $BINARY`
12473       sym_link_file=`$BASENAME $BINARY`
12474       cd $sym_link_dir
12475       # Use -P flag to resolve symlinks in directories.
12476       cd `$THEPWDCMD -P`
12477       sym_link_dir=`$THEPWDCMD -P`
12478       # Resolve file symlinks
12479       while test $COUNTER -lt 20; do
12480         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12481         if test "x$ISLINK" == x; then
12482           # This is not a symbolic link! We are done!
12483           break
12484         fi
12485         # Again resolve directory symlinks since the target of the just found
12486         # link could be in a different directory
12487         cd `$DIRNAME $ISLINK`
12488         sym_link_dir=`$THEPWDCMD -P`
12489         sym_link_file=`$BASENAME $ISLINK`
12490         let COUNTER=COUNTER+1
12491       done
12492       cd $STARTDIR
12493       BINARY=$sym_link_dir/$sym_link_file
12494     fi
12495   fi
12496 
12497     BOOT_JDK=`dirname "$BINARY"`
12498     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12499     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12500       # Looks like we found ourselves an JDK
12501       BOOT_JDK_FOUND=maybe
12502       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12503 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12504     fi
12505   fi
12506 
12507 
12508     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12509     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12510       # Do we have a bin/java?
12511       if test ! -x "$BOOT_JDK/bin/java"; then
12512         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12513 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12514         BOOT_JDK_FOUND=no
12515       else
12516         # Do we have a bin/javac?
12517         if test ! -x "$BOOT_JDK/bin/javac"; then
12518           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12519 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12520           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12521 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12522           BOOT_JDK_FOUND=no
12523         else
12524           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12525           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12526             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12527 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12528             BOOT_JDK_FOUND=no
12529           else
12530             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12531             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12532 
12533             # Extra M4 quote needed to protect [] in grep expression.
12534             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12535             if test "x$FOUND_VERSION_78" = x; then
12536               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12537 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12538               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12539 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12540               BOOT_JDK_FOUND=no
12541             else
12542               # We're done! :-)
12543               BOOT_JDK_FOUND=yes
12544 
12545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12546 
12547   # Input might be given as Windows format, start by converting to
12548   # unix format.
12549   path="$BOOT_JDK"
12550   new_path=`$CYGPATH -u "$path"`
12551 
12552   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12553   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12554   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12555   # "foo.exe" is OK but "foo" is an error.
12556   #
12557   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12558   # It is also a way to make sure we got the proper file name for the real test later on.
12559   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12560   if test "x$test_shortpath" = x; then
12561     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12562 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12563     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12564   fi
12565 
12566   # Call helper function which possibly converts this using DOS-style short mode.
12567   # If so, the updated path is stored in $new_path.
12568 
12569   input_path="$new_path"
12570   # Check if we need to convert this using DOS-style short mode. If the path
12571   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12572   # take no chances and rewrite it.
12573   # Note: m4 eats our [], so we need to use [ and ] instead.
12574   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12575   if test "x$has_forbidden_chars" != x; then
12576     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12577     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12578     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12579     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12580       # Going to short mode and back again did indeed matter. Since short mode is
12581       # case insensitive, let's make it lowercase to improve readability.
12582       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12583       # Now convert it back to Unix-stile (cygpath)
12584       input_path=`$CYGPATH -u "$shortmode_path"`
12585       new_path="$input_path"
12586     fi
12587   fi
12588 
12589   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12590   if test "x$test_cygdrive_prefix" = x; then
12591     # As a simple fix, exclude /usr/bin since it's not a real path.
12592     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12593       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12594       # a path prefixed by /cygdrive for fixpath to work.
12595       new_path="$CYGWIN_ROOT_PATH$input_path"
12596     fi
12597   fi
12598 
12599 
12600   if test "x$path" != "x$new_path"; then
12601     BOOT_JDK="$new_path"
12602     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12603 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12604   fi
12605 
12606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12607 
12608   path="$BOOT_JDK"
12609   has_colon=`$ECHO $path | $GREP ^.:`
12610   new_path="$path"
12611   if test "x$has_colon" = x; then
12612     # Not in mixed or Windows style, start by that.
12613     new_path=`cmd //c echo $path`
12614   fi
12615 
12616 
12617   input_path="$new_path"
12618   # Check if we need to convert this using DOS-style short mode. If the path
12619   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12620   # take no chances and rewrite it.
12621   # Note: m4 eats our [], so we need to use [ and ] instead.
12622   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12623   if test "x$has_forbidden_chars" != x; then
12624     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12625     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12626   fi
12627 
12628 
12629   windows_path="$new_path"
12630   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12631     unix_path=`$CYGPATH -u "$windows_path"`
12632     new_path="$unix_path"
12633   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12634     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12635     new_path="$unix_path"
12636   fi
12637 
12638   if test "x$path" != "x$new_path"; then
12639     BOOT_JDK="$new_path"
12640     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12641 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12642   fi
12643 
12644   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12645   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12646 
12647   else
12648     # We're on a posix platform. Hooray! :)
12649     path="$BOOT_JDK"
12650     has_space=`$ECHO "$path" | $GREP " "`
12651     if test "x$has_space" != x; then
12652       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12653 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12654       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12655     fi
12656 
12657     # Use eval to expand a potential ~
12658     eval path="$path"
12659     if test ! -f "$path" && test ! -d "$path"; then
12660       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12661     fi
12662 
12663     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12664   fi
12665 
12666               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12667 $as_echo_n "checking for Boot JDK... " >&6; }
12668               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12669 $as_echo "$BOOT_JDK" >&6; }
12670               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12671 $as_echo_n "checking Boot JDK version... " >&6; }
12672               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12673               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12674 $as_echo "$BOOT_JDK_VERSION" >&6; }
12675             fi # end check jdk version
12676           fi # end check rt.jar
12677         fi # end check javac
12678       fi # end check java
12679     fi # end check boot jdk found
12680   fi
12681 
12682 
12683   # Test: Is there a JDK installed in default, well-known locations?
12684 
12685   if test "x$BOOT_JDK_FOUND" = xno; then
12686     # Now execute the test
12687 
12688   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12689 
12690   if test "x$BOOT_JDK_FOUND" = xno; then
12691     # Now execute the test
12692 
12693   if test "x$ProgramW6432" != x; then
12694     VIRTUAL_DIR="$ProgramW6432/Java"
12695 
12696   windows_path="$VIRTUAL_DIR"
12697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12698     unix_path=`$CYGPATH -u "$windows_path"`
12699     VIRTUAL_DIR="$unix_path"
12700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12702     VIRTUAL_DIR="$unix_path"
12703   fi
12704 
12705 
12706   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12707   BOOT_JDK_SUFFIX=""
12708   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12709   if test "x$ALL_JDKS_FOUND" != x; then
12710     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12711 
12712   if test "x$BOOT_JDK_FOUND" = xno; then
12713     # Now execute the test
12714 
12715         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12716         if test -d "$BOOT_JDK"; then
12717           BOOT_JDK_FOUND=maybe
12718           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12719 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12720         fi
12721 
12722 
12723     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12724     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12725       # Do we have a bin/java?
12726       if test ! -x "$BOOT_JDK/bin/java"; then
12727         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12728 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12729         BOOT_JDK_FOUND=no
12730       else
12731         # Do we have a bin/javac?
12732         if test ! -x "$BOOT_JDK/bin/javac"; then
12733           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12734 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12735           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12736 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12737           BOOT_JDK_FOUND=no
12738         else
12739           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12740           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12741             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12742 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12743             BOOT_JDK_FOUND=no
12744           else
12745             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12746             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12747 
12748             # Extra M4 quote needed to protect [] in grep expression.
12749             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12750             if test "x$FOUND_VERSION_78" = x; then
12751               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12752 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12753               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12754 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12755               BOOT_JDK_FOUND=no
12756             else
12757               # We're done! :-)
12758               BOOT_JDK_FOUND=yes
12759 
12760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12761 
12762   # Input might be given as Windows format, start by converting to
12763   # unix format.
12764   path="$BOOT_JDK"
12765   new_path=`$CYGPATH -u "$path"`
12766 
12767   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12768   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12769   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12770   # "foo.exe" is OK but "foo" is an error.
12771   #
12772   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12773   # It is also a way to make sure we got the proper file name for the real test later on.
12774   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12775   if test "x$test_shortpath" = x; then
12776     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12777 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12778     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12779   fi
12780 
12781   # Call helper function which possibly converts this using DOS-style short mode.
12782   # If so, the updated path is stored in $new_path.
12783 
12784   input_path="$new_path"
12785   # Check if we need to convert this using DOS-style short mode. If the path
12786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12787   # take no chances and rewrite it.
12788   # Note: m4 eats our [], so we need to use [ and ] instead.
12789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12790   if test "x$has_forbidden_chars" != x; then
12791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12792     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12793     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12794     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12795       # Going to short mode and back again did indeed matter. Since short mode is
12796       # case insensitive, let's make it lowercase to improve readability.
12797       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12798       # Now convert it back to Unix-stile (cygpath)
12799       input_path=`$CYGPATH -u "$shortmode_path"`
12800       new_path="$input_path"
12801     fi
12802   fi
12803 
12804   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12805   if test "x$test_cygdrive_prefix" = x; then
12806     # As a simple fix, exclude /usr/bin since it's not a real path.
12807     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12808       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12809       # a path prefixed by /cygdrive for fixpath to work.
12810       new_path="$CYGWIN_ROOT_PATH$input_path"
12811     fi
12812   fi
12813 
12814 
12815   if test "x$path" != "x$new_path"; then
12816     BOOT_JDK="$new_path"
12817     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12818 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12819   fi
12820 
12821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12822 
12823   path="$BOOT_JDK"
12824   has_colon=`$ECHO $path | $GREP ^.:`
12825   new_path="$path"
12826   if test "x$has_colon" = x; then
12827     # Not in mixed or Windows style, start by that.
12828     new_path=`cmd //c echo $path`
12829   fi
12830 
12831 
12832   input_path="$new_path"
12833   # Check if we need to convert this using DOS-style short mode. If the path
12834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12835   # take no chances and rewrite it.
12836   # Note: m4 eats our [], so we need to use [ and ] instead.
12837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12838   if test "x$has_forbidden_chars" != x; then
12839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12840     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12841   fi
12842 
12843 
12844   windows_path="$new_path"
12845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12846     unix_path=`$CYGPATH -u "$windows_path"`
12847     new_path="$unix_path"
12848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12849     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12850     new_path="$unix_path"
12851   fi
12852 
12853   if test "x$path" != "x$new_path"; then
12854     BOOT_JDK="$new_path"
12855     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12856 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12857   fi
12858 
12859   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12860   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12861 
12862   else
12863     # We're on a posix platform. Hooray! :)
12864     path="$BOOT_JDK"
12865     has_space=`$ECHO "$path" | $GREP " "`
12866     if test "x$has_space" != x; then
12867       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12868 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12869       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12870     fi
12871 
12872     # Use eval to expand a potential ~
12873     eval path="$path"
12874     if test ! -f "$path" && test ! -d "$path"; then
12875       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12876     fi
12877 
12878     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12879   fi
12880 
12881               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12882 $as_echo_n "checking for Boot JDK... " >&6; }
12883               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12884 $as_echo "$BOOT_JDK" >&6; }
12885               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12886 $as_echo_n "checking Boot JDK version... " >&6; }
12887               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12888               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12889 $as_echo "$BOOT_JDK_VERSION" >&6; }
12890             fi # end check jdk version
12891           fi # end check rt.jar
12892         fi # end check javac
12893       fi # end check java
12894     fi # end check boot jdk found
12895   fi
12896 
12897     done
12898   fi
12899 
12900   fi
12901 
12902 
12903     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12904     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12905       # Do we have a bin/java?
12906       if test ! -x "$BOOT_JDK/bin/java"; then
12907         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12908 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12909         BOOT_JDK_FOUND=no
12910       else
12911         # Do we have a bin/javac?
12912         if test ! -x "$BOOT_JDK/bin/javac"; then
12913           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12914 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12915           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12916 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12917           BOOT_JDK_FOUND=no
12918         else
12919           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12920           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12921             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12923             BOOT_JDK_FOUND=no
12924           else
12925             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12926             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12927 
12928             # Extra M4 quote needed to protect [] in grep expression.
12929             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12930             if test "x$FOUND_VERSION_78" = x; then
12931               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12932 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12933               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12934 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12935               BOOT_JDK_FOUND=no
12936             else
12937               # We're done! :-)
12938               BOOT_JDK_FOUND=yes
12939 
12940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12941 
12942   # Input might be given as Windows format, start by converting to
12943   # unix format.
12944   path="$BOOT_JDK"
12945   new_path=`$CYGPATH -u "$path"`
12946 
12947   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12948   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12949   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12950   # "foo.exe" is OK but "foo" is an error.
12951   #
12952   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12953   # It is also a way to make sure we got the proper file name for the real test later on.
12954   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12955   if test "x$test_shortpath" = x; then
12956     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12957 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12958     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12959   fi
12960 
12961   # Call helper function which possibly converts this using DOS-style short mode.
12962   # If so, the updated path is stored in $new_path.
12963 
12964   input_path="$new_path"
12965   # Check if we need to convert this using DOS-style short mode. If the path
12966   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12967   # take no chances and rewrite it.
12968   # Note: m4 eats our [], so we need to use [ and ] instead.
12969   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12970   if test "x$has_forbidden_chars" != x; then
12971     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12972     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12973     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12974     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12975       # Going to short mode and back again did indeed matter. Since short mode is
12976       # case insensitive, let's make it lowercase to improve readability.
12977       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12978       # Now convert it back to Unix-stile (cygpath)
12979       input_path=`$CYGPATH -u "$shortmode_path"`
12980       new_path="$input_path"
12981     fi
12982   fi
12983 
12984   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12985   if test "x$test_cygdrive_prefix" = x; then
12986     # As a simple fix, exclude /usr/bin since it's not a real path.
12987     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12988       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12989       # a path prefixed by /cygdrive for fixpath to work.
12990       new_path="$CYGWIN_ROOT_PATH$input_path"
12991     fi
12992   fi
12993 
12994 
12995   if test "x$path" != "x$new_path"; then
12996     BOOT_JDK="$new_path"
12997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12998 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12999   fi
13000 
13001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13002 
13003   path="$BOOT_JDK"
13004   has_colon=`$ECHO $path | $GREP ^.:`
13005   new_path="$path"
13006   if test "x$has_colon" = x; then
13007     # Not in mixed or Windows style, start by that.
13008     new_path=`cmd //c echo $path`
13009   fi
13010 
13011 
13012   input_path="$new_path"
13013   # Check if we need to convert this using DOS-style short mode. If the path
13014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13015   # take no chances and rewrite it.
13016   # Note: m4 eats our [], so we need to use [ and ] instead.
13017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13018   if test "x$has_forbidden_chars" != x; then
13019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13020     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13021   fi
13022 
13023 
13024   windows_path="$new_path"
13025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13026     unix_path=`$CYGPATH -u "$windows_path"`
13027     new_path="$unix_path"
13028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13030     new_path="$unix_path"
13031   fi
13032 
13033   if test "x$path" != "x$new_path"; then
13034     BOOT_JDK="$new_path"
13035     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13036 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13037   fi
13038 
13039   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13040   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13041 
13042   else
13043     # We're on a posix platform. Hooray! :)
13044     path="$BOOT_JDK"
13045     has_space=`$ECHO "$path" | $GREP " "`
13046     if test "x$has_space" != x; then
13047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13048 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13049       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13050     fi
13051 
13052     # Use eval to expand a potential ~
13053     eval path="$path"
13054     if test ! -f "$path" && test ! -d "$path"; then
13055       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13056     fi
13057 
13058     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13059   fi
13060 
13061               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13062 $as_echo_n "checking for Boot JDK... " >&6; }
13063               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13064 $as_echo "$BOOT_JDK" >&6; }
13065               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13066 $as_echo_n "checking Boot JDK version... " >&6; }
13067               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13068               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13069 $as_echo "$BOOT_JDK_VERSION" >&6; }
13070             fi # end check jdk version
13071           fi # end check rt.jar
13072         fi # end check javac
13073       fi # end check java
13074     fi # end check boot jdk found
13075   fi
13076 
13077 
13078   if test "x$BOOT_JDK_FOUND" = xno; then
13079     # Now execute the test
13080 
13081   if test "x$PROGRAMW6432" != x; then
13082     VIRTUAL_DIR="$PROGRAMW6432/Java"
13083 
13084   windows_path="$VIRTUAL_DIR"
13085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13086     unix_path=`$CYGPATH -u "$windows_path"`
13087     VIRTUAL_DIR="$unix_path"
13088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13090     VIRTUAL_DIR="$unix_path"
13091   fi
13092 
13093 
13094   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13095   BOOT_JDK_SUFFIX=""
13096   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13097   if test "x$ALL_JDKS_FOUND" != x; then
13098     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13099 
13100   if test "x$BOOT_JDK_FOUND" = xno; then
13101     # Now execute the test
13102 
13103         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13104         if test -d "$BOOT_JDK"; then
13105           BOOT_JDK_FOUND=maybe
13106           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13107 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13108         fi
13109 
13110 
13111     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13112     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13113       # Do we have a bin/java?
13114       if test ! -x "$BOOT_JDK/bin/java"; then
13115         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13116 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13117         BOOT_JDK_FOUND=no
13118       else
13119         # Do we have a bin/javac?
13120         if test ! -x "$BOOT_JDK/bin/javac"; then
13121           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13122 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13123           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13124 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13125           BOOT_JDK_FOUND=no
13126         else
13127           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13128           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13129             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13130 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13131             BOOT_JDK_FOUND=no
13132           else
13133             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13134             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13135 
13136             # Extra M4 quote needed to protect [] in grep expression.
13137             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13138             if test "x$FOUND_VERSION_78" = x; then
13139               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13141               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13142 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13143               BOOT_JDK_FOUND=no
13144             else
13145               # We're done! :-)
13146               BOOT_JDK_FOUND=yes
13147 
13148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13149 
13150   # Input might be given as Windows format, start by converting to
13151   # unix format.
13152   path="$BOOT_JDK"
13153   new_path=`$CYGPATH -u "$path"`
13154 
13155   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13156   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13157   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13158   # "foo.exe" is OK but "foo" is an error.
13159   #
13160   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13161   # It is also a way to make sure we got the proper file name for the real test later on.
13162   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13163   if test "x$test_shortpath" = x; then
13164     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13165 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13166     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13167   fi
13168 
13169   # Call helper function which possibly converts this using DOS-style short mode.
13170   # If so, the updated path is stored in $new_path.
13171 
13172   input_path="$new_path"
13173   # Check if we need to convert this using DOS-style short mode. If the path
13174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13175   # take no chances and rewrite it.
13176   # Note: m4 eats our [], so we need to use [ and ] instead.
13177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13178   if test "x$has_forbidden_chars" != x; then
13179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13180     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13181     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13182     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13183       # Going to short mode and back again did indeed matter. Since short mode is
13184       # case insensitive, let's make it lowercase to improve readability.
13185       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13186       # Now convert it back to Unix-stile (cygpath)
13187       input_path=`$CYGPATH -u "$shortmode_path"`
13188       new_path="$input_path"
13189     fi
13190   fi
13191 
13192   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13193   if test "x$test_cygdrive_prefix" = x; then
13194     # As a simple fix, exclude /usr/bin since it's not a real path.
13195     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13196       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13197       # a path prefixed by /cygdrive for fixpath to work.
13198       new_path="$CYGWIN_ROOT_PATH$input_path"
13199     fi
13200   fi
13201 
13202 
13203   if test "x$path" != "x$new_path"; then
13204     BOOT_JDK="$new_path"
13205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13206 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13207   fi
13208 
13209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13210 
13211   path="$BOOT_JDK"
13212   has_colon=`$ECHO $path | $GREP ^.:`
13213   new_path="$path"
13214   if test "x$has_colon" = x; then
13215     # Not in mixed or Windows style, start by that.
13216     new_path=`cmd //c echo $path`
13217   fi
13218 
13219 
13220   input_path="$new_path"
13221   # Check if we need to convert this using DOS-style short mode. If the path
13222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13223   # take no chances and rewrite it.
13224   # Note: m4 eats our [], so we need to use [ and ] instead.
13225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13226   if test "x$has_forbidden_chars" != x; then
13227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13228     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13229   fi
13230 
13231 
13232   windows_path="$new_path"
13233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13234     unix_path=`$CYGPATH -u "$windows_path"`
13235     new_path="$unix_path"
13236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13238     new_path="$unix_path"
13239   fi
13240 
13241   if test "x$path" != "x$new_path"; then
13242     BOOT_JDK="$new_path"
13243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13244 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13245   fi
13246 
13247   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13248   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13249 
13250   else
13251     # We're on a posix platform. Hooray! :)
13252     path="$BOOT_JDK"
13253     has_space=`$ECHO "$path" | $GREP " "`
13254     if test "x$has_space" != x; then
13255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13256 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13257       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13258     fi
13259 
13260     # Use eval to expand a potential ~
13261     eval path="$path"
13262     if test ! -f "$path" && test ! -d "$path"; then
13263       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13264     fi
13265 
13266     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13267   fi
13268 
13269               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13270 $as_echo_n "checking for Boot JDK... " >&6; }
13271               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13272 $as_echo "$BOOT_JDK" >&6; }
13273               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13274 $as_echo_n "checking Boot JDK version... " >&6; }
13275               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13276               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13277 $as_echo "$BOOT_JDK_VERSION" >&6; }
13278             fi # end check jdk version
13279           fi # end check rt.jar
13280         fi # end check javac
13281       fi # end check java
13282     fi # end check boot jdk found
13283   fi
13284 
13285     done
13286   fi
13287 
13288   fi
13289 
13290 
13291     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13292     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13293       # Do we have a bin/java?
13294       if test ! -x "$BOOT_JDK/bin/java"; then
13295         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13296 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13297         BOOT_JDK_FOUND=no
13298       else
13299         # Do we have a bin/javac?
13300         if test ! -x "$BOOT_JDK/bin/javac"; then
13301           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13302 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13303           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13304 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13305           BOOT_JDK_FOUND=no
13306         else
13307           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13308           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13309             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13310 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13311             BOOT_JDK_FOUND=no
13312           else
13313             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13314             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13315 
13316             # Extra M4 quote needed to protect [] in grep expression.
13317             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13318             if test "x$FOUND_VERSION_78" = x; then
13319               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13320 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13321               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13322 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13323               BOOT_JDK_FOUND=no
13324             else
13325               # We're done! :-)
13326               BOOT_JDK_FOUND=yes
13327 
13328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13329 
13330   # Input might be given as Windows format, start by converting to
13331   # unix format.
13332   path="$BOOT_JDK"
13333   new_path=`$CYGPATH -u "$path"`
13334 
13335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13338   # "foo.exe" is OK but "foo" is an error.
13339   #
13340   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13341   # It is also a way to make sure we got the proper file name for the real test later on.
13342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13343   if test "x$test_shortpath" = x; then
13344     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13345 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13346     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13347   fi
13348 
13349   # Call helper function which possibly converts this using DOS-style short mode.
13350   # If so, the updated path is stored in $new_path.
13351 
13352   input_path="$new_path"
13353   # Check if we need to convert this using DOS-style short mode. If the path
13354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13355   # take no chances and rewrite it.
13356   # Note: m4 eats our [], so we need to use [ and ] instead.
13357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13358   if test "x$has_forbidden_chars" != x; then
13359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13360     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13361     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13362     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13363       # Going to short mode and back again did indeed matter. Since short mode is
13364       # case insensitive, let's make it lowercase to improve readability.
13365       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13366       # Now convert it back to Unix-stile (cygpath)
13367       input_path=`$CYGPATH -u "$shortmode_path"`
13368       new_path="$input_path"
13369     fi
13370   fi
13371 
13372   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13373   if test "x$test_cygdrive_prefix" = x; then
13374     # As a simple fix, exclude /usr/bin since it's not a real path.
13375     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13376       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13377       # a path prefixed by /cygdrive for fixpath to work.
13378       new_path="$CYGWIN_ROOT_PATH$input_path"
13379     fi
13380   fi
13381 
13382 
13383   if test "x$path" != "x$new_path"; then
13384     BOOT_JDK="$new_path"
13385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13386 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13387   fi
13388 
13389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13390 
13391   path="$BOOT_JDK"
13392   has_colon=`$ECHO $path | $GREP ^.:`
13393   new_path="$path"
13394   if test "x$has_colon" = x; then
13395     # Not in mixed or Windows style, start by that.
13396     new_path=`cmd //c echo $path`
13397   fi
13398 
13399 
13400   input_path="$new_path"
13401   # Check if we need to convert this using DOS-style short mode. If the path
13402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13403   # take no chances and rewrite it.
13404   # Note: m4 eats our [], so we need to use [ and ] instead.
13405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13406   if test "x$has_forbidden_chars" != x; then
13407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13408     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13409   fi
13410 
13411 
13412   windows_path="$new_path"
13413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13414     unix_path=`$CYGPATH -u "$windows_path"`
13415     new_path="$unix_path"
13416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13418     new_path="$unix_path"
13419   fi
13420 
13421   if test "x$path" != "x$new_path"; then
13422     BOOT_JDK="$new_path"
13423     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13424 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13425   fi
13426 
13427   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13428   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13429 
13430   else
13431     # We're on a posix platform. Hooray! :)
13432     path="$BOOT_JDK"
13433     has_space=`$ECHO "$path" | $GREP " "`
13434     if test "x$has_space" != x; then
13435       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13436 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13437       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13438     fi
13439 
13440     # Use eval to expand a potential ~
13441     eval path="$path"
13442     if test ! -f "$path" && test ! -d "$path"; then
13443       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13444     fi
13445 
13446     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13447   fi
13448 
13449               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13450 $as_echo_n "checking for Boot JDK... " >&6; }
13451               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13452 $as_echo "$BOOT_JDK" >&6; }
13453               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13454 $as_echo_n "checking Boot JDK version... " >&6; }
13455               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13456               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13457 $as_echo "$BOOT_JDK_VERSION" >&6; }
13458             fi # end check jdk version
13459           fi # end check rt.jar
13460         fi # end check javac
13461       fi # end check java
13462     fi # end check boot jdk found
13463   fi
13464 
13465 
13466   if test "x$BOOT_JDK_FOUND" = xno; then
13467     # Now execute the test
13468 
13469   if test "x$PROGRAMFILES" != x; then
13470     VIRTUAL_DIR="$PROGRAMFILES/Java"
13471 
13472   windows_path="$VIRTUAL_DIR"
13473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13474     unix_path=`$CYGPATH -u "$windows_path"`
13475     VIRTUAL_DIR="$unix_path"
13476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13478     VIRTUAL_DIR="$unix_path"
13479   fi
13480 
13481 
13482   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13483   BOOT_JDK_SUFFIX=""
13484   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13485   if test "x$ALL_JDKS_FOUND" != x; then
13486     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13487 
13488   if test "x$BOOT_JDK_FOUND" = xno; then
13489     # Now execute the test
13490 
13491         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13492         if test -d "$BOOT_JDK"; then
13493           BOOT_JDK_FOUND=maybe
13494           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13495 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13496         fi
13497 
13498 
13499     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13500     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13501       # Do we have a bin/java?
13502       if test ! -x "$BOOT_JDK/bin/java"; then
13503         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13504 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13505         BOOT_JDK_FOUND=no
13506       else
13507         # Do we have a bin/javac?
13508         if test ! -x "$BOOT_JDK/bin/javac"; then
13509           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13510 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13511           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13512 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13513           BOOT_JDK_FOUND=no
13514         else
13515           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13516           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13517             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13518 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13519             BOOT_JDK_FOUND=no
13520           else
13521             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13522             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13523 
13524             # Extra M4 quote needed to protect [] in grep expression.
13525             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13526             if test "x$FOUND_VERSION_78" = x; then
13527               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13528 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13529               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13530 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13531               BOOT_JDK_FOUND=no
13532             else
13533               # We're done! :-)
13534               BOOT_JDK_FOUND=yes
13535 
13536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13537 
13538   # Input might be given as Windows format, start by converting to
13539   # unix format.
13540   path="$BOOT_JDK"
13541   new_path=`$CYGPATH -u "$path"`
13542 
13543   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13544   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13545   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13546   # "foo.exe" is OK but "foo" is an error.
13547   #
13548   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13549   # It is also a way to make sure we got the proper file name for the real test later on.
13550   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13551   if test "x$test_shortpath" = x; then
13552     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13553 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13554     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13555   fi
13556 
13557   # Call helper function which possibly converts this using DOS-style short mode.
13558   # If so, the updated path is stored in $new_path.
13559 
13560   input_path="$new_path"
13561   # Check if we need to convert this using DOS-style short mode. If the path
13562   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13563   # take no chances and rewrite it.
13564   # Note: m4 eats our [], so we need to use [ and ] instead.
13565   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13566   if test "x$has_forbidden_chars" != x; then
13567     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13568     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13569     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13570     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13571       # Going to short mode and back again did indeed matter. Since short mode is
13572       # case insensitive, let's make it lowercase to improve readability.
13573       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13574       # Now convert it back to Unix-stile (cygpath)
13575       input_path=`$CYGPATH -u "$shortmode_path"`
13576       new_path="$input_path"
13577     fi
13578   fi
13579 
13580   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13581   if test "x$test_cygdrive_prefix" = x; then
13582     # As a simple fix, exclude /usr/bin since it's not a real path.
13583     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13584       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13585       # a path prefixed by /cygdrive for fixpath to work.
13586       new_path="$CYGWIN_ROOT_PATH$input_path"
13587     fi
13588   fi
13589 
13590 
13591   if test "x$path" != "x$new_path"; then
13592     BOOT_JDK="$new_path"
13593     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13594 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13595   fi
13596 
13597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13598 
13599   path="$BOOT_JDK"
13600   has_colon=`$ECHO $path | $GREP ^.:`
13601   new_path="$path"
13602   if test "x$has_colon" = x; then
13603     # Not in mixed or Windows style, start by that.
13604     new_path=`cmd //c echo $path`
13605   fi
13606 
13607 
13608   input_path="$new_path"
13609   # Check if we need to convert this using DOS-style short mode. If the path
13610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13611   # take no chances and rewrite it.
13612   # Note: m4 eats our [], so we need to use [ and ] instead.
13613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13614   if test "x$has_forbidden_chars" != x; then
13615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13616     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13617   fi
13618 
13619 
13620   windows_path="$new_path"
13621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13622     unix_path=`$CYGPATH -u "$windows_path"`
13623     new_path="$unix_path"
13624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13626     new_path="$unix_path"
13627   fi
13628 
13629   if test "x$path" != "x$new_path"; then
13630     BOOT_JDK="$new_path"
13631     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13632 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13633   fi
13634 
13635   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13636   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13637 
13638   else
13639     # We're on a posix platform. Hooray! :)
13640     path="$BOOT_JDK"
13641     has_space=`$ECHO "$path" | $GREP " "`
13642     if test "x$has_space" != x; then
13643       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13644 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13645       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13646     fi
13647 
13648     # Use eval to expand a potential ~
13649     eval path="$path"
13650     if test ! -f "$path" && test ! -d "$path"; then
13651       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13652     fi
13653 
13654     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13655   fi
13656 
13657               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13658 $as_echo_n "checking for Boot JDK... " >&6; }
13659               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13660 $as_echo "$BOOT_JDK" >&6; }
13661               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13662 $as_echo_n "checking Boot JDK version... " >&6; }
13663               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13664               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13665 $as_echo "$BOOT_JDK_VERSION" >&6; }
13666             fi # end check jdk version
13667           fi # end check rt.jar
13668         fi # end check javac
13669       fi # end check java
13670     fi # end check boot jdk found
13671   fi
13672 
13673     done
13674   fi
13675 
13676   fi
13677 
13678 
13679     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13680     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13681       # Do we have a bin/java?
13682       if test ! -x "$BOOT_JDK/bin/java"; then
13683         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13684 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13685         BOOT_JDK_FOUND=no
13686       else
13687         # Do we have a bin/javac?
13688         if test ! -x "$BOOT_JDK/bin/javac"; then
13689           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13690 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13691           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13692 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13693           BOOT_JDK_FOUND=no
13694         else
13695           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13696           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13697             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13698 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13699             BOOT_JDK_FOUND=no
13700           else
13701             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13702             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13703 
13704             # Extra M4 quote needed to protect [] in grep expression.
13705             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13706             if test "x$FOUND_VERSION_78" = x; then
13707               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13708 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13709               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13710 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13711               BOOT_JDK_FOUND=no
13712             else
13713               # We're done! :-)
13714               BOOT_JDK_FOUND=yes
13715 
13716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13717 
13718   # Input might be given as Windows format, start by converting to
13719   # unix format.
13720   path="$BOOT_JDK"
13721   new_path=`$CYGPATH -u "$path"`
13722 
13723   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13724   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13725   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13726   # "foo.exe" is OK but "foo" is an error.
13727   #
13728   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13729   # It is also a way to make sure we got the proper file name for the real test later on.
13730   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13731   if test "x$test_shortpath" = x; then
13732     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13733 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13734     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13735   fi
13736 
13737   # Call helper function which possibly converts this using DOS-style short mode.
13738   # If so, the updated path is stored in $new_path.
13739 
13740   input_path="$new_path"
13741   # Check if we need to convert this using DOS-style short mode. If the path
13742   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13743   # take no chances and rewrite it.
13744   # Note: m4 eats our [], so we need to use [ and ] instead.
13745   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13746   if test "x$has_forbidden_chars" != x; then
13747     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13748     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13749     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13750     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13751       # Going to short mode and back again did indeed matter. Since short mode is
13752       # case insensitive, let's make it lowercase to improve readability.
13753       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13754       # Now convert it back to Unix-stile (cygpath)
13755       input_path=`$CYGPATH -u "$shortmode_path"`
13756       new_path="$input_path"
13757     fi
13758   fi
13759 
13760   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13761   if test "x$test_cygdrive_prefix" = x; then
13762     # As a simple fix, exclude /usr/bin since it's not a real path.
13763     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13764       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13765       # a path prefixed by /cygdrive for fixpath to work.
13766       new_path="$CYGWIN_ROOT_PATH$input_path"
13767     fi
13768   fi
13769 
13770 
13771   if test "x$path" != "x$new_path"; then
13772     BOOT_JDK="$new_path"
13773     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13774 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13775   fi
13776 
13777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13778 
13779   path="$BOOT_JDK"
13780   has_colon=`$ECHO $path | $GREP ^.:`
13781   new_path="$path"
13782   if test "x$has_colon" = x; then
13783     # Not in mixed or Windows style, start by that.
13784     new_path=`cmd //c echo $path`
13785   fi
13786 
13787 
13788   input_path="$new_path"
13789   # Check if we need to convert this using DOS-style short mode. If the path
13790   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13791   # take no chances and rewrite it.
13792   # Note: m4 eats our [], so we need to use [ and ] instead.
13793   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13794   if test "x$has_forbidden_chars" != x; then
13795     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13796     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13797   fi
13798 
13799 
13800   windows_path="$new_path"
13801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13802     unix_path=`$CYGPATH -u "$windows_path"`
13803     new_path="$unix_path"
13804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13805     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13806     new_path="$unix_path"
13807   fi
13808 
13809   if test "x$path" != "x$new_path"; then
13810     BOOT_JDK="$new_path"
13811     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13812 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13813   fi
13814 
13815   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13816   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13817 
13818   else
13819     # We're on a posix platform. Hooray! :)
13820     path="$BOOT_JDK"
13821     has_space=`$ECHO "$path" | $GREP " "`
13822     if test "x$has_space" != x; then
13823       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13824 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13825       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13826     fi
13827 
13828     # Use eval to expand a potential ~
13829     eval path="$path"
13830     if test ! -f "$path" && test ! -d "$path"; then
13831       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13832     fi
13833 
13834     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13835   fi
13836 
13837               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13838 $as_echo_n "checking for Boot JDK... " >&6; }
13839               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13840 $as_echo "$BOOT_JDK" >&6; }
13841               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13842 $as_echo_n "checking Boot JDK version... " >&6; }
13843               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13844               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13845 $as_echo "$BOOT_JDK_VERSION" >&6; }
13846             fi # end check jdk version
13847           fi # end check rt.jar
13848         fi # end check javac
13849       fi # end check java
13850     fi # end check boot jdk found
13851   fi
13852 
13853 
13854   if test "x$BOOT_JDK_FOUND" = xno; then
13855     # Now execute the test
13856 
13857   if test "x$ProgramFiles" != x; then
13858     VIRTUAL_DIR="$ProgramFiles/Java"
13859 
13860   windows_path="$VIRTUAL_DIR"
13861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13862     unix_path=`$CYGPATH -u "$windows_path"`
13863     VIRTUAL_DIR="$unix_path"
13864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13866     VIRTUAL_DIR="$unix_path"
13867   fi
13868 
13869 
13870   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13871   BOOT_JDK_SUFFIX=""
13872   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13873   if test "x$ALL_JDKS_FOUND" != x; then
13874     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13875 
13876   if test "x$BOOT_JDK_FOUND" = xno; then
13877     # Now execute the test
13878 
13879         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13880         if test -d "$BOOT_JDK"; then
13881           BOOT_JDK_FOUND=maybe
13882           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13883 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13884         fi
13885 
13886 
13887     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13888     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13889       # Do we have a bin/java?
13890       if test ! -x "$BOOT_JDK/bin/java"; then
13891         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13892 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13893         BOOT_JDK_FOUND=no
13894       else
13895         # Do we have a bin/javac?
13896         if test ! -x "$BOOT_JDK/bin/javac"; then
13897           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13898 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13899           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13900 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13901           BOOT_JDK_FOUND=no
13902         else
13903           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13904           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13905             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13906 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13907             BOOT_JDK_FOUND=no
13908           else
13909             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13910             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13911 
13912             # Extra M4 quote needed to protect [] in grep expression.
13913             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13914             if test "x$FOUND_VERSION_78" = x; then
13915               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13916 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13917               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13918 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13919               BOOT_JDK_FOUND=no
13920             else
13921               # We're done! :-)
13922               BOOT_JDK_FOUND=yes
13923 
13924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13925 
13926   # Input might be given as Windows format, start by converting to
13927   # unix format.
13928   path="$BOOT_JDK"
13929   new_path=`$CYGPATH -u "$path"`
13930 
13931   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13932   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13933   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13934   # "foo.exe" is OK but "foo" is an error.
13935   #
13936   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13937   # It is also a way to make sure we got the proper file name for the real test later on.
13938   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13939   if test "x$test_shortpath" = x; then
13940     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13941 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13942     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13943   fi
13944 
13945   # Call helper function which possibly converts this using DOS-style short mode.
13946   # If so, the updated path is stored in $new_path.
13947 
13948   input_path="$new_path"
13949   # Check if we need to convert this using DOS-style short mode. If the path
13950   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13951   # take no chances and rewrite it.
13952   # Note: m4 eats our [], so we need to use [ and ] instead.
13953   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13954   if test "x$has_forbidden_chars" != x; then
13955     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13956     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13957     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13958     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13959       # Going to short mode and back again did indeed matter. Since short mode is
13960       # case insensitive, let's make it lowercase to improve readability.
13961       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13962       # Now convert it back to Unix-stile (cygpath)
13963       input_path=`$CYGPATH -u "$shortmode_path"`
13964       new_path="$input_path"
13965     fi
13966   fi
13967 
13968   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13969   if test "x$test_cygdrive_prefix" = x; then
13970     # As a simple fix, exclude /usr/bin since it's not a real path.
13971     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13972       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13973       # a path prefixed by /cygdrive for fixpath to work.
13974       new_path="$CYGWIN_ROOT_PATH$input_path"
13975     fi
13976   fi
13977 
13978 
13979   if test "x$path" != "x$new_path"; then
13980     BOOT_JDK="$new_path"
13981     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13982 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13983   fi
13984 
13985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13986 
13987   path="$BOOT_JDK"
13988   has_colon=`$ECHO $path | $GREP ^.:`
13989   new_path="$path"
13990   if test "x$has_colon" = x; then
13991     # Not in mixed or Windows style, start by that.
13992     new_path=`cmd //c echo $path`
13993   fi
13994 
13995 
13996   input_path="$new_path"
13997   # Check if we need to convert this using DOS-style short mode. If the path
13998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13999   # take no chances and rewrite it.
14000   # Note: m4 eats our [], so we need to use [ and ] instead.
14001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14002   if test "x$has_forbidden_chars" != x; then
14003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14004     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14005   fi
14006 
14007 
14008   windows_path="$new_path"
14009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14010     unix_path=`$CYGPATH -u "$windows_path"`
14011     new_path="$unix_path"
14012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14014     new_path="$unix_path"
14015   fi
14016 
14017   if test "x$path" != "x$new_path"; then
14018     BOOT_JDK="$new_path"
14019     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14020 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14021   fi
14022 
14023   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14024   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14025 
14026   else
14027     # We're on a posix platform. Hooray! :)
14028     path="$BOOT_JDK"
14029     has_space=`$ECHO "$path" | $GREP " "`
14030     if test "x$has_space" != x; then
14031       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14032 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14033       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14034     fi
14035 
14036     # Use eval to expand a potential ~
14037     eval path="$path"
14038     if test ! -f "$path" && test ! -d "$path"; then
14039       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14040     fi
14041 
14042     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14043   fi
14044 
14045               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14046 $as_echo_n "checking for Boot JDK... " >&6; }
14047               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14048 $as_echo "$BOOT_JDK" >&6; }
14049               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14050 $as_echo_n "checking Boot JDK version... " >&6; }
14051               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14052               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14053 $as_echo "$BOOT_JDK_VERSION" >&6; }
14054             fi # end check jdk version
14055           fi # end check rt.jar
14056         fi # end check javac
14057       fi # end check java
14058     fi # end check boot jdk found
14059   fi
14060 
14061     done
14062   fi
14063 
14064   fi
14065 
14066 
14067     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14068     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14069       # Do we have a bin/java?
14070       if test ! -x "$BOOT_JDK/bin/java"; then
14071         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14072 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14073         BOOT_JDK_FOUND=no
14074       else
14075         # Do we have a bin/javac?
14076         if test ! -x "$BOOT_JDK/bin/javac"; then
14077           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14079           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14080 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14081           BOOT_JDK_FOUND=no
14082         else
14083           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14084           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14085             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14087             BOOT_JDK_FOUND=no
14088           else
14089             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14090             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14091 
14092             # Extra M4 quote needed to protect [] in grep expression.
14093             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14094             if test "x$FOUND_VERSION_78" = x; then
14095               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14096 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14097               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14098 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14099               BOOT_JDK_FOUND=no
14100             else
14101               # We're done! :-)
14102               BOOT_JDK_FOUND=yes
14103 
14104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14105 
14106   # Input might be given as Windows format, start by converting to
14107   # unix format.
14108   path="$BOOT_JDK"
14109   new_path=`$CYGPATH -u "$path"`
14110 
14111   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14112   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14113   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14114   # "foo.exe" is OK but "foo" is an error.
14115   #
14116   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14117   # It is also a way to make sure we got the proper file name for the real test later on.
14118   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14119   if test "x$test_shortpath" = x; then
14120     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14121 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14122     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14123   fi
14124 
14125   # Call helper function which possibly converts this using DOS-style short mode.
14126   # If so, the updated path is stored in $new_path.
14127 
14128   input_path="$new_path"
14129   # Check if we need to convert this using DOS-style short mode. If the path
14130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14131   # take no chances and rewrite it.
14132   # Note: m4 eats our [], so we need to use [ and ] instead.
14133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14134   if test "x$has_forbidden_chars" != x; then
14135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14136     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14137     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14138     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14139       # Going to short mode and back again did indeed matter. Since short mode is
14140       # case insensitive, let's make it lowercase to improve readability.
14141       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14142       # Now convert it back to Unix-stile (cygpath)
14143       input_path=`$CYGPATH -u "$shortmode_path"`
14144       new_path="$input_path"
14145     fi
14146   fi
14147 
14148   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14149   if test "x$test_cygdrive_prefix" = x; then
14150     # As a simple fix, exclude /usr/bin since it's not a real path.
14151     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14152       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14153       # a path prefixed by /cygdrive for fixpath to work.
14154       new_path="$CYGWIN_ROOT_PATH$input_path"
14155     fi
14156   fi
14157 
14158 
14159   if test "x$path" != "x$new_path"; then
14160     BOOT_JDK="$new_path"
14161     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14162 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14163   fi
14164 
14165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14166 
14167   path="$BOOT_JDK"
14168   has_colon=`$ECHO $path | $GREP ^.:`
14169   new_path="$path"
14170   if test "x$has_colon" = x; then
14171     # Not in mixed or Windows style, start by that.
14172     new_path=`cmd //c echo $path`
14173   fi
14174 
14175 
14176   input_path="$new_path"
14177   # Check if we need to convert this using DOS-style short mode. If the path
14178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14179   # take no chances and rewrite it.
14180   # Note: m4 eats our [], so we need to use [ and ] instead.
14181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14182   if test "x$has_forbidden_chars" != x; then
14183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14184     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14185   fi
14186 
14187 
14188   windows_path="$new_path"
14189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14190     unix_path=`$CYGPATH -u "$windows_path"`
14191     new_path="$unix_path"
14192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14194     new_path="$unix_path"
14195   fi
14196 
14197   if test "x$path" != "x$new_path"; then
14198     BOOT_JDK="$new_path"
14199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14200 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14201   fi
14202 
14203   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14204   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14205 
14206   else
14207     # We're on a posix platform. Hooray! :)
14208     path="$BOOT_JDK"
14209     has_space=`$ECHO "$path" | $GREP " "`
14210     if test "x$has_space" != x; then
14211       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14212 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14213       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14214     fi
14215 
14216     # Use eval to expand a potential ~
14217     eval path="$path"
14218     if test ! -f "$path" && test ! -d "$path"; then
14219       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14220     fi
14221 
14222     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14223   fi
14224 
14225               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14226 $as_echo_n "checking for Boot JDK... " >&6; }
14227               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14228 $as_echo "$BOOT_JDK" >&6; }
14229               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14230 $as_echo_n "checking Boot JDK version... " >&6; }
14231               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14232               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14233 $as_echo "$BOOT_JDK_VERSION" >&6; }
14234             fi # end check jdk version
14235           fi # end check rt.jar
14236         fi # end check javac
14237       fi # end check java
14238     fi # end check boot jdk found
14239   fi
14240 
14241 
14242   if test "x$BOOT_JDK_FOUND" = xno; then
14243     # Now execute the test
14244 
14245   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14246   BOOT_JDK_SUFFIX=""
14247   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14248   if test "x$ALL_JDKS_FOUND" != x; then
14249     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14250 
14251   if test "x$BOOT_JDK_FOUND" = xno; then
14252     # Now execute the test
14253 
14254         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14255         if test -d "$BOOT_JDK"; then
14256           BOOT_JDK_FOUND=maybe
14257           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14258 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14259         fi
14260 
14261 
14262     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14263     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14264       # Do we have a bin/java?
14265       if test ! -x "$BOOT_JDK/bin/java"; then
14266         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14267 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14268         BOOT_JDK_FOUND=no
14269       else
14270         # Do we have a bin/javac?
14271         if test ! -x "$BOOT_JDK/bin/javac"; then
14272           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14273 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14274           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14275 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14276           BOOT_JDK_FOUND=no
14277         else
14278           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14279           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14280             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14281 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14282             BOOT_JDK_FOUND=no
14283           else
14284             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14285             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14286 
14287             # Extra M4 quote needed to protect [] in grep expression.
14288             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14289             if test "x$FOUND_VERSION_78" = x; then
14290               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14291 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14292               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14293 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14294               BOOT_JDK_FOUND=no
14295             else
14296               # We're done! :-)
14297               BOOT_JDK_FOUND=yes
14298 
14299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14300 
14301   # Input might be given as Windows format, start by converting to
14302   # unix format.
14303   path="$BOOT_JDK"
14304   new_path=`$CYGPATH -u "$path"`
14305 
14306   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14307   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14308   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14309   # "foo.exe" is OK but "foo" is an error.
14310   #
14311   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14312   # It is also a way to make sure we got the proper file name for the real test later on.
14313   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14314   if test "x$test_shortpath" = x; then
14315     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14317     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14318   fi
14319 
14320   # Call helper function which possibly converts this using DOS-style short mode.
14321   # If so, the updated path is stored in $new_path.
14322 
14323   input_path="$new_path"
14324   # Check if we need to convert this using DOS-style short mode. If the path
14325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14326   # take no chances and rewrite it.
14327   # Note: m4 eats our [], so we need to use [ and ] instead.
14328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14329   if test "x$has_forbidden_chars" != x; then
14330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14331     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14332     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14333     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14334       # Going to short mode and back again did indeed matter. Since short mode is
14335       # case insensitive, let's make it lowercase to improve readability.
14336       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14337       # Now convert it back to Unix-stile (cygpath)
14338       input_path=`$CYGPATH -u "$shortmode_path"`
14339       new_path="$input_path"
14340     fi
14341   fi
14342 
14343   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14344   if test "x$test_cygdrive_prefix" = x; then
14345     # As a simple fix, exclude /usr/bin since it's not a real path.
14346     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14347       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14348       # a path prefixed by /cygdrive for fixpath to work.
14349       new_path="$CYGWIN_ROOT_PATH$input_path"
14350     fi
14351   fi
14352 
14353 
14354   if test "x$path" != "x$new_path"; then
14355     BOOT_JDK="$new_path"
14356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14357 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14358   fi
14359 
14360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14361 
14362   path="$BOOT_JDK"
14363   has_colon=`$ECHO $path | $GREP ^.:`
14364   new_path="$path"
14365   if test "x$has_colon" = x; then
14366     # Not in mixed or Windows style, start by that.
14367     new_path=`cmd //c echo $path`
14368   fi
14369 
14370 
14371   input_path="$new_path"
14372   # Check if we need to convert this using DOS-style short mode. If the path
14373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14374   # take no chances and rewrite it.
14375   # Note: m4 eats our [], so we need to use [ and ] instead.
14376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14377   if test "x$has_forbidden_chars" != x; then
14378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14379     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14380   fi
14381 
14382 
14383   windows_path="$new_path"
14384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14385     unix_path=`$CYGPATH -u "$windows_path"`
14386     new_path="$unix_path"
14387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14389     new_path="$unix_path"
14390   fi
14391 
14392   if test "x$path" != "x$new_path"; then
14393     BOOT_JDK="$new_path"
14394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14395 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14396   fi
14397 
14398   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14399   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14400 
14401   else
14402     # We're on a posix platform. Hooray! :)
14403     path="$BOOT_JDK"
14404     has_space=`$ECHO "$path" | $GREP " "`
14405     if test "x$has_space" != x; then
14406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14407 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14408       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14409     fi
14410 
14411     # Use eval to expand a potential ~
14412     eval path="$path"
14413     if test ! -f "$path" && test ! -d "$path"; then
14414       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14415     fi
14416 
14417     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14418   fi
14419 
14420               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14421 $as_echo_n "checking for Boot JDK... " >&6; }
14422               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14423 $as_echo "$BOOT_JDK" >&6; }
14424               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14425 $as_echo_n "checking Boot JDK version... " >&6; }
14426               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14427               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14428 $as_echo "$BOOT_JDK_VERSION" >&6; }
14429             fi # end check jdk version
14430           fi # end check rt.jar
14431         fi # end check javac
14432       fi # end check java
14433     fi # end check boot jdk found
14434   fi
14435 
14436     done
14437   fi
14438 
14439 
14440     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14441     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14442       # Do we have a bin/java?
14443       if test ! -x "$BOOT_JDK/bin/java"; then
14444         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14445 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14446         BOOT_JDK_FOUND=no
14447       else
14448         # Do we have a bin/javac?
14449         if test ! -x "$BOOT_JDK/bin/javac"; then
14450           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14451 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14452           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14453 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14454           BOOT_JDK_FOUND=no
14455         else
14456           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14457           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14458             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14460             BOOT_JDK_FOUND=no
14461           else
14462             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14463             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14464 
14465             # Extra M4 quote needed to protect [] in grep expression.
14466             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14467             if test "x$FOUND_VERSION_78" = x; then
14468               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14469 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14470               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14471 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14472               BOOT_JDK_FOUND=no
14473             else
14474               # We're done! :-)
14475               BOOT_JDK_FOUND=yes
14476 
14477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14478 
14479   # Input might be given as Windows format, start by converting to
14480   # unix format.
14481   path="$BOOT_JDK"
14482   new_path=`$CYGPATH -u "$path"`
14483 
14484   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14485   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14486   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14487   # "foo.exe" is OK but "foo" is an error.
14488   #
14489   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14490   # It is also a way to make sure we got the proper file name for the real test later on.
14491   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14492   if test "x$test_shortpath" = x; then
14493     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14494 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14495     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14496   fi
14497 
14498   # Call helper function which possibly converts this using DOS-style short mode.
14499   # If so, the updated path is stored in $new_path.
14500 
14501   input_path="$new_path"
14502   # Check if we need to convert this using DOS-style short mode. If the path
14503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14504   # take no chances and rewrite it.
14505   # Note: m4 eats our [], so we need to use [ and ] instead.
14506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14507   if test "x$has_forbidden_chars" != x; then
14508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14512       # Going to short mode and back again did indeed matter. Since short mode is
14513       # case insensitive, let's make it lowercase to improve readability.
14514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14515       # Now convert it back to Unix-stile (cygpath)
14516       input_path=`$CYGPATH -u "$shortmode_path"`
14517       new_path="$input_path"
14518     fi
14519   fi
14520 
14521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14522   if test "x$test_cygdrive_prefix" = x; then
14523     # As a simple fix, exclude /usr/bin since it's not a real path.
14524     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14526       # a path prefixed by /cygdrive for fixpath to work.
14527       new_path="$CYGWIN_ROOT_PATH$input_path"
14528     fi
14529   fi
14530 
14531 
14532   if test "x$path" != "x$new_path"; then
14533     BOOT_JDK="$new_path"
14534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14535 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14536   fi
14537 
14538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14539 
14540   path="$BOOT_JDK"
14541   has_colon=`$ECHO $path | $GREP ^.:`
14542   new_path="$path"
14543   if test "x$has_colon" = x; then
14544     # Not in mixed or Windows style, start by that.
14545     new_path=`cmd //c echo $path`
14546   fi
14547 
14548 
14549   input_path="$new_path"
14550   # Check if we need to convert this using DOS-style short mode. If the path
14551   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14552   # take no chances and rewrite it.
14553   # Note: m4 eats our [], so we need to use [ and ] instead.
14554   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14555   if test "x$has_forbidden_chars" != x; then
14556     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14557     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14558   fi
14559 
14560 
14561   windows_path="$new_path"
14562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14563     unix_path=`$CYGPATH -u "$windows_path"`
14564     new_path="$unix_path"
14565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14567     new_path="$unix_path"
14568   fi
14569 
14570   if test "x$path" != "x$new_path"; then
14571     BOOT_JDK="$new_path"
14572     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14573 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14574   fi
14575 
14576   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14577   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14578 
14579   else
14580     # We're on a posix platform. Hooray! :)
14581     path="$BOOT_JDK"
14582     has_space=`$ECHO "$path" | $GREP " "`
14583     if test "x$has_space" != x; then
14584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14585 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14586       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14587     fi
14588 
14589     # Use eval to expand a potential ~
14590     eval path="$path"
14591     if test ! -f "$path" && test ! -d "$path"; then
14592       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14593     fi
14594 
14595     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14596   fi
14597 
14598               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14599 $as_echo_n "checking for Boot JDK... " >&6; }
14600               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14601 $as_echo "$BOOT_JDK" >&6; }
14602               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14603 $as_echo_n "checking Boot JDK version... " >&6; }
14604               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14605               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14606 $as_echo "$BOOT_JDK_VERSION" >&6; }
14607             fi # end check jdk version
14608           fi # end check rt.jar
14609         fi # end check javac
14610       fi # end check java
14611     fi # end check boot jdk found
14612   fi
14613 
14614   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14615 
14616   if test "x$BOOT_JDK_FOUND" = xno; then
14617     # Now execute the test
14618 
14619   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14620   BOOT_JDK_SUFFIX="/Contents/Home"
14621   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14622   if test "x$ALL_JDKS_FOUND" != x; then
14623     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14624 
14625   if test "x$BOOT_JDK_FOUND" = xno; then
14626     # Now execute the test
14627 
14628         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14629         if test -d "$BOOT_JDK"; then
14630           BOOT_JDK_FOUND=maybe
14631           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14632 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14633         fi
14634 
14635 
14636     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14637     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14638       # Do we have a bin/java?
14639       if test ! -x "$BOOT_JDK/bin/java"; then
14640         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14641 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14642         BOOT_JDK_FOUND=no
14643       else
14644         # Do we have a bin/javac?
14645         if test ! -x "$BOOT_JDK/bin/javac"; then
14646           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14647 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14648           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14649 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14650           BOOT_JDK_FOUND=no
14651         else
14652           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14653           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14654             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14655 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14656             BOOT_JDK_FOUND=no
14657           else
14658             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14659             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14660 
14661             # Extra M4 quote needed to protect [] in grep expression.
14662             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14663             if test "x$FOUND_VERSION_78" = x; then
14664               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14665 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14666               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14667 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14668               BOOT_JDK_FOUND=no
14669             else
14670               # We're done! :-)
14671               BOOT_JDK_FOUND=yes
14672 
14673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14674 
14675   # Input might be given as Windows format, start by converting to
14676   # unix format.
14677   path="$BOOT_JDK"
14678   new_path=`$CYGPATH -u "$path"`
14679 
14680   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14681   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14682   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14683   # "foo.exe" is OK but "foo" is an error.
14684   #
14685   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14686   # It is also a way to make sure we got the proper file name for the real test later on.
14687   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14688   if test "x$test_shortpath" = x; then
14689     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14690 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14691     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14692   fi
14693 
14694   # Call helper function which possibly converts this using DOS-style short mode.
14695   # If so, the updated path is stored in $new_path.
14696 
14697   input_path="$new_path"
14698   # Check if we need to convert this using DOS-style short mode. If the path
14699   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14700   # take no chances and rewrite it.
14701   # Note: m4 eats our [], so we need to use [ and ] instead.
14702   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14703   if test "x$has_forbidden_chars" != x; then
14704     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14705     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14706     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14707     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14708       # Going to short mode and back again did indeed matter. Since short mode is
14709       # case insensitive, let's make it lowercase to improve readability.
14710       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14711       # Now convert it back to Unix-stile (cygpath)
14712       input_path=`$CYGPATH -u "$shortmode_path"`
14713       new_path="$input_path"
14714     fi
14715   fi
14716 
14717   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14718   if test "x$test_cygdrive_prefix" = x; then
14719     # As a simple fix, exclude /usr/bin since it's not a real path.
14720     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14721       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14722       # a path prefixed by /cygdrive for fixpath to work.
14723       new_path="$CYGWIN_ROOT_PATH$input_path"
14724     fi
14725   fi
14726 
14727 
14728   if test "x$path" != "x$new_path"; then
14729     BOOT_JDK="$new_path"
14730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14731 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14732   fi
14733 
14734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14735 
14736   path="$BOOT_JDK"
14737   has_colon=`$ECHO $path | $GREP ^.:`
14738   new_path="$path"
14739   if test "x$has_colon" = x; then
14740     # Not in mixed or Windows style, start by that.
14741     new_path=`cmd //c echo $path`
14742   fi
14743 
14744 
14745   input_path="$new_path"
14746   # Check if we need to convert this using DOS-style short mode. If the path
14747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14748   # take no chances and rewrite it.
14749   # Note: m4 eats our [], so we need to use [ and ] instead.
14750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14751   if test "x$has_forbidden_chars" != x; then
14752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14753     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14754   fi
14755 
14756 
14757   windows_path="$new_path"
14758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14759     unix_path=`$CYGPATH -u "$windows_path"`
14760     new_path="$unix_path"
14761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14763     new_path="$unix_path"
14764   fi
14765 
14766   if test "x$path" != "x$new_path"; then
14767     BOOT_JDK="$new_path"
14768     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14769 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14770   fi
14771 
14772   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14773   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14774 
14775   else
14776     # We're on a posix platform. Hooray! :)
14777     path="$BOOT_JDK"
14778     has_space=`$ECHO "$path" | $GREP " "`
14779     if test "x$has_space" != x; then
14780       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14781 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14782       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14783     fi
14784 
14785     # Use eval to expand a potential ~
14786     eval path="$path"
14787     if test ! -f "$path" && test ! -d "$path"; then
14788       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14789     fi
14790 
14791     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14792   fi
14793 
14794               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14795 $as_echo_n "checking for Boot JDK... " >&6; }
14796               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14797 $as_echo "$BOOT_JDK" >&6; }
14798               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14799 $as_echo_n "checking Boot JDK version... " >&6; }
14800               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14801               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14802 $as_echo "$BOOT_JDK_VERSION" >&6; }
14803             fi # end check jdk version
14804           fi # end check rt.jar
14805         fi # end check javac
14806       fi # end check java
14807     fi # end check boot jdk found
14808   fi
14809 
14810     done
14811   fi
14812 
14813 
14814     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14815     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14816       # Do we have a bin/java?
14817       if test ! -x "$BOOT_JDK/bin/java"; then
14818         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14820         BOOT_JDK_FOUND=no
14821       else
14822         # Do we have a bin/javac?
14823         if test ! -x "$BOOT_JDK/bin/javac"; then
14824           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14825 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14826           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14827 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14828           BOOT_JDK_FOUND=no
14829         else
14830           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14831           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14832             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14833 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14834             BOOT_JDK_FOUND=no
14835           else
14836             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14837             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14838 
14839             # Extra M4 quote needed to protect [] in grep expression.
14840             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14841             if test "x$FOUND_VERSION_78" = x; then
14842               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14843 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14844               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14845 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14846               BOOT_JDK_FOUND=no
14847             else
14848               # We're done! :-)
14849               BOOT_JDK_FOUND=yes
14850 
14851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14852 
14853   # Input might be given as Windows format, start by converting to
14854   # unix format.
14855   path="$BOOT_JDK"
14856   new_path=`$CYGPATH -u "$path"`
14857 
14858   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14859   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14860   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14861   # "foo.exe" is OK but "foo" is an error.
14862   #
14863   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14864   # It is also a way to make sure we got the proper file name for the real test later on.
14865   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14866   if test "x$test_shortpath" = x; then
14867     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14868 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14869     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14870   fi
14871 
14872   # Call helper function which possibly converts this using DOS-style short mode.
14873   # If so, the updated path is stored in $new_path.
14874 
14875   input_path="$new_path"
14876   # Check if we need to convert this using DOS-style short mode. If the path
14877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14878   # take no chances and rewrite it.
14879   # Note: m4 eats our [], so we need to use [ and ] instead.
14880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14881   if test "x$has_forbidden_chars" != x; then
14882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14883     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14884     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14885     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14886       # Going to short mode and back again did indeed matter. Since short mode is
14887       # case insensitive, let's make it lowercase to improve readability.
14888       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14889       # Now convert it back to Unix-stile (cygpath)
14890       input_path=`$CYGPATH -u "$shortmode_path"`
14891       new_path="$input_path"
14892     fi
14893   fi
14894 
14895   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14896   if test "x$test_cygdrive_prefix" = x; then
14897     # As a simple fix, exclude /usr/bin since it's not a real path.
14898     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14899       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14900       # a path prefixed by /cygdrive for fixpath to work.
14901       new_path="$CYGWIN_ROOT_PATH$input_path"
14902     fi
14903   fi
14904 
14905 
14906   if test "x$path" != "x$new_path"; then
14907     BOOT_JDK="$new_path"
14908     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14909 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14910   fi
14911 
14912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14913 
14914   path="$BOOT_JDK"
14915   has_colon=`$ECHO $path | $GREP ^.:`
14916   new_path="$path"
14917   if test "x$has_colon" = x; then
14918     # Not in mixed or Windows style, start by that.
14919     new_path=`cmd //c echo $path`
14920   fi
14921 
14922 
14923   input_path="$new_path"
14924   # Check if we need to convert this using DOS-style short mode. If the path
14925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14926   # take no chances and rewrite it.
14927   # Note: m4 eats our [], so we need to use [ and ] instead.
14928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14929   if test "x$has_forbidden_chars" != x; then
14930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14931     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14932   fi
14933 
14934 
14935   windows_path="$new_path"
14936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14937     unix_path=`$CYGPATH -u "$windows_path"`
14938     new_path="$unix_path"
14939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14941     new_path="$unix_path"
14942   fi
14943 
14944   if test "x$path" != "x$new_path"; then
14945     BOOT_JDK="$new_path"
14946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14947 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14948   fi
14949 
14950   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14951   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14952 
14953   else
14954     # We're on a posix platform. Hooray! :)
14955     path="$BOOT_JDK"
14956     has_space=`$ECHO "$path" | $GREP " "`
14957     if test "x$has_space" != x; then
14958       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14959 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14960       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14961     fi
14962 
14963     # Use eval to expand a potential ~
14964     eval path="$path"
14965     if test ! -f "$path" && test ! -d "$path"; then
14966       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14967     fi
14968 
14969     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14970   fi
14971 
14972               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14973 $as_echo_n "checking for Boot JDK... " >&6; }
14974               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14975 $as_echo "$BOOT_JDK" >&6; }
14976               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14977 $as_echo_n "checking Boot JDK version... " >&6; }
14978               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14979               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14980 $as_echo "$BOOT_JDK_VERSION" >&6; }
14981             fi # end check jdk version
14982           fi # end check rt.jar
14983         fi # end check javac
14984       fi # end check java
14985     fi # end check boot jdk found
14986   fi
14987 
14988 
14989   if test "x$BOOT_JDK_FOUND" = xno; then
14990     # Now execute the test
14991 
14992   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14993   BOOT_JDK_SUFFIX="/Contents/Home"
14994   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14995   if test "x$ALL_JDKS_FOUND" != x; then
14996     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14997 
14998   if test "x$BOOT_JDK_FOUND" = xno; then
14999     # Now execute the test
15000 
15001         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15002         if test -d "$BOOT_JDK"; then
15003           BOOT_JDK_FOUND=maybe
15004           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15005 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15006         fi
15007 
15008 
15009     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15010     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15011       # Do we have a bin/java?
15012       if test ! -x "$BOOT_JDK/bin/java"; then
15013         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15014 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15015         BOOT_JDK_FOUND=no
15016       else
15017         # Do we have a bin/javac?
15018         if test ! -x "$BOOT_JDK/bin/javac"; then
15019           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15020 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15021           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15022 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15023           BOOT_JDK_FOUND=no
15024         else
15025           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15026           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15027             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15028 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15029             BOOT_JDK_FOUND=no
15030           else
15031             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15032             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15033 
15034             # Extra M4 quote needed to protect [] in grep expression.
15035             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15036             if test "x$FOUND_VERSION_78" = x; then
15037               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15038 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15039               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15040 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15041               BOOT_JDK_FOUND=no
15042             else
15043               # We're done! :-)
15044               BOOT_JDK_FOUND=yes
15045 
15046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15047 
15048   # Input might be given as Windows format, start by converting to
15049   # unix format.
15050   path="$BOOT_JDK"
15051   new_path=`$CYGPATH -u "$path"`
15052 
15053   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15054   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15055   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15056   # "foo.exe" is OK but "foo" is an error.
15057   #
15058   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15059   # It is also a way to make sure we got the proper file name for the real test later on.
15060   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15061   if test "x$test_shortpath" = x; then
15062     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15063 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15064     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15065   fi
15066 
15067   # Call helper function which possibly converts this using DOS-style short mode.
15068   # If so, the updated path is stored in $new_path.
15069 
15070   input_path="$new_path"
15071   # Check if we need to convert this using DOS-style short mode. If the path
15072   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15073   # take no chances and rewrite it.
15074   # Note: m4 eats our [], so we need to use [ and ] instead.
15075   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15076   if test "x$has_forbidden_chars" != x; then
15077     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15078     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15079     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15080     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15081       # Going to short mode and back again did indeed matter. Since short mode is
15082       # case insensitive, let's make it lowercase to improve readability.
15083       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15084       # Now convert it back to Unix-stile (cygpath)
15085       input_path=`$CYGPATH -u "$shortmode_path"`
15086       new_path="$input_path"
15087     fi
15088   fi
15089 
15090   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15091   if test "x$test_cygdrive_prefix" = x; then
15092     # As a simple fix, exclude /usr/bin since it's not a real path.
15093     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15094       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15095       # a path prefixed by /cygdrive for fixpath to work.
15096       new_path="$CYGWIN_ROOT_PATH$input_path"
15097     fi
15098   fi
15099 
15100 
15101   if test "x$path" != "x$new_path"; then
15102     BOOT_JDK="$new_path"
15103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15104 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15105   fi
15106 
15107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15108 
15109   path="$BOOT_JDK"
15110   has_colon=`$ECHO $path | $GREP ^.:`
15111   new_path="$path"
15112   if test "x$has_colon" = x; then
15113     # Not in mixed or Windows style, start by that.
15114     new_path=`cmd //c echo $path`
15115   fi
15116 
15117 
15118   input_path="$new_path"
15119   # Check if we need to convert this using DOS-style short mode. If the path
15120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15121   # take no chances and rewrite it.
15122   # Note: m4 eats our [], so we need to use [ and ] instead.
15123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15124   if test "x$has_forbidden_chars" != x; then
15125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15126     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15127   fi
15128 
15129 
15130   windows_path="$new_path"
15131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15132     unix_path=`$CYGPATH -u "$windows_path"`
15133     new_path="$unix_path"
15134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15135     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15136     new_path="$unix_path"
15137   fi
15138 
15139   if test "x$path" != "x$new_path"; then
15140     BOOT_JDK="$new_path"
15141     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15142 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15143   fi
15144 
15145   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15146   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15147 
15148   else
15149     # We're on a posix platform. Hooray! :)
15150     path="$BOOT_JDK"
15151     has_space=`$ECHO "$path" | $GREP " "`
15152     if test "x$has_space" != x; then
15153       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15154 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15155       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15156     fi
15157 
15158     # Use eval to expand a potential ~
15159     eval path="$path"
15160     if test ! -f "$path" && test ! -d "$path"; then
15161       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15162     fi
15163 
15164     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15165   fi
15166 
15167               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15168 $as_echo_n "checking for Boot JDK... " >&6; }
15169               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15170 $as_echo "$BOOT_JDK" >&6; }
15171               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15172 $as_echo_n "checking Boot JDK version... " >&6; }
15173               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15174               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15175 $as_echo "$BOOT_JDK_VERSION" >&6; }
15176             fi # end check jdk version
15177           fi # end check rt.jar
15178         fi # end check javac
15179       fi # end check java
15180     fi # end check boot jdk found
15181   fi
15182 
15183     done
15184   fi
15185 
15186 
15187     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15188     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15189       # Do we have a bin/java?
15190       if test ! -x "$BOOT_JDK/bin/java"; then
15191         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15192 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15193         BOOT_JDK_FOUND=no
15194       else
15195         # Do we have a bin/javac?
15196         if test ! -x "$BOOT_JDK/bin/javac"; then
15197           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15198 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15199           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15200 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15201           BOOT_JDK_FOUND=no
15202         else
15203           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15204           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15205             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15206 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15207             BOOT_JDK_FOUND=no
15208           else
15209             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15210             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15211 
15212             # Extra M4 quote needed to protect [] in grep expression.
15213             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15214             if test "x$FOUND_VERSION_78" = x; then
15215               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15216 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15217               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15218 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15219               BOOT_JDK_FOUND=no
15220             else
15221               # We're done! :-)
15222               BOOT_JDK_FOUND=yes
15223 
15224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15225 
15226   # Input might be given as Windows format, start by converting to
15227   # unix format.
15228   path="$BOOT_JDK"
15229   new_path=`$CYGPATH -u "$path"`
15230 
15231   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15232   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15233   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15234   # "foo.exe" is OK but "foo" is an error.
15235   #
15236   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15237   # It is also a way to make sure we got the proper file name for the real test later on.
15238   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15239   if test "x$test_shortpath" = x; then
15240     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15241 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15242     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15243   fi
15244 
15245   # Call helper function which possibly converts this using DOS-style short mode.
15246   # If so, the updated path is stored in $new_path.
15247 
15248   input_path="$new_path"
15249   # Check if we need to convert this using DOS-style short mode. If the path
15250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15251   # take no chances and rewrite it.
15252   # Note: m4 eats our [], so we need to use [ and ] instead.
15253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15254   if test "x$has_forbidden_chars" != x; then
15255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15256     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15257     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15258     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15259       # Going to short mode and back again did indeed matter. Since short mode is
15260       # case insensitive, let's make it lowercase to improve readability.
15261       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15262       # Now convert it back to Unix-stile (cygpath)
15263       input_path=`$CYGPATH -u "$shortmode_path"`
15264       new_path="$input_path"
15265     fi
15266   fi
15267 
15268   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15269   if test "x$test_cygdrive_prefix" = x; then
15270     # As a simple fix, exclude /usr/bin since it's not a real path.
15271     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15272       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15273       # a path prefixed by /cygdrive for fixpath to work.
15274       new_path="$CYGWIN_ROOT_PATH$input_path"
15275     fi
15276   fi
15277 
15278 
15279   if test "x$path" != "x$new_path"; then
15280     BOOT_JDK="$new_path"
15281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15282 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15283   fi
15284 
15285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15286 
15287   path="$BOOT_JDK"
15288   has_colon=`$ECHO $path | $GREP ^.:`
15289   new_path="$path"
15290   if test "x$has_colon" = x; then
15291     # Not in mixed or Windows style, start by that.
15292     new_path=`cmd //c echo $path`
15293   fi
15294 
15295 
15296   input_path="$new_path"
15297   # Check if we need to convert this using DOS-style short mode. If the path
15298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15299   # take no chances and rewrite it.
15300   # Note: m4 eats our [], so we need to use [ and ] instead.
15301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15302   if test "x$has_forbidden_chars" != x; then
15303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15304     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15305   fi
15306 
15307 
15308   windows_path="$new_path"
15309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15310     unix_path=`$CYGPATH -u "$windows_path"`
15311     new_path="$unix_path"
15312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15313     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15314     new_path="$unix_path"
15315   fi
15316 
15317   if test "x$path" != "x$new_path"; then
15318     BOOT_JDK="$new_path"
15319     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15320 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15321   fi
15322 
15323   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15324   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15325 
15326   else
15327     # We're on a posix platform. Hooray! :)
15328     path="$BOOT_JDK"
15329     has_space=`$ECHO "$path" | $GREP " "`
15330     if test "x$has_space" != x; then
15331       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15332 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15333       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15334     fi
15335 
15336     # Use eval to expand a potential ~
15337     eval path="$path"
15338     if test ! -f "$path" && test ! -d "$path"; then
15339       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15340     fi
15341 
15342     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15343   fi
15344 
15345               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15346 $as_echo_n "checking for Boot JDK... " >&6; }
15347               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15348 $as_echo "$BOOT_JDK" >&6; }
15349               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15350 $as_echo_n "checking Boot JDK version... " >&6; }
15351               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15352               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15353 $as_echo "$BOOT_JDK_VERSION" >&6; }
15354             fi # end check jdk version
15355           fi # end check rt.jar
15356         fi # end check javac
15357       fi # end check java
15358     fi # end check boot jdk found
15359   fi
15360 
15361   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15362 
15363   if test "x$BOOT_JDK_FOUND" = xno; then
15364     # Now execute the test
15365 
15366   BOOT_JDK_PREFIX="/usr/lib/jvm"
15367   BOOT_JDK_SUFFIX=""
15368   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15369   if test "x$ALL_JDKS_FOUND" != x; then
15370     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15371 
15372   if test "x$BOOT_JDK_FOUND" = xno; then
15373     # Now execute the test
15374 
15375         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15376         if test -d "$BOOT_JDK"; then
15377           BOOT_JDK_FOUND=maybe
15378           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15379 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15380         fi
15381 
15382 
15383     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15384     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15385       # Do we have a bin/java?
15386       if test ! -x "$BOOT_JDK/bin/java"; then
15387         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15389         BOOT_JDK_FOUND=no
15390       else
15391         # Do we have a bin/javac?
15392         if test ! -x "$BOOT_JDK/bin/javac"; then
15393           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15394 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15395           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15396 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15397           BOOT_JDK_FOUND=no
15398         else
15399           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15400           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15401             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15402 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15403             BOOT_JDK_FOUND=no
15404           else
15405             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15406             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15407 
15408             # Extra M4 quote needed to protect [] in grep expression.
15409             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15410             if test "x$FOUND_VERSION_78" = x; then
15411               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15412 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15413               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15414 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15415               BOOT_JDK_FOUND=no
15416             else
15417               # We're done! :-)
15418               BOOT_JDK_FOUND=yes
15419 
15420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15421 
15422   # Input might be given as Windows format, start by converting to
15423   # unix format.
15424   path="$BOOT_JDK"
15425   new_path=`$CYGPATH -u "$path"`
15426 
15427   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15428   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15429   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15430   # "foo.exe" is OK but "foo" is an error.
15431   #
15432   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15433   # It is also a way to make sure we got the proper file name for the real test later on.
15434   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15435   if test "x$test_shortpath" = x; then
15436     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15437 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15438     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15439   fi
15440 
15441   # Call helper function which possibly converts this using DOS-style short mode.
15442   # If so, the updated path is stored in $new_path.
15443 
15444   input_path="$new_path"
15445   # Check if we need to convert this using DOS-style short mode. If the path
15446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15447   # take no chances and rewrite it.
15448   # Note: m4 eats our [], so we need to use [ and ] instead.
15449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15450   if test "x$has_forbidden_chars" != x; then
15451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15455       # Going to short mode and back again did indeed matter. Since short mode is
15456       # case insensitive, let's make it lowercase to improve readability.
15457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15458       # Now convert it back to Unix-stile (cygpath)
15459       input_path=`$CYGPATH -u "$shortmode_path"`
15460       new_path="$input_path"
15461     fi
15462   fi
15463 
15464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15465   if test "x$test_cygdrive_prefix" = x; then
15466     # As a simple fix, exclude /usr/bin since it's not a real path.
15467     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15469       # a path prefixed by /cygdrive for fixpath to work.
15470       new_path="$CYGWIN_ROOT_PATH$input_path"
15471     fi
15472   fi
15473 
15474 
15475   if test "x$path" != "x$new_path"; then
15476     BOOT_JDK="$new_path"
15477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15478 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15479   fi
15480 
15481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15482 
15483   path="$BOOT_JDK"
15484   has_colon=`$ECHO $path | $GREP ^.:`
15485   new_path="$path"
15486   if test "x$has_colon" = x; then
15487     # Not in mixed or Windows style, start by that.
15488     new_path=`cmd //c echo $path`
15489   fi
15490 
15491 
15492   input_path="$new_path"
15493   # Check if we need to convert this using DOS-style short mode. If the path
15494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15495   # take no chances and rewrite it.
15496   # Note: m4 eats our [], so we need to use [ and ] instead.
15497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15498   if test "x$has_forbidden_chars" != x; then
15499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15501   fi
15502 
15503 
15504   windows_path="$new_path"
15505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15506     unix_path=`$CYGPATH -u "$windows_path"`
15507     new_path="$unix_path"
15508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15510     new_path="$unix_path"
15511   fi
15512 
15513   if test "x$path" != "x$new_path"; then
15514     BOOT_JDK="$new_path"
15515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15516 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15517   fi
15518 
15519   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15520   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15521 
15522   else
15523     # We're on a posix platform. Hooray! :)
15524     path="$BOOT_JDK"
15525     has_space=`$ECHO "$path" | $GREP " "`
15526     if test "x$has_space" != x; then
15527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15528 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15529       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15530     fi
15531 
15532     # Use eval to expand a potential ~
15533     eval path="$path"
15534     if test ! -f "$path" && test ! -d "$path"; then
15535       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15536     fi
15537 
15538     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15539   fi
15540 
15541               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15542 $as_echo_n "checking for Boot JDK... " >&6; }
15543               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15544 $as_echo "$BOOT_JDK" >&6; }
15545               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15546 $as_echo_n "checking Boot JDK version... " >&6; }
15547               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15548               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15549 $as_echo "$BOOT_JDK_VERSION" >&6; }
15550             fi # end check jdk version
15551           fi # end check rt.jar
15552         fi # end check javac
15553       fi # end check java
15554     fi # end check boot jdk found
15555   fi
15556 
15557     done
15558   fi
15559 
15560 
15561     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15562     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15563       # Do we have a bin/java?
15564       if test ! -x "$BOOT_JDK/bin/java"; then
15565         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15566 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15567         BOOT_JDK_FOUND=no
15568       else
15569         # Do we have a bin/javac?
15570         if test ! -x "$BOOT_JDK/bin/javac"; then
15571           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15572 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15573           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15574 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15575           BOOT_JDK_FOUND=no
15576         else
15577           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15578           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15579             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15580 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15581             BOOT_JDK_FOUND=no
15582           else
15583             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15584             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15585 
15586             # Extra M4 quote needed to protect [] in grep expression.
15587             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15588             if test "x$FOUND_VERSION_78" = x; then
15589               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15590 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15591               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15592 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15593               BOOT_JDK_FOUND=no
15594             else
15595               # We're done! :-)
15596               BOOT_JDK_FOUND=yes
15597 
15598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15599 
15600   # Input might be given as Windows format, start by converting to
15601   # unix format.
15602   path="$BOOT_JDK"
15603   new_path=`$CYGPATH -u "$path"`
15604 
15605   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15606   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15607   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15608   # "foo.exe" is OK but "foo" is an error.
15609   #
15610   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15611   # It is also a way to make sure we got the proper file name for the real test later on.
15612   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15613   if test "x$test_shortpath" = x; then
15614     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15615 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15616     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15617   fi
15618 
15619   # Call helper function which possibly converts this using DOS-style short mode.
15620   # If so, the updated path is stored in $new_path.
15621 
15622   input_path="$new_path"
15623   # Check if we need to convert this using DOS-style short mode. If the path
15624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15625   # take no chances and rewrite it.
15626   # Note: m4 eats our [], so we need to use [ and ] instead.
15627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15628   if test "x$has_forbidden_chars" != x; then
15629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15630     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15631     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15632     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15633       # Going to short mode and back again did indeed matter. Since short mode is
15634       # case insensitive, let's make it lowercase to improve readability.
15635       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15636       # Now convert it back to Unix-stile (cygpath)
15637       input_path=`$CYGPATH -u "$shortmode_path"`
15638       new_path="$input_path"
15639     fi
15640   fi
15641 
15642   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15643   if test "x$test_cygdrive_prefix" = x; then
15644     # As a simple fix, exclude /usr/bin since it's not a real path.
15645     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15646       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15647       # a path prefixed by /cygdrive for fixpath to work.
15648       new_path="$CYGWIN_ROOT_PATH$input_path"
15649     fi
15650   fi
15651 
15652 
15653   if test "x$path" != "x$new_path"; then
15654     BOOT_JDK="$new_path"
15655     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15656 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15657   fi
15658 
15659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15660 
15661   path="$BOOT_JDK"
15662   has_colon=`$ECHO $path | $GREP ^.:`
15663   new_path="$path"
15664   if test "x$has_colon" = x; then
15665     # Not in mixed or Windows style, start by that.
15666     new_path=`cmd //c echo $path`
15667   fi
15668 
15669 
15670   input_path="$new_path"
15671   # Check if we need to convert this using DOS-style short mode. If the path
15672   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15673   # take no chances and rewrite it.
15674   # Note: m4 eats our [], so we need to use [ and ] instead.
15675   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15676   if test "x$has_forbidden_chars" != x; then
15677     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15678     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15679   fi
15680 
15681 
15682   windows_path="$new_path"
15683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15684     unix_path=`$CYGPATH -u "$windows_path"`
15685     new_path="$unix_path"
15686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15688     new_path="$unix_path"
15689   fi
15690 
15691   if test "x$path" != "x$new_path"; then
15692     BOOT_JDK="$new_path"
15693     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15694 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15695   fi
15696 
15697   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15698   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15699 
15700   else
15701     # We're on a posix platform. Hooray! :)
15702     path="$BOOT_JDK"
15703     has_space=`$ECHO "$path" | $GREP " "`
15704     if test "x$has_space" != x; then
15705       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15706 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15707       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15708     fi
15709 
15710     # Use eval to expand a potential ~
15711     eval path="$path"
15712     if test ! -f "$path" && test ! -d "$path"; then
15713       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15714     fi
15715 
15716     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15717   fi
15718 
15719               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15720 $as_echo_n "checking for Boot JDK... " >&6; }
15721               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15722 $as_echo "$BOOT_JDK" >&6; }
15723               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15724 $as_echo_n "checking Boot JDK version... " >&6; }
15725               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15726               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15727 $as_echo "$BOOT_JDK_VERSION" >&6; }
15728             fi # end check jdk version
15729           fi # end check rt.jar
15730         fi # end check javac
15731       fi # end check java
15732     fi # end check boot jdk found
15733   fi
15734 
15735   fi
15736 
15737 
15738     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15739     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15740       # Do we have a bin/java?
15741       if test ! -x "$BOOT_JDK/bin/java"; then
15742         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15743 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15744         BOOT_JDK_FOUND=no
15745       else
15746         # Do we have a bin/javac?
15747         if test ! -x "$BOOT_JDK/bin/javac"; then
15748           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15749 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15750           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15751 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15752           BOOT_JDK_FOUND=no
15753         else
15754           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15755           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15756             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15757 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15758             BOOT_JDK_FOUND=no
15759           else
15760             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15761             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15762 
15763             # Extra M4 quote needed to protect [] in grep expression.
15764             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15765             if test "x$FOUND_VERSION_78" = x; then
15766               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15767 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15768               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15769 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15770               BOOT_JDK_FOUND=no
15771             else
15772               # We're done! :-)
15773               BOOT_JDK_FOUND=yes
15774 
15775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15776 
15777   # Input might be given as Windows format, start by converting to
15778   # unix format.
15779   path="$BOOT_JDK"
15780   new_path=`$CYGPATH -u "$path"`
15781 
15782   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15783   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15784   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15785   # "foo.exe" is OK but "foo" is an error.
15786   #
15787   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15788   # It is also a way to make sure we got the proper file name for the real test later on.
15789   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15790   if test "x$test_shortpath" = x; then
15791     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15792 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15793     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15794   fi
15795 
15796   # Call helper function which possibly converts this using DOS-style short mode.
15797   # If so, the updated path is stored in $new_path.
15798 
15799   input_path="$new_path"
15800   # Check if we need to convert this using DOS-style short mode. If the path
15801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15802   # take no chances and rewrite it.
15803   # Note: m4 eats our [], so we need to use [ and ] instead.
15804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15805   if test "x$has_forbidden_chars" != x; then
15806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15807     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15808     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15809     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15810       # Going to short mode and back again did indeed matter. Since short mode is
15811       # case insensitive, let's make it lowercase to improve readability.
15812       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15813       # Now convert it back to Unix-stile (cygpath)
15814       input_path=`$CYGPATH -u "$shortmode_path"`
15815       new_path="$input_path"
15816     fi
15817   fi
15818 
15819   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15820   if test "x$test_cygdrive_prefix" = x; then
15821     # As a simple fix, exclude /usr/bin since it's not a real path.
15822     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15823       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15824       # a path prefixed by /cygdrive for fixpath to work.
15825       new_path="$CYGWIN_ROOT_PATH$input_path"
15826     fi
15827   fi
15828 
15829 
15830   if test "x$path" != "x$new_path"; then
15831     BOOT_JDK="$new_path"
15832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15833 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15834   fi
15835 
15836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15837 
15838   path="$BOOT_JDK"
15839   has_colon=`$ECHO $path | $GREP ^.:`
15840   new_path="$path"
15841   if test "x$has_colon" = x; then
15842     # Not in mixed or Windows style, start by that.
15843     new_path=`cmd //c echo $path`
15844   fi
15845 
15846 
15847   input_path="$new_path"
15848   # Check if we need to convert this using DOS-style short mode. If the path
15849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15850   # take no chances and rewrite it.
15851   # Note: m4 eats our [], so we need to use [ and ] instead.
15852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15853   if test "x$has_forbidden_chars" != x; then
15854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15855     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15856   fi
15857 
15858 
15859   windows_path="$new_path"
15860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15861     unix_path=`$CYGPATH -u "$windows_path"`
15862     new_path="$unix_path"
15863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15865     new_path="$unix_path"
15866   fi
15867 
15868   if test "x$path" != "x$new_path"; then
15869     BOOT_JDK="$new_path"
15870     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15871 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15872   fi
15873 
15874   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15875   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15876 
15877   else
15878     # We're on a posix platform. Hooray! :)
15879     path="$BOOT_JDK"
15880     has_space=`$ECHO "$path" | $GREP " "`
15881     if test "x$has_space" != x; then
15882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15883 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15884       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15885     fi
15886 
15887     # Use eval to expand a potential ~
15888     eval path="$path"
15889     if test ! -f "$path" && test ! -d "$path"; then
15890       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15891     fi
15892 
15893     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15894   fi
15895 
15896               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15897 $as_echo_n "checking for Boot JDK... " >&6; }
15898               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15899 $as_echo "$BOOT_JDK" >&6; }
15900               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15901 $as_echo_n "checking Boot JDK version... " >&6; }
15902               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15903               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15904 $as_echo "$BOOT_JDK_VERSION" >&6; }
15905             fi # end check jdk version
15906           fi # end check rt.jar
15907         fi # end check javac
15908       fi # end check java
15909     fi # end check boot jdk found
15910   fi
15911 
15912 
15913   # If we haven't found anything yet, we've truly lost. Give up.
15914   if test "x$BOOT_JDK_FOUND" = xno; then
15915 
15916   # Print a helpful message on how to acquire the necessary build dependency.
15917   # openjdk is the help tag: freetype, cups, pulse, alsa etc
15918   MISSING_DEPENDENCY=openjdk
15919 
15920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15921     cygwin_help $MISSING_DEPENDENCY
15922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15923     msys_help $MISSING_DEPENDENCY
15924   else
15925     PKGHANDLER_COMMAND=
15926 
15927     case $PKGHANDLER in
15928       apt-get)
15929         apt_help     $MISSING_DEPENDENCY ;;
15930       yum)
15931         yum_help     $MISSING_DEPENDENCY ;;
15932       port)
15933         port_help    $MISSING_DEPENDENCY ;;
15934       pkgutil)
15935         pkgutil_help $MISSING_DEPENDENCY ;;
15936       pkgadd)
15937         pkgadd_help  $MISSING_DEPENDENCY ;;
15938     esac
15939 
15940     if test "x$PKGHANDLER_COMMAND" != x; then
15941       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15942     fi
15943   fi
15944 
15945     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15946 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15947     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15948 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15949     as_fn_error $? "Cannot continue" "$LINENO" 5
15950   fi
15951 
15952   # Setup proper paths for what we found
15953   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15954   if test ! -f "$BOOT_RTJAR"; then
15955     # On MacOSX it is called classes.jar
15956     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15957     if test -f "$BOOT_RTJAR"; then
15958       # Remove the ..
15959       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15960     fi
15961   fi
15962   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15963   BOOT_JDK="$BOOT_JDK"
15964 
15965 
15966 
15967 
15968   # Setup tools from the Boot JDK.
15969 
15970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15971 $as_echo_n "checking for java in Boot JDK... " >&6; }
15972   JAVA=$BOOT_JDK/bin/java
15973   if test ! -x $JAVA; then
15974     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15975 $as_echo "not found" >&6; }
15976     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15977 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15978     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15979   fi
15980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15981 $as_echo "ok" >&6; }
15982 
15983 
15984   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15985 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15986   JAVAC=$BOOT_JDK/bin/javac
15987   if test ! -x $JAVAC; then
15988     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15989 $as_echo "not found" >&6; }
15990     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15991 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15992     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15993   fi
15994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15995 $as_echo "ok" >&6; }
15996 
15997 
15998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15999 $as_echo_n "checking for javah in Boot JDK... " >&6; }
16000   JAVAH=$BOOT_JDK/bin/javah
16001   if test ! -x $JAVAH; then
16002     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16003 $as_echo "not found" >&6; }
16004     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16005 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16006     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
16007   fi
16008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16009 $as_echo "ok" >&6; }
16010 
16011 
16012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
16013 $as_echo_n "checking for javap in Boot JDK... " >&6; }
16014   JAVAP=$BOOT_JDK/bin/javap
16015   if test ! -x $JAVAP; then
16016     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16017 $as_echo "not found" >&6; }
16018     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16019 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16020     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
16021   fi
16022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16023 $as_echo "ok" >&6; }
16024 
16025 
16026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16027 $as_echo_n "checking for jar in Boot JDK... " >&6; }
16028   JAR=$BOOT_JDK/bin/jar
16029   if test ! -x $JAR; then
16030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16031 $as_echo "not found" >&6; }
16032     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16033 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16034     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16035   fi
16036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16037 $as_echo "ok" >&6; }
16038 
16039 
16040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16041 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16042   RMIC=$BOOT_JDK/bin/rmic
16043   if test ! -x $RMIC; then
16044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16045 $as_echo "not found" >&6; }
16046     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16047 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16048     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16049   fi
16050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16051 $as_echo "ok" >&6; }
16052 
16053 
16054   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16055 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16056   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16057   if test ! -x $NATIVE2ASCII; then
16058     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16059 $as_echo "not found" >&6; }
16060     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16061 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16062     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16063   fi
16064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16065 $as_echo "ok" >&6; }
16066 
16067 
16068   # Finally, set some other options...
16069 
16070   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16071   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16072 
16073 
16074 
16075   # Check if the boot jdk is 32 or 64 bit
16076   if "$JAVA" -d64 -version > /dev/null 2>&1; then
16077     BOOT_JDK_BITS="64"
16078   else
16079     BOOT_JDK_BITS="32"
16080   fi
16081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
16082 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
16083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
16084 $as_echo "$BOOT_JDK_BITS" >&6; }
16085 
16086 
16087 
16088   ##############################################################################
16089   #
16090   # Specify options for anything that is run with the Boot JDK.
16091   #
16092 
16093 # Check whether --with-boot-jdk-jvmargs was given.
16094 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16095   withval=$with_boot_jdk_jvmargs;
16096 fi
16097 
16098 
16099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
16100 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
16101 
16102   # Disable special log output when a debug build is used as Boot JDK...
16103 
16104   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16105   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16106   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16107   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16108   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16109   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16110     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16111     JVM_ARG_OK=true
16112   else
16113     $ECHO "Arg failed:" >&5
16114     $ECHO "$OUTPUT" >&5
16115     JVM_ARG_OK=false
16116   fi
16117 
16118 
16119   # Apply user provided options.
16120 
16121   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
16122   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
16123   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
16124   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16125   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16126   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16127     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
16128     JVM_ARG_OK=true
16129   else
16130     $ECHO "Arg failed:" >&5
16131     $ECHO "$OUTPUT" >&5
16132     JVM_ARG_OK=false
16133   fi
16134 
16135 
16136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
16137 $as_echo "$boot_jdk_jvmargs" >&6; }
16138 
16139   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
16140   JAVA_FLAGS=$boot_jdk_jvmargs
16141 
16142 
16143 
16144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
16145 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
16146 
16147   # Starting amount of heap memory.
16148 
16149   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16150   $ECHO "Command: $JAVA -Xms64M -version" >&5
16151   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16152   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16153   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16154   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16155     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
16156     JVM_ARG_OK=true
16157   else
16158     $ECHO "Arg failed:" >&5
16159     $ECHO "$OUTPUT" >&5
16160     JVM_ARG_OK=false
16161   fi
16162 
16163 
16164   # Maximum amount of heap memory.
16165   # Maximum stack size.
16166   if test "x$BOOT_JDK_BITS" = x32; then
16167     JVM_MAX_HEAP=1100M
16168     STACK_SIZE=768
16169   else
16170     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
16171     # pointers are used. Apparently, we need to increase the heap and stack
16172     # space for the jvm. More specifically, when running javac to build huge
16173     # jdk batch
16174     JVM_MAX_HEAP=1600M
16175     STACK_SIZE=1536
16176   fi
16177 
16178   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
16179   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
16180   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
16181   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16182   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16183   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16184     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
16185     JVM_ARG_OK=true
16186   else
16187     $ECHO "Arg failed:" >&5
16188     $ECHO "$OUTPUT" >&5
16189     JVM_ARG_OK=false
16190   fi
16191 
16192 
16193   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16194   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16195   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16196   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16197   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16198   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16199     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
16200     JVM_ARG_OK=true
16201   else
16202     $ECHO "Arg failed:" >&5
16203     $ECHO "$OUTPUT" >&5
16204     JVM_ARG_OK=false
16205   fi
16206 
16207 
16208   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16209   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16210   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16211   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16212   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16213   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16214     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
16215     JVM_ARG_OK=true
16216   else
16217     $ECHO "Arg failed:" >&5
16218     $ECHO "$OUTPUT" >&5
16219     JVM_ARG_OK=false
16220   fi
16221 
16222 
16223   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16224   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16225   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16226   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16227   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16228   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16229     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
16230     JVM_ARG_OK=true
16231   else
16232     $ECHO "Arg failed:" >&5
16233     $ECHO "$OUTPUT" >&5
16234     JVM_ARG_OK=false
16235   fi
16236 
16237 
16238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
16239 $as_echo "$boot_jdk_jvmargs_big" >&6; }
16240 
16241   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
16242 
16243 
16244 
16245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
16246 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
16247 
16248   # Use serial gc for small short lived tools if possible
16249 
16250   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
16251   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
16252   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
16253   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16254   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16255   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16256     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
16257     JVM_ARG_OK=true
16258   else
16259     $ECHO "Arg failed:" >&5
16260     $ECHO "$OUTPUT" >&5
16261     JVM_ARG_OK=false
16262   fi
16263 
16264 
16265   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
16266   $ECHO "Command: $JAVA -Xms32M -version" >&5
16267   OUTPUT=`$JAVA -Xms32M -version 2>&1`
16268   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16269   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16270   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16271     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
16272     JVM_ARG_OK=true
16273   else
16274     $ECHO "Arg failed:" >&5
16275     $ECHO "$OUTPUT" >&5
16276     JVM_ARG_OK=false
16277   fi
16278 
16279 
16280   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
16281   $ECHO "Command: $JAVA -Xmx512M -version" >&5
16282   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
16283   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16284   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16285   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16286     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
16287     JVM_ARG_OK=true
16288   else
16289     $ECHO "Arg failed:" >&5
16290     $ECHO "$OUTPUT" >&5
16291     JVM_ARG_OK=false
16292   fi
16293 
16294 
16295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
16296 $as_echo "$boot_jdk_jvmargs_small" >&6; }
16297 
16298   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
16299 
16300 
16301 
16302 ###############################################################################
16303 #
16304 # Configure the sources to use. We can add or override individual directories.
16305 #
16306 ###############################################################################
16307 
16308 
16309   # Where are the sources. Any of these can be overridden
16310   # using --with-override-corba and the likes.
16311   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16312   CORBA_TOPDIR="$SRC_ROOT/corba"
16313   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16314   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16315   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16316   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16317   JDK_TOPDIR="$SRC_ROOT/jdk"
16318 
16319 
16320 
16321 
16322 
16323 
16324 
16325 
16326 
16327 
16328   ###############################################################################
16329   #
16330   # Pickup additional source for a component from outside of the source root
16331   # or override source for a component.
16332   #
16333 
16334 # Check whether --with-add-source-root was given.
16335 if test "${with_add_source_root+set}" = set; then :
16336   withval=$with_add_source_root;
16337 fi
16338 
16339 
16340 
16341 # Check whether --with-override-source-root was given.
16342 if test "${with_override_source_root+set}" = set; then :
16343   withval=$with_override_source_root;
16344 fi
16345 
16346 
16347 
16348 # Check whether --with-adds-and-overrides was given.
16349 if test "${with_adds_and_overrides+set}" = set; then :
16350   withval=$with_adds_and_overrides;
16351 fi
16352 
16353 
16354   if test "x$with_adds_and_overrides" != x; then
16355     with_add_source_root="$with_adds_and_overrides/adds"
16356     with_override_source_root="$with_adds_and_overrides/overrides"
16357   fi
16358 
16359   if test "x$with_add_source_root" != x; then
16360     if ! test -d $with_add_source_root; then
16361       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16362     fi
16363     CURDIR="$PWD"
16364     cd "$with_add_source_root"
16365     ADD_SRC_ROOT="`pwd`"
16366     cd "$CURDIR"
16367     # Verify that the addon source root does not have any root makefiles.
16368     # If it does, then it is usually an error, prevent this.
16369     if test -f $with_add_source_root/langtools/make/Makefile; then
16370       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
16371     fi
16372     if test -f $with_add_source_root/corba/make/Makefile; then
16373       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
16374     fi
16375     if test -f $with_add_source_root/jaxp/make/Makefile; then
16376       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
16377     fi
16378     if test -f $with_add_source_root/jaxws/make/Makefile; then
16379       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
16380     fi
16381     if test -f $with_add_source_root/hotspot/make/Makefile; then
16382       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
16383     fi
16384     if test -f $with_add_source_root/nashorn/make/Makefile; then
16385       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
16386     fi
16387     if test -f $with_add_source_root/jdk/make/Makefile; then
16388       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
16389     fi
16390   fi
16391 
16392 
16393   if test "x$with_override_source_root" != x; then
16394     if ! test -d $with_override_source_root; then
16395       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16396     fi
16397     CURDIR="$PWD"
16398     cd "$with_override_source_root"
16399     OVERRIDE_SRC_ROOT="`pwd`"
16400     cd "$CURDIR"
16401     if test -f $with_override_source_root/langtools/make/Makefile; then
16402       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
16403     fi
16404     if test -f $with_override_source_root/corba/make/Makefile; then
16405       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
16406     fi
16407     if test -f $with_override_source_root/jaxp/make/Makefile; then
16408       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
16409     fi
16410     if test -f $with_override_source_root/jaxws/make/Makefile; then
16411       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
16412     fi
16413     if test -f $with_override_source_root/hotspot/make/Makefile; then
16414       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
16415     fi
16416     if test -f $with_override_source_root/nashorn/make/Makefile; then
16417       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
16418     fi
16419     if test -f $with_override_source_root/jdk/make/Makefile; then
16420       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
16421     fi
16422   fi
16423 
16424 
16425   ###############################################################################
16426   #
16427   # Override a repo completely, this is used for example when you have 3 small
16428   # development sandboxes of the langtools sources and want to avoid having 3 full
16429   # OpenJDK sources checked out on disk.
16430   #
16431   # Assuming that the 3 langtools sandboxes are located here:
16432   # /home/fredrik/sandbox1/langtools
16433   # /home/fredrik/sandbox2/langtools
16434   # /home/fredrik/sandbox3/langtools
16435   #
16436   # From the source root you create build subdirs manually:
16437   #     mkdir -p build1 build2 build3
16438   # in each build directory run:
16439   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16440   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16441   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16442   #
16443 
16444 
16445 # Check whether --with-override-langtools was given.
16446 if test "${with_override_langtools+set}" = set; then :
16447   withval=$with_override_langtools;
16448 fi
16449 
16450 
16451 
16452 # Check whether --with-override-corba was given.
16453 if test "${with_override_corba+set}" = set; then :
16454   withval=$with_override_corba;
16455 fi
16456 
16457 
16458 
16459 # Check whether --with-override-jaxp was given.
16460 if test "${with_override_jaxp+set}" = set; then :
16461   withval=$with_override_jaxp;
16462 fi
16463 
16464 
16465 
16466 # Check whether --with-override-jaxws was given.
16467 if test "${with_override_jaxws+set}" = set; then :
16468   withval=$with_override_jaxws;
16469 fi
16470 
16471 
16472 
16473 # Check whether --with-override-hotspot was given.
16474 if test "${with_override_hotspot+set}" = set; then :
16475   withval=$with_override_hotspot;
16476 fi
16477 
16478 
16479 
16480 # Check whether --with-override-nashorn was given.
16481 if test "${with_override_nashorn+set}" = set; then :
16482   withval=$with_override_nashorn;
16483 fi
16484 
16485 
16486 
16487 # Check whether --with-override-jdk was given.
16488 if test "${with_override_jdk+set}" = set; then :
16489   withval=$with_override_jdk;
16490 fi
16491 
16492 
16493   if test "x$with_override_langtools" != x; then
16494     CURDIR="$PWD"
16495     cd "$with_override_langtools"
16496     LANGTOOLS_TOPDIR="`pwd`"
16497     cd "$CURDIR"
16498     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16499       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16500     fi
16501     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16502 $as_echo_n "checking if langtools should be overridden... " >&6; }
16503     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16504 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16505   fi
16506   if test "x$with_override_corba" != x; then
16507     CURDIR="$PWD"
16508     cd "$with_override_corba"
16509     CORBA_TOPDIR="`pwd`"
16510     cd "$CURDIR"
16511     if ! test -f $CORBA_TOPDIR/make/Makefile; then
16512       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16513     fi
16514     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16515 $as_echo_n "checking if corba should be overridden... " >&6; }
16516     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16517 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16518   fi
16519   if test "x$with_override_jaxp" != x; then
16520     CURDIR="$PWD"
16521     cd "$with_override_jaxp"
16522     JAXP_TOPDIR="`pwd`"
16523     cd "$CURDIR"
16524     if ! test -f $JAXP_TOPDIR/make/Makefile; then
16525       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16526     fi
16527     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16528 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16529     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16530 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16531   fi
16532   if test "x$with_override_jaxws" != x; then
16533     CURDIR="$PWD"
16534     cd "$with_override_jaxws"
16535     JAXWS_TOPDIR="`pwd`"
16536     cd "$CURDIR"
16537     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16538       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16539     fi
16540     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16541 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16542     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16543 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16544   fi
16545   if test "x$with_override_hotspot" != x; then
16546     CURDIR="$PWD"
16547     cd "$with_override_hotspot"
16548     HOTSPOT_TOPDIR="`pwd`"
16549     cd "$CURDIR"
16550     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16551       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16552     fi
16553     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16554 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16555     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16556 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16557   fi
16558   if test "x$with_override_nashorn" != x; then
16559     CURDIR="$PWD"
16560     cd "$with_override_nashorn"
16561     NASHORN_TOPDIR="`pwd`"
16562     cd "$CURDIR"
16563     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16564       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16565     fi
16566     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16567 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16568     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16569 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16570   fi
16571   if test "x$with_override_jdk" != x; then
16572     CURDIR="$PWD"
16573     cd "$with_override_jdk"
16574     JDK_TOPDIR="`pwd`"
16575     cd "$CURDIR"
16576     if ! test -f $JDK_TOPDIR/make/Makefile; then
16577       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16578     fi
16579     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16580 $as_echo_n "checking if JDK should be overridden... " >&6; }
16581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16582 $as_echo "yes with $JDK_TOPDIR" >&6; }
16583   fi
16584 
16585 
16586   BUILD_OUTPUT="$OUTPUT_ROOT"
16587 
16588 
16589   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16590   BUILD_HOTSPOT=true
16591 
16592 
16593 
16594 # Check whether --with-import-hotspot was given.
16595 if test "${with_import_hotspot+set}" = set; then :
16596   withval=$with_import_hotspot;
16597 fi
16598 
16599   if test "x$with_import_hotspot" != x; then
16600     CURDIR="$PWD"
16601     cd "$with_import_hotspot"
16602     HOTSPOT_DIST="`pwd`"
16603     cd "$CURDIR"
16604     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16605       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16606     fi
16607     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16608 $as_echo_n "checking if hotspot should be imported... " >&6; }
16609     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16610 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16611     BUILD_HOTSPOT=false
16612   fi
16613 
16614   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16615 
16616 
16617 ###############################################################################
16618 #
16619 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16620 # cross-compilation aware.
16621 #
16622 ###############################################################################
16623 
16624 
16625   ###############################################################################
16626   #
16627   # Configure the development tool paths and potential sysroot.
16628   #
16629   ac_ext=cpp
16630 ac_cpp='$CXXCPP $CPPFLAGS'
16631 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16632 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16633 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16634 
16635 
16636   # The option used to specify the target .o,.a or .so file.
16637   # When compiling, how to specify the to be created object file.
16638   CC_OUT_OPTION='-o$(SPACE)'
16639   # When linking, how to specify the to be created executable.
16640   EXE_OUT_OPTION='-o$(SPACE)'
16641   # When linking, how to specify the to be created dynamically linkable library.
16642   LD_OUT_OPTION='-o$(SPACE)'
16643   # When archiving, how to specify the to be create static archive for object files.
16644   AR_OUT_OPTION='rcs$(SPACE)'
16645 
16646 
16647 
16648 
16649 
16650 # Locate the actual tools
16651 
16652 
16653 # Check whether --with-jtreg was given.
16654 if test "${with_jtreg+set}" = set; then :
16655   withval=$with_jtreg;
16656 else
16657   with_jtreg=no
16658 fi
16659 
16660 
16661   if test "x$with_jtreg" = xno; then
16662     # jtreg disabled
16663     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16664 $as_echo_n "checking for jtreg... " >&6; }
16665     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16666 $as_echo "no" >&6; }
16667   else
16668     if test "x$with_jtreg" != xyes; then
16669       # with path specified.
16670       JT_HOME="$with_jtreg"
16671     fi
16672 
16673     if test "x$JT_HOME" != x; then
16674       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16675 $as_echo_n "checking for jtreg... " >&6; }
16676 
16677       # use JT_HOME enviroment var.
16678 
16679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16680 
16681   # Input might be given as Windows format, start by converting to
16682   # unix format.
16683   path="$JT_HOME"
16684   new_path=`$CYGPATH -u "$path"`
16685 
16686   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16687   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16688   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16689   # "foo.exe" is OK but "foo" is an error.
16690   #
16691   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16692   # It is also a way to make sure we got the proper file name for the real test later on.
16693   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16694   if test "x$test_shortpath" = x; then
16695     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16696 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16697     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16698   fi
16699 
16700   # Call helper function which possibly converts this using DOS-style short mode.
16701   # If so, the updated path is stored in $new_path.
16702 
16703   input_path="$new_path"
16704   # Check if we need to convert this using DOS-style short mode. If the path
16705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16706   # take no chances and rewrite it.
16707   # Note: m4 eats our [], so we need to use [ and ] instead.
16708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16709   if test "x$has_forbidden_chars" != x; then
16710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16711     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16712     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16713     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16714       # Going to short mode and back again did indeed matter. Since short mode is
16715       # case insensitive, let's make it lowercase to improve readability.
16716       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16717       # Now convert it back to Unix-stile (cygpath)
16718       input_path=`$CYGPATH -u "$shortmode_path"`
16719       new_path="$input_path"
16720     fi
16721   fi
16722 
16723   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16724   if test "x$test_cygdrive_prefix" = x; then
16725     # As a simple fix, exclude /usr/bin since it's not a real path.
16726     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16727       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16728       # a path prefixed by /cygdrive for fixpath to work.
16729       new_path="$CYGWIN_ROOT_PATH$input_path"
16730     fi
16731   fi
16732 
16733 
16734   if test "x$path" != "x$new_path"; then
16735     JT_HOME="$new_path"
16736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16737 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16738   fi
16739 
16740   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16741 
16742   path="$JT_HOME"
16743   has_colon=`$ECHO $path | $GREP ^.:`
16744   new_path="$path"
16745   if test "x$has_colon" = x; then
16746     # Not in mixed or Windows style, start by that.
16747     new_path=`cmd //c echo $path`
16748   fi
16749 
16750 
16751   input_path="$new_path"
16752   # Check if we need to convert this using DOS-style short mode. If the path
16753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16754   # take no chances and rewrite it.
16755   # Note: m4 eats our [], so we need to use [ and ] instead.
16756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16757   if test "x$has_forbidden_chars" != x; then
16758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16759     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16760   fi
16761 
16762 
16763   windows_path="$new_path"
16764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16765     unix_path=`$CYGPATH -u "$windows_path"`
16766     new_path="$unix_path"
16767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16769     new_path="$unix_path"
16770   fi
16771 
16772   if test "x$path" != "x$new_path"; then
16773     JT_HOME="$new_path"
16774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16775 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16776   fi
16777 
16778   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16779   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16780 
16781   else
16782     # We're on a posix platform. Hooray! :)
16783     path="$JT_HOME"
16784     has_space=`$ECHO "$path" | $GREP " "`
16785     if test "x$has_space" != x; then
16786       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16787 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16788       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16789     fi
16790 
16791     # Use eval to expand a potential ~
16792     eval path="$path"
16793     if test ! -f "$path" && test ! -d "$path"; then
16794       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16795     fi
16796 
16797     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16798   fi
16799 
16800 
16801       # jtreg win32 script works for everybody
16802       JTREGEXE="$JT_HOME/bin/jtreg"
16803 
16804       if test ! -f "$JTREGEXE"; then
16805         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16806       fi
16807 
16808       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16809 $as_echo "$JTREGEXE" >&6; }
16810     else
16811       # try to find jtreg on path
16812 
16813   for ac_prog in jtreg
16814 do
16815   # Extract the first word of "$ac_prog", so it can be a program name with args.
16816 set dummy $ac_prog; ac_word=$2
16817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16818 $as_echo_n "checking for $ac_word... " >&6; }
16819 if ${ac_cv_path_JTREGEXE+:} false; then :
16820   $as_echo_n "(cached) " >&6
16821 else
16822   case $JTREGEXE in
16823   [\\/]* | ?:[\\/]*)
16824   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16825   ;;
16826   *)
16827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16828 for as_dir in $PATH
16829 do
16830   IFS=$as_save_IFS
16831   test -z "$as_dir" && as_dir=.
16832     for ac_exec_ext in '' $ac_executable_extensions; do
16833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16834     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16836     break 2
16837   fi
16838 done
16839   done
16840 IFS=$as_save_IFS
16841 
16842   ;;
16843 esac
16844 fi
16845 JTREGEXE=$ac_cv_path_JTREGEXE
16846 if test -n "$JTREGEXE"; then
16847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16848 $as_echo "$JTREGEXE" >&6; }
16849 else
16850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16851 $as_echo "no" >&6; }
16852 fi
16853 
16854 
16855   test -n "$JTREGEXE" && break
16856 done
16857 
16858 
16859   if test "x$JTREGEXE" = x; then
16860     if test "xjtreg" = x; then
16861       PROG_NAME=jtregexe
16862     else
16863       PROG_NAME=jtreg
16864     fi
16865     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16866 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16867     as_fn_error $? "Cannot continue" "$LINENO" 5
16868   fi
16869 
16870 
16871       JT_HOME="`$DIRNAME $JTREGEXE`"
16872     fi
16873   fi
16874 
16875 
16876 
16877 
16878 
16879   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16880 
16881   # Store path to cygwin link.exe to help excluding it when searching for
16882   # VS linker. This must be done before changing the PATH when looking for VS.
16883   # Extract the first word of "link", so it can be a program name with args.
16884 set dummy link; ac_word=$2
16885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16886 $as_echo_n "checking for $ac_word... " >&6; }
16887 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16888   $as_echo_n "(cached) " >&6
16889 else
16890   case $CYGWIN_LINK in
16891   [\\/]* | ?:[\\/]*)
16892   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16893   ;;
16894   *)
16895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16896 for as_dir in $PATH
16897 do
16898   IFS=$as_save_IFS
16899   test -z "$as_dir" && as_dir=.
16900     for ac_exec_ext in '' $ac_executable_extensions; do
16901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16902     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16904     break 2
16905   fi
16906 done
16907   done
16908 IFS=$as_save_IFS
16909 
16910   ;;
16911 esac
16912 fi
16913 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16914 if test -n "$CYGWIN_LINK"; then
16915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16916 $as_echo "$CYGWIN_LINK" >&6; }
16917 else
16918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16919 $as_echo "no" >&6; }
16920 fi
16921 
16922 
16923   if test "x$CYGWIN_LINK" != x; then
16924     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16925 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16926     "$CYGWIN_LINK" --version > /dev/null
16927     if test $? -eq 0 ; then
16928       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16929 $as_echo "yes" >&6; }
16930     else
16931       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16932 $as_echo "no" >&6; }
16933       # This might be the VS linker. Don't exclude it later on.
16934       CYGWIN_LINK=""
16935     fi
16936   fi
16937 
16938   # First-hand choice is to locate and run the vsvars bat file.
16939 
16940   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16941     VCVARSFILE="vc/bin/vcvars32.bat"
16942   else
16943     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16944   fi
16945 
16946   VS_ENV_CMD=""
16947   VS_ENV_ARGS=""
16948   if test "x$with_toolsdir" != x; then
16949 
16950   if test "x$VS_ENV_CMD" = x; then
16951     VS100BASE="$with_toolsdir/../.."
16952     METHOD="--with-tools-dir"
16953 
16954   windows_path="$VS100BASE"
16955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16956     unix_path=`$CYGPATH -u "$windows_path"`
16957     VS100BASE="$unix_path"
16958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16960     VS100BASE="$unix_path"
16961   fi
16962 
16963     if test -d "$VS100BASE"; then
16964       if test -f "$VS100BASE/$VCVARSFILE"; then
16965         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16966 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16967         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16968       else
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         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16972 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16973       fi
16974     fi
16975   fi
16976 
16977   fi
16978 
16979   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16980     # Having specified an argument which is incorrect will produce an instant failure;
16981     # we should not go on looking
16982     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16983 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16984     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16985 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16986     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16987   fi
16988 
16989   if test "x$VS100COMNTOOLS" != x; then
16990 
16991   if test "x$VS_ENV_CMD" = x; then
16992     VS100BASE="$VS100COMNTOOLS/../.."
16993     METHOD="VS100COMNTOOLS variable"
16994 
16995   windows_path="$VS100BASE"
16996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16997     unix_path=`$CYGPATH -u "$windows_path"`
16998     VS100BASE="$unix_path"
16999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17001     VS100BASE="$unix_path"
17002   fi
17003 
17004     if test -d "$VS100BASE"; then
17005       if test -f "$VS100BASE/$VCVARSFILE"; then
17006         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17007 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17008         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17009       else
17010         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17011 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17012         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17013 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17014       fi
17015     fi
17016   fi
17017 
17018   fi
17019   if test "x$PROGRAMFILES" != x; then
17020 
17021   if test "x$VS_ENV_CMD" = x; then
17022     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
17023     METHOD="well-known name"
17024 
17025   windows_path="$VS100BASE"
17026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17027     unix_path=`$CYGPATH -u "$windows_path"`
17028     VS100BASE="$unix_path"
17029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17030     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17031     VS100BASE="$unix_path"
17032   fi
17033 
17034     if test -d "$VS100BASE"; then
17035       if test -f "$VS100BASE/$VCVARSFILE"; then
17036         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17037 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17038         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17039       else
17040         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17041 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17042         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17043 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17044       fi
17045     fi
17046   fi
17047 
17048   fi
17049 
17050   if test "x$VS_ENV_CMD" = x; then
17051     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
17052     METHOD="well-known name"
17053 
17054   windows_path="$VS100BASE"
17055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17056     unix_path=`$CYGPATH -u "$windows_path"`
17057     VS100BASE="$unix_path"
17058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17060     VS100BASE="$unix_path"
17061   fi
17062 
17063     if test -d "$VS100BASE"; then
17064       if test -f "$VS100BASE/$VCVARSFILE"; then
17065         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17066 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17067         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17068       else
17069         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17070 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17071         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17072 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17073       fi
17074     fi
17075   fi
17076 
17077 
17078   if test "x$VS_ENV_CMD" = x; then
17079     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
17080     METHOD="well-known name"
17081 
17082   windows_path="$VS100BASE"
17083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17084     unix_path=`$CYGPATH -u "$windows_path"`
17085     VS100BASE="$unix_path"
17086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17088     VS100BASE="$unix_path"
17089   fi
17090 
17091     if test -d "$VS100BASE"; then
17092       if test -f "$VS100BASE/$VCVARSFILE"; then
17093         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17094 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17095         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17096       else
17097         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17098 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17099         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17100 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17101       fi
17102     fi
17103   fi
17104 
17105 
17106   if test "x$ProgramW6432" != x; then
17107 
17108   if test "x$VS_ENV_CMD" = x; then
17109     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17110     METHOD="well-known name"
17111 
17112   windows_path="$WIN_SDK_BASE"
17113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17114     unix_path=`$CYGPATH -u "$windows_path"`
17115     WIN_SDK_BASE="$unix_path"
17116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17117     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17118     WIN_SDK_BASE="$unix_path"
17119   fi
17120 
17121     if test -d "$WIN_SDK_BASE"; then
17122       # There have been cases of partial or broken SDK installations. A missing
17123       # lib dir is not going to work.
17124       if test ! -d "$WIN_SDK_BASE/../lib"; then
17125         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17126 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17127         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17128 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17129       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; 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         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17133         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17134           VS_ENV_ARGS="/x86"
17135         else
17136           VS_ENV_ARGS="/x64"
17137         fi
17138       else
17139         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17140 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17141         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17142 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17143       fi
17144     fi
17145   fi
17146 
17147   fi
17148   if test "x$PROGRAMW6432" != x; then
17149 
17150   if test "x$VS_ENV_CMD" = x; then
17151     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17152     METHOD="well-known name"
17153 
17154   windows_path="$WIN_SDK_BASE"
17155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17156     unix_path=`$CYGPATH -u "$windows_path"`
17157     WIN_SDK_BASE="$unix_path"
17158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17160     WIN_SDK_BASE="$unix_path"
17161   fi
17162 
17163     if test -d "$WIN_SDK_BASE"; then
17164       # There have been cases of partial or broken SDK installations. A missing
17165       # lib dir is not going to work.
17166       if test ! -d "$WIN_SDK_BASE/../lib"; then
17167         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17168 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17169         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17170 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17171       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; 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         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17175         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17176           VS_ENV_ARGS="/x86"
17177         else
17178           VS_ENV_ARGS="/x64"
17179         fi
17180       else
17181         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17182 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17183         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17184 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17185       fi
17186     fi
17187   fi
17188 
17189   fi
17190   if test "x$PROGRAMFILES" != x; then
17191 
17192   if test "x$VS_ENV_CMD" = x; then
17193     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17194     METHOD="well-known name"
17195 
17196   windows_path="$WIN_SDK_BASE"
17197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17198     unix_path=`$CYGPATH -u "$windows_path"`
17199     WIN_SDK_BASE="$unix_path"
17200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17201     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17202     WIN_SDK_BASE="$unix_path"
17203   fi
17204 
17205     if test -d "$WIN_SDK_BASE"; then
17206       # There have been cases of partial or broken SDK installations. A missing
17207       # lib dir is not going to work.
17208       if test ! -d "$WIN_SDK_BASE/../lib"; then
17209         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17210 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17211         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17212 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17213       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17214         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17215 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17216         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17217         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17218           VS_ENV_ARGS="/x86"
17219         else
17220           VS_ENV_ARGS="/x64"
17221         fi
17222       else
17223         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17224 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17225         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17226 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17227       fi
17228     fi
17229   fi
17230 
17231   fi
17232 
17233   if test "x$VS_ENV_CMD" = x; then
17234     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17235     METHOD="well-known name"
17236 
17237   windows_path="$WIN_SDK_BASE"
17238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17239     unix_path=`$CYGPATH -u "$windows_path"`
17240     WIN_SDK_BASE="$unix_path"
17241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17243     WIN_SDK_BASE="$unix_path"
17244   fi
17245 
17246     if test -d "$WIN_SDK_BASE"; then
17247       # There have been cases of partial or broken SDK installations. A missing
17248       # lib dir is not going to work.
17249       if test ! -d "$WIN_SDK_BASE/../lib"; then
17250         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17251 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17252         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17253 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17254       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17255         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17256 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17257         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17258         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17259           VS_ENV_ARGS="/x86"
17260         else
17261           VS_ENV_ARGS="/x64"
17262         fi
17263       else
17264         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17265 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17266         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17267 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17268       fi
17269     fi
17270   fi
17271 
17272 
17273   if test "x$VS_ENV_CMD" = x; then
17274     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17275     METHOD="well-known name"
17276 
17277   windows_path="$WIN_SDK_BASE"
17278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17279     unix_path=`$CYGPATH -u "$windows_path"`
17280     WIN_SDK_BASE="$unix_path"
17281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17283     WIN_SDK_BASE="$unix_path"
17284   fi
17285 
17286     if test -d "$WIN_SDK_BASE"; then
17287       # There have been cases of partial or broken SDK installations. A missing
17288       # lib dir is not going to work.
17289       if test ! -d "$WIN_SDK_BASE/../lib"; then
17290         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17291 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17292         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17293 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17294       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17295         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17296 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17297         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17298         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17299           VS_ENV_ARGS="/x86"
17300         else
17301           VS_ENV_ARGS="/x64"
17302         fi
17303       else
17304         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17305 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17306         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17307 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17308       fi
17309     fi
17310   fi
17311 
17312 
17313   if test "x$VS_ENV_CMD" != x; then
17314     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17315 
17316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17317 
17318   # First separate the path from the arguments. This will split at the first
17319   # space.
17320   complete="$VS_ENV_CMD"
17321   path="${complete%% *}"
17322   tmp="$complete EOL"
17323   arguments="${tmp#* }"
17324 
17325   # Input might be given as Windows format, start by converting to
17326   # unix format.
17327   new_path=`$CYGPATH -u "$path"`
17328 
17329   # Now try to locate executable using which
17330   new_path=`$WHICH "$new_path" 2> /dev/null`
17331   # bat and cmd files are not always considered executable in cygwin causing which
17332   # to not find them
17333   if test "x$new_path" = x \
17334       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17335       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17336     new_path=`$CYGPATH -u "$path"`
17337   fi
17338   if test "x$new_path" = x; then
17339     # Oops. Which didn't find the executable.
17340     # The splitting of arguments from the executable at a space might have been incorrect,
17341     # since paths with space are more likely in Windows. Give it another try with the whole
17342     # argument.
17343     path="$complete"
17344     arguments="EOL"
17345     new_path=`$CYGPATH -u "$path"`
17346     new_path=`$WHICH "$new_path" 2> /dev/null`
17347     # bat and cmd files are not always considered executable in cygwin causing which
17348     # to not find them
17349     if test "x$new_path" = x \
17350         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17351         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17352       new_path=`$CYGPATH -u "$path"`
17353     fi
17354     if test "x$new_path" = x; then
17355       # It's still not found. Now this is an unrecoverable error.
17356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17357 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17358       has_space=`$ECHO "$complete" | $GREP " "`
17359       if test "x$has_space" != x; then
17360         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17361 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17362       fi
17363       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17364     fi
17365   fi
17366 
17367   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17368   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17369   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17370   # "foo.exe" is OK but "foo" is an error.
17371   #
17372   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17373   # It is also a way to make sure we got the proper file name for the real test later on.
17374   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17375   if test "x$test_shortpath" = x; then
17376     # Short path failed, file does not exist as specified.
17377     # Try adding .exe or .cmd
17378     if test -f "${new_path}.exe"; then
17379       input_to_shortpath="${new_path}.exe"
17380     elif test -f "${new_path}.cmd"; then
17381       input_to_shortpath="${new_path}.cmd"
17382     else
17383       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17384 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17385       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17386 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17387       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17388     fi
17389   else
17390     input_to_shortpath="$new_path"
17391   fi
17392 
17393   # Call helper function which possibly converts this using DOS-style short mode.
17394   # If so, the updated path is stored in $new_path.
17395   new_path="$input_to_shortpath"
17396 
17397   input_path="$input_to_shortpath"
17398   # Check if we need to convert this using DOS-style short mode. If the path
17399   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17400   # take no chances and rewrite it.
17401   # Note: m4 eats our [], so we need to use [ and ] instead.
17402   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17403   if test "x$has_forbidden_chars" != x; then
17404     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17405     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17406     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17407     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17408       # Going to short mode and back again did indeed matter. Since short mode is
17409       # case insensitive, let's make it lowercase to improve readability.
17410       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17411       # Now convert it back to Unix-stile (cygpath)
17412       input_path=`$CYGPATH -u "$shortmode_path"`
17413       new_path="$input_path"
17414     fi
17415   fi
17416 
17417   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17418   if test "x$test_cygdrive_prefix" = x; then
17419     # As a simple fix, exclude /usr/bin since it's not a real path.
17420     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17421       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17422       # a path prefixed by /cygdrive for fixpath to work.
17423       new_path="$CYGWIN_ROOT_PATH$input_path"
17424     fi
17425   fi
17426 
17427   # remove trailing .exe if any
17428   new_path="${new_path/%.exe/}"
17429 
17430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17431 
17432   # First separate the path from the arguments. This will split at the first
17433   # space.
17434   complete="$VS_ENV_CMD"
17435   path="${complete%% *}"
17436   tmp="$complete EOL"
17437   arguments="${tmp#* }"
17438 
17439   # Input might be given as Windows format, start by converting to
17440   # unix format.
17441   new_path="$path"
17442 
17443   windows_path="$new_path"
17444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17445     unix_path=`$CYGPATH -u "$windows_path"`
17446     new_path="$unix_path"
17447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17449     new_path="$unix_path"
17450   fi
17451 
17452 
17453   # Now try to locate executable using which
17454   new_path=`$WHICH "$new_path" 2> /dev/null`
17455 
17456   if test "x$new_path" = x; then
17457     # Oops. Which didn't find the executable.
17458     # The splitting of arguments from the executable at a space might have been incorrect,
17459     # since paths with space are more likely in Windows. Give it another try with the whole
17460     # argument.
17461     path="$complete"
17462     arguments="EOL"
17463     new_path="$path"
17464 
17465   windows_path="$new_path"
17466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17467     unix_path=`$CYGPATH -u "$windows_path"`
17468     new_path="$unix_path"
17469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17471     new_path="$unix_path"
17472   fi
17473 
17474 
17475     new_path=`$WHICH "$new_path" 2> /dev/null`
17476 
17477     if test "x$new_path" = x; then
17478       # It's still not found. Now this is an unrecoverable error.
17479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17480 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17481       has_space=`$ECHO "$complete" | $GREP " "`
17482       if test "x$has_space" != x; then
17483         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17484 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17485       fi
17486       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17487     fi
17488   fi
17489 
17490   # Now new_path has a complete unix path to the binary
17491   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17492     # Keep paths in /bin as-is, but remove trailing .exe if any
17493     new_path="${new_path/%.exe/}"
17494     # Do not save /bin paths to all_fixpath_prefixes!
17495   else
17496     # Not in mixed or Windows style, start by that.
17497     new_path=`cmd //c echo $new_path`
17498 
17499   input_path="$new_path"
17500   # Check if we need to convert this using DOS-style short mode. If the path
17501   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17502   # take no chances and rewrite it.
17503   # Note: m4 eats our [], so we need to use [ and ] instead.
17504   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17505   if test "x$has_forbidden_chars" != x; then
17506     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17507     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17508   fi
17509 
17510     # Output is in $new_path
17511 
17512   windows_path="$new_path"
17513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17514     unix_path=`$CYGPATH -u "$windows_path"`
17515     new_path="$unix_path"
17516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17518     new_path="$unix_path"
17519   fi
17520 
17521     # remove trailing .exe if any
17522     new_path="${new_path/%.exe/}"
17523 
17524     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17525     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17526   fi
17527 
17528   else
17529     # We're on a posix platform. Hooray! :)
17530     # First separate the path from the arguments. This will split at the first
17531     # space.
17532     complete="$VS_ENV_CMD"
17533     path="${complete%% *}"
17534     tmp="$complete EOL"
17535     arguments="${tmp#* }"
17536 
17537     # Cannot rely on the command "which" here since it doesn't always work.
17538     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17539     if test -z "$is_absolute_path"; then
17540       # Path to executable is not absolute. Find it.
17541       IFS_save="$IFS"
17542       IFS=:
17543       for p in $PATH; do
17544         if test -f "$p/$path" && test -x "$p/$path"; then
17545           new_path="$p/$path"
17546           break
17547         fi
17548       done
17549       IFS="$IFS_save"
17550     else
17551       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17552 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17553       new_path="$path"
17554     fi
17555 
17556     if test "x$new_path" = x; then
17557       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17558 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17559       has_space=`$ECHO "$complete" | $GREP " "`
17560       if test "x$has_space" != x; then
17561         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17562 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17563       fi
17564       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17565     fi
17566   fi
17567 
17568   # Now join together the path and the arguments once again
17569   if test "x$arguments" != xEOL; then
17570     new_complete="$new_path ${arguments% *}"
17571   else
17572     new_complete="$new_path"
17573   fi
17574 
17575   if test "x$complete" != "x$new_complete"; then
17576     VS_ENV_CMD="$new_complete"
17577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17578 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17579   fi
17580 
17581 
17582     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17583     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17584 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17585     cd $OUTPUT_ROOT
17586     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17587     # to autoconf standards.
17588 
17589     #----
17590 
17591     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17592     # but calculate the difference in Cygwin environment before/after running it and then
17593     # apply the diff.
17594 
17595     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17596       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17597       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17598       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17599     else
17600       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17601       _dosbash=`cmd //c echo \`which bash\``
17602     fi
17603 
17604     # generate the set of exported vars before/after the vs10 setup
17605     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17606     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17607     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17608     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17609 
17610     # Now execute the newly created bat file.
17611     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17612     cmd /c localdevenvtmp.bat | cat
17613 
17614     # apply the diff (less some non-vs10 vars named by "!")
17615     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17616     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17617     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17618 
17619     # cleanup
17620     $RM localdevenvtmp*
17621     #----
17622     cd $CURDIR
17623     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17624       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17625 $as_echo "no" >&6; }
17626       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17627 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17628       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17629 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17630       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17631 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17632       as_fn_error $? "Cannot continue" "$LINENO" 5
17633     fi
17634 
17635     # Now set all paths and other env variables. This will allow the rest of
17636     # the configure script to find and run the compiler in the proper way.
17637     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17638 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17639     . $OUTPUT_ROOT/localdevenv.sh
17640   else
17641     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17642     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17643 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17644   fi
17645 
17646   # At this point, we should have corrent variables in the environment, or we can't continue.
17647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17648 $as_echo_n "checking for Visual Studio variables... " >&6; }
17649 
17650   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17651     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17652       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17653 $as_echo "present but broken" >&6; }
17654       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17655     else
17656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17657 $as_echo "ok" >&6; }
17658       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17659       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17660       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17661       # Remove any paths containing # (typically F#) as that messes up make
17662       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17663       VS_PATH="$PATH"
17664 
17665 
17666 
17667     fi
17668   else
17669     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17670 $as_echo "not found" >&6; }
17671 
17672     if test "x$VS_ENV_CMD" = x; then
17673       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17674 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17675       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17676 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17677     else
17678       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17679 $as_echo "$as_me: Running the extraction script failed." >&6;}
17680     fi
17681     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17682 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17683     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17684 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17685     as_fn_error $? "Cannot continue" "$LINENO" 5
17686   fi
17687 
17688 
17689 
17690 # Check whether --with-msvcr-dll was given.
17691 if test "${with_msvcr_dll+set}" = set; then :
17692   withval=$with_msvcr_dll;
17693 fi
17694 
17695 
17696   if test "x$with_msvcr_dll" != x; then
17697     # If given explicitely by user, do not probe. If not present, fail directly.
17698 
17699   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17700   METHOD="--with-msvcr-dll"
17701   if test -e "$POSSIBLE_MSVCR_DLL"; then
17702     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17703 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17704 
17705     # Need to check if the found msvcr is correct architecture
17706     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17707 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17708     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17709     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17710       CORRECT_MSVCR_ARCH=386
17711     else
17712       CORRECT_MSVCR_ARCH=x86-64
17713     fi
17714     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17715       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17716 $as_echo "ok" >&6; }
17717       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17718       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17719 $as_echo_n "checking for msvcr100.dll... " >&6; }
17720       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17721 $as_echo "$MSVCR_DLL" >&6; }
17722     else
17723       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17724 $as_echo "incorrect, ignoring" >&6; }
17725       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17726 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17727     fi
17728   fi
17729 
17730     if test "x$MSVCR_DLL" = x; then
17731       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17732     fi
17733   fi
17734 
17735   if test "x$MSVCR_DLL" = x; then
17736     # Probe: Using well-known location from Visual Studio 10.0
17737     if test "x$VCINSTALLDIR" != x; then
17738       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17739 
17740   windows_path="$CYGWIN_VC_INSTALL_DIR"
17741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17742     unix_path=`$CYGPATH -u "$windows_path"`
17743     CYGWIN_VC_INSTALL_DIR="$unix_path"
17744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17746     CYGWIN_VC_INSTALL_DIR="$unix_path"
17747   fi
17748 
17749       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17750         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17751       else
17752         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17753       fi
17754 
17755   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17756   METHOD="well-known location in VCINSTALLDIR"
17757   if test -e "$POSSIBLE_MSVCR_DLL"; then
17758     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17759 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17760 
17761     # Need to check if the found msvcr is correct architecture
17762     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17763 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17764     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17765     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17766       CORRECT_MSVCR_ARCH=386
17767     else
17768       CORRECT_MSVCR_ARCH=x86-64
17769     fi
17770     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17771       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17772 $as_echo "ok" >&6; }
17773       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17774       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17775 $as_echo_n "checking for msvcr100.dll... " >&6; }
17776       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17777 $as_echo "$MSVCR_DLL" >&6; }
17778     else
17779       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17780 $as_echo "incorrect, ignoring" >&6; }
17781       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17782 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17783     fi
17784   fi
17785 
17786     fi
17787   fi
17788 
17789   if test "x$MSVCR_DLL" = x; then
17790     # Probe: Check in the Boot JDK directory.
17791     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17792 
17793   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17794   METHOD="well-known location in Boot JDK"
17795   if test -e "$POSSIBLE_MSVCR_DLL"; then
17796     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17797 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17798 
17799     # Need to check if the found msvcr is correct architecture
17800     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17801 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17802     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17803     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17804       CORRECT_MSVCR_ARCH=386
17805     else
17806       CORRECT_MSVCR_ARCH=x86-64
17807     fi
17808     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17809       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17810 $as_echo "ok" >&6; }
17811       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17812       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17813 $as_echo_n "checking for msvcr100.dll... " >&6; }
17814       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17815 $as_echo "$MSVCR_DLL" >&6; }
17816     else
17817       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17818 $as_echo "incorrect, ignoring" >&6; }
17819       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17820 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17821     fi
17822   fi
17823 
17824   fi
17825 
17826   if test "x$MSVCR_DLL" = x; then
17827     # Probe: Look in the Windows system32 directory
17828     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17829 
17830   windows_path="$CYGWIN_SYSTEMROOT"
17831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17832     unix_path=`$CYGPATH -u "$windows_path"`
17833     CYGWIN_SYSTEMROOT="$unix_path"
17834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17836     CYGWIN_SYSTEMROOT="$unix_path"
17837   fi
17838 
17839     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17840 
17841   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17842   METHOD="well-known location in SYSTEMROOT"
17843   if test -e "$POSSIBLE_MSVCR_DLL"; then
17844     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17845 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17846 
17847     # Need to check if the found msvcr is correct architecture
17848     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17849 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17850     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17851     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17852       CORRECT_MSVCR_ARCH=386
17853     else
17854       CORRECT_MSVCR_ARCH=x86-64
17855     fi
17856     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17857       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17858 $as_echo "ok" >&6; }
17859       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17860       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17861 $as_echo_n "checking for msvcr100.dll... " >&6; }
17862       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17863 $as_echo "$MSVCR_DLL" >&6; }
17864     else
17865       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17866 $as_echo "incorrect, ignoring" >&6; }
17867       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17868 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17869     fi
17870   fi
17871 
17872   fi
17873 
17874   if test "x$MSVCR_DLL" = x; then
17875     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17876     if test "x$VS100COMNTOOLS" != x; then
17877       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17878 
17879   windows_path="$CYGWIN_VS_TOOLS_DIR"
17880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17881     unix_path=`$CYGPATH -u "$windows_path"`
17882     CYGWIN_VS_TOOLS_DIR="$unix_path"
17883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17885     CYGWIN_VS_TOOLS_DIR="$unix_path"
17886   fi
17887 
17888       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17889         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17890       else
17891         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17892       fi
17893 
17894   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17895   METHOD="search of VS100COMNTOOLS"
17896   if test -e "$POSSIBLE_MSVCR_DLL"; then
17897     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17898 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17899 
17900     # Need to check if the found msvcr is correct architecture
17901     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17902 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17903     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17904     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17905       CORRECT_MSVCR_ARCH=386
17906     else
17907       CORRECT_MSVCR_ARCH=x86-64
17908     fi
17909     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17910       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17911 $as_echo "ok" >&6; }
17912       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17913       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17914 $as_echo_n "checking for msvcr100.dll... " >&6; }
17915       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17916 $as_echo "$MSVCR_DLL" >&6; }
17917     else
17918       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17919 $as_echo "incorrect, ignoring" >&6; }
17920       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17921 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17922     fi
17923   fi
17924 
17925     fi
17926   fi
17927 
17928   if test "x$MSVCR_DLL" = x; then
17929     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17930     # (This was the original behaviour; kept since it might turn up something)
17931     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17932       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17933         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17934       else
17935         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17936         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17937           # We're grasping at straws now...
17938           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17939         fi
17940       fi
17941 
17942 
17943   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17944   METHOD="search of VCINSTALLDIR"
17945   if test -e "$POSSIBLE_MSVCR_DLL"; then
17946     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17947 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17948 
17949     # Need to check if the found msvcr is correct architecture
17950     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17951 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17952     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17953     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17954       CORRECT_MSVCR_ARCH=386
17955     else
17956       CORRECT_MSVCR_ARCH=x86-64
17957     fi
17958     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17959       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17960 $as_echo "ok" >&6; }
17961       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17962       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17963 $as_echo_n "checking for msvcr100.dll... " >&6; }
17964       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17965 $as_echo "$MSVCR_DLL" >&6; }
17966     else
17967       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17968 $as_echo "incorrect, ignoring" >&6; }
17969       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17970 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17971     fi
17972   fi
17973 
17974     fi
17975   fi
17976 
17977   if test "x$MSVCR_DLL" = x; then
17978     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17979 $as_echo_n "checking for msvcr100.dll... " >&6; }
17980     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17981 $as_echo "no" >&6; }
17982     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17983   fi
17984 
17985 
17986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17987 
17988   # Input might be given as Windows format, start by converting to
17989   # unix format.
17990   path="$MSVCR_DLL"
17991   new_path=`$CYGPATH -u "$path"`
17992 
17993   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17994   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17995   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17996   # "foo.exe" is OK but "foo" is an error.
17997   #
17998   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17999   # It is also a way to make sure we got the proper file name for the real test later on.
18000   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18001   if test "x$test_shortpath" = x; then
18002     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18003 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18004     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
18005   fi
18006 
18007   # Call helper function which possibly converts this using DOS-style short mode.
18008   # If so, the updated path is stored in $new_path.
18009 
18010   input_path="$new_path"
18011   # Check if we need to convert this using DOS-style short mode. If the path
18012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18013   # take no chances and rewrite it.
18014   # Note: m4 eats our [], so we need to use [ and ] instead.
18015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18016   if test "x$has_forbidden_chars" != x; then
18017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18018     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18019     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18020     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18021       # Going to short mode and back again did indeed matter. Since short mode is
18022       # case insensitive, let's make it lowercase to improve readability.
18023       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18024       # Now convert it back to Unix-stile (cygpath)
18025       input_path=`$CYGPATH -u "$shortmode_path"`
18026       new_path="$input_path"
18027     fi
18028   fi
18029 
18030   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18031   if test "x$test_cygdrive_prefix" = x; then
18032     # As a simple fix, exclude /usr/bin since it's not a real path.
18033     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18034       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18035       # a path prefixed by /cygdrive for fixpath to work.
18036       new_path="$CYGWIN_ROOT_PATH$input_path"
18037     fi
18038   fi
18039 
18040 
18041   if test "x$path" != "x$new_path"; then
18042     MSVCR_DLL="$new_path"
18043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18044 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18045   fi
18046 
18047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18048 
18049   path="$MSVCR_DLL"
18050   has_colon=`$ECHO $path | $GREP ^.:`
18051   new_path="$path"
18052   if test "x$has_colon" = x; then
18053     # Not in mixed or Windows style, start by that.
18054     new_path=`cmd //c echo $path`
18055   fi
18056 
18057 
18058   input_path="$new_path"
18059   # Check if we need to convert this using DOS-style short mode. If the path
18060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18061   # take no chances and rewrite it.
18062   # Note: m4 eats our [], so we need to use [ and ] instead.
18063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18064   if test "x$has_forbidden_chars" != x; then
18065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18066     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18067   fi
18068 
18069 
18070   windows_path="$new_path"
18071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18072     unix_path=`$CYGPATH -u "$windows_path"`
18073     new_path="$unix_path"
18074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18076     new_path="$unix_path"
18077   fi
18078 
18079   if test "x$path" != "x$new_path"; then
18080     MSVCR_DLL="$new_path"
18081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18082 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18083   fi
18084 
18085   # Save the first 10 bytes of this path to the storage, so fixpath can work.
18086   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18087 
18088   else
18089     # We're on a posix platform. Hooray! :)
18090     path="$MSVCR_DLL"
18091     has_space=`$ECHO "$path" | $GREP " "`
18092     if test "x$has_space" != x; then
18093       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18094 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18095       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18096     fi
18097 
18098     # Use eval to expand a potential ~
18099     eval path="$path"
18100     if test ! -f "$path" && test ! -d "$path"; then
18101       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18102     fi
18103 
18104     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18105   fi
18106 
18107 
18108 
18109 
18110 # Check whether --with-dxsdk was given.
18111 if test "${with_dxsdk+set}" = set; then :
18112   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18113 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18114 fi
18115 
18116 
18117 
18118 
18119 # Check whether --with-dxsdk-lib was given.
18120 if test "${with_dxsdk_lib+set}" = set; then :
18121   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18122 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18123 fi
18124 
18125 
18126 
18127 
18128 # Check whether --with-dxsdk-include was given.
18129 if test "${with_dxsdk_include+set}" = set; then :
18130   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18131 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18132 fi
18133 
18134 
18135   fi
18136 
18137 
18138 
18139   # If --build AND --host is set, then the configure script will find any
18140   # cross compilation tools in the PATH. Cross compilation tools
18141   # follows the cross compilation standard where they are prefixed with ${host}.
18142   # For example the binary i686-sun-solaris2.10-gcc
18143   # will cross compile for i686-sun-solaris2.10
18144   # If neither of build and host is not set, then build=host and the
18145   # default compiler found in the path will be used.
18146   # Setting only --host, does not seem to be really supported.
18147   # Please set both --build and --host if you want to cross compile.
18148 
18149   if test "x$COMPILE_TYPE" = "xcross"; then
18150     # Now we to find a C/C++ compiler that can build executables for the build
18151     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18152     # once. Also, we need to do this before adding a tools dir to the path,
18153     # otherwise we might pick up cross-compilers which don't use standard naming.
18154     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18155     # to wait until they are properly discovered.
18156     for ac_prog in cl cc gcc
18157 do
18158   # Extract the first word of "$ac_prog", so it can be a program name with args.
18159 set dummy $ac_prog; ac_word=$2
18160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18161 $as_echo_n "checking for $ac_word... " >&6; }
18162 if ${ac_cv_path_BUILD_CC+:} false; then :
18163   $as_echo_n "(cached) " >&6
18164 else
18165   case $BUILD_CC in
18166   [\\/]* | ?:[\\/]*)
18167   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18168   ;;
18169   *)
18170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18171 for as_dir in $PATH
18172 do
18173   IFS=$as_save_IFS
18174   test -z "$as_dir" && as_dir=.
18175     for ac_exec_ext in '' $ac_executable_extensions; do
18176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18177     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18179     break 2
18180   fi
18181 done
18182   done
18183 IFS=$as_save_IFS
18184 
18185   ;;
18186 esac
18187 fi
18188 BUILD_CC=$ac_cv_path_BUILD_CC
18189 if test -n "$BUILD_CC"; then
18190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18191 $as_echo "$BUILD_CC" >&6; }
18192 else
18193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18194 $as_echo "no" >&6; }
18195 fi
18196 
18197 
18198   test -n "$BUILD_CC" && break
18199 done
18200 
18201 
18202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18203 
18204   # First separate the path from the arguments. This will split at the first
18205   # space.
18206   complete="$BUILD_CC"
18207   path="${complete%% *}"
18208   tmp="$complete EOL"
18209   arguments="${tmp#* }"
18210 
18211   # Input might be given as Windows format, start by converting to
18212   # unix format.
18213   new_path=`$CYGPATH -u "$path"`
18214 
18215   # Now try to locate executable using which
18216   new_path=`$WHICH "$new_path" 2> /dev/null`
18217   # bat and cmd files are not always considered executable in cygwin causing which
18218   # to not find them
18219   if test "x$new_path" = x \
18220       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18221       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18222     new_path=`$CYGPATH -u "$path"`
18223   fi
18224   if test "x$new_path" = x; then
18225     # Oops. Which didn't find the executable.
18226     # The splitting of arguments from the executable at a space might have been incorrect,
18227     # since paths with space are more likely in Windows. Give it another try with the whole
18228     # argument.
18229     path="$complete"
18230     arguments="EOL"
18231     new_path=`$CYGPATH -u "$path"`
18232     new_path=`$WHICH "$new_path" 2> /dev/null`
18233     # bat and cmd files are not always considered executable in cygwin causing which
18234     # to not find them
18235     if test "x$new_path" = x \
18236         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18237         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18238       new_path=`$CYGPATH -u "$path"`
18239     fi
18240     if test "x$new_path" = x; then
18241       # It's still not found. Now this is an unrecoverable error.
18242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18243 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18244       has_space=`$ECHO "$complete" | $GREP " "`
18245       if test "x$has_space" != x; then
18246         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18247 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18248       fi
18249       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18250     fi
18251   fi
18252 
18253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18256   # "foo.exe" is OK but "foo" is an error.
18257   #
18258   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18259   # It is also a way to make sure we got the proper file name for the real test later on.
18260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18261   if test "x$test_shortpath" = x; then
18262     # Short path failed, file does not exist as specified.
18263     # Try adding .exe or .cmd
18264     if test -f "${new_path}.exe"; then
18265       input_to_shortpath="${new_path}.exe"
18266     elif test -f "${new_path}.cmd"; then
18267       input_to_shortpath="${new_path}.cmd"
18268     else
18269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18270 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18271       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18272 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18273       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18274     fi
18275   else
18276     input_to_shortpath="$new_path"
18277   fi
18278 
18279   # Call helper function which possibly converts this using DOS-style short mode.
18280   # If so, the updated path is stored in $new_path.
18281   new_path="$input_to_shortpath"
18282 
18283   input_path="$input_to_shortpath"
18284   # Check if we need to convert this using DOS-style short mode. If the path
18285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18286   # take no chances and rewrite it.
18287   # Note: m4 eats our [], so we need to use [ and ] instead.
18288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18289   if test "x$has_forbidden_chars" != x; then
18290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18294       # Going to short mode and back again did indeed matter. Since short mode is
18295       # case insensitive, let's make it lowercase to improve readability.
18296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18297       # Now convert it back to Unix-stile (cygpath)
18298       input_path=`$CYGPATH -u "$shortmode_path"`
18299       new_path="$input_path"
18300     fi
18301   fi
18302 
18303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18304   if test "x$test_cygdrive_prefix" = x; then
18305     # As a simple fix, exclude /usr/bin since it's not a real path.
18306     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18308       # a path prefixed by /cygdrive for fixpath to work.
18309       new_path="$CYGWIN_ROOT_PATH$input_path"
18310     fi
18311   fi
18312 
18313   # remove trailing .exe if any
18314   new_path="${new_path/%.exe/}"
18315 
18316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18317 
18318   # First separate the path from the arguments. This will split at the first
18319   # space.
18320   complete="$BUILD_CC"
18321   path="${complete%% *}"
18322   tmp="$complete EOL"
18323   arguments="${tmp#* }"
18324 
18325   # Input might be given as Windows format, start by converting to
18326   # unix format.
18327   new_path="$path"
18328 
18329   windows_path="$new_path"
18330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18331     unix_path=`$CYGPATH -u "$windows_path"`
18332     new_path="$unix_path"
18333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18335     new_path="$unix_path"
18336   fi
18337 
18338 
18339   # Now try to locate executable using which
18340   new_path=`$WHICH "$new_path" 2> /dev/null`
18341 
18342   if test "x$new_path" = x; then
18343     # Oops. Which didn't find the executable.
18344     # The splitting of arguments from the executable at a space might have been incorrect,
18345     # since paths with space are more likely in Windows. Give it another try with the whole
18346     # argument.
18347     path="$complete"
18348     arguments="EOL"
18349     new_path="$path"
18350 
18351   windows_path="$new_path"
18352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18353     unix_path=`$CYGPATH -u "$windows_path"`
18354     new_path="$unix_path"
18355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18357     new_path="$unix_path"
18358   fi
18359 
18360 
18361     new_path=`$WHICH "$new_path" 2> /dev/null`
18362 
18363     if test "x$new_path" = x; then
18364       # It's still not found. Now this is an unrecoverable error.
18365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18366 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18367       has_space=`$ECHO "$complete" | $GREP " "`
18368       if test "x$has_space" != x; then
18369         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18370 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18371       fi
18372       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18373     fi
18374   fi
18375 
18376   # Now new_path has a complete unix path to the binary
18377   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18378     # Keep paths in /bin as-is, but remove trailing .exe if any
18379     new_path="${new_path/%.exe/}"
18380     # Do not save /bin paths to all_fixpath_prefixes!
18381   else
18382     # Not in mixed or Windows style, start by that.
18383     new_path=`cmd //c echo $new_path`
18384 
18385   input_path="$new_path"
18386   # Check if we need to convert this using DOS-style short mode. If the path
18387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18388   # take no chances and rewrite it.
18389   # Note: m4 eats our [], so we need to use [ and ] instead.
18390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18391   if test "x$has_forbidden_chars" != x; then
18392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18394   fi
18395 
18396     # Output is in $new_path
18397 
18398   windows_path="$new_path"
18399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18400     unix_path=`$CYGPATH -u "$windows_path"`
18401     new_path="$unix_path"
18402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18404     new_path="$unix_path"
18405   fi
18406 
18407     # remove trailing .exe if any
18408     new_path="${new_path/%.exe/}"
18409 
18410     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18411     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18412   fi
18413 
18414   else
18415     # We're on a posix platform. Hooray! :)
18416     # First separate the path from the arguments. This will split at the first
18417     # space.
18418     complete="$BUILD_CC"
18419     path="${complete%% *}"
18420     tmp="$complete EOL"
18421     arguments="${tmp#* }"
18422 
18423     # Cannot rely on the command "which" here since it doesn't always work.
18424     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18425     if test -z "$is_absolute_path"; then
18426       # Path to executable is not absolute. Find it.
18427       IFS_save="$IFS"
18428       IFS=:
18429       for p in $PATH; do
18430         if test -f "$p/$path" && test -x "$p/$path"; then
18431           new_path="$p/$path"
18432           break
18433         fi
18434       done
18435       IFS="$IFS_save"
18436     else
18437       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18438 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18439       new_path="$path"
18440     fi
18441 
18442     if test "x$new_path" = x; then
18443       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18444 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18445       has_space=`$ECHO "$complete" | $GREP " "`
18446       if test "x$has_space" != x; then
18447         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18448 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18449       fi
18450       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18451     fi
18452   fi
18453 
18454   # Now join together the path and the arguments once again
18455   if test "x$arguments" != xEOL; then
18456     new_complete="$new_path ${arguments% *}"
18457   else
18458     new_complete="$new_path"
18459   fi
18460 
18461   if test "x$complete" != "x$new_complete"; then
18462     BUILD_CC="$new_complete"
18463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18464 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18465   fi
18466 
18467     for ac_prog in cl CC g++
18468 do
18469   # Extract the first word of "$ac_prog", so it can be a program name with args.
18470 set dummy $ac_prog; ac_word=$2
18471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18472 $as_echo_n "checking for $ac_word... " >&6; }
18473 if ${ac_cv_path_BUILD_CXX+:} false; then :
18474   $as_echo_n "(cached) " >&6
18475 else
18476   case $BUILD_CXX in
18477   [\\/]* | ?:[\\/]*)
18478   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18479   ;;
18480   *)
18481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18482 for as_dir in $PATH
18483 do
18484   IFS=$as_save_IFS
18485   test -z "$as_dir" && as_dir=.
18486     for ac_exec_ext in '' $ac_executable_extensions; do
18487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18488     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18490     break 2
18491   fi
18492 done
18493   done
18494 IFS=$as_save_IFS
18495 
18496   ;;
18497 esac
18498 fi
18499 BUILD_CXX=$ac_cv_path_BUILD_CXX
18500 if test -n "$BUILD_CXX"; then
18501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18502 $as_echo "$BUILD_CXX" >&6; }
18503 else
18504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18505 $as_echo "no" >&6; }
18506 fi
18507 
18508 
18509   test -n "$BUILD_CXX" && break
18510 done
18511 
18512 
18513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18514 
18515   # First separate the path from the arguments. This will split at the first
18516   # space.
18517   complete="$BUILD_CXX"
18518   path="${complete%% *}"
18519   tmp="$complete EOL"
18520   arguments="${tmp#* }"
18521 
18522   # Input might be given as Windows format, start by converting to
18523   # unix format.
18524   new_path=`$CYGPATH -u "$path"`
18525 
18526   # Now try to locate executable using which
18527   new_path=`$WHICH "$new_path" 2> /dev/null`
18528   # bat and cmd files are not always considered executable in cygwin causing which
18529   # to not find them
18530   if test "x$new_path" = x \
18531       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18532       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18533     new_path=`$CYGPATH -u "$path"`
18534   fi
18535   if test "x$new_path" = x; then
18536     # Oops. Which didn't find the executable.
18537     # The splitting of arguments from the executable at a space might have been incorrect,
18538     # since paths with space are more likely in Windows. Give it another try with the whole
18539     # argument.
18540     path="$complete"
18541     arguments="EOL"
18542     new_path=`$CYGPATH -u "$path"`
18543     new_path=`$WHICH "$new_path" 2> /dev/null`
18544     # bat and cmd files are not always considered executable in cygwin causing which
18545     # to not find them
18546     if test "x$new_path" = x \
18547         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18548         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18549       new_path=`$CYGPATH -u "$path"`
18550     fi
18551     if test "x$new_path" = x; then
18552       # It's still not found. Now this is an unrecoverable error.
18553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18554 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18555       has_space=`$ECHO "$complete" | $GREP " "`
18556       if test "x$has_space" != x; then
18557         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18558 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18559       fi
18560       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18561     fi
18562   fi
18563 
18564   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18565   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18566   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18567   # "foo.exe" is OK but "foo" is an error.
18568   #
18569   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18570   # It is also a way to make sure we got the proper file name for the real test later on.
18571   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18572   if test "x$test_shortpath" = x; then
18573     # Short path failed, file does not exist as specified.
18574     # Try adding .exe or .cmd
18575     if test -f "${new_path}.exe"; then
18576       input_to_shortpath="${new_path}.exe"
18577     elif test -f "${new_path}.cmd"; then
18578       input_to_shortpath="${new_path}.cmd"
18579     else
18580       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18581 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18582       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18583 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18584       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18585     fi
18586   else
18587     input_to_shortpath="$new_path"
18588   fi
18589 
18590   # Call helper function which possibly converts this using DOS-style short mode.
18591   # If so, the updated path is stored in $new_path.
18592   new_path="$input_to_shortpath"
18593 
18594   input_path="$input_to_shortpath"
18595   # Check if we need to convert this using DOS-style short mode. If the path
18596   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18597   # take no chances and rewrite it.
18598   # Note: m4 eats our [], so we need to use [ and ] instead.
18599   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18600   if test "x$has_forbidden_chars" != x; then
18601     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18602     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18603     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18604     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18605       # Going to short mode and back again did indeed matter. Since short mode is
18606       # case insensitive, let's make it lowercase to improve readability.
18607       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18608       # Now convert it back to Unix-stile (cygpath)
18609       input_path=`$CYGPATH -u "$shortmode_path"`
18610       new_path="$input_path"
18611     fi
18612   fi
18613 
18614   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18615   if test "x$test_cygdrive_prefix" = x; then
18616     # As a simple fix, exclude /usr/bin since it's not a real path.
18617     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18618       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18619       # a path prefixed by /cygdrive for fixpath to work.
18620       new_path="$CYGWIN_ROOT_PATH$input_path"
18621     fi
18622   fi
18623 
18624   # remove trailing .exe if any
18625   new_path="${new_path/%.exe/}"
18626 
18627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18628 
18629   # First separate the path from the arguments. This will split at the first
18630   # space.
18631   complete="$BUILD_CXX"
18632   path="${complete%% *}"
18633   tmp="$complete EOL"
18634   arguments="${tmp#* }"
18635 
18636   # Input might be given as Windows format, start by converting to
18637   # unix format.
18638   new_path="$path"
18639 
18640   windows_path="$new_path"
18641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18642     unix_path=`$CYGPATH -u "$windows_path"`
18643     new_path="$unix_path"
18644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18646     new_path="$unix_path"
18647   fi
18648 
18649 
18650   # Now try to locate executable using which
18651   new_path=`$WHICH "$new_path" 2> /dev/null`
18652 
18653   if test "x$new_path" = x; then
18654     # Oops. Which didn't find the executable.
18655     # The splitting of arguments from the executable at a space might have been incorrect,
18656     # since paths with space are more likely in Windows. Give it another try with the whole
18657     # argument.
18658     path="$complete"
18659     arguments="EOL"
18660     new_path="$path"
18661 
18662   windows_path="$new_path"
18663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18664     unix_path=`$CYGPATH -u "$windows_path"`
18665     new_path="$unix_path"
18666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18668     new_path="$unix_path"
18669   fi
18670 
18671 
18672     new_path=`$WHICH "$new_path" 2> /dev/null`
18673 
18674     if test "x$new_path" = x; then
18675       # It's still not found. Now this is an unrecoverable error.
18676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18677 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18678       has_space=`$ECHO "$complete" | $GREP " "`
18679       if test "x$has_space" != x; then
18680         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18681 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18682       fi
18683       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18684     fi
18685   fi
18686 
18687   # Now new_path has a complete unix path to the binary
18688   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18689     # Keep paths in /bin as-is, but remove trailing .exe if any
18690     new_path="${new_path/%.exe/}"
18691     # Do not save /bin paths to all_fixpath_prefixes!
18692   else
18693     # Not in mixed or Windows style, start by that.
18694     new_path=`cmd //c echo $new_path`
18695 
18696   input_path="$new_path"
18697   # Check if we need to convert this using DOS-style short mode. If the path
18698   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18699   # take no chances and rewrite it.
18700   # Note: m4 eats our [], so we need to use [ and ] instead.
18701   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18702   if test "x$has_forbidden_chars" != x; then
18703     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18704     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18705   fi
18706 
18707     # Output is in $new_path
18708 
18709   windows_path="$new_path"
18710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18711     unix_path=`$CYGPATH -u "$windows_path"`
18712     new_path="$unix_path"
18713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18715     new_path="$unix_path"
18716   fi
18717 
18718     # remove trailing .exe if any
18719     new_path="${new_path/%.exe/}"
18720 
18721     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18722     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18723   fi
18724 
18725   else
18726     # We're on a posix platform. Hooray! :)
18727     # First separate the path from the arguments. This will split at the first
18728     # space.
18729     complete="$BUILD_CXX"
18730     path="${complete%% *}"
18731     tmp="$complete EOL"
18732     arguments="${tmp#* }"
18733 
18734     # Cannot rely on the command "which" here since it doesn't always work.
18735     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18736     if test -z "$is_absolute_path"; then
18737       # Path to executable is not absolute. Find it.
18738       IFS_save="$IFS"
18739       IFS=:
18740       for p in $PATH; do
18741         if test -f "$p/$path" && test -x "$p/$path"; then
18742           new_path="$p/$path"
18743           break
18744         fi
18745       done
18746       IFS="$IFS_save"
18747     else
18748       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18749 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18750       new_path="$path"
18751     fi
18752 
18753     if test "x$new_path" = x; then
18754       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18755 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18756       has_space=`$ECHO "$complete" | $GREP " "`
18757       if test "x$has_space" != x; then
18758         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18759 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18760       fi
18761       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18762     fi
18763   fi
18764 
18765   # Now join together the path and the arguments once again
18766   if test "x$arguments" != xEOL; then
18767     new_complete="$new_path ${arguments% *}"
18768   else
18769     new_complete="$new_path"
18770   fi
18771 
18772   if test "x$complete" != "x$new_complete"; then
18773     BUILD_CXX="$new_complete"
18774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18775 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18776   fi
18777 
18778     # Extract the first word of "ld", so it can be a program name with args.
18779 set dummy ld; ac_word=$2
18780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18781 $as_echo_n "checking for $ac_word... " >&6; }
18782 if ${ac_cv_path_BUILD_LD+:} false; then :
18783   $as_echo_n "(cached) " >&6
18784 else
18785   case $BUILD_LD in
18786   [\\/]* | ?:[\\/]*)
18787   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18788   ;;
18789   *)
18790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18791 for as_dir in $PATH
18792 do
18793   IFS=$as_save_IFS
18794   test -z "$as_dir" && as_dir=.
18795     for ac_exec_ext in '' $ac_executable_extensions; do
18796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18797     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18799     break 2
18800   fi
18801 done
18802   done
18803 IFS=$as_save_IFS
18804 
18805   ;;
18806 esac
18807 fi
18808 BUILD_LD=$ac_cv_path_BUILD_LD
18809 if test -n "$BUILD_LD"; then
18810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18811 $as_echo "$BUILD_LD" >&6; }
18812 else
18813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18814 $as_echo "no" >&6; }
18815 fi
18816 
18817 
18818 
18819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18820 
18821   # First separate the path from the arguments. This will split at the first
18822   # space.
18823   complete="$BUILD_LD"
18824   path="${complete%% *}"
18825   tmp="$complete EOL"
18826   arguments="${tmp#* }"
18827 
18828   # Input might be given as Windows format, start by converting to
18829   # unix format.
18830   new_path=`$CYGPATH -u "$path"`
18831 
18832   # Now try to locate executable using which
18833   new_path=`$WHICH "$new_path" 2> /dev/null`
18834   # bat and cmd files are not always considered executable in cygwin causing which
18835   # to not find them
18836   if test "x$new_path" = x \
18837       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18838       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18839     new_path=`$CYGPATH -u "$path"`
18840   fi
18841   if test "x$new_path" = x; then
18842     # Oops. Which didn't find the executable.
18843     # The splitting of arguments from the executable at a space might have been incorrect,
18844     # since paths with space are more likely in Windows. Give it another try with the whole
18845     # argument.
18846     path="$complete"
18847     arguments="EOL"
18848     new_path=`$CYGPATH -u "$path"`
18849     new_path=`$WHICH "$new_path" 2> /dev/null`
18850     # bat and cmd files are not always considered executable in cygwin causing which
18851     # to not find them
18852     if test "x$new_path" = x \
18853         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18854         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18855       new_path=`$CYGPATH -u "$path"`
18856     fi
18857     if test "x$new_path" = x; then
18858       # It's still not found. Now this is an unrecoverable error.
18859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18860 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18861       has_space=`$ECHO "$complete" | $GREP " "`
18862       if test "x$has_space" != x; then
18863         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18864 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18865       fi
18866       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18867     fi
18868   fi
18869 
18870   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18871   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18872   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18873   # "foo.exe" is OK but "foo" is an error.
18874   #
18875   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18876   # It is also a way to make sure we got the proper file name for the real test later on.
18877   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18878   if test "x$test_shortpath" = x; then
18879     # Short path failed, file does not exist as specified.
18880     # Try adding .exe or .cmd
18881     if test -f "${new_path}.exe"; then
18882       input_to_shortpath="${new_path}.exe"
18883     elif test -f "${new_path}.cmd"; then
18884       input_to_shortpath="${new_path}.cmd"
18885     else
18886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18887 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18888       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18889 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18890       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18891     fi
18892   else
18893     input_to_shortpath="$new_path"
18894   fi
18895 
18896   # Call helper function which possibly converts this using DOS-style short mode.
18897   # If so, the updated path is stored in $new_path.
18898   new_path="$input_to_shortpath"
18899 
18900   input_path="$input_to_shortpath"
18901   # Check if we need to convert this using DOS-style short mode. If the path
18902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18903   # take no chances and rewrite it.
18904   # Note: m4 eats our [], so we need to use [ and ] instead.
18905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18906   if test "x$has_forbidden_chars" != x; then
18907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18908     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18909     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18910     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18911       # Going to short mode and back again did indeed matter. Since short mode is
18912       # case insensitive, let's make it lowercase to improve readability.
18913       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18914       # Now convert it back to Unix-stile (cygpath)
18915       input_path=`$CYGPATH -u "$shortmode_path"`
18916       new_path="$input_path"
18917     fi
18918   fi
18919 
18920   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18921   if test "x$test_cygdrive_prefix" = x; then
18922     # As a simple fix, exclude /usr/bin since it's not a real path.
18923     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18924       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18925       # a path prefixed by /cygdrive for fixpath to work.
18926       new_path="$CYGWIN_ROOT_PATH$input_path"
18927     fi
18928   fi
18929 
18930   # remove trailing .exe if any
18931   new_path="${new_path/%.exe/}"
18932 
18933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18934 
18935   # First separate the path from the arguments. This will split at the first
18936   # space.
18937   complete="$BUILD_LD"
18938   path="${complete%% *}"
18939   tmp="$complete EOL"
18940   arguments="${tmp#* }"
18941 
18942   # Input might be given as Windows format, start by converting to
18943   # unix format.
18944   new_path="$path"
18945 
18946   windows_path="$new_path"
18947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18948     unix_path=`$CYGPATH -u "$windows_path"`
18949     new_path="$unix_path"
18950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18952     new_path="$unix_path"
18953   fi
18954 
18955 
18956   # Now try to locate executable using which
18957   new_path=`$WHICH "$new_path" 2> /dev/null`
18958 
18959   if test "x$new_path" = x; then
18960     # Oops. Which didn't find the executable.
18961     # The splitting of arguments from the executable at a space might have been incorrect,
18962     # since paths with space are more likely in Windows. Give it another try with the whole
18963     # argument.
18964     path="$complete"
18965     arguments="EOL"
18966     new_path="$path"
18967 
18968   windows_path="$new_path"
18969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18970     unix_path=`$CYGPATH -u "$windows_path"`
18971     new_path="$unix_path"
18972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18974     new_path="$unix_path"
18975   fi
18976 
18977 
18978     new_path=`$WHICH "$new_path" 2> /dev/null`
18979 
18980     if test "x$new_path" = x; then
18981       # It's still not found. Now this is an unrecoverable error.
18982       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18983 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18984       has_space=`$ECHO "$complete" | $GREP " "`
18985       if test "x$has_space" != x; then
18986         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18987 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18988       fi
18989       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18990     fi
18991   fi
18992 
18993   # Now new_path has a complete unix path to the binary
18994   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18995     # Keep paths in /bin as-is, but remove trailing .exe if any
18996     new_path="${new_path/%.exe/}"
18997     # Do not save /bin paths to all_fixpath_prefixes!
18998   else
18999     # Not in mixed or Windows style, start by that.
19000     new_path=`cmd //c echo $new_path`
19001 
19002   input_path="$new_path"
19003   # Check if we need to convert this using DOS-style short mode. If the path
19004   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19005   # take no chances and rewrite it.
19006   # Note: m4 eats our [], so we need to use [ and ] instead.
19007   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19008   if test "x$has_forbidden_chars" != x; then
19009     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19010     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19011   fi
19012 
19013     # Output is in $new_path
19014 
19015   windows_path="$new_path"
19016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19017     unix_path=`$CYGPATH -u "$windows_path"`
19018     new_path="$unix_path"
19019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19021     new_path="$unix_path"
19022   fi
19023 
19024     # remove trailing .exe if any
19025     new_path="${new_path/%.exe/}"
19026 
19027     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19028     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19029   fi
19030 
19031   else
19032     # We're on a posix platform. Hooray! :)
19033     # First separate the path from the arguments. This will split at the first
19034     # space.
19035     complete="$BUILD_LD"
19036     path="${complete%% *}"
19037     tmp="$complete EOL"
19038     arguments="${tmp#* }"
19039 
19040     # Cannot rely on the command "which" here since it doesn't always work.
19041     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19042     if test -z "$is_absolute_path"; then
19043       # Path to executable is not absolute. Find it.
19044       IFS_save="$IFS"
19045       IFS=:
19046       for p in $PATH; do
19047         if test -f "$p/$path" && test -x "$p/$path"; then
19048           new_path="$p/$path"
19049           break
19050         fi
19051       done
19052       IFS="$IFS_save"
19053     else
19054       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19055 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19056       new_path="$path"
19057     fi
19058 
19059     if test "x$new_path" = x; then
19060       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19061 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19062       has_space=`$ECHO "$complete" | $GREP " "`
19063       if test "x$has_space" != x; then
19064         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19065 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19066       fi
19067       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19068     fi
19069   fi
19070 
19071   # Now join together the path and the arguments once again
19072   if test "x$arguments" != xEOL; then
19073     new_complete="$new_path ${arguments% *}"
19074   else
19075     new_complete="$new_path"
19076   fi
19077 
19078   if test "x$complete" != "x$new_complete"; then
19079     BUILD_LD="$new_complete"
19080     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19081 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19082   fi
19083 
19084   fi
19085 
19086 
19087 
19088 
19089   # If a devkit is found on the builddeps server, then prepend its path to the
19090   # PATH variable. If there are cross compilers available in the devkit, these
19091   # will be found by AC_PROG_CC et al.
19092   DEVKIT=
19093 
19094 
19095   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19096     # Source the builddeps file again, to make sure it uses the latest variables!
19097     . $builddepsfile
19098     # Look for a target and build machine specific resource!
19099     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19100     if test "x$resource" = x; then
19101       # Ok, lets instead look for a target specific resource
19102       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19103     fi
19104     if test "x$resource" = x; then
19105       # Ok, lets instead look for a build specific resource
19106       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19107     fi
19108     if test "x$resource" = x; then
19109       # Ok, lets instead look for a generic resource
19110       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19111       resource=${builddep_devkit}
19112     fi
19113     if test "x$resource" != x; then
19114       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19115 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19116       # If the resource in the builddeps.conf file is an existing directory,
19117       # for example /java/linux/cups
19118       if test -d ${resource}; then
19119         depdir=${resource}
19120       else
19121 
19122   # devkit is for example mymodule
19123   # $resource is for example libs/general/libmymod_1_2_3.zip
19124   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19125   # $with_builddeps_dir is for example /localhome/builddeps
19126   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19127   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19128   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19129   filename=`basename $resource`
19130   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19131   filebase=${filename%%.*}
19132   extension=${filename#*.}
19133   installdir=$with_builddeps_dir/$filebase
19134   if test ! -f $installdir/$filename.unpacked; then
19135     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19136 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19137     if test ! -d $installdir; then
19138       mkdir -p $installdir
19139     fi
19140     if test ! -d $installdir; then
19141       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19142     fi
19143     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19144     touch $tmpfile
19145     if test ! -f $tmpfile; then
19146       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19147     fi
19148 
19149   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19150   # $tmpfile is the local file name for the downloaded file.
19151   VALID_TOOL=no
19152   if test "x$BDEPS_FTP" = xwget; then
19153     VALID_TOOL=yes
19154     wget -O $tmpfile $with_builddeps_server/$resource
19155   fi
19156   if test "x$BDEPS_FTP" = xlftp; then
19157     VALID_TOOL=yes
19158     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19159   fi
19160   if test "x$BDEPS_FTP" = xftp; then
19161     VALID_TOOL=yes
19162     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19163     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19164     FTPUSERPWD=${FTPSERVER%%@*}
19165     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19166       FTPUSER=${userpwd%%:*}
19167       FTPPWD=${userpwd#*@}
19168       FTPSERVER=${FTPSERVER#*@}
19169     else
19170       FTPUSER=ftp
19171       FTPPWD=ftp
19172     fi
19173     # the "pass" command does not work on some
19174     # ftp clients (read ftp.exe) but if it works,
19175     # passive mode is better!
19176     ( \
19177         echo "user $FTPUSER $FTPPWD"        ; \
19178         echo "pass"                         ; \
19179         echo "bin"                          ; \
19180         echo "get $FTPPATH $tmpfile"              ; \
19181     ) | ftp -in $FTPSERVER
19182   fi
19183   if test "x$VALID_TOOL" != xyes; then
19184     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19185   fi
19186 
19187     mv $tmpfile $installdir/$filename
19188     if test ! -s $installdir/$filename; then
19189       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19190     fi
19191     case "$extension" in
19192       zip)  echo "Unzipping $installdir/$filename..."
19193         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19194         ;;
19195       tar.gz) echo "Untaring $installdir/$filename..."
19196         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19197         ;;
19198       tgz) echo "Untaring $installdir/$filename..."
19199         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19200         ;;
19201       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19202         ;;
19203     esac
19204   fi
19205   if test -f $installdir/$filename.unpacked; then
19206     depdir=$installdir
19207   fi
19208 
19209       fi
19210       # Source the builddeps file again, because in the previous command, the depdir
19211       # was updated to point at the current build dependency install directory.
19212       . $builddepsfile
19213       # Now extract variables from the builddeps.conf files.
19214       theroot=${builddep_devkit_ROOT}
19215       thecflags=${builddep_devkit_CFLAGS}
19216       thelibs=${builddep_devkit_LIBS}
19217       if test "x$depdir" = x; then
19218         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19219       fi
19220       DEVKIT=$depdir
19221       if test "x$theroot" != x; then
19222         DEVKIT="$theroot"
19223       fi
19224       if test "x$thecflags" != x; then
19225         DEVKIT_CFLAGS="$thecflags"
19226       fi
19227       if test "x$thelibs" != x; then
19228         DEVKIT_LIBS="$thelibs"
19229       fi
19230 
19231         # Found devkit
19232         PATH="$DEVKIT/bin:$PATH"
19233         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19234         if test "x$x_includes" = "xNONE"; then
19235           x_includes="$SYS_ROOT/usr/include/X11"
19236         fi
19237         if test "x$x_libraries" = "xNONE"; then
19238           x_libraries="$SYS_ROOT/usr/lib"
19239         fi
19240 
19241 
19242     fi
19243 
19244   fi
19245 
19246 
19247   # Store the CFLAGS etal passed to the configure script.
19248   ORG_CFLAGS="$CFLAGS"
19249   ORG_CXXFLAGS="$CXXFLAGS"
19250   ORG_OBJCFLAGS="$OBJCFLAGS"
19251 
19252   # autoconf magic only relies on PATH, so update it if tools dir is specified
19253   OLD_PATH="$PATH"
19254   if test "x$TOOLS_DIR" != x; then
19255     PATH=$TOOLS_DIR:$PATH
19256   fi
19257 
19258   # Before we locate the compilers, we need to sanitize the Xcode build environment
19259   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19260     # determine path to Xcode developer directory
19261     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
19262     SET_DEVELOPER_DIR=
19263 
19264     if test -n "$XCODE_PATH"; then
19265       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
19266     fi
19267 
19268     # DEVELOPER_DIR could also be provided directly
19269     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
19270 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
19271     if test -n "$DEVELOPER_DIR"; then
19272       if test ! -d "$DEVELOPER_DIR"; then
19273         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
19274       fi
19275       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
19276         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
19277       fi
19278       # make it visible to all the tools immediately
19279       export DEVELOPER_DIR
19280       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
19281       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
19282 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
19283     else
19284       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19285 $as_echo "no" >&6; }
19286     fi
19287 
19288 
19289     # Extract the first word of "xcodebuild", so it can be a program name with args.
19290 set dummy xcodebuild; ac_word=$2
19291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19292 $as_echo_n "checking for $ac_word... " >&6; }
19293 if ${ac_cv_path_XCODEBUILD+:} false; then :
19294   $as_echo_n "(cached) " >&6
19295 else
19296   case $XCODEBUILD in
19297   [\\/]* | ?:[\\/]*)
19298   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
19299   ;;
19300   *)
19301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19302 for as_dir in $PATH
19303 do
19304   IFS=$as_save_IFS
19305   test -z "$as_dir" && as_dir=.
19306     for ac_exec_ext in '' $ac_executable_extensions; do
19307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19308     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
19309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19310     break 2
19311   fi
19312 done
19313   done
19314 IFS=$as_save_IFS
19315 
19316   ;;
19317 esac
19318 fi
19319 XCODEBUILD=$ac_cv_path_XCODEBUILD
19320 if test -n "$XCODEBUILD"; then
19321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
19322 $as_echo "$XCODEBUILD" >&6; }
19323 else
19324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19325 $as_echo "no" >&6; }
19326 fi
19327 
19328 
19329     if test -z "$XCODEBUILD"; then
19330       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
19331     fi
19332 
19333     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
19334     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
19335     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
19336     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
19337       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
19338     fi
19339 
19340     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
19341     # clang and clang++, which will break the build. So handle that here if we need to.
19342     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
19343       # use xcrun to find the real gcc and add it's directory to PATH
19344       # then autoconf magic will find it
19345       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
19346 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
19347       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
19348       PATH="$XCODE_BIN_PATH":$PATH
19349     fi
19350 
19351     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
19352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
19353 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
19354     # allow SDKNAME to be set to override the default SDK selection
19355     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
19356     if test -n "$SDKPATH"; then
19357       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
19358 $as_echo "$SDKPATH" >&6; }
19359     else
19360       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
19361 $as_echo "(none, will use system headers and frameworks)" >&6; }
19362     fi
19363 
19364 
19365     # Perform a basic sanity test
19366     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
19367       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
19368     fi
19369 
19370     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
19371     if test -n "$SDKPATH"; then
19372       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
19373       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19374       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19375       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19376     fi
19377 
19378     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
19379     # setting this here means it doesn't have to be peppered throughout the forest
19380     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19381     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19382     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19383   fi
19384 
19385   ### Locate C compiler (CC)
19386 
19387   # On windows, only cl.exe is supported.
19388   # On Solaris, cc is preferred to gcc.
19389   # Elsewhere, gcc is preferred to cc.
19390 
19391   if test "x$CC" != x; then
19392     COMPILER_CHECK_LIST="$CC"
19393   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19394     COMPILER_CHECK_LIST="cl"
19395   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19396     COMPILER_CHECK_LIST="cc gcc"
19397   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19398     # Do not probe for cc on AIX.
19399     COMPILER_CHECK_LIST="xlc_r"
19400   else
19401     COMPILER_CHECK_LIST="gcc cc"
19402   fi
19403 
19404 
19405   COMPILER_NAME=C
19406 
19407   CC=
19408   # If TOOLS_DIR is set, check for all compiler names in there first
19409   # before checking the rest of the PATH.
19410   if test -n "$TOOLS_DIR"; then
19411     PATH_save="$PATH"
19412     PATH="$TOOLS_DIR"
19413     for ac_prog in $COMPILER_CHECK_LIST
19414 do
19415   # Extract the first word of "$ac_prog", so it can be a program name with args.
19416 set dummy $ac_prog; ac_word=$2
19417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19418 $as_echo_n "checking for $ac_word... " >&6; }
19419 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19420   $as_echo_n "(cached) " >&6
19421 else
19422   case $TOOLS_DIR_CC in
19423   [\\/]* | ?:[\\/]*)
19424   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19425   ;;
19426   *)
19427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19428 for as_dir in $PATH
19429 do
19430   IFS=$as_save_IFS
19431   test -z "$as_dir" && as_dir=.
19432     for ac_exec_ext in '' $ac_executable_extensions; do
19433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19434     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19436     break 2
19437   fi
19438 done
19439   done
19440 IFS=$as_save_IFS
19441 
19442   ;;
19443 esac
19444 fi
19445 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19446 if test -n "$TOOLS_DIR_CC"; then
19447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19448 $as_echo "$TOOLS_DIR_CC" >&6; }
19449 else
19450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19451 $as_echo "no" >&6; }
19452 fi
19453 
19454 
19455   test -n "$TOOLS_DIR_CC" && break
19456 done
19457 
19458     CC=$TOOLS_DIR_CC
19459     PATH="$PATH_save"
19460   fi
19461 
19462   # AC_PATH_PROGS can't be run multiple times with the same variable,
19463   # so create a new name for this run.
19464   if test "x$CC" = x; then
19465     for ac_prog in $COMPILER_CHECK_LIST
19466 do
19467   # Extract the first word of "$ac_prog", so it can be a program name with args.
19468 set dummy $ac_prog; ac_word=$2
19469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19470 $as_echo_n "checking for $ac_word... " >&6; }
19471 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19472   $as_echo_n "(cached) " >&6
19473 else
19474   case $POTENTIAL_CC in
19475   [\\/]* | ?:[\\/]*)
19476   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19477   ;;
19478   *)
19479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19480 for as_dir in $PATH
19481 do
19482   IFS=$as_save_IFS
19483   test -z "$as_dir" && as_dir=.
19484     for ac_exec_ext in '' $ac_executable_extensions; do
19485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19486     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19488     break 2
19489   fi
19490 done
19491   done
19492 IFS=$as_save_IFS
19493 
19494   ;;
19495 esac
19496 fi
19497 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19498 if test -n "$POTENTIAL_CC"; then
19499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19500 $as_echo "$POTENTIAL_CC" >&6; }
19501 else
19502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19503 $as_echo "no" >&6; }
19504 fi
19505 
19506 
19507   test -n "$POTENTIAL_CC" && break
19508 done
19509 
19510     CC=$POTENTIAL_CC
19511   fi
19512 
19513   if test "x$CC" = x; then
19514 
19515   # Print a helpful message on how to acquire the necessary build dependency.
19516   # devkit is the help tag: freetype, cups, pulse, alsa etc
19517   MISSING_DEPENDENCY=devkit
19518 
19519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19520     cygwin_help $MISSING_DEPENDENCY
19521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19522     msys_help $MISSING_DEPENDENCY
19523   else
19524     PKGHANDLER_COMMAND=
19525 
19526     case $PKGHANDLER in
19527       apt-get)
19528         apt_help     $MISSING_DEPENDENCY ;;
19529       yum)
19530         yum_help     $MISSING_DEPENDENCY ;;
19531       port)
19532         port_help    $MISSING_DEPENDENCY ;;
19533       pkgutil)
19534         pkgutil_help $MISSING_DEPENDENCY ;;
19535       pkgadd)
19536         pkgadd_help  $MISSING_DEPENDENCY ;;
19537     esac
19538 
19539     if test "x$PKGHANDLER_COMMAND" != x; then
19540       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19541     fi
19542   fi
19543 
19544     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19545   fi
19546 
19547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19548 
19549   # First separate the path from the arguments. This will split at the first
19550   # space.
19551   complete="$CC"
19552   path="${complete%% *}"
19553   tmp="$complete EOL"
19554   arguments="${tmp#* }"
19555 
19556   # Input might be given as Windows format, start by converting to
19557   # unix format.
19558   new_path=`$CYGPATH -u "$path"`
19559 
19560   # Now try to locate executable using which
19561   new_path=`$WHICH "$new_path" 2> /dev/null`
19562   # bat and cmd files are not always considered executable in cygwin causing which
19563   # to not find them
19564   if test "x$new_path" = x \
19565       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19566       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19567     new_path=`$CYGPATH -u "$path"`
19568   fi
19569   if test "x$new_path" = x; then
19570     # Oops. Which didn't find the executable.
19571     # The splitting of arguments from the executable at a space might have been incorrect,
19572     # since paths with space are more likely in Windows. Give it another try with the whole
19573     # argument.
19574     path="$complete"
19575     arguments="EOL"
19576     new_path=`$CYGPATH -u "$path"`
19577     new_path=`$WHICH "$new_path" 2> /dev/null`
19578     # bat and cmd files are not always considered executable in cygwin causing which
19579     # to not find them
19580     if test "x$new_path" = x \
19581         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19582         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19583       new_path=`$CYGPATH -u "$path"`
19584     fi
19585     if test "x$new_path" = x; then
19586       # It's still not found. Now this is an unrecoverable error.
19587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19588 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19589       has_space=`$ECHO "$complete" | $GREP " "`
19590       if test "x$has_space" != x; then
19591         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19592 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19593       fi
19594       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19595     fi
19596   fi
19597 
19598   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19599   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19600   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19601   # "foo.exe" is OK but "foo" is an error.
19602   #
19603   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19604   # It is also a way to make sure we got the proper file name for the real test later on.
19605   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19606   if test "x$test_shortpath" = x; then
19607     # Short path failed, file does not exist as specified.
19608     # Try adding .exe or .cmd
19609     if test -f "${new_path}.exe"; then
19610       input_to_shortpath="${new_path}.exe"
19611     elif test -f "${new_path}.cmd"; then
19612       input_to_shortpath="${new_path}.cmd"
19613     else
19614       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19615 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19616       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19617 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19618       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19619     fi
19620   else
19621     input_to_shortpath="$new_path"
19622   fi
19623 
19624   # Call helper function which possibly converts this using DOS-style short mode.
19625   # If so, the updated path is stored in $new_path.
19626   new_path="$input_to_shortpath"
19627 
19628   input_path="$input_to_shortpath"
19629   # Check if we need to convert this using DOS-style short mode. If the path
19630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19631   # take no chances and rewrite it.
19632   # Note: m4 eats our [], so we need to use [ and ] instead.
19633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19634   if test "x$has_forbidden_chars" != x; then
19635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19636     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19637     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19638     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19639       # Going to short mode and back again did indeed matter. Since short mode is
19640       # case insensitive, let's make it lowercase to improve readability.
19641       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19642       # Now convert it back to Unix-stile (cygpath)
19643       input_path=`$CYGPATH -u "$shortmode_path"`
19644       new_path="$input_path"
19645     fi
19646   fi
19647 
19648   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19649   if test "x$test_cygdrive_prefix" = x; then
19650     # As a simple fix, exclude /usr/bin since it's not a real path.
19651     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19652       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19653       # a path prefixed by /cygdrive for fixpath to work.
19654       new_path="$CYGWIN_ROOT_PATH$input_path"
19655     fi
19656   fi
19657 
19658   # remove trailing .exe if any
19659   new_path="${new_path/%.exe/}"
19660 
19661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19662 
19663   # First separate the path from the arguments. This will split at the first
19664   # space.
19665   complete="$CC"
19666   path="${complete%% *}"
19667   tmp="$complete EOL"
19668   arguments="${tmp#* }"
19669 
19670   # Input might be given as Windows format, start by converting to
19671   # unix format.
19672   new_path="$path"
19673 
19674   windows_path="$new_path"
19675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19676     unix_path=`$CYGPATH -u "$windows_path"`
19677     new_path="$unix_path"
19678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19680     new_path="$unix_path"
19681   fi
19682 
19683 
19684   # Now try to locate executable using which
19685   new_path=`$WHICH "$new_path" 2> /dev/null`
19686 
19687   if test "x$new_path" = x; then
19688     # Oops. Which didn't find the executable.
19689     # The splitting of arguments from the executable at a space might have been incorrect,
19690     # since paths with space are more likely in Windows. Give it another try with the whole
19691     # argument.
19692     path="$complete"
19693     arguments="EOL"
19694     new_path="$path"
19695 
19696   windows_path="$new_path"
19697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19698     unix_path=`$CYGPATH -u "$windows_path"`
19699     new_path="$unix_path"
19700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19702     new_path="$unix_path"
19703   fi
19704 
19705 
19706     new_path=`$WHICH "$new_path" 2> /dev/null`
19707 
19708     if test "x$new_path" = x; then
19709       # It's still not found. Now this is an unrecoverable error.
19710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19711 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19712       has_space=`$ECHO "$complete" | $GREP " "`
19713       if test "x$has_space" != x; then
19714         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19715 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19716       fi
19717       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19718     fi
19719   fi
19720 
19721   # Now new_path has a complete unix path to the binary
19722   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19723     # Keep paths in /bin as-is, but remove trailing .exe if any
19724     new_path="${new_path/%.exe/}"
19725     # Do not save /bin paths to all_fixpath_prefixes!
19726   else
19727     # Not in mixed or Windows style, start by that.
19728     new_path=`cmd //c echo $new_path`
19729 
19730   input_path="$new_path"
19731   # Check if we need to convert this using DOS-style short mode. If the path
19732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19733   # take no chances and rewrite it.
19734   # Note: m4 eats our [], so we need to use [ and ] instead.
19735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19736   if test "x$has_forbidden_chars" != x; then
19737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19739   fi
19740 
19741     # Output is in $new_path
19742 
19743   windows_path="$new_path"
19744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19745     unix_path=`$CYGPATH -u "$windows_path"`
19746     new_path="$unix_path"
19747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19749     new_path="$unix_path"
19750   fi
19751 
19752     # remove trailing .exe if any
19753     new_path="${new_path/%.exe/}"
19754 
19755     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19756     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19757   fi
19758 
19759   else
19760     # We're on a posix platform. Hooray! :)
19761     # First separate the path from the arguments. This will split at the first
19762     # space.
19763     complete="$CC"
19764     path="${complete%% *}"
19765     tmp="$complete EOL"
19766     arguments="${tmp#* }"
19767 
19768     # Cannot rely on the command "which" here since it doesn't always work.
19769     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19770     if test -z "$is_absolute_path"; then
19771       # Path to executable is not absolute. Find it.
19772       IFS_save="$IFS"
19773       IFS=:
19774       for p in $PATH; do
19775         if test -f "$p/$path" && test -x "$p/$path"; then
19776           new_path="$p/$path"
19777           break
19778         fi
19779       done
19780       IFS="$IFS_save"
19781     else
19782       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19783 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19784       new_path="$path"
19785     fi
19786 
19787     if test "x$new_path" = x; then
19788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19789 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19790       has_space=`$ECHO "$complete" | $GREP " "`
19791       if test "x$has_space" != x; then
19792         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19793 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19794       fi
19795       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19796     fi
19797   fi
19798 
19799   # Now join together the path and the arguments once again
19800   if test "x$arguments" != xEOL; then
19801     new_complete="$new_path ${arguments% *}"
19802   else
19803     new_complete="$new_path"
19804   fi
19805 
19806   if test "x$complete" != "x$new_complete"; then
19807     CC="$new_complete"
19808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19809 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19810   fi
19811 
19812   TEST_COMPILER="$CC"
19813   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19814   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19815   if test "x$OPENJDK_BUILD_OS" != xaix; then
19816     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19817 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19818 
19819   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19820     # Follow a chain of symbolic links. Use readlink
19821     # where it exists, else fall back to horribly
19822     # complicated shell code.
19823     if test "x$READLINK_TESTED" != yes; then
19824       # On MacOSX there is a readlink tool with a different
19825       # purpose than the GNU readlink tool. Check the found readlink.
19826       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19827       if test "x$ISGNU" = x; then
19828         # A readlink that we do not know how to use.
19829         # Are there other non-GNU readlinks out there?
19830         READLINK_TESTED=yes
19831         READLINK=
19832       fi
19833     fi
19834 
19835     if test "x$READLINK" != x; then
19836       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19837     else
19838       # Save the current directory for restoring afterwards
19839       STARTDIR=$PWD
19840       COUNTER=0
19841       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19842       sym_link_file=`$BASENAME $TEST_COMPILER`
19843       cd $sym_link_dir
19844       # Use -P flag to resolve symlinks in directories.
19845       cd `$THEPWDCMD -P`
19846       sym_link_dir=`$THEPWDCMD -P`
19847       # Resolve file symlinks
19848       while test $COUNTER -lt 20; do
19849         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19850         if test "x$ISLINK" == x; then
19851           # This is not a symbolic link! We are done!
19852           break
19853         fi
19854         # Again resolve directory symlinks since the target of the just found
19855         # link could be in a different directory
19856         cd `$DIRNAME $ISLINK`
19857         sym_link_dir=`$THEPWDCMD -P`
19858         sym_link_file=`$BASENAME $ISLINK`
19859         let COUNTER=COUNTER+1
19860       done
19861       cd $STARTDIR
19862       TEST_COMPILER=$sym_link_dir/$sym_link_file
19863     fi
19864   fi
19865 
19866     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19867 $as_echo "$TEST_COMPILER" >&6; }
19868   fi
19869   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19870 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19871 
19872   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19873   if test "x$COMPILER_BASENAME" = "xccache"; then
19874     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19875 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19876     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19877     # We want to control ccache invocation ourselves, so ignore this cc and try
19878     # searching again.
19879 
19880     # Remove the path to the fake ccache cc from the PATH
19881     RETRY_COMPILER_SAVED_PATH="$PATH"
19882     COMPILER_DIRNAME=`$DIRNAME $CC`
19883     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19884 
19885     # Try again looking for our compiler
19886     if test -n "$ac_tool_prefix"; then
19887   for ac_prog in $COMPILER_CHECK_LIST
19888   do
19889     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19890 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19892 $as_echo_n "checking for $ac_word... " >&6; }
19893 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19894   $as_echo_n "(cached) " >&6
19895 else
19896   if test -n "$PROPER_COMPILER_CC"; then
19897   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19898 else
19899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19900 for as_dir in $PATH
19901 do
19902   IFS=$as_save_IFS
19903   test -z "$as_dir" && as_dir=.
19904     for ac_exec_ext in '' $ac_executable_extensions; do
19905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19906     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19908     break 2
19909   fi
19910 done
19911   done
19912 IFS=$as_save_IFS
19913 
19914 fi
19915 fi
19916 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19917 if test -n "$PROPER_COMPILER_CC"; then
19918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19919 $as_echo "$PROPER_COMPILER_CC" >&6; }
19920 else
19921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19922 $as_echo "no" >&6; }
19923 fi
19924 
19925 
19926     test -n "$PROPER_COMPILER_CC" && break
19927   done
19928 fi
19929 if test -z "$PROPER_COMPILER_CC"; then
19930   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19931   for ac_prog in $COMPILER_CHECK_LIST
19932 do
19933   # Extract the first word of "$ac_prog", so it can be a program name with args.
19934 set dummy $ac_prog; ac_word=$2
19935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19936 $as_echo_n "checking for $ac_word... " >&6; }
19937 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19938   $as_echo_n "(cached) " >&6
19939 else
19940   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19941   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19942 else
19943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19944 for as_dir in $PATH
19945 do
19946   IFS=$as_save_IFS
19947   test -z "$as_dir" && as_dir=.
19948     for ac_exec_ext in '' $ac_executable_extensions; do
19949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19950     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19952     break 2
19953   fi
19954 done
19955   done
19956 IFS=$as_save_IFS
19957 
19958 fi
19959 fi
19960 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19961 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19963 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19964 else
19965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19966 $as_echo "no" >&6; }
19967 fi
19968 
19969 
19970   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19971 done
19972 
19973   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19974     PROPER_COMPILER_CC=""
19975   else
19976     case $cross_compiling:$ac_tool_warned in
19977 yes:)
19978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19979 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19980 ac_tool_warned=yes ;;
19981 esac
19982     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19983   fi
19984 fi
19985 
19986 
19987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19988 
19989   # First separate the path from the arguments. This will split at the first
19990   # space.
19991   complete="$PROPER_COMPILER_CC"
19992   path="${complete%% *}"
19993   tmp="$complete EOL"
19994   arguments="${tmp#* }"
19995 
19996   # Input might be given as Windows format, start by converting to
19997   # unix format.
19998   new_path=`$CYGPATH -u "$path"`
19999 
20000   # Now try to locate executable using which
20001   new_path=`$WHICH "$new_path" 2> /dev/null`
20002   # bat and cmd files are not always considered executable in cygwin causing which
20003   # to not find them
20004   if test "x$new_path" = x \
20005       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20006       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20007     new_path=`$CYGPATH -u "$path"`
20008   fi
20009   if test "x$new_path" = x; then
20010     # Oops. Which didn't find the executable.
20011     # The splitting of arguments from the executable at a space might have been incorrect,
20012     # since paths with space are more likely in Windows. Give it another try with the whole
20013     # argument.
20014     path="$complete"
20015     arguments="EOL"
20016     new_path=`$CYGPATH -u "$path"`
20017     new_path=`$WHICH "$new_path" 2> /dev/null`
20018     # bat and cmd files are not always considered executable in cygwin causing which
20019     # to not find them
20020     if test "x$new_path" = x \
20021         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20022         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20023       new_path=`$CYGPATH -u "$path"`
20024     fi
20025     if test "x$new_path" = x; then
20026       # It's still not found. Now this is an unrecoverable error.
20027       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20028 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20029       has_space=`$ECHO "$complete" | $GREP " "`
20030       if test "x$has_space" != x; then
20031         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20032 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20033       fi
20034       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20035     fi
20036   fi
20037 
20038   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20039   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20040   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20041   # "foo.exe" is OK but "foo" is an error.
20042   #
20043   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20044   # It is also a way to make sure we got the proper file name for the real test later on.
20045   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20046   if test "x$test_shortpath" = x; then
20047     # Short path failed, file does not exist as specified.
20048     # Try adding .exe or .cmd
20049     if test -f "${new_path}.exe"; then
20050       input_to_shortpath="${new_path}.exe"
20051     elif test -f "${new_path}.cmd"; then
20052       input_to_shortpath="${new_path}.cmd"
20053     else
20054       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
20055 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
20056       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20057 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20058       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20059     fi
20060   else
20061     input_to_shortpath="$new_path"
20062   fi
20063 
20064   # Call helper function which possibly converts this using DOS-style short mode.
20065   # If so, the updated path is stored in $new_path.
20066   new_path="$input_to_shortpath"
20067 
20068   input_path="$input_to_shortpath"
20069   # Check if we need to convert this using DOS-style short mode. If the path
20070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20071   # take no chances and rewrite it.
20072   # Note: m4 eats our [], so we need to use [ and ] instead.
20073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20074   if test "x$has_forbidden_chars" != x; then
20075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20076     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20077     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20078     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20079       # Going to short mode and back again did indeed matter. Since short mode is
20080       # case insensitive, let's make it lowercase to improve readability.
20081       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20082       # Now convert it back to Unix-stile (cygpath)
20083       input_path=`$CYGPATH -u "$shortmode_path"`
20084       new_path="$input_path"
20085     fi
20086   fi
20087 
20088   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20089   if test "x$test_cygdrive_prefix" = x; then
20090     # As a simple fix, exclude /usr/bin since it's not a real path.
20091     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20092       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20093       # a path prefixed by /cygdrive for fixpath to work.
20094       new_path="$CYGWIN_ROOT_PATH$input_path"
20095     fi
20096   fi
20097 
20098   # remove trailing .exe if any
20099   new_path="${new_path/%.exe/}"
20100 
20101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20102 
20103   # First separate the path from the arguments. This will split at the first
20104   # space.
20105   complete="$PROPER_COMPILER_CC"
20106   path="${complete%% *}"
20107   tmp="$complete EOL"
20108   arguments="${tmp#* }"
20109 
20110   # Input might be given as Windows format, start by converting to
20111   # unix format.
20112   new_path="$path"
20113 
20114   windows_path="$new_path"
20115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20116     unix_path=`$CYGPATH -u "$windows_path"`
20117     new_path="$unix_path"
20118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20120     new_path="$unix_path"
20121   fi
20122 
20123 
20124   # Now try to locate executable using which
20125   new_path=`$WHICH "$new_path" 2> /dev/null`
20126 
20127   if test "x$new_path" = x; then
20128     # Oops. Which didn't find the executable.
20129     # The splitting of arguments from the executable at a space might have been incorrect,
20130     # since paths with space are more likely in Windows. Give it another try with the whole
20131     # argument.
20132     path="$complete"
20133     arguments="EOL"
20134     new_path="$path"
20135 
20136   windows_path="$new_path"
20137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20138     unix_path=`$CYGPATH -u "$windows_path"`
20139     new_path="$unix_path"
20140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20141     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20142     new_path="$unix_path"
20143   fi
20144 
20145 
20146     new_path=`$WHICH "$new_path" 2> /dev/null`
20147 
20148     if test "x$new_path" = x; then
20149       # It's still not found. Now this is an unrecoverable error.
20150       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20151 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20152       has_space=`$ECHO "$complete" | $GREP " "`
20153       if test "x$has_space" != x; then
20154         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20155 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20156       fi
20157       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20158     fi
20159   fi
20160 
20161   # Now new_path has a complete unix path to the binary
20162   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20163     # Keep paths in /bin as-is, but remove trailing .exe if any
20164     new_path="${new_path/%.exe/}"
20165     # Do not save /bin paths to all_fixpath_prefixes!
20166   else
20167     # Not in mixed or Windows style, start by that.
20168     new_path=`cmd //c echo $new_path`
20169 
20170   input_path="$new_path"
20171   # Check if we need to convert this using DOS-style short mode. If the path
20172   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20173   # take no chances and rewrite it.
20174   # Note: m4 eats our [], so we need to use [ and ] instead.
20175   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20176   if test "x$has_forbidden_chars" != x; then
20177     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20178     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20179   fi
20180 
20181     # Output is in $new_path
20182 
20183   windows_path="$new_path"
20184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20185     unix_path=`$CYGPATH -u "$windows_path"`
20186     new_path="$unix_path"
20187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20188     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20189     new_path="$unix_path"
20190   fi
20191 
20192     # remove trailing .exe if any
20193     new_path="${new_path/%.exe/}"
20194 
20195     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20196     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20197   fi
20198 
20199   else
20200     # We're on a posix platform. Hooray! :)
20201     # First separate the path from the arguments. This will split at the first
20202     # space.
20203     complete="$PROPER_COMPILER_CC"
20204     path="${complete%% *}"
20205     tmp="$complete EOL"
20206     arguments="${tmp#* }"
20207 
20208     # Cannot rely on the command "which" here since it doesn't always work.
20209     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20210     if test -z "$is_absolute_path"; then
20211       # Path to executable is not absolute. Find it.
20212       IFS_save="$IFS"
20213       IFS=:
20214       for p in $PATH; do
20215         if test -f "$p/$path" && test -x "$p/$path"; then
20216           new_path="$p/$path"
20217           break
20218         fi
20219       done
20220       IFS="$IFS_save"
20221     else
20222       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20223 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20224       new_path="$path"
20225     fi
20226 
20227     if test "x$new_path" = x; then
20228       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20229 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20230       has_space=`$ECHO "$complete" | $GREP " "`
20231       if test "x$has_space" != x; then
20232         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20233 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20234       fi
20235       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20236     fi
20237   fi
20238 
20239   # Now join together the path and the arguments once again
20240   if test "x$arguments" != xEOL; then
20241     new_complete="$new_path ${arguments% *}"
20242   else
20243     new_complete="$new_path"
20244   fi
20245 
20246   if test "x$complete" != "x$new_complete"; then
20247     PROPER_COMPILER_CC="$new_complete"
20248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20249 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20250   fi
20251 
20252     PATH="$RETRY_COMPILER_SAVED_PATH"
20253 
20254     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20255 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20256 
20257   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20258     # Follow a chain of symbolic links. Use readlink
20259     # where it exists, else fall back to horribly
20260     # complicated shell code.
20261     if test "x$READLINK_TESTED" != yes; then
20262       # On MacOSX there is a readlink tool with a different
20263       # purpose than the GNU readlink tool. Check the found readlink.
20264       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20265       if test "x$ISGNU" = x; then
20266         # A readlink that we do not know how to use.
20267         # Are there other non-GNU readlinks out there?
20268         READLINK_TESTED=yes
20269         READLINK=
20270       fi
20271     fi
20272 
20273     if test "x$READLINK" != x; then
20274       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20275     else
20276       # Save the current directory for restoring afterwards
20277       STARTDIR=$PWD
20278       COUNTER=0
20279       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20280       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20281       cd $sym_link_dir
20282       # Use -P flag to resolve symlinks in directories.
20283       cd `$THEPWDCMD -P`
20284       sym_link_dir=`$THEPWDCMD -P`
20285       # Resolve file symlinks
20286       while test $COUNTER -lt 20; do
20287         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20288         if test "x$ISLINK" == x; then
20289           # This is not a symbolic link! We are done!
20290           break
20291         fi
20292         # Again resolve directory symlinks since the target of the just found
20293         # link could be in a different directory
20294         cd `$DIRNAME $ISLINK`
20295         sym_link_dir=`$THEPWDCMD -P`
20296         sym_link_file=`$BASENAME $ISLINK`
20297         let COUNTER=COUNTER+1
20298       done
20299       cd $STARTDIR
20300       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20301     fi
20302   fi
20303 
20304     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20305 $as_echo "$PROPER_COMPILER_CC" >&6; }
20306     CC="$PROPER_COMPILER_CC"
20307   else
20308     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20309 $as_echo "no, keeping CC" >&6; }
20310     CC="$TEST_COMPILER"
20311   fi
20312 
20313   COMPILER=$CC
20314   COMPILER_NAME=$COMPILER_NAME
20315 
20316   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20317     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20318     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20319     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20320     if test $? -ne 0; then
20321       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20322 
20323       { $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
20324 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20325       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20326 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20327       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20328     else
20329       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20330       COMPILER_VENDOR="Sun Studio"
20331     fi
20332   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20333       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20334       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20335       if test $? -ne 0; then
20336         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20337       else
20338         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20339         COMPILER_VENDOR='IBM'
20340       fi
20341   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20342     # First line typically looks something like:
20343     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20344     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20345     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20346     COMPILER_VENDOR="Microsoft CL.EXE"
20347     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20348     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20349       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20350         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20351       fi
20352     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20353       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20354         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20355       fi
20356     fi
20357   else
20358     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20359     # Check that this is likely to be GCC.
20360     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20361     if test $? -ne 0; then
20362       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20363 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20364       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20365 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20366       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20367     fi
20368 
20369     # First line typically looks something like:
20370     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20371     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20372     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20373   fi
20374   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20375   CC_VERSION="$COMPILER_VERSION"
20376   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20377   CC_VENDOR="$COMPILER_VENDOR"
20378 
20379   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20380 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20381 
20382 
20383   # Now that we have resolved CC ourself, let autoconf have its go at it
20384   ac_ext=c
20385 ac_cpp='$CPP $CPPFLAGS'
20386 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20387 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20388 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20389 if test -n "$ac_tool_prefix"; then
20390   for ac_prog in $CC
20391   do
20392     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20393 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20395 $as_echo_n "checking for $ac_word... " >&6; }
20396 if ${ac_cv_prog_CC+:} false; then :
20397   $as_echo_n "(cached) " >&6
20398 else
20399   if test -n "$CC"; then
20400   ac_cv_prog_CC="$CC" # Let the user override the test.
20401 else
20402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20403 for as_dir in $PATH
20404 do
20405   IFS=$as_save_IFS
20406   test -z "$as_dir" && as_dir=.
20407     for ac_exec_ext in '' $ac_executable_extensions; do
20408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20409     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20411     break 2
20412   fi
20413 done
20414   done
20415 IFS=$as_save_IFS
20416 
20417 fi
20418 fi
20419 CC=$ac_cv_prog_CC
20420 if test -n "$CC"; then
20421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20422 $as_echo "$CC" >&6; }
20423 else
20424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20425 $as_echo "no" >&6; }
20426 fi
20427 
20428 
20429     test -n "$CC" && break
20430   done
20431 fi
20432 if test -z "$CC"; then
20433   ac_ct_CC=$CC
20434   for ac_prog in $CC
20435 do
20436   # Extract the first word of "$ac_prog", so it can be a program name with args.
20437 set dummy $ac_prog; ac_word=$2
20438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20439 $as_echo_n "checking for $ac_word... " >&6; }
20440 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20441   $as_echo_n "(cached) " >&6
20442 else
20443   if test -n "$ac_ct_CC"; then
20444   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20445 else
20446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20447 for as_dir in $PATH
20448 do
20449   IFS=$as_save_IFS
20450   test -z "$as_dir" && as_dir=.
20451     for ac_exec_ext in '' $ac_executable_extensions; do
20452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20453     ac_cv_prog_ac_ct_CC="$ac_prog"
20454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20455     break 2
20456   fi
20457 done
20458   done
20459 IFS=$as_save_IFS
20460 
20461 fi
20462 fi
20463 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20464 if test -n "$ac_ct_CC"; then
20465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20466 $as_echo "$ac_ct_CC" >&6; }
20467 else
20468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20469 $as_echo "no" >&6; }
20470 fi
20471 
20472 
20473   test -n "$ac_ct_CC" && break
20474 done
20475 
20476   if test "x$ac_ct_CC" = x; then
20477     CC=""
20478   else
20479     case $cross_compiling:$ac_tool_warned in
20480 yes:)
20481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20482 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20483 ac_tool_warned=yes ;;
20484 esac
20485     CC=$ac_ct_CC
20486   fi
20487 fi
20488 
20489 
20490 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20491 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20492 as_fn_error $? "no acceptable C compiler found in \$PATH
20493 See \`config.log' for more details" "$LINENO" 5; }
20494 
20495 # Provide some information about the compiler.
20496 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20497 set X $ac_compile
20498 ac_compiler=$2
20499 for ac_option in --version -v -V -qversion; do
20500   { { ac_try="$ac_compiler $ac_option >&5"
20501 case "(($ac_try" in
20502   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20503   *) ac_try_echo=$ac_try;;
20504 esac
20505 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20506 $as_echo "$ac_try_echo"; } >&5
20507   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20508   ac_status=$?
20509   if test -s conftest.err; then
20510     sed '10a\
20511 ... rest of stderr output deleted ...
20512          10q' conftest.err >conftest.er1
20513     cat conftest.er1 >&5
20514   fi
20515   rm -f conftest.er1 conftest.err
20516   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20517   test $ac_status = 0; }
20518 done
20519 
20520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20521 /* end confdefs.h.  */
20522 
20523 int
20524 main ()
20525 {
20526 
20527   ;
20528   return 0;
20529 }
20530 _ACEOF
20531 ac_clean_files_save=$ac_clean_files
20532 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20533 # Try to create an executable without -o first, disregard a.out.
20534 # It will help us diagnose broken compilers, and finding out an intuition
20535 # of exeext.
20536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20537 $as_echo_n "checking whether the C compiler works... " >&6; }
20538 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20539 
20540 # The possible output files:
20541 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20542 
20543 ac_rmfiles=
20544 for ac_file in $ac_files
20545 do
20546   case $ac_file in
20547     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20548     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20549   esac
20550 done
20551 rm -f $ac_rmfiles
20552 
20553 if { { ac_try="$ac_link_default"
20554 case "(($ac_try" in
20555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556   *) ac_try_echo=$ac_try;;
20557 esac
20558 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20559 $as_echo "$ac_try_echo"; } >&5
20560   (eval "$ac_link_default") 2>&5
20561   ac_status=$?
20562   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20563   test $ac_status = 0; }; then :
20564   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20565 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20566 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20567 # so that the user can short-circuit this test for compilers unknown to
20568 # Autoconf.
20569 for ac_file in $ac_files ''
20570 do
20571   test -f "$ac_file" || continue
20572   case $ac_file in
20573     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20574         ;;
20575     [ab].out )
20576         # We found the default executable, but exeext='' is most
20577         # certainly right.
20578         break;;
20579     *.* )
20580         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20581         then :; else
20582            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20583         fi
20584         # We set ac_cv_exeext here because the later test for it is not
20585         # safe: cross compilers may not add the suffix if given an `-o'
20586         # argument, so we may need to know it at that point already.
20587         # Even if this section looks crufty: it has the advantage of
20588         # actually working.
20589         break;;
20590     * )
20591         break;;
20592   esac
20593 done
20594 test "$ac_cv_exeext" = no && ac_cv_exeext=
20595 
20596 else
20597   ac_file=''
20598 fi
20599 if test -z "$ac_file"; then :
20600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20601 $as_echo "no" >&6; }
20602 $as_echo "$as_me: failed program was:" >&5
20603 sed 's/^/| /' conftest.$ac_ext >&5
20604 
20605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20606 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20607 as_fn_error 77 "C compiler cannot create executables
20608 See \`config.log' for more details" "$LINENO" 5; }
20609 else
20610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20611 $as_echo "yes" >&6; }
20612 fi
20613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20614 $as_echo_n "checking for C compiler default output file name... " >&6; }
20615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20616 $as_echo "$ac_file" >&6; }
20617 ac_exeext=$ac_cv_exeext
20618 
20619 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20620 ac_clean_files=$ac_clean_files_save
20621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20622 $as_echo_n "checking for suffix of executables... " >&6; }
20623 if { { ac_try="$ac_link"
20624 case "(($ac_try" in
20625   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20626   *) ac_try_echo=$ac_try;;
20627 esac
20628 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20629 $as_echo "$ac_try_echo"; } >&5
20630   (eval "$ac_link") 2>&5
20631   ac_status=$?
20632   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20633   test $ac_status = 0; }; then :
20634   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20635 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20636 # work properly (i.e., refer to `conftest.exe'), while it won't with
20637 # `rm'.
20638 for ac_file in conftest.exe conftest conftest.*; do
20639   test -f "$ac_file" || continue
20640   case $ac_file in
20641     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20642     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20643           break;;
20644     * ) break;;
20645   esac
20646 done
20647 else
20648   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20649 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20650 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20651 See \`config.log' for more details" "$LINENO" 5; }
20652 fi
20653 rm -f conftest conftest$ac_cv_exeext
20654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20655 $as_echo "$ac_cv_exeext" >&6; }
20656 
20657 rm -f conftest.$ac_ext
20658 EXEEXT=$ac_cv_exeext
20659 ac_exeext=$EXEEXT
20660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20661 /* end confdefs.h.  */
20662 #include <stdio.h>
20663 int
20664 main ()
20665 {
20666 FILE *f = fopen ("conftest.out", "w");
20667  return ferror (f) || fclose (f) != 0;
20668 
20669   ;
20670   return 0;
20671 }
20672 _ACEOF
20673 ac_clean_files="$ac_clean_files conftest.out"
20674 # Check that the compiler produces executables we can run.  If not, either
20675 # the compiler is broken, or we cross compile.
20676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20677 $as_echo_n "checking whether we are cross compiling... " >&6; }
20678 if test "$cross_compiling" != yes; then
20679   { { ac_try="$ac_link"
20680 case "(($ac_try" in
20681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20682   *) ac_try_echo=$ac_try;;
20683 esac
20684 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20685 $as_echo "$ac_try_echo"; } >&5
20686   (eval "$ac_link") 2>&5
20687   ac_status=$?
20688   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20689   test $ac_status = 0; }
20690   if { ac_try='./conftest$ac_cv_exeext'
20691   { { case "(($ac_try" in
20692   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20693   *) ac_try_echo=$ac_try;;
20694 esac
20695 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20696 $as_echo "$ac_try_echo"; } >&5
20697   (eval "$ac_try") 2>&5
20698   ac_status=$?
20699   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20700   test $ac_status = 0; }; }; then
20701     cross_compiling=no
20702   else
20703     if test "$cross_compiling" = maybe; then
20704         cross_compiling=yes
20705     else
20706         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20707 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20708 as_fn_error $? "cannot run C compiled programs.
20709 If you meant to cross compile, use \`--host'.
20710 See \`config.log' for more details" "$LINENO" 5; }
20711     fi
20712   fi
20713 fi
20714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20715 $as_echo "$cross_compiling" >&6; }
20716 
20717 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20718 ac_clean_files=$ac_clean_files_save
20719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20720 $as_echo_n "checking for suffix of object files... " >&6; }
20721 if ${ac_cv_objext+:} false; then :
20722   $as_echo_n "(cached) " >&6
20723 else
20724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20725 /* end confdefs.h.  */
20726 
20727 int
20728 main ()
20729 {
20730 
20731   ;
20732   return 0;
20733 }
20734 _ACEOF
20735 rm -f conftest.o conftest.obj
20736 if { { ac_try="$ac_compile"
20737 case "(($ac_try" in
20738   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20739   *) ac_try_echo=$ac_try;;
20740 esac
20741 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20742 $as_echo "$ac_try_echo"; } >&5
20743   (eval "$ac_compile") 2>&5
20744   ac_status=$?
20745   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20746   test $ac_status = 0; }; then :
20747   for ac_file in conftest.o conftest.obj conftest.*; do
20748   test -f "$ac_file" || continue;
20749   case $ac_file in
20750     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20751     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20752        break;;
20753   esac
20754 done
20755 else
20756   $as_echo "$as_me: failed program was:" >&5
20757 sed 's/^/| /' conftest.$ac_ext >&5
20758 
20759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20760 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20761 as_fn_error $? "cannot compute suffix of object files: cannot compile
20762 See \`config.log' for more details" "$LINENO" 5; }
20763 fi
20764 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20765 fi
20766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20767 $as_echo "$ac_cv_objext" >&6; }
20768 OBJEXT=$ac_cv_objext
20769 ac_objext=$OBJEXT
20770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20771 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20772 if ${ac_cv_c_compiler_gnu+:} false; then :
20773   $as_echo_n "(cached) " >&6
20774 else
20775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20776 /* end confdefs.h.  */
20777 
20778 int
20779 main ()
20780 {
20781 #ifndef __GNUC__
20782        choke me
20783 #endif
20784 
20785   ;
20786   return 0;
20787 }
20788 _ACEOF
20789 if ac_fn_c_try_compile "$LINENO"; then :
20790   ac_compiler_gnu=yes
20791 else
20792   ac_compiler_gnu=no
20793 fi
20794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20795 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20796 
20797 fi
20798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20799 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20800 if test $ac_compiler_gnu = yes; then
20801   GCC=yes
20802 else
20803   GCC=
20804 fi
20805 ac_test_CFLAGS=${CFLAGS+set}
20806 ac_save_CFLAGS=$CFLAGS
20807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20808 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20809 if ${ac_cv_prog_cc_g+:} false; then :
20810   $as_echo_n "(cached) " >&6
20811 else
20812   ac_save_c_werror_flag=$ac_c_werror_flag
20813    ac_c_werror_flag=yes
20814    ac_cv_prog_cc_g=no
20815    CFLAGS="-g"
20816    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20817 /* end confdefs.h.  */
20818 
20819 int
20820 main ()
20821 {
20822 
20823   ;
20824   return 0;
20825 }
20826 _ACEOF
20827 if ac_fn_c_try_compile "$LINENO"; then :
20828   ac_cv_prog_cc_g=yes
20829 else
20830   CFLAGS=""
20831       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20832 /* end confdefs.h.  */
20833 
20834 int
20835 main ()
20836 {
20837 
20838   ;
20839   return 0;
20840 }
20841 _ACEOF
20842 if ac_fn_c_try_compile "$LINENO"; then :
20843 
20844 else
20845   ac_c_werror_flag=$ac_save_c_werror_flag
20846          CFLAGS="-g"
20847          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20848 /* end confdefs.h.  */
20849 
20850 int
20851 main ()
20852 {
20853 
20854   ;
20855   return 0;
20856 }
20857 _ACEOF
20858 if ac_fn_c_try_compile "$LINENO"; then :
20859   ac_cv_prog_cc_g=yes
20860 fi
20861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20862 fi
20863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20864 fi
20865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20866    ac_c_werror_flag=$ac_save_c_werror_flag
20867 fi
20868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20869 $as_echo "$ac_cv_prog_cc_g" >&6; }
20870 if test "$ac_test_CFLAGS" = set; then
20871   CFLAGS=$ac_save_CFLAGS
20872 elif test $ac_cv_prog_cc_g = yes; then
20873   if test "$GCC" = yes; then
20874     CFLAGS="-g -O2"
20875   else
20876     CFLAGS="-g"
20877   fi
20878 else
20879   if test "$GCC" = yes; then
20880     CFLAGS="-O2"
20881   else
20882     CFLAGS=
20883   fi
20884 fi
20885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20886 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20887 if ${ac_cv_prog_cc_c89+:} false; then :
20888   $as_echo_n "(cached) " >&6
20889 else
20890   ac_cv_prog_cc_c89=no
20891 ac_save_CC=$CC
20892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20893 /* end confdefs.h.  */
20894 #include <stdarg.h>
20895 #include <stdio.h>
20896 struct stat;
20897 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20898 struct buf { int x; };
20899 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20900 static char *e (p, i)
20901      char **p;
20902      int i;
20903 {
20904   return p[i];
20905 }
20906 static char *f (char * (*g) (char **, int), char **p, ...)
20907 {
20908   char *s;
20909   va_list v;
20910   va_start (v,p);
20911   s = g (p, va_arg (v,int));
20912   va_end (v);
20913   return s;
20914 }
20915 
20916 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20917    function prototypes and stuff, but not '\xHH' hex character constants.
20918    These don't provoke an error unfortunately, instead are silently treated
20919    as 'x'.  The following induces an error, until -std is added to get
20920    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20921    array size at least.  It's necessary to write '\x00'==0 to get something
20922    that's true only with -std.  */
20923 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20924 
20925 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20926    inside strings and character constants.  */
20927 #define FOO(x) 'x'
20928 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20929 
20930 int test (int i, double x);
20931 struct s1 {int (*f) (int a);};
20932 struct s2 {int (*f) (double a);};
20933 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20934 int argc;
20935 char **argv;
20936 int
20937 main ()
20938 {
20939 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20940   ;
20941   return 0;
20942 }
20943 _ACEOF
20944 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20945         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20946 do
20947   CC="$ac_save_CC $ac_arg"
20948   if ac_fn_c_try_compile "$LINENO"; then :
20949   ac_cv_prog_cc_c89=$ac_arg
20950 fi
20951 rm -f core conftest.err conftest.$ac_objext
20952   test "x$ac_cv_prog_cc_c89" != "xno" && break
20953 done
20954 rm -f conftest.$ac_ext
20955 CC=$ac_save_CC
20956 
20957 fi
20958 # AC_CACHE_VAL
20959 case "x$ac_cv_prog_cc_c89" in
20960   x)
20961     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20962 $as_echo "none needed" >&6; } ;;
20963   xno)
20964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20965 $as_echo "unsupported" >&6; } ;;
20966   *)
20967     CC="$CC $ac_cv_prog_cc_c89"
20968     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20969 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20970 esac
20971 if test "x$ac_cv_prog_cc_c89" != xno; then :
20972 
20973 fi
20974 
20975 ac_ext=cpp
20976 ac_cpp='$CXXCPP $CPPFLAGS'
20977 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20978 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20979 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20980 
20981 
20982   # Option used to tell the compiler whether to create 32- or 64-bit executables
20983   # Notice that CC contains the full compiler path at this point.
20984   case $CC in
20985     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20986     *)      COMPILER_TARGET_BITS_FLAG="-m";;
20987   esac
20988 
20989 
20990   ### Locate C++ compiler (CXX)
20991 
20992   if test "x$CXX" != x; then
20993     COMPILER_CHECK_LIST="$CXX"
20994   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20995     COMPILER_CHECK_LIST="cl"
20996   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20997     COMPILER_CHECK_LIST="CC g++"
20998   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20999     # Do not probe for CC on AIX .
21000     COMPILER_CHECK_LIST="xlC_r"
21001   else
21002     COMPILER_CHECK_LIST="g++ CC"
21003   fi
21004 
21005 
21006   COMPILER_NAME=C++
21007 
21008   CXX=
21009   # If TOOLS_DIR is set, check for all compiler names in there first
21010   # before checking the rest of the PATH.
21011   if test -n "$TOOLS_DIR"; then
21012     PATH_save="$PATH"
21013     PATH="$TOOLS_DIR"
21014     for ac_prog in $COMPILER_CHECK_LIST
21015 do
21016   # Extract the first word of "$ac_prog", so it can be a program name with args.
21017 set dummy $ac_prog; ac_word=$2
21018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21019 $as_echo_n "checking for $ac_word... " >&6; }
21020 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
21021   $as_echo_n "(cached) " >&6
21022 else
21023   case $TOOLS_DIR_CXX in
21024   [\\/]* | ?:[\\/]*)
21025   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
21026   ;;
21027   *)
21028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21029 for as_dir in $PATH
21030 do
21031   IFS=$as_save_IFS
21032   test -z "$as_dir" && as_dir=.
21033     for ac_exec_ext in '' $ac_executable_extensions; do
21034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21035     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
21036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21037     break 2
21038   fi
21039 done
21040   done
21041 IFS=$as_save_IFS
21042 
21043   ;;
21044 esac
21045 fi
21046 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
21047 if test -n "$TOOLS_DIR_CXX"; then
21048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
21049 $as_echo "$TOOLS_DIR_CXX" >&6; }
21050 else
21051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21052 $as_echo "no" >&6; }
21053 fi
21054 
21055 
21056   test -n "$TOOLS_DIR_CXX" && break
21057 done
21058 
21059     CXX=$TOOLS_DIR_CXX
21060     PATH="$PATH_save"
21061   fi
21062 
21063   # AC_PATH_PROGS can't be run multiple times with the same variable,
21064   # so create a new name for this run.
21065   if test "x$CXX" = x; then
21066     for ac_prog in $COMPILER_CHECK_LIST
21067 do
21068   # Extract the first word of "$ac_prog", so it can be a program name with args.
21069 set dummy $ac_prog; ac_word=$2
21070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21071 $as_echo_n "checking for $ac_word... " >&6; }
21072 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
21073   $as_echo_n "(cached) " >&6
21074 else
21075   case $POTENTIAL_CXX in
21076   [\\/]* | ?:[\\/]*)
21077   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
21078   ;;
21079   *)
21080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21081 for as_dir in $PATH
21082 do
21083   IFS=$as_save_IFS
21084   test -z "$as_dir" && as_dir=.
21085     for ac_exec_ext in '' $ac_executable_extensions; do
21086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21087     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
21088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21089     break 2
21090   fi
21091 done
21092   done
21093 IFS=$as_save_IFS
21094 
21095   ;;
21096 esac
21097 fi
21098 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
21099 if test -n "$POTENTIAL_CXX"; then
21100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
21101 $as_echo "$POTENTIAL_CXX" >&6; }
21102 else
21103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21104 $as_echo "no" >&6; }
21105 fi
21106 
21107 
21108   test -n "$POTENTIAL_CXX" && break
21109 done
21110 
21111     CXX=$POTENTIAL_CXX
21112   fi
21113 
21114   if test "x$CXX" = x; then
21115 
21116   # Print a helpful message on how to acquire the necessary build dependency.
21117   # devkit is the help tag: freetype, cups, pulse, alsa etc
21118   MISSING_DEPENDENCY=devkit
21119 
21120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21121     cygwin_help $MISSING_DEPENDENCY
21122   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21123     msys_help $MISSING_DEPENDENCY
21124   else
21125     PKGHANDLER_COMMAND=
21126 
21127     case $PKGHANDLER in
21128       apt-get)
21129         apt_help     $MISSING_DEPENDENCY ;;
21130       yum)
21131         yum_help     $MISSING_DEPENDENCY ;;
21132       port)
21133         port_help    $MISSING_DEPENDENCY ;;
21134       pkgutil)
21135         pkgutil_help $MISSING_DEPENDENCY ;;
21136       pkgadd)
21137         pkgadd_help  $MISSING_DEPENDENCY ;;
21138     esac
21139 
21140     if test "x$PKGHANDLER_COMMAND" != x; then
21141       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21142     fi
21143   fi
21144 
21145     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21146   fi
21147 
21148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21149 
21150   # First separate the path from the arguments. This will split at the first
21151   # space.
21152   complete="$CXX"
21153   path="${complete%% *}"
21154   tmp="$complete EOL"
21155   arguments="${tmp#* }"
21156 
21157   # Input might be given as Windows format, start by converting to
21158   # unix format.
21159   new_path=`$CYGPATH -u "$path"`
21160 
21161   # Now try to locate executable using which
21162   new_path=`$WHICH "$new_path" 2> /dev/null`
21163   # bat and cmd files are not always considered executable in cygwin causing which
21164   # to not find them
21165   if test "x$new_path" = x \
21166       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21167       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21168     new_path=`$CYGPATH -u "$path"`
21169   fi
21170   if test "x$new_path" = x; then
21171     # Oops. Which didn't find the executable.
21172     # The splitting of arguments from the executable at a space might have been incorrect,
21173     # since paths with space are more likely in Windows. Give it another try with the whole
21174     # argument.
21175     path="$complete"
21176     arguments="EOL"
21177     new_path=`$CYGPATH -u "$path"`
21178     new_path=`$WHICH "$new_path" 2> /dev/null`
21179     # bat and cmd files are not always considered executable in cygwin causing which
21180     # to not find them
21181     if test "x$new_path" = x \
21182         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21183         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21184       new_path=`$CYGPATH -u "$path"`
21185     fi
21186     if test "x$new_path" = x; then
21187       # It's still not found. Now this is an unrecoverable error.
21188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21189 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21190       has_space=`$ECHO "$complete" | $GREP " "`
21191       if test "x$has_space" != x; then
21192         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21193 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21194       fi
21195       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21196     fi
21197   fi
21198 
21199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21202   # "foo.exe" is OK but "foo" is an error.
21203   #
21204   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21205   # It is also a way to make sure we got the proper file name for the real test later on.
21206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21207   if test "x$test_shortpath" = x; then
21208     # Short path failed, file does not exist as specified.
21209     # Try adding .exe or .cmd
21210     if test -f "${new_path}.exe"; then
21211       input_to_shortpath="${new_path}.exe"
21212     elif test -f "${new_path}.cmd"; then
21213       input_to_shortpath="${new_path}.cmd"
21214     else
21215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21216 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21217       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21218 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21219       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21220     fi
21221   else
21222     input_to_shortpath="$new_path"
21223   fi
21224 
21225   # Call helper function which possibly converts this using DOS-style short mode.
21226   # If so, the updated path is stored in $new_path.
21227   new_path="$input_to_shortpath"
21228 
21229   input_path="$input_to_shortpath"
21230   # Check if we need to convert this using DOS-style short mode. If the path
21231   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21232   # take no chances and rewrite it.
21233   # Note: m4 eats our [], so we need to use [ and ] instead.
21234   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21235   if test "x$has_forbidden_chars" != x; then
21236     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21237     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21238     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21239     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21240       # Going to short mode and back again did indeed matter. Since short mode is
21241       # case insensitive, let's make it lowercase to improve readability.
21242       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21243       # Now convert it back to Unix-stile (cygpath)
21244       input_path=`$CYGPATH -u "$shortmode_path"`
21245       new_path="$input_path"
21246     fi
21247   fi
21248 
21249   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21250   if test "x$test_cygdrive_prefix" = x; then
21251     # As a simple fix, exclude /usr/bin since it's not a real path.
21252     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21253       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21254       # a path prefixed by /cygdrive for fixpath to work.
21255       new_path="$CYGWIN_ROOT_PATH$input_path"
21256     fi
21257   fi
21258 
21259   # remove trailing .exe if any
21260   new_path="${new_path/%.exe/}"
21261 
21262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21263 
21264   # First separate the path from the arguments. This will split at the first
21265   # space.
21266   complete="$CXX"
21267   path="${complete%% *}"
21268   tmp="$complete EOL"
21269   arguments="${tmp#* }"
21270 
21271   # Input might be given as Windows format, start by converting to
21272   # unix format.
21273   new_path="$path"
21274 
21275   windows_path="$new_path"
21276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21277     unix_path=`$CYGPATH -u "$windows_path"`
21278     new_path="$unix_path"
21279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21281     new_path="$unix_path"
21282   fi
21283 
21284 
21285   # Now try to locate executable using which
21286   new_path=`$WHICH "$new_path" 2> /dev/null`
21287 
21288   if test "x$new_path" = x; then
21289     # Oops. Which didn't find the executable.
21290     # The splitting of arguments from the executable at a space might have been incorrect,
21291     # since paths with space are more likely in Windows. Give it another try with the whole
21292     # argument.
21293     path="$complete"
21294     arguments="EOL"
21295     new_path="$path"
21296 
21297   windows_path="$new_path"
21298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21299     unix_path=`$CYGPATH -u "$windows_path"`
21300     new_path="$unix_path"
21301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21303     new_path="$unix_path"
21304   fi
21305 
21306 
21307     new_path=`$WHICH "$new_path" 2> /dev/null`
21308 
21309     if test "x$new_path" = x; then
21310       # It's still not found. Now this is an unrecoverable error.
21311       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21312 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21313       has_space=`$ECHO "$complete" | $GREP " "`
21314       if test "x$has_space" != x; then
21315         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21316 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21317       fi
21318       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21319     fi
21320   fi
21321 
21322   # Now new_path has a complete unix path to the binary
21323   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21324     # Keep paths in /bin as-is, but remove trailing .exe if any
21325     new_path="${new_path/%.exe/}"
21326     # Do not save /bin paths to all_fixpath_prefixes!
21327   else
21328     # Not in mixed or Windows style, start by that.
21329     new_path=`cmd //c echo $new_path`
21330 
21331   input_path="$new_path"
21332   # Check if we need to convert this using DOS-style short mode. If the path
21333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21334   # take no chances and rewrite it.
21335   # Note: m4 eats our [], so we need to use [ and ] instead.
21336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21337   if test "x$has_forbidden_chars" != x; then
21338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21339     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21340   fi
21341 
21342     # Output is in $new_path
21343 
21344   windows_path="$new_path"
21345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21346     unix_path=`$CYGPATH -u "$windows_path"`
21347     new_path="$unix_path"
21348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21350     new_path="$unix_path"
21351   fi
21352 
21353     # remove trailing .exe if any
21354     new_path="${new_path/%.exe/}"
21355 
21356     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21357     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21358   fi
21359 
21360   else
21361     # We're on a posix platform. Hooray! :)
21362     # First separate the path from the arguments. This will split at the first
21363     # space.
21364     complete="$CXX"
21365     path="${complete%% *}"
21366     tmp="$complete EOL"
21367     arguments="${tmp#* }"
21368 
21369     # Cannot rely on the command "which" here since it doesn't always work.
21370     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21371     if test -z "$is_absolute_path"; then
21372       # Path to executable is not absolute. Find it.
21373       IFS_save="$IFS"
21374       IFS=:
21375       for p in $PATH; do
21376         if test -f "$p/$path" && test -x "$p/$path"; then
21377           new_path="$p/$path"
21378           break
21379         fi
21380       done
21381       IFS="$IFS_save"
21382     else
21383       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21384 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21385       new_path="$path"
21386     fi
21387 
21388     if test "x$new_path" = x; then
21389       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21390 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21391       has_space=`$ECHO "$complete" | $GREP " "`
21392       if test "x$has_space" != x; then
21393         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21394 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21395       fi
21396       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21397     fi
21398   fi
21399 
21400   # Now join together the path and the arguments once again
21401   if test "x$arguments" != xEOL; then
21402     new_complete="$new_path ${arguments% *}"
21403   else
21404     new_complete="$new_path"
21405   fi
21406 
21407   if test "x$complete" != "x$new_complete"; then
21408     CXX="$new_complete"
21409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21410 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21411   fi
21412 
21413   TEST_COMPILER="$CXX"
21414   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21415   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21416   if test "x$OPENJDK_BUILD_OS" != xaix; then
21417     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21418 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21419 
21420   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21421     # Follow a chain of symbolic links. Use readlink
21422     # where it exists, else fall back to horribly
21423     # complicated shell code.
21424     if test "x$READLINK_TESTED" != yes; then
21425       # On MacOSX there is a readlink tool with a different
21426       # purpose than the GNU readlink tool. Check the found readlink.
21427       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21428       if test "x$ISGNU" = x; then
21429         # A readlink that we do not know how to use.
21430         # Are there other non-GNU readlinks out there?
21431         READLINK_TESTED=yes
21432         READLINK=
21433       fi
21434     fi
21435 
21436     if test "x$READLINK" != x; then
21437       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21438     else
21439       # Save the current directory for restoring afterwards
21440       STARTDIR=$PWD
21441       COUNTER=0
21442       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21443       sym_link_file=`$BASENAME $TEST_COMPILER`
21444       cd $sym_link_dir
21445       # Use -P flag to resolve symlinks in directories.
21446       cd `$THEPWDCMD -P`
21447       sym_link_dir=`$THEPWDCMD -P`
21448       # Resolve file symlinks
21449       while test $COUNTER -lt 20; do
21450         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21451         if test "x$ISLINK" == x; then
21452           # This is not a symbolic link! We are done!
21453           break
21454         fi
21455         # Again resolve directory symlinks since the target of the just found
21456         # link could be in a different directory
21457         cd `$DIRNAME $ISLINK`
21458         sym_link_dir=`$THEPWDCMD -P`
21459         sym_link_file=`$BASENAME $ISLINK`
21460         let COUNTER=COUNTER+1
21461       done
21462       cd $STARTDIR
21463       TEST_COMPILER=$sym_link_dir/$sym_link_file
21464     fi
21465   fi
21466 
21467     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21468 $as_echo "$TEST_COMPILER" >&6; }
21469   fi
21470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21471 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21472 
21473   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21474   if test "x$COMPILER_BASENAME" = "xccache"; then
21475     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21476 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21477     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21478     # We want to control ccache invocation ourselves, so ignore this cc and try
21479     # searching again.
21480 
21481     # Remove the path to the fake ccache cc from the PATH
21482     RETRY_COMPILER_SAVED_PATH="$PATH"
21483     COMPILER_DIRNAME=`$DIRNAME $CXX`
21484     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21485 
21486     # Try again looking for our compiler
21487     if test -n "$ac_tool_prefix"; then
21488   for ac_prog in $COMPILER_CHECK_LIST
21489   do
21490     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21491 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21493 $as_echo_n "checking for $ac_word... " >&6; }
21494 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21495   $as_echo_n "(cached) " >&6
21496 else
21497   if test -n "$PROPER_COMPILER_CXX"; then
21498   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21499 else
21500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21501 for as_dir in $PATH
21502 do
21503   IFS=$as_save_IFS
21504   test -z "$as_dir" && as_dir=.
21505     for ac_exec_ext in '' $ac_executable_extensions; do
21506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21507     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21509     break 2
21510   fi
21511 done
21512   done
21513 IFS=$as_save_IFS
21514 
21515 fi
21516 fi
21517 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21518 if test -n "$PROPER_COMPILER_CXX"; then
21519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21520 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21521 else
21522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21523 $as_echo "no" >&6; }
21524 fi
21525 
21526 
21527     test -n "$PROPER_COMPILER_CXX" && break
21528   done
21529 fi
21530 if test -z "$PROPER_COMPILER_CXX"; then
21531   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21532   for ac_prog in $COMPILER_CHECK_LIST
21533 do
21534   # Extract the first word of "$ac_prog", so it can be a program name with args.
21535 set dummy $ac_prog; ac_word=$2
21536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21537 $as_echo_n "checking for $ac_word... " >&6; }
21538 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21539   $as_echo_n "(cached) " >&6
21540 else
21541   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21542   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21543 else
21544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21545 for as_dir in $PATH
21546 do
21547   IFS=$as_save_IFS
21548   test -z "$as_dir" && as_dir=.
21549     for ac_exec_ext in '' $ac_executable_extensions; do
21550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21551     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21553     break 2
21554   fi
21555 done
21556   done
21557 IFS=$as_save_IFS
21558 
21559 fi
21560 fi
21561 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21562 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21564 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21565 else
21566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21567 $as_echo "no" >&6; }
21568 fi
21569 
21570 
21571   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21572 done
21573 
21574   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21575     PROPER_COMPILER_CXX=""
21576   else
21577     case $cross_compiling:$ac_tool_warned in
21578 yes:)
21579 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21580 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21581 ac_tool_warned=yes ;;
21582 esac
21583     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21584   fi
21585 fi
21586 
21587 
21588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21589 
21590   # First separate the path from the arguments. This will split at the first
21591   # space.
21592   complete="$PROPER_COMPILER_CXX"
21593   path="${complete%% *}"
21594   tmp="$complete EOL"
21595   arguments="${tmp#* }"
21596 
21597   # Input might be given as Windows format, start by converting to
21598   # unix format.
21599   new_path=`$CYGPATH -u "$path"`
21600 
21601   # Now try to locate executable using which
21602   new_path=`$WHICH "$new_path" 2> /dev/null`
21603   # bat and cmd files are not always considered executable in cygwin causing which
21604   # to not find them
21605   if test "x$new_path" = x \
21606       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21607       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21608     new_path=`$CYGPATH -u "$path"`
21609   fi
21610   if test "x$new_path" = x; then
21611     # Oops. Which didn't find the executable.
21612     # The splitting of arguments from the executable at a space might have been incorrect,
21613     # since paths with space are more likely in Windows. Give it another try with the whole
21614     # argument.
21615     path="$complete"
21616     arguments="EOL"
21617     new_path=`$CYGPATH -u "$path"`
21618     new_path=`$WHICH "$new_path" 2> /dev/null`
21619     # bat and cmd files are not always considered executable in cygwin causing which
21620     # to not find them
21621     if test "x$new_path" = x \
21622         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21623         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21624       new_path=`$CYGPATH -u "$path"`
21625     fi
21626     if test "x$new_path" = x; then
21627       # It's still not found. Now this is an unrecoverable error.
21628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21629 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21630       has_space=`$ECHO "$complete" | $GREP " "`
21631       if test "x$has_space" != x; then
21632         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21633 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21634       fi
21635       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21636     fi
21637   fi
21638 
21639   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21640   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21641   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21642   # "foo.exe" is OK but "foo" is an error.
21643   #
21644   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21645   # It is also a way to make sure we got the proper file name for the real test later on.
21646   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21647   if test "x$test_shortpath" = x; then
21648     # Short path failed, file does not exist as specified.
21649     # Try adding .exe or .cmd
21650     if test -f "${new_path}.exe"; then
21651       input_to_shortpath="${new_path}.exe"
21652     elif test -f "${new_path}.cmd"; then
21653       input_to_shortpath="${new_path}.cmd"
21654     else
21655       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21656 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21657       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21658 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21659       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21660     fi
21661   else
21662     input_to_shortpath="$new_path"
21663   fi
21664 
21665   # Call helper function which possibly converts this using DOS-style short mode.
21666   # If so, the updated path is stored in $new_path.
21667   new_path="$input_to_shortpath"
21668 
21669   input_path="$input_to_shortpath"
21670   # Check if we need to convert this using DOS-style short mode. If the path
21671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21672   # take no chances and rewrite it.
21673   # Note: m4 eats our [], so we need to use [ and ] instead.
21674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21675   if test "x$has_forbidden_chars" != x; then
21676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21677     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21678     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21679     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21680       # Going to short mode and back again did indeed matter. Since short mode is
21681       # case insensitive, let's make it lowercase to improve readability.
21682       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21683       # Now convert it back to Unix-stile (cygpath)
21684       input_path=`$CYGPATH -u "$shortmode_path"`
21685       new_path="$input_path"
21686     fi
21687   fi
21688 
21689   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21690   if test "x$test_cygdrive_prefix" = x; then
21691     # As a simple fix, exclude /usr/bin since it's not a real path.
21692     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21693       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21694       # a path prefixed by /cygdrive for fixpath to work.
21695       new_path="$CYGWIN_ROOT_PATH$input_path"
21696     fi
21697   fi
21698 
21699   # remove trailing .exe if any
21700   new_path="${new_path/%.exe/}"
21701 
21702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21703 
21704   # First separate the path from the arguments. This will split at the first
21705   # space.
21706   complete="$PROPER_COMPILER_CXX"
21707   path="${complete%% *}"
21708   tmp="$complete EOL"
21709   arguments="${tmp#* }"
21710 
21711   # Input might be given as Windows format, start by converting to
21712   # unix format.
21713   new_path="$path"
21714 
21715   windows_path="$new_path"
21716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21717     unix_path=`$CYGPATH -u "$windows_path"`
21718     new_path="$unix_path"
21719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21721     new_path="$unix_path"
21722   fi
21723 
21724 
21725   # Now try to locate executable using which
21726   new_path=`$WHICH "$new_path" 2> /dev/null`
21727 
21728   if test "x$new_path" = x; then
21729     # Oops. Which didn't find the executable.
21730     # The splitting of arguments from the executable at a space might have been incorrect,
21731     # since paths with space are more likely in Windows. Give it another try with the whole
21732     # argument.
21733     path="$complete"
21734     arguments="EOL"
21735     new_path="$path"
21736 
21737   windows_path="$new_path"
21738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21739     unix_path=`$CYGPATH -u "$windows_path"`
21740     new_path="$unix_path"
21741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21743     new_path="$unix_path"
21744   fi
21745 
21746 
21747     new_path=`$WHICH "$new_path" 2> /dev/null`
21748 
21749     if test "x$new_path" = x; then
21750       # It's still not found. Now this is an unrecoverable error.
21751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21752 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21753       has_space=`$ECHO "$complete" | $GREP " "`
21754       if test "x$has_space" != x; then
21755         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21756 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21757       fi
21758       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21759     fi
21760   fi
21761 
21762   # Now new_path has a complete unix path to the binary
21763   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21764     # Keep paths in /bin as-is, but remove trailing .exe if any
21765     new_path="${new_path/%.exe/}"
21766     # Do not save /bin paths to all_fixpath_prefixes!
21767   else
21768     # Not in mixed or Windows style, start by that.
21769     new_path=`cmd //c echo $new_path`
21770 
21771   input_path="$new_path"
21772   # Check if we need to convert this using DOS-style short mode. If the path
21773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21774   # take no chances and rewrite it.
21775   # Note: m4 eats our [], so we need to use [ and ] instead.
21776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21777   if test "x$has_forbidden_chars" != x; then
21778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21780   fi
21781 
21782     # Output is in $new_path
21783 
21784   windows_path="$new_path"
21785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21786     unix_path=`$CYGPATH -u "$windows_path"`
21787     new_path="$unix_path"
21788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21790     new_path="$unix_path"
21791   fi
21792 
21793     # remove trailing .exe if any
21794     new_path="${new_path/%.exe/}"
21795 
21796     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21797     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21798   fi
21799 
21800   else
21801     # We're on a posix platform. Hooray! :)
21802     # First separate the path from the arguments. This will split at the first
21803     # space.
21804     complete="$PROPER_COMPILER_CXX"
21805     path="${complete%% *}"
21806     tmp="$complete EOL"
21807     arguments="${tmp#* }"
21808 
21809     # Cannot rely on the command "which" here since it doesn't always work.
21810     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21811     if test -z "$is_absolute_path"; then
21812       # Path to executable is not absolute. Find it.
21813       IFS_save="$IFS"
21814       IFS=:
21815       for p in $PATH; do
21816         if test -f "$p/$path" && test -x "$p/$path"; then
21817           new_path="$p/$path"
21818           break
21819         fi
21820       done
21821       IFS="$IFS_save"
21822     else
21823       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21824 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21825       new_path="$path"
21826     fi
21827 
21828     if test "x$new_path" = x; then
21829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21830 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21831       has_space=`$ECHO "$complete" | $GREP " "`
21832       if test "x$has_space" != x; then
21833         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21834 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21835       fi
21836       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21837     fi
21838   fi
21839 
21840   # Now join together the path and the arguments once again
21841   if test "x$arguments" != xEOL; then
21842     new_complete="$new_path ${arguments% *}"
21843   else
21844     new_complete="$new_path"
21845   fi
21846 
21847   if test "x$complete" != "x$new_complete"; then
21848     PROPER_COMPILER_CXX="$new_complete"
21849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21850 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21851   fi
21852 
21853     PATH="$RETRY_COMPILER_SAVED_PATH"
21854 
21855     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21856 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21857 
21858   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21859     # Follow a chain of symbolic links. Use readlink
21860     # where it exists, else fall back to horribly
21861     # complicated shell code.
21862     if test "x$READLINK_TESTED" != yes; then
21863       # On MacOSX there is a readlink tool with a different
21864       # purpose than the GNU readlink tool. Check the found readlink.
21865       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21866       if test "x$ISGNU" = x; then
21867         # A readlink that we do not know how to use.
21868         # Are there other non-GNU readlinks out there?
21869         READLINK_TESTED=yes
21870         READLINK=
21871       fi
21872     fi
21873 
21874     if test "x$READLINK" != x; then
21875       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21876     else
21877       # Save the current directory for restoring afterwards
21878       STARTDIR=$PWD
21879       COUNTER=0
21880       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21881       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21882       cd $sym_link_dir
21883       # Use -P flag to resolve symlinks in directories.
21884       cd `$THEPWDCMD -P`
21885       sym_link_dir=`$THEPWDCMD -P`
21886       # Resolve file symlinks
21887       while test $COUNTER -lt 20; do
21888         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21889         if test "x$ISLINK" == x; then
21890           # This is not a symbolic link! We are done!
21891           break
21892         fi
21893         # Again resolve directory symlinks since the target of the just found
21894         # link could be in a different directory
21895         cd `$DIRNAME $ISLINK`
21896         sym_link_dir=`$THEPWDCMD -P`
21897         sym_link_file=`$BASENAME $ISLINK`
21898         let COUNTER=COUNTER+1
21899       done
21900       cd $STARTDIR
21901       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21902     fi
21903   fi
21904 
21905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21906 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21907     CXX="$PROPER_COMPILER_CXX"
21908   else
21909     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21910 $as_echo "no, keeping CXX" >&6; }
21911     CXX="$TEST_COMPILER"
21912   fi
21913 
21914   COMPILER=$CXX
21915   COMPILER_NAME=$COMPILER_NAME
21916 
21917   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21918     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21919     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21920     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21921     if test $? -ne 0; then
21922       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21923 
21924       { $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
21925 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21926       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21927 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21928       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21929     else
21930       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21931       COMPILER_VENDOR="Sun Studio"
21932     fi
21933   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21934       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21935       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21936       if test $? -ne 0; then
21937         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21938       else
21939         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21940         COMPILER_VENDOR='IBM'
21941       fi
21942   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21943     # First line typically looks something like:
21944     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21945     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21946     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21947     COMPILER_VENDOR="Microsoft CL.EXE"
21948     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21949     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21950       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21951         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21952       fi
21953     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21954       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21955         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21956       fi
21957     fi
21958   else
21959     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21960     # Check that this is likely to be GCC.
21961     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21962     if test $? -ne 0; then
21963       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21964 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21965       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21966 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21967       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21968     fi
21969 
21970     # First line typically looks something like:
21971     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21972     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21973     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21974   fi
21975   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21976   CXX_VERSION="$COMPILER_VERSION"
21977   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21978   CXX_VENDOR="$COMPILER_VENDOR"
21979 
21980   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21981 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21982 
21983 
21984   # Now that we have resolved CXX ourself, let autoconf have its go at it
21985   ac_ext=cpp
21986 ac_cpp='$CXXCPP $CPPFLAGS'
21987 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21988 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21989 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21990 if test -z "$CXX"; then
21991   if test -n "$CCC"; then
21992     CXX=$CCC
21993   else
21994     if test -n "$ac_tool_prefix"; then
21995   for ac_prog in $CXX
21996   do
21997     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21998 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22000 $as_echo_n "checking for $ac_word... " >&6; }
22001 if ${ac_cv_prog_CXX+:} false; then :
22002   $as_echo_n "(cached) " >&6
22003 else
22004   if test -n "$CXX"; then
22005   ac_cv_prog_CXX="$CXX" # Let the user override the test.
22006 else
22007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22008 for as_dir in $PATH
22009 do
22010   IFS=$as_save_IFS
22011   test -z "$as_dir" && as_dir=.
22012     for ac_exec_ext in '' $ac_executable_extensions; do
22013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22014     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
22015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22016     break 2
22017   fi
22018 done
22019   done
22020 IFS=$as_save_IFS
22021 
22022 fi
22023 fi
22024 CXX=$ac_cv_prog_CXX
22025 if test -n "$CXX"; then
22026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
22027 $as_echo "$CXX" >&6; }
22028 else
22029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22030 $as_echo "no" >&6; }
22031 fi
22032 
22033 
22034     test -n "$CXX" && break
22035   done
22036 fi
22037 if test -z "$CXX"; then
22038   ac_ct_CXX=$CXX
22039   for ac_prog in $CXX
22040 do
22041   # Extract the first word of "$ac_prog", so it can be a program name with args.
22042 set dummy $ac_prog; ac_word=$2
22043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22044 $as_echo_n "checking for $ac_word... " >&6; }
22045 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
22046   $as_echo_n "(cached) " >&6
22047 else
22048   if test -n "$ac_ct_CXX"; then
22049   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
22050 else
22051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22052 for as_dir in $PATH
22053 do
22054   IFS=$as_save_IFS
22055   test -z "$as_dir" && as_dir=.
22056     for ac_exec_ext in '' $ac_executable_extensions; do
22057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22058     ac_cv_prog_ac_ct_CXX="$ac_prog"
22059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22060     break 2
22061   fi
22062 done
22063   done
22064 IFS=$as_save_IFS
22065 
22066 fi
22067 fi
22068 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
22069 if test -n "$ac_ct_CXX"; then
22070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
22071 $as_echo "$ac_ct_CXX" >&6; }
22072 else
22073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22074 $as_echo "no" >&6; }
22075 fi
22076 
22077 
22078   test -n "$ac_ct_CXX" && break
22079 done
22080 
22081   if test "x$ac_ct_CXX" = x; then
22082     CXX="g++"
22083   else
22084     case $cross_compiling:$ac_tool_warned in
22085 yes:)
22086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22087 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22088 ac_tool_warned=yes ;;
22089 esac
22090     CXX=$ac_ct_CXX
22091   fi
22092 fi
22093 
22094   fi
22095 fi
22096 # Provide some information about the compiler.
22097 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
22098 set X $ac_compile
22099 ac_compiler=$2
22100 for ac_option in --version -v -V -qversion; do
22101   { { ac_try="$ac_compiler $ac_option >&5"
22102 case "(($ac_try" in
22103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22104   *) ac_try_echo=$ac_try;;
22105 esac
22106 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22107 $as_echo "$ac_try_echo"; } >&5
22108   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22109   ac_status=$?
22110   if test -s conftest.err; then
22111     sed '10a\
22112 ... rest of stderr output deleted ...
22113          10q' conftest.err >conftest.er1
22114     cat conftest.er1 >&5
22115   fi
22116   rm -f conftest.er1 conftest.err
22117   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22118   test $ac_status = 0; }
22119 done
22120 
22121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
22122 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
22123 if ${ac_cv_cxx_compiler_gnu+:} false; then :
22124   $as_echo_n "(cached) " >&6
22125 else
22126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22127 /* end confdefs.h.  */
22128 
22129 int
22130 main ()
22131 {
22132 #ifndef __GNUC__
22133        choke me
22134 #endif
22135 
22136   ;
22137   return 0;
22138 }
22139 _ACEOF
22140 if ac_fn_cxx_try_compile "$LINENO"; then :
22141   ac_compiler_gnu=yes
22142 else
22143   ac_compiler_gnu=no
22144 fi
22145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22146 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22147 
22148 fi
22149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22150 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22151 if test $ac_compiler_gnu = yes; then
22152   GXX=yes
22153 else
22154   GXX=
22155 fi
22156 ac_test_CXXFLAGS=${CXXFLAGS+set}
22157 ac_save_CXXFLAGS=$CXXFLAGS
22158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22159 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
22160 if ${ac_cv_prog_cxx_g+:} false; then :
22161   $as_echo_n "(cached) " >&6
22162 else
22163   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22164    ac_cxx_werror_flag=yes
22165    ac_cv_prog_cxx_g=no
22166    CXXFLAGS="-g"
22167    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22168 /* end confdefs.h.  */
22169 
22170 int
22171 main ()
22172 {
22173 
22174   ;
22175   return 0;
22176 }
22177 _ACEOF
22178 if ac_fn_cxx_try_compile "$LINENO"; then :
22179   ac_cv_prog_cxx_g=yes
22180 else
22181   CXXFLAGS=""
22182       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22183 /* end confdefs.h.  */
22184 
22185 int
22186 main ()
22187 {
22188 
22189   ;
22190   return 0;
22191 }
22192 _ACEOF
22193 if ac_fn_cxx_try_compile "$LINENO"; then :
22194 
22195 else
22196   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22197          CXXFLAGS="-g"
22198          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22199 /* end confdefs.h.  */
22200 
22201 int
22202 main ()
22203 {
22204 
22205   ;
22206   return 0;
22207 }
22208 _ACEOF
22209 if ac_fn_cxx_try_compile "$LINENO"; then :
22210   ac_cv_prog_cxx_g=yes
22211 fi
22212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22213 fi
22214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22215 fi
22216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22217    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22218 fi
22219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22220 $as_echo "$ac_cv_prog_cxx_g" >&6; }
22221 if test "$ac_test_CXXFLAGS" = set; then
22222   CXXFLAGS=$ac_save_CXXFLAGS
22223 elif test $ac_cv_prog_cxx_g = yes; then
22224   if test "$GXX" = yes; then
22225     CXXFLAGS="-g -O2"
22226   else
22227     CXXFLAGS="-g"
22228   fi
22229 else
22230   if test "$GXX" = yes; then
22231     CXXFLAGS="-O2"
22232   else
22233     CXXFLAGS=
22234   fi
22235 fi
22236 ac_ext=cpp
22237 ac_cpp='$CXXCPP $CPPFLAGS'
22238 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22239 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22240 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22241 
22242 
22243   ### Locate other tools
22244 
22245   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22246     ac_ext=m
22247 ac_cpp='$OBJCPP $CPPFLAGS'
22248 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22249 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22250 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22251 if test -n "$ac_tool_prefix"; then
22252   for ac_prog in gcc objcc objc cc CC
22253   do
22254     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22255 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22257 $as_echo_n "checking for $ac_word... " >&6; }
22258 if ${ac_cv_prog_OBJC+:} false; then :
22259   $as_echo_n "(cached) " >&6
22260 else
22261   if test -n "$OBJC"; then
22262   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22263 else
22264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22265 for as_dir in $PATH
22266 do
22267   IFS=$as_save_IFS
22268   test -z "$as_dir" && as_dir=.
22269     for ac_exec_ext in '' $ac_executable_extensions; do
22270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22271     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22273     break 2
22274   fi
22275 done
22276   done
22277 IFS=$as_save_IFS
22278 
22279 fi
22280 fi
22281 OBJC=$ac_cv_prog_OBJC
22282 if test -n "$OBJC"; then
22283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22284 $as_echo "$OBJC" >&6; }
22285 else
22286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22287 $as_echo "no" >&6; }
22288 fi
22289 
22290 
22291     test -n "$OBJC" && break
22292   done
22293 fi
22294 if test -z "$OBJC"; then
22295   ac_ct_OBJC=$OBJC
22296   for ac_prog in gcc objcc objc cc CC
22297 do
22298   # Extract the first word of "$ac_prog", so it can be a program name with args.
22299 set dummy $ac_prog; ac_word=$2
22300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22301 $as_echo_n "checking for $ac_word... " >&6; }
22302 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22303   $as_echo_n "(cached) " >&6
22304 else
22305   if test -n "$ac_ct_OBJC"; then
22306   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22307 else
22308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22309 for as_dir in $PATH
22310 do
22311   IFS=$as_save_IFS
22312   test -z "$as_dir" && as_dir=.
22313     for ac_exec_ext in '' $ac_executable_extensions; do
22314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22315     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22317     break 2
22318   fi
22319 done
22320   done
22321 IFS=$as_save_IFS
22322 
22323 fi
22324 fi
22325 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22326 if test -n "$ac_ct_OBJC"; then
22327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22328 $as_echo "$ac_ct_OBJC" >&6; }
22329 else
22330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22331 $as_echo "no" >&6; }
22332 fi
22333 
22334 
22335   test -n "$ac_ct_OBJC" && break
22336 done
22337 
22338   if test "x$ac_ct_OBJC" = x; then
22339     OBJC="gcc"
22340   else
22341     case $cross_compiling:$ac_tool_warned in
22342 yes:)
22343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22344 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22345 ac_tool_warned=yes ;;
22346 esac
22347     OBJC=$ac_ct_OBJC
22348   fi
22349 fi
22350 
22351 # Provide some information about the compiler.
22352 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22353 set X $ac_compile
22354 ac_compiler=$2
22355 for ac_option in --version -v -V -qversion; do
22356   { { ac_try="$ac_compiler $ac_option >&5"
22357 case "(($ac_try" in
22358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22359   *) ac_try_echo=$ac_try;;
22360 esac
22361 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22362 $as_echo "$ac_try_echo"; } >&5
22363   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22364   ac_status=$?
22365   if test -s conftest.err; then
22366     sed '10a\
22367 ... rest of stderr output deleted ...
22368          10q' conftest.err >conftest.er1
22369     cat conftest.er1 >&5
22370   fi
22371   rm -f conftest.er1 conftest.err
22372   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22373   test $ac_status = 0; }
22374 done
22375 
22376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22377 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22378 if ${ac_cv_objc_compiler_gnu+:} false; then :
22379   $as_echo_n "(cached) " >&6
22380 else
22381   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22382 /* end confdefs.h.  */
22383 
22384 int
22385 main ()
22386 {
22387 #ifndef __GNUC__
22388        choke me
22389 #endif
22390 
22391   ;
22392   return 0;
22393 }
22394 _ACEOF
22395 if ac_fn_objc_try_compile "$LINENO"; then :
22396   ac_compiler_gnu=yes
22397 else
22398   ac_compiler_gnu=no
22399 fi
22400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22401 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22402 
22403 fi
22404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22405 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22406 if test $ac_compiler_gnu = yes; then
22407   GOBJC=yes
22408 else
22409   GOBJC=
22410 fi
22411 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22412 ac_save_OBJCFLAGS=$OBJCFLAGS
22413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22414 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22415 if ${ac_cv_prog_objc_g+:} false; then :
22416   $as_echo_n "(cached) " >&6
22417 else
22418   ac_save_objc_werror_flag=$ac_objc_werror_flag
22419    ac_objc_werror_flag=yes
22420    ac_cv_prog_objc_g=no
22421    OBJCFLAGS="-g"
22422    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22423 /* end confdefs.h.  */
22424 
22425 int
22426 main ()
22427 {
22428 
22429   ;
22430   return 0;
22431 }
22432 _ACEOF
22433 if ac_fn_objc_try_compile "$LINENO"; then :
22434   ac_cv_prog_objc_g=yes
22435 else
22436   OBJCFLAGS=""
22437       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22438 /* end confdefs.h.  */
22439 
22440 int
22441 main ()
22442 {
22443 
22444   ;
22445   return 0;
22446 }
22447 _ACEOF
22448 if ac_fn_objc_try_compile "$LINENO"; then :
22449 
22450 else
22451   ac_objc_werror_flag=$ac_save_objc_werror_flag
22452          OBJCFLAGS="-g"
22453          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22454 /* end confdefs.h.  */
22455 
22456 int
22457 main ()
22458 {
22459 
22460   ;
22461   return 0;
22462 }
22463 _ACEOF
22464 if ac_fn_objc_try_compile "$LINENO"; then :
22465   ac_cv_prog_objc_g=yes
22466 fi
22467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22468 fi
22469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22470 fi
22471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22472    ac_objc_werror_flag=$ac_save_objc_werror_flag
22473 fi
22474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22475 $as_echo "$ac_cv_prog_objc_g" >&6; }
22476 if test "$ac_test_OBJCFLAGS" = set; then
22477   OBJCFLAGS=$ac_save_OBJCFLAGS
22478 elif test $ac_cv_prog_objc_g = yes; then
22479   if test "$GOBJC" = yes; then
22480     OBJCFLAGS="-g -O2"
22481   else
22482     OBJCFLAGS="-g"
22483   fi
22484 else
22485   if test "$GOBJC" = yes; then
22486     OBJCFLAGS="-O2"
22487   else
22488     OBJCFLAGS=
22489   fi
22490 fi
22491 ac_ext=cpp
22492 ac_cpp='$CXXCPP $CPPFLAGS'
22493 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22494 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22495 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22496 
22497 
22498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22499 
22500   # First separate the path from the arguments. This will split at the first
22501   # space.
22502   complete="$OBJC"
22503   path="${complete%% *}"
22504   tmp="$complete EOL"
22505   arguments="${tmp#* }"
22506 
22507   # Input might be given as Windows format, start by converting to
22508   # unix format.
22509   new_path=`$CYGPATH -u "$path"`
22510 
22511   # Now try to locate executable using which
22512   new_path=`$WHICH "$new_path" 2> /dev/null`
22513   # bat and cmd files are not always considered executable in cygwin causing which
22514   # to not find them
22515   if test "x$new_path" = x \
22516       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22517       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22518     new_path=`$CYGPATH -u "$path"`
22519   fi
22520   if test "x$new_path" = x; then
22521     # Oops. Which didn't find the executable.
22522     # The splitting of arguments from the executable at a space might have been incorrect,
22523     # since paths with space are more likely in Windows. Give it another try with the whole
22524     # argument.
22525     path="$complete"
22526     arguments="EOL"
22527     new_path=`$CYGPATH -u "$path"`
22528     new_path=`$WHICH "$new_path" 2> /dev/null`
22529     # bat and cmd files are not always considered executable in cygwin causing which
22530     # to not find them
22531     if test "x$new_path" = x \
22532         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22533         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22534       new_path=`$CYGPATH -u "$path"`
22535     fi
22536     if test "x$new_path" = x; then
22537       # It's still not found. Now this is an unrecoverable error.
22538       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22539 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22540       has_space=`$ECHO "$complete" | $GREP " "`
22541       if test "x$has_space" != x; then
22542         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22543 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22544       fi
22545       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22546     fi
22547   fi
22548 
22549   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22550   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22551   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22552   # "foo.exe" is OK but "foo" is an error.
22553   #
22554   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22555   # It is also a way to make sure we got the proper file name for the real test later on.
22556   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22557   if test "x$test_shortpath" = x; then
22558     # Short path failed, file does not exist as specified.
22559     # Try adding .exe or .cmd
22560     if test -f "${new_path}.exe"; then
22561       input_to_shortpath="${new_path}.exe"
22562     elif test -f "${new_path}.cmd"; then
22563       input_to_shortpath="${new_path}.cmd"
22564     else
22565       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22566 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22567       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22568 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22569       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22570     fi
22571   else
22572     input_to_shortpath="$new_path"
22573   fi
22574 
22575   # Call helper function which possibly converts this using DOS-style short mode.
22576   # If so, the updated path is stored in $new_path.
22577   new_path="$input_to_shortpath"
22578 
22579   input_path="$input_to_shortpath"
22580   # Check if we need to convert this using DOS-style short mode. If the path
22581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22582   # take no chances and rewrite it.
22583   # Note: m4 eats our [], so we need to use [ and ] instead.
22584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22585   if test "x$has_forbidden_chars" != x; then
22586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22587     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22588     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22589     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22590       # Going to short mode and back again did indeed matter. Since short mode is
22591       # case insensitive, let's make it lowercase to improve readability.
22592       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22593       # Now convert it back to Unix-stile (cygpath)
22594       input_path=`$CYGPATH -u "$shortmode_path"`
22595       new_path="$input_path"
22596     fi
22597   fi
22598 
22599   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22600   if test "x$test_cygdrive_prefix" = x; then
22601     # As a simple fix, exclude /usr/bin since it's not a real path.
22602     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22603       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22604       # a path prefixed by /cygdrive for fixpath to work.
22605       new_path="$CYGWIN_ROOT_PATH$input_path"
22606     fi
22607   fi
22608 
22609   # remove trailing .exe if any
22610   new_path="${new_path/%.exe/}"
22611 
22612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22613 
22614   # First separate the path from the arguments. This will split at the first
22615   # space.
22616   complete="$OBJC"
22617   path="${complete%% *}"
22618   tmp="$complete EOL"
22619   arguments="${tmp#* }"
22620 
22621   # Input might be given as Windows format, start by converting to
22622   # unix format.
22623   new_path="$path"
22624 
22625   windows_path="$new_path"
22626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22627     unix_path=`$CYGPATH -u "$windows_path"`
22628     new_path="$unix_path"
22629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22631     new_path="$unix_path"
22632   fi
22633 
22634 
22635   # Now try to locate executable using which
22636   new_path=`$WHICH "$new_path" 2> /dev/null`
22637 
22638   if test "x$new_path" = x; then
22639     # Oops. Which didn't find the executable.
22640     # The splitting of arguments from the executable at a space might have been incorrect,
22641     # since paths with space are more likely in Windows. Give it another try with the whole
22642     # argument.
22643     path="$complete"
22644     arguments="EOL"
22645     new_path="$path"
22646 
22647   windows_path="$new_path"
22648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22649     unix_path=`$CYGPATH -u "$windows_path"`
22650     new_path="$unix_path"
22651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22653     new_path="$unix_path"
22654   fi
22655 
22656 
22657     new_path=`$WHICH "$new_path" 2> /dev/null`
22658 
22659     if test "x$new_path" = x; then
22660       # It's still not found. Now this is an unrecoverable error.
22661       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22662 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22663       has_space=`$ECHO "$complete" | $GREP " "`
22664       if test "x$has_space" != x; then
22665         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22666 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22667       fi
22668       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22669     fi
22670   fi
22671 
22672   # Now new_path has a complete unix path to the binary
22673   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22674     # Keep paths in /bin as-is, but remove trailing .exe if any
22675     new_path="${new_path/%.exe/}"
22676     # Do not save /bin paths to all_fixpath_prefixes!
22677   else
22678     # Not in mixed or Windows style, start by that.
22679     new_path=`cmd //c echo $new_path`
22680 
22681   input_path="$new_path"
22682   # Check if we need to convert this using DOS-style short mode. If the path
22683   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22684   # take no chances and rewrite it.
22685   # Note: m4 eats our [], so we need to use [ and ] instead.
22686   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22687   if test "x$has_forbidden_chars" != x; then
22688     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22689     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22690   fi
22691 
22692     # Output is in $new_path
22693 
22694   windows_path="$new_path"
22695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22696     unix_path=`$CYGPATH -u "$windows_path"`
22697     new_path="$unix_path"
22698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22700     new_path="$unix_path"
22701   fi
22702 
22703     # remove trailing .exe if any
22704     new_path="${new_path/%.exe/}"
22705 
22706     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22707     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22708   fi
22709 
22710   else
22711     # We're on a posix platform. Hooray! :)
22712     # First separate the path from the arguments. This will split at the first
22713     # space.
22714     complete="$OBJC"
22715     path="${complete%% *}"
22716     tmp="$complete EOL"
22717     arguments="${tmp#* }"
22718 
22719     # Cannot rely on the command "which" here since it doesn't always work.
22720     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22721     if test -z "$is_absolute_path"; then
22722       # Path to executable is not absolute. Find it.
22723       IFS_save="$IFS"
22724       IFS=:
22725       for p in $PATH; do
22726         if test -f "$p/$path" && test -x "$p/$path"; then
22727           new_path="$p/$path"
22728           break
22729         fi
22730       done
22731       IFS="$IFS_save"
22732     else
22733       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22734 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22735       new_path="$path"
22736     fi
22737 
22738     if test "x$new_path" = x; then
22739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22740 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22741       has_space=`$ECHO "$complete" | $GREP " "`
22742       if test "x$has_space" != x; then
22743         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22744 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22745       fi
22746       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22747     fi
22748   fi
22749 
22750   # Now join together the path and the arguments once again
22751   if test "x$arguments" != xEOL; then
22752     new_complete="$new_path ${arguments% *}"
22753   else
22754     new_complete="$new_path"
22755   fi
22756 
22757   if test "x$complete" != "x$new_complete"; then
22758     OBJC="$new_complete"
22759     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22760 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22761   fi
22762 
22763   else
22764     OBJC=
22765   fi
22766 
22767   # Restore the flags to the user specified values.
22768   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22769   CFLAGS="$ORG_CFLAGS"
22770   CXXFLAGS="$ORG_CXXFLAGS"
22771   OBJCFLAGS="$ORG_OBJCFLAGS"
22772 
22773   LD="$CC"
22774   LDEXE="$CC"
22775   LDCXX="$CXX"
22776   LDEXECXX="$CXX"
22777 
22778   # LDEXE is the linker to use, when creating executables.
22779 
22780   # Linking C++ libraries.
22781 
22782   # Linking C++ executables.
22783 
22784 
22785   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22786     if test -n "$ac_tool_prefix"; then
22787   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22788 set dummy ${ac_tool_prefix}ar; ac_word=$2
22789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22790 $as_echo_n "checking for $ac_word... " >&6; }
22791 if ${ac_cv_prog_AR+:} false; then :
22792   $as_echo_n "(cached) " >&6
22793 else
22794   if test -n "$AR"; then
22795   ac_cv_prog_AR="$AR" # Let the user override the test.
22796 else
22797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798 for as_dir in $PATH
22799 do
22800   IFS=$as_save_IFS
22801   test -z "$as_dir" && as_dir=.
22802     for ac_exec_ext in '' $ac_executable_extensions; do
22803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22804     ac_cv_prog_AR="${ac_tool_prefix}ar"
22805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22806     break 2
22807   fi
22808 done
22809   done
22810 IFS=$as_save_IFS
22811 
22812 fi
22813 fi
22814 AR=$ac_cv_prog_AR
22815 if test -n "$AR"; then
22816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22817 $as_echo "$AR" >&6; }
22818 else
22819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22820 $as_echo "no" >&6; }
22821 fi
22822 
22823 
22824 fi
22825 if test -z "$ac_cv_prog_AR"; then
22826   ac_ct_AR=$AR
22827   # Extract the first word of "ar", so it can be a program name with args.
22828 set dummy ar; ac_word=$2
22829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22830 $as_echo_n "checking for $ac_word... " >&6; }
22831 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22832   $as_echo_n "(cached) " >&6
22833 else
22834   if test -n "$ac_ct_AR"; then
22835   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22836 else
22837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22838 for as_dir in $PATH
22839 do
22840   IFS=$as_save_IFS
22841   test -z "$as_dir" && as_dir=.
22842     for ac_exec_ext in '' $ac_executable_extensions; do
22843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22844     ac_cv_prog_ac_ct_AR="ar"
22845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22846     break 2
22847   fi
22848 done
22849   done
22850 IFS=$as_save_IFS
22851 
22852 fi
22853 fi
22854 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22855 if test -n "$ac_ct_AR"; then
22856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22857 $as_echo "$ac_ct_AR" >&6; }
22858 else
22859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22860 $as_echo "no" >&6; }
22861 fi
22862 
22863   if test "x$ac_ct_AR" = x; then
22864     AR=""
22865   else
22866     case $cross_compiling:$ac_tool_warned in
22867 yes:)
22868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22869 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22870 ac_tool_warned=yes ;;
22871 esac
22872     AR=$ac_ct_AR
22873   fi
22874 else
22875   AR="$ac_cv_prog_AR"
22876 fi
22877 
22878 
22879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22880 
22881   # First separate the path from the arguments. This will split at the first
22882   # space.
22883   complete="$AR"
22884   path="${complete%% *}"
22885   tmp="$complete EOL"
22886   arguments="${tmp#* }"
22887 
22888   # Input might be given as Windows format, start by converting to
22889   # unix format.
22890   new_path=`$CYGPATH -u "$path"`
22891 
22892   # Now try to locate executable using which
22893   new_path=`$WHICH "$new_path" 2> /dev/null`
22894   # bat and cmd files are not always considered executable in cygwin causing which
22895   # to not find them
22896   if test "x$new_path" = x \
22897       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22898       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22899     new_path=`$CYGPATH -u "$path"`
22900   fi
22901   if test "x$new_path" = x; then
22902     # Oops. Which didn't find the executable.
22903     # The splitting of arguments from the executable at a space might have been incorrect,
22904     # since paths with space are more likely in Windows. Give it another try with the whole
22905     # argument.
22906     path="$complete"
22907     arguments="EOL"
22908     new_path=`$CYGPATH -u "$path"`
22909     new_path=`$WHICH "$new_path" 2> /dev/null`
22910     # bat and cmd files are not always considered executable in cygwin causing which
22911     # to not find them
22912     if test "x$new_path" = x \
22913         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22914         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22915       new_path=`$CYGPATH -u "$path"`
22916     fi
22917     if test "x$new_path" = x; then
22918       # It's still not found. Now this is an unrecoverable error.
22919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22920 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22921       has_space=`$ECHO "$complete" | $GREP " "`
22922       if test "x$has_space" != x; then
22923         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22924 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22925       fi
22926       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22927     fi
22928   fi
22929 
22930   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22931   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22932   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22933   # "foo.exe" is OK but "foo" is an error.
22934   #
22935   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22936   # It is also a way to make sure we got the proper file name for the real test later on.
22937   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22938   if test "x$test_shortpath" = x; then
22939     # Short path failed, file does not exist as specified.
22940     # Try adding .exe or .cmd
22941     if test -f "${new_path}.exe"; then
22942       input_to_shortpath="${new_path}.exe"
22943     elif test -f "${new_path}.cmd"; then
22944       input_to_shortpath="${new_path}.cmd"
22945     else
22946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22947 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22948       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22949 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22950       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22951     fi
22952   else
22953     input_to_shortpath="$new_path"
22954   fi
22955 
22956   # Call helper function which possibly converts this using DOS-style short mode.
22957   # If so, the updated path is stored in $new_path.
22958   new_path="$input_to_shortpath"
22959 
22960   input_path="$input_to_shortpath"
22961   # Check if we need to convert this using DOS-style short mode. If the path
22962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22963   # take no chances and rewrite it.
22964   # Note: m4 eats our [], so we need to use [ and ] instead.
22965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22966   if test "x$has_forbidden_chars" != x; then
22967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22968     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22969     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22970     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22971       # Going to short mode and back again did indeed matter. Since short mode is
22972       # case insensitive, let's make it lowercase to improve readability.
22973       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22974       # Now convert it back to Unix-stile (cygpath)
22975       input_path=`$CYGPATH -u "$shortmode_path"`
22976       new_path="$input_path"
22977     fi
22978   fi
22979 
22980   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22981   if test "x$test_cygdrive_prefix" = x; then
22982     # As a simple fix, exclude /usr/bin since it's not a real path.
22983     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22984       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22985       # a path prefixed by /cygdrive for fixpath to work.
22986       new_path="$CYGWIN_ROOT_PATH$input_path"
22987     fi
22988   fi
22989 
22990   # remove trailing .exe if any
22991   new_path="${new_path/%.exe/}"
22992 
22993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22994 
22995   # First separate the path from the arguments. This will split at the first
22996   # space.
22997   complete="$AR"
22998   path="${complete%% *}"
22999   tmp="$complete EOL"
23000   arguments="${tmp#* }"
23001 
23002   # Input might be given as Windows format, start by converting to
23003   # unix format.
23004   new_path="$path"
23005 
23006   windows_path="$new_path"
23007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23008     unix_path=`$CYGPATH -u "$windows_path"`
23009     new_path="$unix_path"
23010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23012     new_path="$unix_path"
23013   fi
23014 
23015 
23016   # Now try to locate executable using which
23017   new_path=`$WHICH "$new_path" 2> /dev/null`
23018 
23019   if test "x$new_path" = x; then
23020     # Oops. Which didn't find the executable.
23021     # The splitting of arguments from the executable at a space might have been incorrect,
23022     # since paths with space are more likely in Windows. Give it another try with the whole
23023     # argument.
23024     path="$complete"
23025     arguments="EOL"
23026     new_path="$path"
23027 
23028   windows_path="$new_path"
23029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23030     unix_path=`$CYGPATH -u "$windows_path"`
23031     new_path="$unix_path"
23032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23034     new_path="$unix_path"
23035   fi
23036 
23037 
23038     new_path=`$WHICH "$new_path" 2> /dev/null`
23039 
23040     if test "x$new_path" = x; then
23041       # It's still not found. Now this is an unrecoverable error.
23042       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23043 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23044       has_space=`$ECHO "$complete" | $GREP " "`
23045       if test "x$has_space" != x; then
23046         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23047 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23048       fi
23049       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23050     fi
23051   fi
23052 
23053   # Now new_path has a complete unix path to the binary
23054   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23055     # Keep paths in /bin as-is, but remove trailing .exe if any
23056     new_path="${new_path/%.exe/}"
23057     # Do not save /bin paths to all_fixpath_prefixes!
23058   else
23059     # Not in mixed or Windows style, start by that.
23060     new_path=`cmd //c echo $new_path`
23061 
23062   input_path="$new_path"
23063   # Check if we need to convert this using DOS-style short mode. If the path
23064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23065   # take no chances and rewrite it.
23066   # Note: m4 eats our [], so we need to use [ and ] instead.
23067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23068   if test "x$has_forbidden_chars" != x; then
23069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23070     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23071   fi
23072 
23073     # Output is in $new_path
23074 
23075   windows_path="$new_path"
23076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23077     unix_path=`$CYGPATH -u "$windows_path"`
23078     new_path="$unix_path"
23079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23081     new_path="$unix_path"
23082   fi
23083 
23084     # remove trailing .exe if any
23085     new_path="${new_path/%.exe/}"
23086 
23087     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23088     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23089   fi
23090 
23091   else
23092     # We're on a posix platform. Hooray! :)
23093     # First separate the path from the arguments. This will split at the first
23094     # space.
23095     complete="$AR"
23096     path="${complete%% *}"
23097     tmp="$complete EOL"
23098     arguments="${tmp#* }"
23099 
23100     # Cannot rely on the command "which" here since it doesn't always work.
23101     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23102     if test -z "$is_absolute_path"; then
23103       # Path to executable is not absolute. Find it.
23104       IFS_save="$IFS"
23105       IFS=:
23106       for p in $PATH; do
23107         if test -f "$p/$path" && test -x "$p/$path"; then
23108           new_path="$p/$path"
23109           break
23110         fi
23111       done
23112       IFS="$IFS_save"
23113     else
23114       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
23115 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
23116       new_path="$path"
23117     fi
23118 
23119     if test "x$new_path" = x; then
23120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23121 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23122       has_space=`$ECHO "$complete" | $GREP " "`
23123       if test "x$has_space" != x; then
23124         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23125 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23126       fi
23127       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23128     fi
23129   fi
23130 
23131   # Now join together the path and the arguments once again
23132   if test "x$arguments" != xEOL; then
23133     new_complete="$new_path ${arguments% *}"
23134   else
23135     new_complete="$new_path"
23136   fi
23137 
23138   if test "x$complete" != "x$new_complete"; then
23139     AR="$new_complete"
23140     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23141 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23142   fi
23143 
23144   fi
23145   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23146     ARFLAGS="-r"
23147   elif test "x$OPENJDK_TARGET_OS" = xaix; then
23148     ARFLAGS="-X64"
23149   else
23150     ARFLAGS=""
23151   fi
23152 
23153 
23154   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
23155   HOTSPOT_CXX="$CXX"
23156   HOTSPOT_LD="$LD"
23157 
23158 
23159 
23160   COMPILER_NAME=gcc
23161   COMPILER_TYPE=CC
23162   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23163 
23164     # For now, assume that we are always compiling using cl.exe.
23165     CC_OUT_OPTION=-Fo
23166     EXE_OUT_OPTION=-out:
23167     LD_OUT_OPTION=-out:
23168     AR_OUT_OPTION=-out:
23169     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23170     # program for something completely different.
23171     # Extract the first word of "link", so it can be a program name with args.
23172 set dummy link; ac_word=$2
23173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23174 $as_echo_n "checking for $ac_word... " >&6; }
23175 if ${ac_cv_prog_WINLD+:} false; then :
23176   $as_echo_n "(cached) " >&6
23177 else
23178   if test -n "$WINLD"; then
23179   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23180 else
23181   ac_prog_rejected=no
23182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23183 for as_dir in $PATH
23184 do
23185   IFS=$as_save_IFS
23186   test -z "$as_dir" && as_dir=.
23187     for ac_exec_ext in '' $ac_executable_extensions; do
23188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23189     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23190        ac_prog_rejected=yes
23191        continue
23192      fi
23193     ac_cv_prog_WINLD="link"
23194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23195     break 2
23196   fi
23197 done
23198   done
23199 IFS=$as_save_IFS
23200 
23201 if test $ac_prog_rejected = yes; then
23202   # We found a bogon in the path, so make sure we never use it.
23203   set dummy $ac_cv_prog_WINLD
23204   shift
23205   if test $# != 0; then
23206     # We chose a different compiler from the bogus one.
23207     # However, it has the same basename, so the bogon will be chosen
23208     # first if we set WINLD to just the basename; use the full file name.
23209     shift
23210     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23211   fi
23212 fi
23213 fi
23214 fi
23215 WINLD=$ac_cv_prog_WINLD
23216 if test -n "$WINLD"; then
23217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23218 $as_echo "$WINLD" >&6; }
23219 else
23220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23221 $as_echo "no" >&6; }
23222 fi
23223 
23224 
23225     # Since we must ignore the first found link, WINLD will contain
23226     # the full path to the link.exe program.
23227 
23228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23229 
23230   # First separate the path from the arguments. This will split at the first
23231   # space.
23232   complete="$WINLD"
23233   path="${complete%% *}"
23234   tmp="$complete EOL"
23235   arguments="${tmp#* }"
23236 
23237   # Input might be given as Windows format, start by converting to
23238   # unix format.
23239   new_path=`$CYGPATH -u "$path"`
23240 
23241   # Now try to locate executable using which
23242   new_path=`$WHICH "$new_path" 2> /dev/null`
23243   # bat and cmd files are not always considered executable in cygwin causing which
23244   # to not find them
23245   if test "x$new_path" = x \
23246       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23247       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23248     new_path=`$CYGPATH -u "$path"`
23249   fi
23250   if test "x$new_path" = x; then
23251     # Oops. Which didn't find the executable.
23252     # The splitting of arguments from the executable at a space might have been incorrect,
23253     # since paths with space are more likely in Windows. Give it another try with the whole
23254     # argument.
23255     path="$complete"
23256     arguments="EOL"
23257     new_path=`$CYGPATH -u "$path"`
23258     new_path=`$WHICH "$new_path" 2> /dev/null`
23259     # bat and cmd files are not always considered executable in cygwin causing which
23260     # to not find them
23261     if test "x$new_path" = x \
23262         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23263         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23264       new_path=`$CYGPATH -u "$path"`
23265     fi
23266     if test "x$new_path" = x; then
23267       # It's still not found. Now this is an unrecoverable error.
23268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23269 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23270       has_space=`$ECHO "$complete" | $GREP " "`
23271       if test "x$has_space" != x; then
23272         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23273 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23274       fi
23275       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23276     fi
23277   fi
23278 
23279   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23280   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23281   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23282   # "foo.exe" is OK but "foo" is an error.
23283   #
23284   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23285   # It is also a way to make sure we got the proper file name for the real test later on.
23286   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23287   if test "x$test_shortpath" = x; then
23288     # Short path failed, file does not exist as specified.
23289     # Try adding .exe or .cmd
23290     if test -f "${new_path}.exe"; then
23291       input_to_shortpath="${new_path}.exe"
23292     elif test -f "${new_path}.cmd"; then
23293       input_to_shortpath="${new_path}.cmd"
23294     else
23295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23296 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23297       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23298 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23299       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23300     fi
23301   else
23302     input_to_shortpath="$new_path"
23303   fi
23304 
23305   # Call helper function which possibly converts this using DOS-style short mode.
23306   # If so, the updated path is stored in $new_path.
23307   new_path="$input_to_shortpath"
23308 
23309   input_path="$input_to_shortpath"
23310   # Check if we need to convert this using DOS-style short mode. If the path
23311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23312   # take no chances and rewrite it.
23313   # Note: m4 eats our [], so we need to use [ and ] instead.
23314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23315   if test "x$has_forbidden_chars" != x; then
23316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23320       # Going to short mode and back again did indeed matter. Since short mode is
23321       # case insensitive, let's make it lowercase to improve readability.
23322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23323       # Now convert it back to Unix-stile (cygpath)
23324       input_path=`$CYGPATH -u "$shortmode_path"`
23325       new_path="$input_path"
23326     fi
23327   fi
23328 
23329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23330   if test "x$test_cygdrive_prefix" = x; then
23331     # As a simple fix, exclude /usr/bin since it's not a real path.
23332     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23334       # a path prefixed by /cygdrive for fixpath to work.
23335       new_path="$CYGWIN_ROOT_PATH$input_path"
23336     fi
23337   fi
23338 
23339   # remove trailing .exe if any
23340   new_path="${new_path/%.exe/}"
23341 
23342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23343 
23344   # First separate the path from the arguments. This will split at the first
23345   # space.
23346   complete="$WINLD"
23347   path="${complete%% *}"
23348   tmp="$complete EOL"
23349   arguments="${tmp#* }"
23350 
23351   # Input might be given as Windows format, start by converting to
23352   # unix format.
23353   new_path="$path"
23354 
23355   windows_path="$new_path"
23356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23357     unix_path=`$CYGPATH -u "$windows_path"`
23358     new_path="$unix_path"
23359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23361     new_path="$unix_path"
23362   fi
23363 
23364 
23365   # Now try to locate executable using which
23366   new_path=`$WHICH "$new_path" 2> /dev/null`
23367 
23368   if test "x$new_path" = x; then
23369     # Oops. Which didn't find the executable.
23370     # The splitting of arguments from the executable at a space might have been incorrect,
23371     # since paths with space are more likely in Windows. Give it another try with the whole
23372     # argument.
23373     path="$complete"
23374     arguments="EOL"
23375     new_path="$path"
23376 
23377   windows_path="$new_path"
23378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23379     unix_path=`$CYGPATH -u "$windows_path"`
23380     new_path="$unix_path"
23381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23383     new_path="$unix_path"
23384   fi
23385 
23386 
23387     new_path=`$WHICH "$new_path" 2> /dev/null`
23388 
23389     if test "x$new_path" = x; then
23390       # It's still not found. Now this is an unrecoverable error.
23391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23392 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23393       has_space=`$ECHO "$complete" | $GREP " "`
23394       if test "x$has_space" != x; then
23395         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23396 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23397       fi
23398       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23399     fi
23400   fi
23401 
23402   # Now new_path has a complete unix path to the binary
23403   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23404     # Keep paths in /bin as-is, but remove trailing .exe if any
23405     new_path="${new_path/%.exe/}"
23406     # Do not save /bin paths to all_fixpath_prefixes!
23407   else
23408     # Not in mixed or Windows style, start by that.
23409     new_path=`cmd //c echo $new_path`
23410 
23411   input_path="$new_path"
23412   # Check if we need to convert this using DOS-style short mode. If the path
23413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23414   # take no chances and rewrite it.
23415   # Note: m4 eats our [], so we need to use [ and ] instead.
23416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23417   if test "x$has_forbidden_chars" != x; then
23418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23420   fi
23421 
23422     # Output is in $new_path
23423 
23424   windows_path="$new_path"
23425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23426     unix_path=`$CYGPATH -u "$windows_path"`
23427     new_path="$unix_path"
23428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23430     new_path="$unix_path"
23431   fi
23432 
23433     # remove trailing .exe if any
23434     new_path="${new_path/%.exe/}"
23435 
23436     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23437     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23438   fi
23439 
23440   else
23441     # We're on a posix platform. Hooray! :)
23442     # First separate the path from the arguments. This will split at the first
23443     # space.
23444     complete="$WINLD"
23445     path="${complete%% *}"
23446     tmp="$complete EOL"
23447     arguments="${tmp#* }"
23448 
23449     # Cannot rely on the command "which" here since it doesn't always work.
23450     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23451     if test -z "$is_absolute_path"; then
23452       # Path to executable is not absolute. Find it.
23453       IFS_save="$IFS"
23454       IFS=:
23455       for p in $PATH; do
23456         if test -f "$p/$path" && test -x "$p/$path"; then
23457           new_path="$p/$path"
23458           break
23459         fi
23460       done
23461       IFS="$IFS_save"
23462     else
23463       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23464 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23465       new_path="$path"
23466     fi
23467 
23468     if test "x$new_path" = x; then
23469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23470 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23471       has_space=`$ECHO "$complete" | $GREP " "`
23472       if test "x$has_space" != x; then
23473         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23474 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23475       fi
23476       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23477     fi
23478   fi
23479 
23480   # Now join together the path and the arguments once again
23481   if test "x$arguments" != xEOL; then
23482     new_complete="$new_path ${arguments% *}"
23483   else
23484     new_complete="$new_path"
23485   fi
23486 
23487   if test "x$complete" != "x$new_complete"; then
23488     WINLD="$new_complete"
23489     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23490 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23491   fi
23492 
23493     printf "Windows linker was found at $WINLD\n"
23494     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23495 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23496     "$WINLD" --version > /dev/null
23497     if test $? -eq 0 ; then
23498       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23499 $as_echo "no" >&6; }
23500       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23501     else
23502       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23503 $as_echo "yes" >&6; }
23504     fi
23505     LD="$WINLD"
23506     LDEXE="$WINLD"
23507     LDCXX="$WINLD"
23508     LDEXECXX="$WINLD"
23509 
23510     # Extract the first word of "mt", so it can be a program name with args.
23511 set dummy mt; ac_word=$2
23512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23513 $as_echo_n "checking for $ac_word... " >&6; }
23514 if ${ac_cv_prog_MT+:} false; then :
23515   $as_echo_n "(cached) " >&6
23516 else
23517   if test -n "$MT"; then
23518   ac_cv_prog_MT="$MT" # Let the user override the test.
23519 else
23520   ac_prog_rejected=no
23521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23522 for as_dir in $PATH
23523 do
23524   IFS=$as_save_IFS
23525   test -z "$as_dir" && as_dir=.
23526     for ac_exec_ext in '' $ac_executable_extensions; do
23527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23528     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23529        ac_prog_rejected=yes
23530        continue
23531      fi
23532     ac_cv_prog_MT="mt"
23533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23534     break 2
23535   fi
23536 done
23537   done
23538 IFS=$as_save_IFS
23539 
23540 if test $ac_prog_rejected = yes; then
23541   # We found a bogon in the path, so make sure we never use it.
23542   set dummy $ac_cv_prog_MT
23543   shift
23544   if test $# != 0; then
23545     # We chose a different compiler from the bogus one.
23546     # However, it has the same basename, so the bogon will be chosen
23547     # first if we set MT to just the basename; use the full file name.
23548     shift
23549     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23550   fi
23551 fi
23552 fi
23553 fi
23554 MT=$ac_cv_prog_MT
23555 if test -n "$MT"; then
23556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23557 $as_echo "$MT" >&6; }
23558 else
23559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23560 $as_echo "no" >&6; }
23561 fi
23562 
23563 
23564 
23565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23566 
23567   # First separate the path from the arguments. This will split at the first
23568   # space.
23569   complete="$MT"
23570   path="${complete%% *}"
23571   tmp="$complete EOL"
23572   arguments="${tmp#* }"
23573 
23574   # Input might be given as Windows format, start by converting to
23575   # unix format.
23576   new_path=`$CYGPATH -u "$path"`
23577 
23578   # Now try to locate executable using which
23579   new_path=`$WHICH "$new_path" 2> /dev/null`
23580   # bat and cmd files are not always considered executable in cygwin causing which
23581   # to not find them
23582   if test "x$new_path" = x \
23583       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23584       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23585     new_path=`$CYGPATH -u "$path"`
23586   fi
23587   if test "x$new_path" = x; then
23588     # Oops. Which didn't find the executable.
23589     # The splitting of arguments from the executable at a space might have been incorrect,
23590     # since paths with space are more likely in Windows. Give it another try with the whole
23591     # argument.
23592     path="$complete"
23593     arguments="EOL"
23594     new_path=`$CYGPATH -u "$path"`
23595     new_path=`$WHICH "$new_path" 2> /dev/null`
23596     # bat and cmd files are not always considered executable in cygwin causing which
23597     # to not find them
23598     if test "x$new_path" = x \
23599         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23600         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23601       new_path=`$CYGPATH -u "$path"`
23602     fi
23603     if test "x$new_path" = x; then
23604       # It's still not found. Now this is an unrecoverable error.
23605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23606 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23607       has_space=`$ECHO "$complete" | $GREP " "`
23608       if test "x$has_space" != x; then
23609         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23610 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23611       fi
23612       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23613     fi
23614   fi
23615 
23616   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23617   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23618   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23619   # "foo.exe" is OK but "foo" is an error.
23620   #
23621   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23622   # It is also a way to make sure we got the proper file name for the real test later on.
23623   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23624   if test "x$test_shortpath" = x; then
23625     # Short path failed, file does not exist as specified.
23626     # Try adding .exe or .cmd
23627     if test -f "${new_path}.exe"; then
23628       input_to_shortpath="${new_path}.exe"
23629     elif test -f "${new_path}.cmd"; then
23630       input_to_shortpath="${new_path}.cmd"
23631     else
23632       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23633 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23634       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23635 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23636       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23637     fi
23638   else
23639     input_to_shortpath="$new_path"
23640   fi
23641 
23642   # Call helper function which possibly converts this using DOS-style short mode.
23643   # If so, the updated path is stored in $new_path.
23644   new_path="$input_to_shortpath"
23645 
23646   input_path="$input_to_shortpath"
23647   # Check if we need to convert this using DOS-style short mode. If the path
23648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23649   # take no chances and rewrite it.
23650   # Note: m4 eats our [], so we need to use [ and ] instead.
23651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23652   if test "x$has_forbidden_chars" != x; then
23653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23654     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23655     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23656     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23657       # Going to short mode and back again did indeed matter. Since short mode is
23658       # case insensitive, let's make it lowercase to improve readability.
23659       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23660       # Now convert it back to Unix-stile (cygpath)
23661       input_path=`$CYGPATH -u "$shortmode_path"`
23662       new_path="$input_path"
23663     fi
23664   fi
23665 
23666   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23667   if test "x$test_cygdrive_prefix" = x; then
23668     # As a simple fix, exclude /usr/bin since it's not a real path.
23669     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23670       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23671       # a path prefixed by /cygdrive for fixpath to work.
23672       new_path="$CYGWIN_ROOT_PATH$input_path"
23673     fi
23674   fi
23675 
23676   # remove trailing .exe if any
23677   new_path="${new_path/%.exe/}"
23678 
23679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23680 
23681   # First separate the path from the arguments. This will split at the first
23682   # space.
23683   complete="$MT"
23684   path="${complete%% *}"
23685   tmp="$complete EOL"
23686   arguments="${tmp#* }"
23687 
23688   # Input might be given as Windows format, start by converting to
23689   # unix format.
23690   new_path="$path"
23691 
23692   windows_path="$new_path"
23693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23694     unix_path=`$CYGPATH -u "$windows_path"`
23695     new_path="$unix_path"
23696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23698     new_path="$unix_path"
23699   fi
23700 
23701 
23702   # Now try to locate executable using which
23703   new_path=`$WHICH "$new_path" 2> /dev/null`
23704 
23705   if test "x$new_path" = x; then
23706     # Oops. Which didn't find the executable.
23707     # The splitting of arguments from the executable at a space might have been incorrect,
23708     # since paths with space are more likely in Windows. Give it another try with the whole
23709     # argument.
23710     path="$complete"
23711     arguments="EOL"
23712     new_path="$path"
23713 
23714   windows_path="$new_path"
23715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23716     unix_path=`$CYGPATH -u "$windows_path"`
23717     new_path="$unix_path"
23718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23720     new_path="$unix_path"
23721   fi
23722 
23723 
23724     new_path=`$WHICH "$new_path" 2> /dev/null`
23725 
23726     if test "x$new_path" = x; then
23727       # It's still not found. Now this is an unrecoverable error.
23728       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23729 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23730       has_space=`$ECHO "$complete" | $GREP " "`
23731       if test "x$has_space" != x; then
23732         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23733 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23734       fi
23735       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23736     fi
23737   fi
23738 
23739   # Now new_path has a complete unix path to the binary
23740   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23741     # Keep paths in /bin as-is, but remove trailing .exe if any
23742     new_path="${new_path/%.exe/}"
23743     # Do not save /bin paths to all_fixpath_prefixes!
23744   else
23745     # Not in mixed or Windows style, start by that.
23746     new_path=`cmd //c echo $new_path`
23747 
23748   input_path="$new_path"
23749   # Check if we need to convert this using DOS-style short mode. If the path
23750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23751   # take no chances and rewrite it.
23752   # Note: m4 eats our [], so we need to use [ and ] instead.
23753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23754   if test "x$has_forbidden_chars" != x; then
23755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23756     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23757   fi
23758 
23759     # Output is in $new_path
23760 
23761   windows_path="$new_path"
23762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23763     unix_path=`$CYGPATH -u "$windows_path"`
23764     new_path="$unix_path"
23765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23767     new_path="$unix_path"
23768   fi
23769 
23770     # remove trailing .exe if any
23771     new_path="${new_path/%.exe/}"
23772 
23773     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23774     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23775   fi
23776 
23777   else
23778     # We're on a posix platform. Hooray! :)
23779     # First separate the path from the arguments. This will split at the first
23780     # space.
23781     complete="$MT"
23782     path="${complete%% *}"
23783     tmp="$complete EOL"
23784     arguments="${tmp#* }"
23785 
23786     # Cannot rely on the command "which" here since it doesn't always work.
23787     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23788     if test -z "$is_absolute_path"; then
23789       # Path to executable is not absolute. Find it.
23790       IFS_save="$IFS"
23791       IFS=:
23792       for p in $PATH; do
23793         if test -f "$p/$path" && test -x "$p/$path"; then
23794           new_path="$p/$path"
23795           break
23796         fi
23797       done
23798       IFS="$IFS_save"
23799     else
23800       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23801 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23802       new_path="$path"
23803     fi
23804 
23805     if test "x$new_path" = x; then
23806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23807 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23808       has_space=`$ECHO "$complete" | $GREP " "`
23809       if test "x$has_space" != x; then
23810         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23811 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23812       fi
23813       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23814     fi
23815   fi
23816 
23817   # Now join together the path and the arguments once again
23818   if test "x$arguments" != xEOL; then
23819     new_complete="$new_path ${arguments% *}"
23820   else
23821     new_complete="$new_path"
23822   fi
23823 
23824   if test "x$complete" != "x$new_complete"; then
23825     MT="$new_complete"
23826     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23827 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23828   fi
23829 
23830     # The resource compiler
23831     # Extract the first word of "rc", so it can be a program name with args.
23832 set dummy rc; ac_word=$2
23833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23834 $as_echo_n "checking for $ac_word... " >&6; }
23835 if ${ac_cv_prog_RC+:} false; then :
23836   $as_echo_n "(cached) " >&6
23837 else
23838   if test -n "$RC"; then
23839   ac_cv_prog_RC="$RC" # Let the user override the test.
23840 else
23841   ac_prog_rejected=no
23842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23843 for as_dir in $PATH
23844 do
23845   IFS=$as_save_IFS
23846   test -z "$as_dir" && as_dir=.
23847     for ac_exec_ext in '' $ac_executable_extensions; do
23848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23849     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23850        ac_prog_rejected=yes
23851        continue
23852      fi
23853     ac_cv_prog_RC="rc"
23854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23855     break 2
23856   fi
23857 done
23858   done
23859 IFS=$as_save_IFS
23860 
23861 if test $ac_prog_rejected = yes; then
23862   # We found a bogon in the path, so make sure we never use it.
23863   set dummy $ac_cv_prog_RC
23864   shift
23865   if test $# != 0; then
23866     # We chose a different compiler from the bogus one.
23867     # However, it has the same basename, so the bogon will be chosen
23868     # first if we set RC to just the basename; use the full file name.
23869     shift
23870     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23871   fi
23872 fi
23873 fi
23874 fi
23875 RC=$ac_cv_prog_RC
23876 if test -n "$RC"; then
23877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23878 $as_echo "$RC" >&6; }
23879 else
23880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23881 $as_echo "no" >&6; }
23882 fi
23883 
23884 
23885 
23886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23887 
23888   # First separate the path from the arguments. This will split at the first
23889   # space.
23890   complete="$RC"
23891   path="${complete%% *}"
23892   tmp="$complete EOL"
23893   arguments="${tmp#* }"
23894 
23895   # Input might be given as Windows format, start by converting to
23896   # unix format.
23897   new_path=`$CYGPATH -u "$path"`
23898 
23899   # Now try to locate executable using which
23900   new_path=`$WHICH "$new_path" 2> /dev/null`
23901   # bat and cmd files are not always considered executable in cygwin causing which
23902   # to not find them
23903   if test "x$new_path" = x \
23904       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23905       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23906     new_path=`$CYGPATH -u "$path"`
23907   fi
23908   if test "x$new_path" = x; then
23909     # Oops. Which didn't find the executable.
23910     # The splitting of arguments from the executable at a space might have been incorrect,
23911     # since paths with space are more likely in Windows. Give it another try with the whole
23912     # argument.
23913     path="$complete"
23914     arguments="EOL"
23915     new_path=`$CYGPATH -u "$path"`
23916     new_path=`$WHICH "$new_path" 2> /dev/null`
23917     # bat and cmd files are not always considered executable in cygwin causing which
23918     # to not find them
23919     if test "x$new_path" = x \
23920         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23921         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23922       new_path=`$CYGPATH -u "$path"`
23923     fi
23924     if test "x$new_path" = x; then
23925       # It's still not found. Now this is an unrecoverable error.
23926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23927 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23928       has_space=`$ECHO "$complete" | $GREP " "`
23929       if test "x$has_space" != x; then
23930         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23931 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23932       fi
23933       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23934     fi
23935   fi
23936 
23937   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23938   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23939   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23940   # "foo.exe" is OK but "foo" is an error.
23941   #
23942   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23943   # It is also a way to make sure we got the proper file name for the real test later on.
23944   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23945   if test "x$test_shortpath" = x; then
23946     # Short path failed, file does not exist as specified.
23947     # Try adding .exe or .cmd
23948     if test -f "${new_path}.exe"; then
23949       input_to_shortpath="${new_path}.exe"
23950     elif test -f "${new_path}.cmd"; then
23951       input_to_shortpath="${new_path}.cmd"
23952     else
23953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23954 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23955       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23956 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23957       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23958     fi
23959   else
23960     input_to_shortpath="$new_path"
23961   fi
23962 
23963   # Call helper function which possibly converts this using DOS-style short mode.
23964   # If so, the updated path is stored in $new_path.
23965   new_path="$input_to_shortpath"
23966 
23967   input_path="$input_to_shortpath"
23968   # Check if we need to convert this using DOS-style short mode. If the path
23969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23970   # take no chances and rewrite it.
23971   # Note: m4 eats our [], so we need to use [ and ] instead.
23972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23973   if test "x$has_forbidden_chars" != x; then
23974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23975     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23976     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23977     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23978       # Going to short mode and back again did indeed matter. Since short mode is
23979       # case insensitive, let's make it lowercase to improve readability.
23980       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23981       # Now convert it back to Unix-stile (cygpath)
23982       input_path=`$CYGPATH -u "$shortmode_path"`
23983       new_path="$input_path"
23984     fi
23985   fi
23986 
23987   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23988   if test "x$test_cygdrive_prefix" = x; then
23989     # As a simple fix, exclude /usr/bin since it's not a real path.
23990     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23991       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23992       # a path prefixed by /cygdrive for fixpath to work.
23993       new_path="$CYGWIN_ROOT_PATH$input_path"
23994     fi
23995   fi
23996 
23997   # remove trailing .exe if any
23998   new_path="${new_path/%.exe/}"
23999 
24000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24001 
24002   # First separate the path from the arguments. This will split at the first
24003   # space.
24004   complete="$RC"
24005   path="${complete%% *}"
24006   tmp="$complete EOL"
24007   arguments="${tmp#* }"
24008 
24009   # Input might be given as Windows format, start by converting to
24010   # unix format.
24011   new_path="$path"
24012 
24013   windows_path="$new_path"
24014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24015     unix_path=`$CYGPATH -u "$windows_path"`
24016     new_path="$unix_path"
24017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24019     new_path="$unix_path"
24020   fi
24021 
24022 
24023   # Now try to locate executable using which
24024   new_path=`$WHICH "$new_path" 2> /dev/null`
24025 
24026   if test "x$new_path" = x; then
24027     # Oops. Which didn't find the executable.
24028     # The splitting of arguments from the executable at a space might have been incorrect,
24029     # since paths with space are more likely in Windows. Give it another try with the whole
24030     # argument.
24031     path="$complete"
24032     arguments="EOL"
24033     new_path="$path"
24034 
24035   windows_path="$new_path"
24036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24037     unix_path=`$CYGPATH -u "$windows_path"`
24038     new_path="$unix_path"
24039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24041     new_path="$unix_path"
24042   fi
24043 
24044 
24045     new_path=`$WHICH "$new_path" 2> /dev/null`
24046 
24047     if test "x$new_path" = x; then
24048       # It's still not found. Now this is an unrecoverable error.
24049       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24050 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24051       has_space=`$ECHO "$complete" | $GREP " "`
24052       if test "x$has_space" != x; then
24053         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24054 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24055       fi
24056       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24057     fi
24058   fi
24059 
24060   # Now new_path has a complete unix path to the binary
24061   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24062     # Keep paths in /bin as-is, but remove trailing .exe if any
24063     new_path="${new_path/%.exe/}"
24064     # Do not save /bin paths to all_fixpath_prefixes!
24065   else
24066     # Not in mixed or Windows style, start by that.
24067     new_path=`cmd //c echo $new_path`
24068 
24069   input_path="$new_path"
24070   # Check if we need to convert this using DOS-style short mode. If the path
24071   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24072   # take no chances and rewrite it.
24073   # Note: m4 eats our [], so we need to use [ and ] instead.
24074   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24075   if test "x$has_forbidden_chars" != x; then
24076     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24077     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24078   fi
24079 
24080     # Output is in $new_path
24081 
24082   windows_path="$new_path"
24083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24084     unix_path=`$CYGPATH -u "$windows_path"`
24085     new_path="$unix_path"
24086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24088     new_path="$unix_path"
24089   fi
24090 
24091     # remove trailing .exe if any
24092     new_path="${new_path/%.exe/}"
24093 
24094     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24095     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24096   fi
24097 
24098   else
24099     # We're on a posix platform. Hooray! :)
24100     # First separate the path from the arguments. This will split at the first
24101     # space.
24102     complete="$RC"
24103     path="${complete%% *}"
24104     tmp="$complete EOL"
24105     arguments="${tmp#* }"
24106 
24107     # Cannot rely on the command "which" here since it doesn't always work.
24108     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24109     if test -z "$is_absolute_path"; then
24110       # Path to executable is not absolute. Find it.
24111       IFS_save="$IFS"
24112       IFS=:
24113       for p in $PATH; do
24114         if test -f "$p/$path" && test -x "$p/$path"; then
24115           new_path="$p/$path"
24116           break
24117         fi
24118       done
24119       IFS="$IFS_save"
24120     else
24121       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
24122 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
24123       new_path="$path"
24124     fi
24125 
24126     if test "x$new_path" = x; then
24127       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24128 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24129       has_space=`$ECHO "$complete" | $GREP " "`
24130       if test "x$has_space" != x; then
24131         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24132 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24133       fi
24134       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24135     fi
24136   fi
24137 
24138   # Now join together the path and the arguments once again
24139   if test "x$arguments" != xEOL; then
24140     new_complete="$new_path ${arguments% *}"
24141   else
24142     new_complete="$new_path"
24143   fi
24144 
24145   if test "x$complete" != "x$new_complete"; then
24146     RC="$new_complete"
24147     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24148 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24149   fi
24150 
24151 
24152     # For hotspot, we need these in Windows mixed path,
24153     # so rewrite them all. Need added .exe suffix.
24154     HOTSPOT_CXX="$CXX.exe"
24155     HOTSPOT_LD="$LD.exe"
24156     HOTSPOT_MT="$MT.exe"
24157     HOTSPOT_RC="$RC.exe"
24158 
24159   unix_path="$HOTSPOT_CXX"
24160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24161     windows_path=`$CYGPATH -m "$unix_path"`
24162     HOTSPOT_CXX="$windows_path"
24163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24164     windows_path=`cmd //c echo $unix_path`
24165     HOTSPOT_CXX="$windows_path"
24166   fi
24167 
24168 
24169   unix_path="$HOTSPOT_LD"
24170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24171     windows_path=`$CYGPATH -m "$unix_path"`
24172     HOTSPOT_LD="$windows_path"
24173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24174     windows_path=`cmd //c echo $unix_path`
24175     HOTSPOT_LD="$windows_path"
24176   fi
24177 
24178 
24179   unix_path="$HOTSPOT_MT"
24180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24181     windows_path=`$CYGPATH -m "$unix_path"`
24182     HOTSPOT_MT="$windows_path"
24183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24184     windows_path=`cmd //c echo $unix_path`
24185     HOTSPOT_MT="$windows_path"
24186   fi
24187 
24188 
24189   unix_path="$HOTSPOT_RC"
24190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24191     windows_path=`$CYGPATH -m "$unix_path"`
24192     HOTSPOT_RC="$windows_path"
24193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24194     windows_path=`cmd //c echo $unix_path`
24195     HOTSPOT_RC="$windows_path"
24196   fi
24197 
24198 
24199 
24200 
24201     RC_FLAGS="-nologo -l 0x409 -r"
24202     if test "x$VARIANT" = xOPT; then :
24203 
24204     RC_FLAGS="$RC_FLAGS -d NDEBUG"
24205 
24206 fi
24207 
24208   # The version variables used to create RC_FLAGS may be overridden
24209   # in a custom configure script, or possibly the command line.
24210   # Let those variables be expanded at make time in spec.gmk.
24211   # The \$ are escaped to the shell, and the $(...) variables
24212   # are evaluated by make.
24213   RC_FLAGS="$RC_FLAGS \
24214       -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
24215       -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
24216       -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
24217       -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(COOKED_JDK_UPDATE_VERSION).\$(COOKED_BUILD_NUMBER)\" \
24218       -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
24219       -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
24220       -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(COOKED_JDK_UPDATE_VERSION),\$(COOKED_BUILD_NUMBER)\""
24221 
24222   # lib.exe is used to create static libraries.
24223   # Extract the first word of "lib", so it can be a program name with args.
24224 set dummy lib; ac_word=$2
24225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24226 $as_echo_n "checking for $ac_word... " >&6; }
24227 if ${ac_cv_prog_WINAR+:} false; then :
24228   $as_echo_n "(cached) " >&6
24229 else
24230   if test -n "$WINAR"; then
24231   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24232 else
24233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24234 for as_dir in $PATH
24235 do
24236   IFS=$as_save_IFS
24237   test -z "$as_dir" && as_dir=.
24238     for ac_exec_ext in '' $ac_executable_extensions; do
24239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24240     ac_cv_prog_WINAR="lib"
24241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24242     break 2
24243   fi
24244 done
24245   done
24246 IFS=$as_save_IFS
24247 
24248 fi
24249 fi
24250 WINAR=$ac_cv_prog_WINAR
24251 if test -n "$WINAR"; then
24252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24253 $as_echo "$WINAR" >&6; }
24254 else
24255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24256 $as_echo "no" >&6; }
24257 fi
24258 
24259 
24260 
24261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24262 
24263   # First separate the path from the arguments. This will split at the first
24264   # space.
24265   complete="$WINAR"
24266   path="${complete%% *}"
24267   tmp="$complete EOL"
24268   arguments="${tmp#* }"
24269 
24270   # Input might be given as Windows format, start by converting to
24271   # unix format.
24272   new_path=`$CYGPATH -u "$path"`
24273 
24274   # Now try to locate executable using which
24275   new_path=`$WHICH "$new_path" 2> /dev/null`
24276   # bat and cmd files are not always considered executable in cygwin causing which
24277   # to not find them
24278   if test "x$new_path" = x \
24279       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24280       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24281     new_path=`$CYGPATH -u "$path"`
24282   fi
24283   if test "x$new_path" = x; then
24284     # Oops. Which didn't find the executable.
24285     # The splitting of arguments from the executable at a space might have been incorrect,
24286     # since paths with space are more likely in Windows. Give it another try with the whole
24287     # argument.
24288     path="$complete"
24289     arguments="EOL"
24290     new_path=`$CYGPATH -u "$path"`
24291     new_path=`$WHICH "$new_path" 2> /dev/null`
24292     # bat and cmd files are not always considered executable in cygwin causing which
24293     # to not find them
24294     if test "x$new_path" = x \
24295         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24296         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24297       new_path=`$CYGPATH -u "$path"`
24298     fi
24299     if test "x$new_path" = x; then
24300       # It's still not found. Now this is an unrecoverable error.
24301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24302 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24303       has_space=`$ECHO "$complete" | $GREP " "`
24304       if test "x$has_space" != x; then
24305         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24306 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24307       fi
24308       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24309     fi
24310   fi
24311 
24312   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24313   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24314   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24315   # "foo.exe" is OK but "foo" is an error.
24316   #
24317   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24318   # It is also a way to make sure we got the proper file name for the real test later on.
24319   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24320   if test "x$test_shortpath" = x; then
24321     # Short path failed, file does not exist as specified.
24322     # Try adding .exe or .cmd
24323     if test -f "${new_path}.exe"; then
24324       input_to_shortpath="${new_path}.exe"
24325     elif test -f "${new_path}.cmd"; then
24326       input_to_shortpath="${new_path}.cmd"
24327     else
24328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24329 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24330       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24331 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24332       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24333     fi
24334   else
24335     input_to_shortpath="$new_path"
24336   fi
24337 
24338   # Call helper function which possibly converts this using DOS-style short mode.
24339   # If so, the updated path is stored in $new_path.
24340   new_path="$input_to_shortpath"
24341 
24342   input_path="$input_to_shortpath"
24343   # Check if we need to convert this using DOS-style short mode. If the path
24344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24345   # take no chances and rewrite it.
24346   # Note: m4 eats our [], so we need to use [ and ] instead.
24347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24348   if test "x$has_forbidden_chars" != x; then
24349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24350     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24351     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24352     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24353       # Going to short mode and back again did indeed matter. Since short mode is
24354       # case insensitive, let's make it lowercase to improve readability.
24355       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24356       # Now convert it back to Unix-stile (cygpath)
24357       input_path=`$CYGPATH -u "$shortmode_path"`
24358       new_path="$input_path"
24359     fi
24360   fi
24361 
24362   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24363   if test "x$test_cygdrive_prefix" = x; then
24364     # As a simple fix, exclude /usr/bin since it's not a real path.
24365     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24366       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24367       # a path prefixed by /cygdrive for fixpath to work.
24368       new_path="$CYGWIN_ROOT_PATH$input_path"
24369     fi
24370   fi
24371 
24372   # remove trailing .exe if any
24373   new_path="${new_path/%.exe/}"
24374 
24375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24376 
24377   # First separate the path from the arguments. This will split at the first
24378   # space.
24379   complete="$WINAR"
24380   path="${complete%% *}"
24381   tmp="$complete EOL"
24382   arguments="${tmp#* }"
24383 
24384   # Input might be given as Windows format, start by converting to
24385   # unix format.
24386   new_path="$path"
24387 
24388   windows_path="$new_path"
24389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24390     unix_path=`$CYGPATH -u "$windows_path"`
24391     new_path="$unix_path"
24392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24394     new_path="$unix_path"
24395   fi
24396 
24397 
24398   # Now try to locate executable using which
24399   new_path=`$WHICH "$new_path" 2> /dev/null`
24400 
24401   if test "x$new_path" = x; then
24402     # Oops. Which didn't find the executable.
24403     # The splitting of arguments from the executable at a space might have been incorrect,
24404     # since paths with space are more likely in Windows. Give it another try with the whole
24405     # argument.
24406     path="$complete"
24407     arguments="EOL"
24408     new_path="$path"
24409 
24410   windows_path="$new_path"
24411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24412     unix_path=`$CYGPATH -u "$windows_path"`
24413     new_path="$unix_path"
24414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24416     new_path="$unix_path"
24417   fi
24418 
24419 
24420     new_path=`$WHICH "$new_path" 2> /dev/null`
24421 
24422     if test "x$new_path" = x; then
24423       # It's still not found. Now this is an unrecoverable error.
24424       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24425 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24426       has_space=`$ECHO "$complete" | $GREP " "`
24427       if test "x$has_space" != x; then
24428         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24429 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24430       fi
24431       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24432     fi
24433   fi
24434 
24435   # Now new_path has a complete unix path to the binary
24436   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24437     # Keep paths in /bin as-is, but remove trailing .exe if any
24438     new_path="${new_path/%.exe/}"
24439     # Do not save /bin paths to all_fixpath_prefixes!
24440   else
24441     # Not in mixed or Windows style, start by that.
24442     new_path=`cmd //c echo $new_path`
24443 
24444   input_path="$new_path"
24445   # Check if we need to convert this using DOS-style short mode. If the path
24446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24447   # take no chances and rewrite it.
24448   # Note: m4 eats our [], so we need to use [ and ] instead.
24449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24450   if test "x$has_forbidden_chars" != x; then
24451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24452     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24453   fi
24454 
24455     # Output is in $new_path
24456 
24457   windows_path="$new_path"
24458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24459     unix_path=`$CYGPATH -u "$windows_path"`
24460     new_path="$unix_path"
24461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24462     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24463     new_path="$unix_path"
24464   fi
24465 
24466     # remove trailing .exe if any
24467     new_path="${new_path/%.exe/}"
24468 
24469     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24470     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24471   fi
24472 
24473   else
24474     # We're on a posix platform. Hooray! :)
24475     # First separate the path from the arguments. This will split at the first
24476     # space.
24477     complete="$WINAR"
24478     path="${complete%% *}"
24479     tmp="$complete EOL"
24480     arguments="${tmp#* }"
24481 
24482     # Cannot rely on the command "which" here since it doesn't always work.
24483     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24484     if test -z "$is_absolute_path"; then
24485       # Path to executable is not absolute. Find it.
24486       IFS_save="$IFS"
24487       IFS=:
24488       for p in $PATH; do
24489         if test -f "$p/$path" && test -x "$p/$path"; then
24490           new_path="$p/$path"
24491           break
24492         fi
24493       done
24494       IFS="$IFS_save"
24495     else
24496       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24497 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24498       new_path="$path"
24499     fi
24500 
24501     if test "x$new_path" = x; then
24502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24503 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24504       has_space=`$ECHO "$complete" | $GREP " "`
24505       if test "x$has_space" != x; then
24506         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24507 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24508       fi
24509       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24510     fi
24511   fi
24512 
24513   # Now join together the path and the arguments once again
24514   if test "x$arguments" != xEOL; then
24515     new_complete="$new_path ${arguments% *}"
24516   else
24517     new_complete="$new_path"
24518   fi
24519 
24520   if test "x$complete" != "x$new_complete"; then
24521     WINAR="$new_complete"
24522     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24523 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24524   fi
24525 
24526   AR="$WINAR"
24527   ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24528 
24529   # Extract the first word of "dumpbin", so it can be a program name with args.
24530 set dummy dumpbin; ac_word=$2
24531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24532 $as_echo_n "checking for $ac_word... " >&6; }
24533 if ${ac_cv_prog_DUMPBIN+:} false; then :
24534   $as_echo_n "(cached) " >&6
24535 else
24536   if test -n "$DUMPBIN"; then
24537   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24538 else
24539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24540 for as_dir in $PATH
24541 do
24542   IFS=$as_save_IFS
24543   test -z "$as_dir" && as_dir=.
24544     for ac_exec_ext in '' $ac_executable_extensions; do
24545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24546     ac_cv_prog_DUMPBIN="dumpbin"
24547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24548     break 2
24549   fi
24550 done
24551   done
24552 IFS=$as_save_IFS
24553 
24554 fi
24555 fi
24556 DUMPBIN=$ac_cv_prog_DUMPBIN
24557 if test -n "$DUMPBIN"; then
24558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24559 $as_echo "$DUMPBIN" >&6; }
24560 else
24561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24562 $as_echo "no" >&6; }
24563 fi
24564 
24565 
24566 
24567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24568 
24569   # First separate the path from the arguments. This will split at the first
24570   # space.
24571   complete="$DUMPBIN"
24572   path="${complete%% *}"
24573   tmp="$complete EOL"
24574   arguments="${tmp#* }"
24575 
24576   # Input might be given as Windows format, start by converting to
24577   # unix format.
24578   new_path=`$CYGPATH -u "$path"`
24579 
24580   # Now try to locate executable using which
24581   new_path=`$WHICH "$new_path" 2> /dev/null`
24582   # bat and cmd files are not always considered executable in cygwin causing which
24583   # to not find them
24584   if test "x$new_path" = x \
24585       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24586       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24587     new_path=`$CYGPATH -u "$path"`
24588   fi
24589   if test "x$new_path" = x; then
24590     # Oops. Which didn't find the executable.
24591     # The splitting of arguments from the executable at a space might have been incorrect,
24592     # since paths with space are more likely in Windows. Give it another try with the whole
24593     # argument.
24594     path="$complete"
24595     arguments="EOL"
24596     new_path=`$CYGPATH -u "$path"`
24597     new_path=`$WHICH "$new_path" 2> /dev/null`
24598     # bat and cmd files are not always considered executable in cygwin causing which
24599     # to not find them
24600     if test "x$new_path" = x \
24601         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24602         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24603       new_path=`$CYGPATH -u "$path"`
24604     fi
24605     if test "x$new_path" = x; then
24606       # It's still not found. Now this is an unrecoverable error.
24607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24608 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24609       has_space=`$ECHO "$complete" | $GREP " "`
24610       if test "x$has_space" != x; then
24611         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24612 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24613       fi
24614       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24615     fi
24616   fi
24617 
24618   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24619   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24620   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24621   # "foo.exe" is OK but "foo" is an error.
24622   #
24623   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24624   # It is also a way to make sure we got the proper file name for the real test later on.
24625   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24626   if test "x$test_shortpath" = x; then
24627     # Short path failed, file does not exist as specified.
24628     # Try adding .exe or .cmd
24629     if test -f "${new_path}.exe"; then
24630       input_to_shortpath="${new_path}.exe"
24631     elif test -f "${new_path}.cmd"; then
24632       input_to_shortpath="${new_path}.cmd"
24633     else
24634       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24635 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24636       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24637 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24638       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24639     fi
24640   else
24641     input_to_shortpath="$new_path"
24642   fi
24643 
24644   # Call helper function which possibly converts this using DOS-style short mode.
24645   # If so, the updated path is stored in $new_path.
24646   new_path="$input_to_shortpath"
24647 
24648   input_path="$input_to_shortpath"
24649   # Check if we need to convert this using DOS-style short mode. If the path
24650   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24651   # take no chances and rewrite it.
24652   # Note: m4 eats our [], so we need to use [ and ] instead.
24653   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24654   if test "x$has_forbidden_chars" != x; then
24655     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24656     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24657     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24658     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24659       # Going to short mode and back again did indeed matter. Since short mode is
24660       # case insensitive, let's make it lowercase to improve readability.
24661       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24662       # Now convert it back to Unix-stile (cygpath)
24663       input_path=`$CYGPATH -u "$shortmode_path"`
24664       new_path="$input_path"
24665     fi
24666   fi
24667 
24668   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24669   if test "x$test_cygdrive_prefix" = x; then
24670     # As a simple fix, exclude /usr/bin since it's not a real path.
24671     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24672       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24673       # a path prefixed by /cygdrive for fixpath to work.
24674       new_path="$CYGWIN_ROOT_PATH$input_path"
24675     fi
24676   fi
24677 
24678   # remove trailing .exe if any
24679   new_path="${new_path/%.exe/}"
24680 
24681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24682 
24683   # First separate the path from the arguments. This will split at the first
24684   # space.
24685   complete="$DUMPBIN"
24686   path="${complete%% *}"
24687   tmp="$complete EOL"
24688   arguments="${tmp#* }"
24689 
24690   # Input might be given as Windows format, start by converting to
24691   # unix format.
24692   new_path="$path"
24693 
24694   windows_path="$new_path"
24695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24696     unix_path=`$CYGPATH -u "$windows_path"`
24697     new_path="$unix_path"
24698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24700     new_path="$unix_path"
24701   fi
24702 
24703 
24704   # Now try to locate executable using which
24705   new_path=`$WHICH "$new_path" 2> /dev/null`
24706 
24707   if test "x$new_path" = x; then
24708     # Oops. Which didn't find the executable.
24709     # The splitting of arguments from the executable at a space might have been incorrect,
24710     # since paths with space are more likely in Windows. Give it another try with the whole
24711     # argument.
24712     path="$complete"
24713     arguments="EOL"
24714     new_path="$path"
24715 
24716   windows_path="$new_path"
24717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24718     unix_path=`$CYGPATH -u "$windows_path"`
24719     new_path="$unix_path"
24720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24722     new_path="$unix_path"
24723   fi
24724 
24725 
24726     new_path=`$WHICH "$new_path" 2> /dev/null`
24727 
24728     if test "x$new_path" = x; then
24729       # It's still not found. Now this is an unrecoverable error.
24730       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24731 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24732       has_space=`$ECHO "$complete" | $GREP " "`
24733       if test "x$has_space" != x; then
24734         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24735 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24736       fi
24737       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24738     fi
24739   fi
24740 
24741   # Now new_path has a complete unix path to the binary
24742   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24743     # Keep paths in /bin as-is, but remove trailing .exe if any
24744     new_path="${new_path/%.exe/}"
24745     # Do not save /bin paths to all_fixpath_prefixes!
24746   else
24747     # Not in mixed or Windows style, start by that.
24748     new_path=`cmd //c echo $new_path`
24749 
24750   input_path="$new_path"
24751   # Check if we need to convert this using DOS-style short mode. If the path
24752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24753   # take no chances and rewrite it.
24754   # Note: m4 eats our [], so we need to use [ and ] instead.
24755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24756   if test "x$has_forbidden_chars" != x; then
24757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24758     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24759   fi
24760 
24761     # Output is in $new_path
24762 
24763   windows_path="$new_path"
24764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24765     unix_path=`$CYGPATH -u "$windows_path"`
24766     new_path="$unix_path"
24767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24769     new_path="$unix_path"
24770   fi
24771 
24772     # remove trailing .exe if any
24773     new_path="${new_path/%.exe/}"
24774 
24775     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24776     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24777   fi
24778 
24779   else
24780     # We're on a posix platform. Hooray! :)
24781     # First separate the path from the arguments. This will split at the first
24782     # space.
24783     complete="$DUMPBIN"
24784     path="${complete%% *}"
24785     tmp="$complete EOL"
24786     arguments="${tmp#* }"
24787 
24788     # Cannot rely on the command "which" here since it doesn't always work.
24789     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24790     if test -z "$is_absolute_path"; then
24791       # Path to executable is not absolute. Find it.
24792       IFS_save="$IFS"
24793       IFS=:
24794       for p in $PATH; do
24795         if test -f "$p/$path" && test -x "$p/$path"; then
24796           new_path="$p/$path"
24797           break
24798         fi
24799       done
24800       IFS="$IFS_save"
24801     else
24802       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24803 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24804       new_path="$path"
24805     fi
24806 
24807     if test "x$new_path" = x; then
24808       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24809 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24810       has_space=`$ECHO "$complete" | $GREP " "`
24811       if test "x$has_space" != x; then
24812         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24813 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24814       fi
24815       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24816     fi
24817   fi
24818 
24819   # Now join together the path and the arguments once again
24820   if test "x$arguments" != xEOL; then
24821     new_complete="$new_path ${arguments% *}"
24822   else
24823     new_complete="$new_path"
24824   fi
24825 
24826   if test "x$complete" != "x$new_complete"; then
24827     DUMPBIN="$new_complete"
24828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24829 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24830   fi
24831 
24832 
24833       COMPILER_TYPE=CL
24834       CCXXFLAGS="$CCXXFLAGS -nologo"
24835 
24836 fi
24837 
24838 
24839 
24840   ac_ext=c
24841 ac_cpp='$CPP $CPPFLAGS'
24842 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24843 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24844 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24846 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24847 # On Suns, sometimes $CPP names a directory.
24848 if test -n "$CPP" && test -d "$CPP"; then
24849   CPP=
24850 fi
24851 if test -z "$CPP"; then
24852   if ${ac_cv_prog_CPP+:} false; then :
24853   $as_echo_n "(cached) " >&6
24854 else
24855       # Double quotes because CPP needs to be expanded
24856     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24857     do
24858       ac_preproc_ok=false
24859 for ac_c_preproc_warn_flag in '' yes
24860 do
24861   # Use a header file that comes with gcc, so configuring glibc
24862   # with a fresh cross-compiler works.
24863   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24864   # <limits.h> exists even on freestanding compilers.
24865   # On the NeXT, cc -E runs the code through the compiler's parser,
24866   # not just through cpp. "Syntax error" is here to catch this case.
24867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24868 /* end confdefs.h.  */
24869 #ifdef __STDC__
24870 # include <limits.h>
24871 #else
24872 # include <assert.h>
24873 #endif
24874                      Syntax error
24875 _ACEOF
24876 if ac_fn_c_try_cpp "$LINENO"; then :
24877 
24878 else
24879   # Broken: fails on valid input.
24880 continue
24881 fi
24882 rm -f conftest.err conftest.i conftest.$ac_ext
24883 
24884   # OK, works on sane cases.  Now check whether nonexistent headers
24885   # can be detected and how.
24886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24887 /* end confdefs.h.  */
24888 #include <ac_nonexistent.h>
24889 _ACEOF
24890 if ac_fn_c_try_cpp "$LINENO"; then :
24891   # Broken: success on invalid input.
24892 continue
24893 else
24894   # Passes both tests.
24895 ac_preproc_ok=:
24896 break
24897 fi
24898 rm -f conftest.err conftest.i conftest.$ac_ext
24899 
24900 done
24901 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24902 rm -f conftest.i conftest.err conftest.$ac_ext
24903 if $ac_preproc_ok; then :
24904   break
24905 fi
24906 
24907     done
24908     ac_cv_prog_CPP=$CPP
24909 
24910 fi
24911   CPP=$ac_cv_prog_CPP
24912 else
24913   ac_cv_prog_CPP=$CPP
24914 fi
24915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24916 $as_echo "$CPP" >&6; }
24917 ac_preproc_ok=false
24918 for ac_c_preproc_warn_flag in '' yes
24919 do
24920   # Use a header file that comes with gcc, so configuring glibc
24921   # with a fresh cross-compiler works.
24922   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24923   # <limits.h> exists even on freestanding compilers.
24924   # On the NeXT, cc -E runs the code through the compiler's parser,
24925   # not just through cpp. "Syntax error" is here to catch this case.
24926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24927 /* end confdefs.h.  */
24928 #ifdef __STDC__
24929 # include <limits.h>
24930 #else
24931 # include <assert.h>
24932 #endif
24933                      Syntax error
24934 _ACEOF
24935 if ac_fn_c_try_cpp "$LINENO"; then :
24936 
24937 else
24938   # Broken: fails on valid input.
24939 continue
24940 fi
24941 rm -f conftest.err conftest.i conftest.$ac_ext
24942 
24943   # OK, works on sane cases.  Now check whether nonexistent headers
24944   # can be detected and how.
24945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24946 /* end confdefs.h.  */
24947 #include <ac_nonexistent.h>
24948 _ACEOF
24949 if ac_fn_c_try_cpp "$LINENO"; then :
24950   # Broken: success on invalid input.
24951 continue
24952 else
24953   # Passes both tests.
24954 ac_preproc_ok=:
24955 break
24956 fi
24957 rm -f conftest.err conftest.i conftest.$ac_ext
24958 
24959 done
24960 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24961 rm -f conftest.i conftest.err conftest.$ac_ext
24962 if $ac_preproc_ok; then :
24963 
24964 else
24965   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24966 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24967 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24968 See \`config.log' for more details" "$LINENO" 5; }
24969 fi
24970 
24971 ac_ext=cpp
24972 ac_cpp='$CXXCPP $CPPFLAGS'
24973 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24974 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24975 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24976 
24977 
24978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24979 
24980   # First separate the path from the arguments. This will split at the first
24981   # space.
24982   complete="$CPP"
24983   path="${complete%% *}"
24984   tmp="$complete EOL"
24985   arguments="${tmp#* }"
24986 
24987   # Input might be given as Windows format, start by converting to
24988   # unix format.
24989   new_path=`$CYGPATH -u "$path"`
24990 
24991   # Now try to locate executable using which
24992   new_path=`$WHICH "$new_path" 2> /dev/null`
24993   # bat and cmd files are not always considered executable in cygwin causing which
24994   # to not find them
24995   if test "x$new_path" = x \
24996       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24997       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24998     new_path=`$CYGPATH -u "$path"`
24999   fi
25000   if test "x$new_path" = x; then
25001     # Oops. Which didn't find the executable.
25002     # The splitting of arguments from the executable at a space might have been incorrect,
25003     # since paths with space are more likely in Windows. Give it another try with the whole
25004     # argument.
25005     path="$complete"
25006     arguments="EOL"
25007     new_path=`$CYGPATH -u "$path"`
25008     new_path=`$WHICH "$new_path" 2> /dev/null`
25009     # bat and cmd files are not always considered executable in cygwin causing which
25010     # to not find them
25011     if test "x$new_path" = x \
25012         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25013         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25014       new_path=`$CYGPATH -u "$path"`
25015     fi
25016     if test "x$new_path" = x; then
25017       # It's still not found. Now this is an unrecoverable error.
25018       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25019 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25020       has_space=`$ECHO "$complete" | $GREP " "`
25021       if test "x$has_space" != x; then
25022         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25023 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25024       fi
25025       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25026     fi
25027   fi
25028 
25029   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25030   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25031   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25032   # "foo.exe" is OK but "foo" is an error.
25033   #
25034   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25035   # It is also a way to make sure we got the proper file name for the real test later on.
25036   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25037   if test "x$test_shortpath" = x; then
25038     # Short path failed, file does not exist as specified.
25039     # Try adding .exe or .cmd
25040     if test -f "${new_path}.exe"; then
25041       input_to_shortpath="${new_path}.exe"
25042     elif test -f "${new_path}.cmd"; then
25043       input_to_shortpath="${new_path}.cmd"
25044     else
25045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
25046 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
25047       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25048 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25049       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25050     fi
25051   else
25052     input_to_shortpath="$new_path"
25053   fi
25054 
25055   # Call helper function which possibly converts this using DOS-style short mode.
25056   # If so, the updated path is stored in $new_path.
25057   new_path="$input_to_shortpath"
25058 
25059   input_path="$input_to_shortpath"
25060   # Check if we need to convert this using DOS-style short mode. If the path
25061   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25062   # take no chances and rewrite it.
25063   # Note: m4 eats our [], so we need to use [ and ] instead.
25064   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25065   if test "x$has_forbidden_chars" != x; then
25066     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25067     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25068     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25069     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25070       # Going to short mode and back again did indeed matter. Since short mode is
25071       # case insensitive, let's make it lowercase to improve readability.
25072       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25073       # Now convert it back to Unix-stile (cygpath)
25074       input_path=`$CYGPATH -u "$shortmode_path"`
25075       new_path="$input_path"
25076     fi
25077   fi
25078 
25079   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25080   if test "x$test_cygdrive_prefix" = x; then
25081     # As a simple fix, exclude /usr/bin since it's not a real path.
25082     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25083       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25084       # a path prefixed by /cygdrive for fixpath to work.
25085       new_path="$CYGWIN_ROOT_PATH$input_path"
25086     fi
25087   fi
25088 
25089   # remove trailing .exe if any
25090   new_path="${new_path/%.exe/}"
25091 
25092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25093 
25094   # First separate the path from the arguments. This will split at the first
25095   # space.
25096   complete="$CPP"
25097   path="${complete%% *}"
25098   tmp="$complete EOL"
25099   arguments="${tmp#* }"
25100 
25101   # Input might be given as Windows format, start by converting to
25102   # unix format.
25103   new_path="$path"
25104 
25105   windows_path="$new_path"
25106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25107     unix_path=`$CYGPATH -u "$windows_path"`
25108     new_path="$unix_path"
25109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25111     new_path="$unix_path"
25112   fi
25113 
25114 
25115   # Now try to locate executable using which
25116   new_path=`$WHICH "$new_path" 2> /dev/null`
25117 
25118   if test "x$new_path" = x; then
25119     # Oops. Which didn't find the executable.
25120     # The splitting of arguments from the executable at a space might have been incorrect,
25121     # since paths with space are more likely in Windows. Give it another try with the whole
25122     # argument.
25123     path="$complete"
25124     arguments="EOL"
25125     new_path="$path"
25126 
25127   windows_path="$new_path"
25128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25129     unix_path=`$CYGPATH -u "$windows_path"`
25130     new_path="$unix_path"
25131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25133     new_path="$unix_path"
25134   fi
25135 
25136 
25137     new_path=`$WHICH "$new_path" 2> /dev/null`
25138 
25139     if test "x$new_path" = x; then
25140       # It's still not found. Now this is an unrecoverable error.
25141       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25142 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25143       has_space=`$ECHO "$complete" | $GREP " "`
25144       if test "x$has_space" != x; then
25145         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25146 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25147       fi
25148       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25149     fi
25150   fi
25151 
25152   # Now new_path has a complete unix path to the binary
25153   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25154     # Keep paths in /bin as-is, but remove trailing .exe if any
25155     new_path="${new_path/%.exe/}"
25156     # Do not save /bin paths to all_fixpath_prefixes!
25157   else
25158     # Not in mixed or Windows style, start by that.
25159     new_path=`cmd //c echo $new_path`
25160 
25161   input_path="$new_path"
25162   # Check if we need to convert this using DOS-style short mode. If the path
25163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25164   # take no chances and rewrite it.
25165   # Note: m4 eats our [], so we need to use [ and ] instead.
25166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25167   if test "x$has_forbidden_chars" != x; then
25168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25169     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25170   fi
25171 
25172     # Output is in $new_path
25173 
25174   windows_path="$new_path"
25175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25176     unix_path=`$CYGPATH -u "$windows_path"`
25177     new_path="$unix_path"
25178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25180     new_path="$unix_path"
25181   fi
25182 
25183     # remove trailing .exe if any
25184     new_path="${new_path/%.exe/}"
25185 
25186     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25187     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25188   fi
25189 
25190   else
25191     # We're on a posix platform. Hooray! :)
25192     # First separate the path from the arguments. This will split at the first
25193     # space.
25194     complete="$CPP"
25195     path="${complete%% *}"
25196     tmp="$complete EOL"
25197     arguments="${tmp#* }"
25198 
25199     # Cannot rely on the command "which" here since it doesn't always work.
25200     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25201     if test -z "$is_absolute_path"; then
25202       # Path to executable is not absolute. Find it.
25203       IFS_save="$IFS"
25204       IFS=:
25205       for p in $PATH; do
25206         if test -f "$p/$path" && test -x "$p/$path"; then
25207           new_path="$p/$path"
25208           break
25209         fi
25210       done
25211       IFS="$IFS_save"
25212     else
25213       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
25214 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
25215       new_path="$path"
25216     fi
25217 
25218     if test "x$new_path" = x; then
25219       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25220 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25221       has_space=`$ECHO "$complete" | $GREP " "`
25222       if test "x$has_space" != x; then
25223         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25224 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25225       fi
25226       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25227     fi
25228   fi
25229 
25230   # Now join together the path and the arguments once again
25231   if test "x$arguments" != xEOL; then
25232     new_complete="$new_path ${arguments% *}"
25233   else
25234     new_complete="$new_path"
25235   fi
25236 
25237   if test "x$complete" != "x$new_complete"; then
25238     CPP="$new_complete"
25239     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25240 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25241   fi
25242 
25243 
25244   ac_ext=cpp
25245 ac_cpp='$CXXCPP $CPPFLAGS'
25246 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25247 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25248 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25250 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25251 if test -z "$CXXCPP"; then
25252   if ${ac_cv_prog_CXXCPP+:} false; then :
25253   $as_echo_n "(cached) " >&6
25254 else
25255       # Double quotes because CXXCPP needs to be expanded
25256     for CXXCPP in "$CXX -E" "/lib/cpp"
25257     do
25258       ac_preproc_ok=false
25259 for ac_cxx_preproc_warn_flag in '' yes
25260 do
25261   # Use a header file that comes with gcc, so configuring glibc
25262   # with a fresh cross-compiler works.
25263   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25264   # <limits.h> exists even on freestanding compilers.
25265   # On the NeXT, cc -E runs the code through the compiler's parser,
25266   # not just through cpp. "Syntax error" is here to catch this case.
25267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25268 /* end confdefs.h.  */
25269 #ifdef __STDC__
25270 # include <limits.h>
25271 #else
25272 # include <assert.h>
25273 #endif
25274                      Syntax error
25275 _ACEOF
25276 if ac_fn_cxx_try_cpp "$LINENO"; then :
25277 
25278 else
25279   # Broken: fails on valid input.
25280 continue
25281 fi
25282 rm -f conftest.err conftest.i conftest.$ac_ext
25283 
25284   # OK, works on sane cases.  Now check whether nonexistent headers
25285   # can be detected and how.
25286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25287 /* end confdefs.h.  */
25288 #include <ac_nonexistent.h>
25289 _ACEOF
25290 if ac_fn_cxx_try_cpp "$LINENO"; then :
25291   # Broken: success on invalid input.
25292 continue
25293 else
25294   # Passes both tests.
25295 ac_preproc_ok=:
25296 break
25297 fi
25298 rm -f conftest.err conftest.i conftest.$ac_ext
25299 
25300 done
25301 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25302 rm -f conftest.i conftest.err conftest.$ac_ext
25303 if $ac_preproc_ok; then :
25304   break
25305 fi
25306 
25307     done
25308     ac_cv_prog_CXXCPP=$CXXCPP
25309 
25310 fi
25311   CXXCPP=$ac_cv_prog_CXXCPP
25312 else
25313   ac_cv_prog_CXXCPP=$CXXCPP
25314 fi
25315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25316 $as_echo "$CXXCPP" >&6; }
25317 ac_preproc_ok=false
25318 for ac_cxx_preproc_warn_flag in '' yes
25319 do
25320   # Use a header file that comes with gcc, so configuring glibc
25321   # with a fresh cross-compiler works.
25322   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25323   # <limits.h> exists even on freestanding compilers.
25324   # On the NeXT, cc -E runs the code through the compiler's parser,
25325   # not just through cpp. "Syntax error" is here to catch this case.
25326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25327 /* end confdefs.h.  */
25328 #ifdef __STDC__
25329 # include <limits.h>
25330 #else
25331 # include <assert.h>
25332 #endif
25333                      Syntax error
25334 _ACEOF
25335 if ac_fn_cxx_try_cpp "$LINENO"; then :
25336 
25337 else
25338   # Broken: fails on valid input.
25339 continue
25340 fi
25341 rm -f conftest.err conftest.i conftest.$ac_ext
25342 
25343   # OK, works on sane cases.  Now check whether nonexistent headers
25344   # can be detected and how.
25345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25346 /* end confdefs.h.  */
25347 #include <ac_nonexistent.h>
25348 _ACEOF
25349 if ac_fn_cxx_try_cpp "$LINENO"; then :
25350   # Broken: success on invalid input.
25351 continue
25352 else
25353   # Passes both tests.
25354 ac_preproc_ok=:
25355 break
25356 fi
25357 rm -f conftest.err conftest.i conftest.$ac_ext
25358 
25359 done
25360 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25361 rm -f conftest.i conftest.err conftest.$ac_ext
25362 if $ac_preproc_ok; then :
25363 
25364 else
25365   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25366 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25367 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25368 See \`config.log' for more details" "$LINENO" 5; }
25369 fi
25370 
25371 ac_ext=cpp
25372 ac_cpp='$CXXCPP $CPPFLAGS'
25373 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25374 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25375 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25376 
25377 
25378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25379 
25380   # First separate the path from the arguments. This will split at the first
25381   # space.
25382   complete="$CXXCPP"
25383   path="${complete%% *}"
25384   tmp="$complete EOL"
25385   arguments="${tmp#* }"
25386 
25387   # Input might be given as Windows format, start by converting to
25388   # unix format.
25389   new_path=`$CYGPATH -u "$path"`
25390 
25391   # Now try to locate executable using which
25392   new_path=`$WHICH "$new_path" 2> /dev/null`
25393   # bat and cmd files are not always considered executable in cygwin causing which
25394   # to not find them
25395   if test "x$new_path" = x \
25396       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25397       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25398     new_path=`$CYGPATH -u "$path"`
25399   fi
25400   if test "x$new_path" = x; then
25401     # Oops. Which didn't find the executable.
25402     # The splitting of arguments from the executable at a space might have been incorrect,
25403     # since paths with space are more likely in Windows. Give it another try with the whole
25404     # argument.
25405     path="$complete"
25406     arguments="EOL"
25407     new_path=`$CYGPATH -u "$path"`
25408     new_path=`$WHICH "$new_path" 2> /dev/null`
25409     # bat and cmd files are not always considered executable in cygwin causing which
25410     # to not find them
25411     if test "x$new_path" = x \
25412         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25413         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25414       new_path=`$CYGPATH -u "$path"`
25415     fi
25416     if test "x$new_path" = x; then
25417       # It's still not found. Now this is an unrecoverable error.
25418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25419 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25420       has_space=`$ECHO "$complete" | $GREP " "`
25421       if test "x$has_space" != x; then
25422         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25424       fi
25425       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25426     fi
25427   fi
25428 
25429   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25430   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25431   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25432   # "foo.exe" is OK but "foo" is an error.
25433   #
25434   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25435   # It is also a way to make sure we got the proper file name for the real test later on.
25436   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25437   if test "x$test_shortpath" = x; then
25438     # Short path failed, file does not exist as specified.
25439     # Try adding .exe or .cmd
25440     if test -f "${new_path}.exe"; then
25441       input_to_shortpath="${new_path}.exe"
25442     elif test -f "${new_path}.cmd"; then
25443       input_to_shortpath="${new_path}.cmd"
25444     else
25445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25446 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25447       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25448 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25449       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25450     fi
25451   else
25452     input_to_shortpath="$new_path"
25453   fi
25454 
25455   # Call helper function which possibly converts this using DOS-style short mode.
25456   # If so, the updated path is stored in $new_path.
25457   new_path="$input_to_shortpath"
25458 
25459   input_path="$input_to_shortpath"
25460   # Check if we need to convert this using DOS-style short mode. If the path
25461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25462   # take no chances and rewrite it.
25463   # Note: m4 eats our [], so we need to use [ and ] instead.
25464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25465   if test "x$has_forbidden_chars" != x; then
25466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25467     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25468     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25469     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25470       # Going to short mode and back again did indeed matter. Since short mode is
25471       # case insensitive, let's make it lowercase to improve readability.
25472       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25473       # Now convert it back to Unix-stile (cygpath)
25474       input_path=`$CYGPATH -u "$shortmode_path"`
25475       new_path="$input_path"
25476     fi
25477   fi
25478 
25479   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25480   if test "x$test_cygdrive_prefix" = x; then
25481     # As a simple fix, exclude /usr/bin since it's not a real path.
25482     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25483       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25484       # a path prefixed by /cygdrive for fixpath to work.
25485       new_path="$CYGWIN_ROOT_PATH$input_path"
25486     fi
25487   fi
25488 
25489   # remove trailing .exe if any
25490   new_path="${new_path/%.exe/}"
25491 
25492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25493 
25494   # First separate the path from the arguments. This will split at the first
25495   # space.
25496   complete="$CXXCPP"
25497   path="${complete%% *}"
25498   tmp="$complete EOL"
25499   arguments="${tmp#* }"
25500 
25501   # Input might be given as Windows format, start by converting to
25502   # unix format.
25503   new_path="$path"
25504 
25505   windows_path="$new_path"
25506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25507     unix_path=`$CYGPATH -u "$windows_path"`
25508     new_path="$unix_path"
25509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25511     new_path="$unix_path"
25512   fi
25513 
25514 
25515   # Now try to locate executable using which
25516   new_path=`$WHICH "$new_path" 2> /dev/null`
25517 
25518   if test "x$new_path" = x; then
25519     # Oops. Which didn't find the executable.
25520     # The splitting of arguments from the executable at a space might have been incorrect,
25521     # since paths with space are more likely in Windows. Give it another try with the whole
25522     # argument.
25523     path="$complete"
25524     arguments="EOL"
25525     new_path="$path"
25526 
25527   windows_path="$new_path"
25528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25529     unix_path=`$CYGPATH -u "$windows_path"`
25530     new_path="$unix_path"
25531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25532     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25533     new_path="$unix_path"
25534   fi
25535 
25536 
25537     new_path=`$WHICH "$new_path" 2> /dev/null`
25538 
25539     if test "x$new_path" = x; then
25540       # It's still not found. Now this is an unrecoverable error.
25541       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25542 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25543       has_space=`$ECHO "$complete" | $GREP " "`
25544       if test "x$has_space" != x; then
25545         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25546 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25547       fi
25548       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25549     fi
25550   fi
25551 
25552   # Now new_path has a complete unix path to the binary
25553   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25554     # Keep paths in /bin as-is, but remove trailing .exe if any
25555     new_path="${new_path/%.exe/}"
25556     # Do not save /bin paths to all_fixpath_prefixes!
25557   else
25558     # Not in mixed or Windows style, start by that.
25559     new_path=`cmd //c echo $new_path`
25560 
25561   input_path="$new_path"
25562   # Check if we need to convert this using DOS-style short mode. If the path
25563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25564   # take no chances and rewrite it.
25565   # Note: m4 eats our [], so we need to use [ and ] instead.
25566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25567   if test "x$has_forbidden_chars" != x; then
25568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25569     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25570   fi
25571 
25572     # Output is in $new_path
25573 
25574   windows_path="$new_path"
25575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25576     unix_path=`$CYGPATH -u "$windows_path"`
25577     new_path="$unix_path"
25578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25580     new_path="$unix_path"
25581   fi
25582 
25583     # remove trailing .exe if any
25584     new_path="${new_path/%.exe/}"
25585 
25586     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25587     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25588   fi
25589 
25590   else
25591     # We're on a posix platform. Hooray! :)
25592     # First separate the path from the arguments. This will split at the first
25593     # space.
25594     complete="$CXXCPP"
25595     path="${complete%% *}"
25596     tmp="$complete EOL"
25597     arguments="${tmp#* }"
25598 
25599     # Cannot rely on the command "which" here since it doesn't always work.
25600     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25601     if test -z "$is_absolute_path"; then
25602       # Path to executable is not absolute. Find it.
25603       IFS_save="$IFS"
25604       IFS=:
25605       for p in $PATH; do
25606         if test -f "$p/$path" && test -x "$p/$path"; then
25607           new_path="$p/$path"
25608           break
25609         fi
25610       done
25611       IFS="$IFS_save"
25612     else
25613       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25614 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25615       new_path="$path"
25616     fi
25617 
25618     if test "x$new_path" = x; then
25619       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25620 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25621       has_space=`$ECHO "$complete" | $GREP " "`
25622       if test "x$has_space" != x; then
25623         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25624 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25625       fi
25626       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25627     fi
25628   fi
25629 
25630   # Now join together the path and the arguments once again
25631   if test "x$arguments" != xEOL; then
25632     new_complete="$new_path ${arguments% *}"
25633   else
25634     new_complete="$new_path"
25635   fi
25636 
25637   if test "x$complete" != "x$new_complete"; then
25638     CXXCPP="$new_complete"
25639     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25640 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25641   fi
25642 
25643 
25644   if test "x$COMPILE_TYPE" != "xcross"; then
25645     # If we are not cross compiling, use the same compilers for
25646     # building the build platform executables. The cross-compilation
25647     # case needed to be done earlier, but this can only be done after
25648     # the native tools have been localized.
25649     BUILD_CC="$CC"
25650     BUILD_CXX="$CXX"
25651     BUILD_LD="$LD"
25652   fi
25653 
25654   # for solaris we really need solaris tools, and not gnu equivalent
25655   #   these seems to normally reside in /usr/ccs/bin so add that to path before
25656   #   starting to probe
25657   #
25658   #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25659   #         so that it can be overriden --with-tools-dir
25660   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25661     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25662   fi
25663 
25664   # Find the right assembler.
25665   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25666     # Extract the first word of "as", so it can be a program name with args.
25667 set dummy as; ac_word=$2
25668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25669 $as_echo_n "checking for $ac_word... " >&6; }
25670 if ${ac_cv_path_AS+:} false; then :
25671   $as_echo_n "(cached) " >&6
25672 else
25673   case $AS in
25674   [\\/]* | ?:[\\/]*)
25675   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25676   ;;
25677   *)
25678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25679 for as_dir in $PATH
25680 do
25681   IFS=$as_save_IFS
25682   test -z "$as_dir" && as_dir=.
25683     for ac_exec_ext in '' $ac_executable_extensions; do
25684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25685     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25687     break 2
25688   fi
25689 done
25690   done
25691 IFS=$as_save_IFS
25692 
25693   ;;
25694 esac
25695 fi
25696 AS=$ac_cv_path_AS
25697 if test -n "$AS"; then
25698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25699 $as_echo "$AS" >&6; }
25700 else
25701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25702 $as_echo "no" >&6; }
25703 fi
25704 
25705 
25706 
25707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25708 
25709   # First separate the path from the arguments. This will split at the first
25710   # space.
25711   complete="$AS"
25712   path="${complete%% *}"
25713   tmp="$complete EOL"
25714   arguments="${tmp#* }"
25715 
25716   # Input might be given as Windows format, start by converting to
25717   # unix format.
25718   new_path=`$CYGPATH -u "$path"`
25719 
25720   # Now try to locate executable using which
25721   new_path=`$WHICH "$new_path" 2> /dev/null`
25722   # bat and cmd files are not always considered executable in cygwin causing which
25723   # to not find them
25724   if test "x$new_path" = x \
25725       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25726       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25727     new_path=`$CYGPATH -u "$path"`
25728   fi
25729   if test "x$new_path" = x; then
25730     # Oops. Which didn't find the executable.
25731     # The splitting of arguments from the executable at a space might have been incorrect,
25732     # since paths with space are more likely in Windows. Give it another try with the whole
25733     # argument.
25734     path="$complete"
25735     arguments="EOL"
25736     new_path=`$CYGPATH -u "$path"`
25737     new_path=`$WHICH "$new_path" 2> /dev/null`
25738     # bat and cmd files are not always considered executable in cygwin causing which
25739     # to not find them
25740     if test "x$new_path" = x \
25741         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25742         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25743       new_path=`$CYGPATH -u "$path"`
25744     fi
25745     if test "x$new_path" = x; then
25746       # It's still not found. Now this is an unrecoverable error.
25747       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25748 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25749       has_space=`$ECHO "$complete" | $GREP " "`
25750       if test "x$has_space" != x; then
25751         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25752 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25753       fi
25754       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25755     fi
25756   fi
25757 
25758   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25759   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25760   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25761   # "foo.exe" is OK but "foo" is an error.
25762   #
25763   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25764   # It is also a way to make sure we got the proper file name for the real test later on.
25765   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25766   if test "x$test_shortpath" = x; then
25767     # Short path failed, file does not exist as specified.
25768     # Try adding .exe or .cmd
25769     if test -f "${new_path}.exe"; then
25770       input_to_shortpath="${new_path}.exe"
25771     elif test -f "${new_path}.cmd"; then
25772       input_to_shortpath="${new_path}.cmd"
25773     else
25774       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25775 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25776       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25777 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25778       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25779     fi
25780   else
25781     input_to_shortpath="$new_path"
25782   fi
25783 
25784   # Call helper function which possibly converts this using DOS-style short mode.
25785   # If so, the updated path is stored in $new_path.
25786   new_path="$input_to_shortpath"
25787 
25788   input_path="$input_to_shortpath"
25789   # Check if we need to convert this using DOS-style short mode. If the path
25790   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25791   # take no chances and rewrite it.
25792   # Note: m4 eats our [], so we need to use [ and ] instead.
25793   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25794   if test "x$has_forbidden_chars" != x; then
25795     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25796     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25797     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25798     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25799       # Going to short mode and back again did indeed matter. Since short mode is
25800       # case insensitive, let's make it lowercase to improve readability.
25801       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25802       # Now convert it back to Unix-stile (cygpath)
25803       input_path=`$CYGPATH -u "$shortmode_path"`
25804       new_path="$input_path"
25805     fi
25806   fi
25807 
25808   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25809   if test "x$test_cygdrive_prefix" = x; then
25810     # As a simple fix, exclude /usr/bin since it's not a real path.
25811     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25812       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25813       # a path prefixed by /cygdrive for fixpath to work.
25814       new_path="$CYGWIN_ROOT_PATH$input_path"
25815     fi
25816   fi
25817 
25818   # remove trailing .exe if any
25819   new_path="${new_path/%.exe/}"
25820 
25821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25822 
25823   # First separate the path from the arguments. This will split at the first
25824   # space.
25825   complete="$AS"
25826   path="${complete%% *}"
25827   tmp="$complete EOL"
25828   arguments="${tmp#* }"
25829 
25830   # Input might be given as Windows format, start by converting to
25831   # unix format.
25832   new_path="$path"
25833 
25834   windows_path="$new_path"
25835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25836     unix_path=`$CYGPATH -u "$windows_path"`
25837     new_path="$unix_path"
25838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25840     new_path="$unix_path"
25841   fi
25842 
25843 
25844   # Now try to locate executable using which
25845   new_path=`$WHICH "$new_path" 2> /dev/null`
25846 
25847   if test "x$new_path" = x; then
25848     # Oops. Which didn't find the executable.
25849     # The splitting of arguments from the executable at a space might have been incorrect,
25850     # since paths with space are more likely in Windows. Give it another try with the whole
25851     # argument.
25852     path="$complete"
25853     arguments="EOL"
25854     new_path="$path"
25855 
25856   windows_path="$new_path"
25857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25858     unix_path=`$CYGPATH -u "$windows_path"`
25859     new_path="$unix_path"
25860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25862     new_path="$unix_path"
25863   fi
25864 
25865 
25866     new_path=`$WHICH "$new_path" 2> /dev/null`
25867 
25868     if test "x$new_path" = x; then
25869       # It's still not found. Now this is an unrecoverable error.
25870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25871 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25872       has_space=`$ECHO "$complete" | $GREP " "`
25873       if test "x$has_space" != x; then
25874         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25875 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25876       fi
25877       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25878     fi
25879   fi
25880 
25881   # Now new_path has a complete unix path to the binary
25882   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25883     # Keep paths in /bin as-is, but remove trailing .exe if any
25884     new_path="${new_path/%.exe/}"
25885     # Do not save /bin paths to all_fixpath_prefixes!
25886   else
25887     # Not in mixed or Windows style, start by that.
25888     new_path=`cmd //c echo $new_path`
25889 
25890   input_path="$new_path"
25891   # Check if we need to convert this using DOS-style short mode. If the path
25892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25893   # take no chances and rewrite it.
25894   # Note: m4 eats our [], so we need to use [ and ] instead.
25895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25896   if test "x$has_forbidden_chars" != x; then
25897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25898     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25899   fi
25900 
25901     # Output is in $new_path
25902 
25903   windows_path="$new_path"
25904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25905     unix_path=`$CYGPATH -u "$windows_path"`
25906     new_path="$unix_path"
25907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25909     new_path="$unix_path"
25910   fi
25911 
25912     # remove trailing .exe if any
25913     new_path="${new_path/%.exe/}"
25914 
25915     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25916     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25917   fi
25918 
25919   else
25920     # We're on a posix platform. Hooray! :)
25921     # First separate the path from the arguments. This will split at the first
25922     # space.
25923     complete="$AS"
25924     path="${complete%% *}"
25925     tmp="$complete EOL"
25926     arguments="${tmp#* }"
25927 
25928     # Cannot rely on the command "which" here since it doesn't always work.
25929     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25930     if test -z "$is_absolute_path"; then
25931       # Path to executable is not absolute. Find it.
25932       IFS_save="$IFS"
25933       IFS=:
25934       for p in $PATH; do
25935         if test -f "$p/$path" && test -x "$p/$path"; then
25936           new_path="$p/$path"
25937           break
25938         fi
25939       done
25940       IFS="$IFS_save"
25941     else
25942       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25943 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25944       new_path="$path"
25945     fi
25946 
25947     if test "x$new_path" = x; then
25948       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25949 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25950       has_space=`$ECHO "$complete" | $GREP " "`
25951       if test "x$has_space" != x; then
25952         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25953 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25954       fi
25955       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25956     fi
25957   fi
25958 
25959   # Now join together the path and the arguments once again
25960   if test "x$arguments" != xEOL; then
25961     new_complete="$new_path ${arguments% *}"
25962   else
25963     new_complete="$new_path"
25964   fi
25965 
25966   if test "x$complete" != "x$new_complete"; then
25967     AS="$new_complete"
25968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25969 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25970   fi
25971 
25972   else
25973     AS="$CC -c"
25974   fi
25975 
25976 
25977   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25978     # Extract the first word of "nm", so it can be a program name with args.
25979 set dummy nm; ac_word=$2
25980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25981 $as_echo_n "checking for $ac_word... " >&6; }
25982 if ${ac_cv_path_NM+:} false; then :
25983   $as_echo_n "(cached) " >&6
25984 else
25985   case $NM in
25986   [\\/]* | ?:[\\/]*)
25987   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25988   ;;
25989   *)
25990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25991 for as_dir in $PATH
25992 do
25993   IFS=$as_save_IFS
25994   test -z "$as_dir" && as_dir=.
25995     for ac_exec_ext in '' $ac_executable_extensions; do
25996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25997     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25999     break 2
26000   fi
26001 done
26002   done
26003 IFS=$as_save_IFS
26004 
26005   ;;
26006 esac
26007 fi
26008 NM=$ac_cv_path_NM
26009 if test -n "$NM"; then
26010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26011 $as_echo "$NM" >&6; }
26012 else
26013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26014 $as_echo "no" >&6; }
26015 fi
26016 
26017 
26018 
26019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26020 
26021   # First separate the path from the arguments. This will split at the first
26022   # space.
26023   complete="$NM"
26024   path="${complete%% *}"
26025   tmp="$complete EOL"
26026   arguments="${tmp#* }"
26027 
26028   # Input might be given as Windows format, start by converting to
26029   # unix format.
26030   new_path=`$CYGPATH -u "$path"`
26031 
26032   # Now try to locate executable using which
26033   new_path=`$WHICH "$new_path" 2> /dev/null`
26034   # bat and cmd files are not always considered executable in cygwin causing which
26035   # to not find them
26036   if test "x$new_path" = x \
26037       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26038       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26039     new_path=`$CYGPATH -u "$path"`
26040   fi
26041   if test "x$new_path" = x; then
26042     # Oops. Which didn't find the executable.
26043     # The splitting of arguments from the executable at a space might have been incorrect,
26044     # since paths with space are more likely in Windows. Give it another try with the whole
26045     # argument.
26046     path="$complete"
26047     arguments="EOL"
26048     new_path=`$CYGPATH -u "$path"`
26049     new_path=`$WHICH "$new_path" 2> /dev/null`
26050     # bat and cmd files are not always considered executable in cygwin causing which
26051     # to not find them
26052     if test "x$new_path" = x \
26053         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26054         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26055       new_path=`$CYGPATH -u "$path"`
26056     fi
26057     if test "x$new_path" = x; then
26058       # It's still not found. Now this is an unrecoverable error.
26059       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26060 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26061       has_space=`$ECHO "$complete" | $GREP " "`
26062       if test "x$has_space" != x; then
26063         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26064 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26065       fi
26066       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26067     fi
26068   fi
26069 
26070   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26071   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26072   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26073   # "foo.exe" is OK but "foo" is an error.
26074   #
26075   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26076   # It is also a way to make sure we got the proper file name for the real test later on.
26077   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26078   if test "x$test_shortpath" = x; then
26079     # Short path failed, file does not exist as specified.
26080     # Try adding .exe or .cmd
26081     if test -f "${new_path}.exe"; then
26082       input_to_shortpath="${new_path}.exe"
26083     elif test -f "${new_path}.cmd"; then
26084       input_to_shortpath="${new_path}.cmd"
26085     else
26086       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26087 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26088       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26089 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26090       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26091     fi
26092   else
26093     input_to_shortpath="$new_path"
26094   fi
26095 
26096   # Call helper function which possibly converts this using DOS-style short mode.
26097   # If so, the updated path is stored in $new_path.
26098   new_path="$input_to_shortpath"
26099 
26100   input_path="$input_to_shortpath"
26101   # Check if we need to convert this using DOS-style short mode. If the path
26102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26103   # take no chances and rewrite it.
26104   # Note: m4 eats our [], so we need to use [ and ] instead.
26105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26106   if test "x$has_forbidden_chars" != x; then
26107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26108     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26109     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26110     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26111       # Going to short mode and back again did indeed matter. Since short mode is
26112       # case insensitive, let's make it lowercase to improve readability.
26113       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26114       # Now convert it back to Unix-stile (cygpath)
26115       input_path=`$CYGPATH -u "$shortmode_path"`
26116       new_path="$input_path"
26117     fi
26118   fi
26119 
26120   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26121   if test "x$test_cygdrive_prefix" = x; then
26122     # As a simple fix, exclude /usr/bin since it's not a real path.
26123     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26124       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26125       # a path prefixed by /cygdrive for fixpath to work.
26126       new_path="$CYGWIN_ROOT_PATH$input_path"
26127     fi
26128   fi
26129 
26130   # remove trailing .exe if any
26131   new_path="${new_path/%.exe/}"
26132 
26133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26134 
26135   # First separate the path from the arguments. This will split at the first
26136   # space.
26137   complete="$NM"
26138   path="${complete%% *}"
26139   tmp="$complete EOL"
26140   arguments="${tmp#* }"
26141 
26142   # Input might be given as Windows format, start by converting to
26143   # unix format.
26144   new_path="$path"
26145 
26146   windows_path="$new_path"
26147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26148     unix_path=`$CYGPATH -u "$windows_path"`
26149     new_path="$unix_path"
26150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26152     new_path="$unix_path"
26153   fi
26154 
26155 
26156   # Now try to locate executable using which
26157   new_path=`$WHICH "$new_path" 2> /dev/null`
26158 
26159   if test "x$new_path" = x; then
26160     # Oops. Which didn't find the executable.
26161     # The splitting of arguments from the executable at a space might have been incorrect,
26162     # since paths with space are more likely in Windows. Give it another try with the whole
26163     # argument.
26164     path="$complete"
26165     arguments="EOL"
26166     new_path="$path"
26167 
26168   windows_path="$new_path"
26169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26170     unix_path=`$CYGPATH -u "$windows_path"`
26171     new_path="$unix_path"
26172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26174     new_path="$unix_path"
26175   fi
26176 
26177 
26178     new_path=`$WHICH "$new_path" 2> /dev/null`
26179 
26180     if test "x$new_path" = x; then
26181       # It's still not found. Now this is an unrecoverable error.
26182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26183 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26184       has_space=`$ECHO "$complete" | $GREP " "`
26185       if test "x$has_space" != x; then
26186         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26187 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26188       fi
26189       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26190     fi
26191   fi
26192 
26193   # Now new_path has a complete unix path to the binary
26194   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26195     # Keep paths in /bin as-is, but remove trailing .exe if any
26196     new_path="${new_path/%.exe/}"
26197     # Do not save /bin paths to all_fixpath_prefixes!
26198   else
26199     # Not in mixed or Windows style, start by that.
26200     new_path=`cmd //c echo $new_path`
26201 
26202   input_path="$new_path"
26203   # Check if we need to convert this using DOS-style short mode. If the path
26204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26205   # take no chances and rewrite it.
26206   # Note: m4 eats our [], so we need to use [ and ] instead.
26207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26208   if test "x$has_forbidden_chars" != x; then
26209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26210     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26211   fi
26212 
26213     # Output is in $new_path
26214 
26215   windows_path="$new_path"
26216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26217     unix_path=`$CYGPATH -u "$windows_path"`
26218     new_path="$unix_path"
26219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26221     new_path="$unix_path"
26222   fi
26223 
26224     # remove trailing .exe if any
26225     new_path="${new_path/%.exe/}"
26226 
26227     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26228     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26229   fi
26230 
26231   else
26232     # We're on a posix platform. Hooray! :)
26233     # First separate the path from the arguments. This will split at the first
26234     # space.
26235     complete="$NM"
26236     path="${complete%% *}"
26237     tmp="$complete EOL"
26238     arguments="${tmp#* }"
26239 
26240     # Cannot rely on the command "which" here since it doesn't always work.
26241     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26242     if test -z "$is_absolute_path"; then
26243       # Path to executable is not absolute. Find it.
26244       IFS_save="$IFS"
26245       IFS=:
26246       for p in $PATH; do
26247         if test -f "$p/$path" && test -x "$p/$path"; then
26248           new_path="$p/$path"
26249           break
26250         fi
26251       done
26252       IFS="$IFS_save"
26253     else
26254       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26255 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26256       new_path="$path"
26257     fi
26258 
26259     if test "x$new_path" = x; then
26260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26261 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26262       has_space=`$ECHO "$complete" | $GREP " "`
26263       if test "x$has_space" != x; then
26264         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26265 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26266       fi
26267       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26268     fi
26269   fi
26270 
26271   # Now join together the path and the arguments once again
26272   if test "x$arguments" != xEOL; then
26273     new_complete="$new_path ${arguments% *}"
26274   else
26275     new_complete="$new_path"
26276   fi
26277 
26278   if test "x$complete" != "x$new_complete"; then
26279     NM="$new_complete"
26280     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26281 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26282   fi
26283 
26284     # Extract the first word of "gnm", so it can be a program name with args.
26285 set dummy gnm; ac_word=$2
26286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26287 $as_echo_n "checking for $ac_word... " >&6; }
26288 if ${ac_cv_path_GNM+:} false; then :
26289   $as_echo_n "(cached) " >&6
26290 else
26291   case $GNM in
26292   [\\/]* | ?:[\\/]*)
26293   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26294   ;;
26295   *)
26296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26297 for as_dir in $PATH
26298 do
26299   IFS=$as_save_IFS
26300   test -z "$as_dir" && as_dir=.
26301     for ac_exec_ext in '' $ac_executable_extensions; do
26302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26303     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26305     break 2
26306   fi
26307 done
26308   done
26309 IFS=$as_save_IFS
26310 
26311   ;;
26312 esac
26313 fi
26314 GNM=$ac_cv_path_GNM
26315 if test -n "$GNM"; then
26316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26317 $as_echo "$GNM" >&6; }
26318 else
26319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26320 $as_echo "no" >&6; }
26321 fi
26322 
26323 
26324 
26325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26326 
26327   # First separate the path from the arguments. This will split at the first
26328   # space.
26329   complete="$GNM"
26330   path="${complete%% *}"
26331   tmp="$complete EOL"
26332   arguments="${tmp#* }"
26333 
26334   # Input might be given as Windows format, start by converting to
26335   # unix format.
26336   new_path=`$CYGPATH -u "$path"`
26337 
26338   # Now try to locate executable using which
26339   new_path=`$WHICH "$new_path" 2> /dev/null`
26340   # bat and cmd files are not always considered executable in cygwin causing which
26341   # to not find them
26342   if test "x$new_path" = x \
26343       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26344       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26345     new_path=`$CYGPATH -u "$path"`
26346   fi
26347   if test "x$new_path" = x; then
26348     # Oops. Which didn't find the executable.
26349     # The splitting of arguments from the executable at a space might have been incorrect,
26350     # since paths with space are more likely in Windows. Give it another try with the whole
26351     # argument.
26352     path="$complete"
26353     arguments="EOL"
26354     new_path=`$CYGPATH -u "$path"`
26355     new_path=`$WHICH "$new_path" 2> /dev/null`
26356     # bat and cmd files are not always considered executable in cygwin causing which
26357     # to not find them
26358     if test "x$new_path" = x \
26359         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26360         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26361       new_path=`$CYGPATH -u "$path"`
26362     fi
26363     if test "x$new_path" = x; then
26364       # It's still not found. Now this is an unrecoverable error.
26365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26366 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26367       has_space=`$ECHO "$complete" | $GREP " "`
26368       if test "x$has_space" != x; then
26369         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26370 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26371       fi
26372       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26373     fi
26374   fi
26375 
26376   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26377   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26378   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26379   # "foo.exe" is OK but "foo" is an error.
26380   #
26381   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26382   # It is also a way to make sure we got the proper file name for the real test later on.
26383   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26384   if test "x$test_shortpath" = x; then
26385     # Short path failed, file does not exist as specified.
26386     # Try adding .exe or .cmd
26387     if test -f "${new_path}.exe"; then
26388       input_to_shortpath="${new_path}.exe"
26389     elif test -f "${new_path}.cmd"; then
26390       input_to_shortpath="${new_path}.cmd"
26391     else
26392       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26393 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26394       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26395 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26396       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26397     fi
26398   else
26399     input_to_shortpath="$new_path"
26400   fi
26401 
26402   # Call helper function which possibly converts this using DOS-style short mode.
26403   # If so, the updated path is stored in $new_path.
26404   new_path="$input_to_shortpath"
26405 
26406   input_path="$input_to_shortpath"
26407   # Check if we need to convert this using DOS-style short mode. If the path
26408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26409   # take no chances and rewrite it.
26410   # Note: m4 eats our [], so we need to use [ and ] instead.
26411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26412   if test "x$has_forbidden_chars" != x; then
26413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26414     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26415     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26416     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26417       # Going to short mode and back again did indeed matter. Since short mode is
26418       # case insensitive, let's make it lowercase to improve readability.
26419       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26420       # Now convert it back to Unix-stile (cygpath)
26421       input_path=`$CYGPATH -u "$shortmode_path"`
26422       new_path="$input_path"
26423     fi
26424   fi
26425 
26426   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26427   if test "x$test_cygdrive_prefix" = x; then
26428     # As a simple fix, exclude /usr/bin since it's not a real path.
26429     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26430       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26431       # a path prefixed by /cygdrive for fixpath to work.
26432       new_path="$CYGWIN_ROOT_PATH$input_path"
26433     fi
26434   fi
26435 
26436   # remove trailing .exe if any
26437   new_path="${new_path/%.exe/}"
26438 
26439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26440 
26441   # First separate the path from the arguments. This will split at the first
26442   # space.
26443   complete="$GNM"
26444   path="${complete%% *}"
26445   tmp="$complete EOL"
26446   arguments="${tmp#* }"
26447 
26448   # Input might be given as Windows format, start by converting to
26449   # unix format.
26450   new_path="$path"
26451 
26452   windows_path="$new_path"
26453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26454     unix_path=`$CYGPATH -u "$windows_path"`
26455     new_path="$unix_path"
26456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26458     new_path="$unix_path"
26459   fi
26460 
26461 
26462   # Now try to locate executable using which
26463   new_path=`$WHICH "$new_path" 2> /dev/null`
26464 
26465   if test "x$new_path" = x; then
26466     # Oops. Which didn't find the executable.
26467     # The splitting of arguments from the executable at a space might have been incorrect,
26468     # since paths with space are more likely in Windows. Give it another try with the whole
26469     # argument.
26470     path="$complete"
26471     arguments="EOL"
26472     new_path="$path"
26473 
26474   windows_path="$new_path"
26475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26476     unix_path=`$CYGPATH -u "$windows_path"`
26477     new_path="$unix_path"
26478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26479     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26480     new_path="$unix_path"
26481   fi
26482 
26483 
26484     new_path=`$WHICH "$new_path" 2> /dev/null`
26485 
26486     if test "x$new_path" = x; then
26487       # It's still not found. Now this is an unrecoverable error.
26488       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26489 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26490       has_space=`$ECHO "$complete" | $GREP " "`
26491       if test "x$has_space" != x; then
26492         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26493 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26494       fi
26495       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26496     fi
26497   fi
26498 
26499   # Now new_path has a complete unix path to the binary
26500   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26501     # Keep paths in /bin as-is, but remove trailing .exe if any
26502     new_path="${new_path/%.exe/}"
26503     # Do not save /bin paths to all_fixpath_prefixes!
26504   else
26505     # Not in mixed or Windows style, start by that.
26506     new_path=`cmd //c echo $new_path`
26507 
26508   input_path="$new_path"
26509   # Check if we need to convert this using DOS-style short mode. If the path
26510   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26511   # take no chances and rewrite it.
26512   # Note: m4 eats our [], so we need to use [ and ] instead.
26513   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26514   if test "x$has_forbidden_chars" != x; then
26515     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26516     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26517   fi
26518 
26519     # Output is in $new_path
26520 
26521   windows_path="$new_path"
26522   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26523     unix_path=`$CYGPATH -u "$windows_path"`
26524     new_path="$unix_path"
26525   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26526     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26527     new_path="$unix_path"
26528   fi
26529 
26530     # remove trailing .exe if any
26531     new_path="${new_path/%.exe/}"
26532 
26533     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26534     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26535   fi
26536 
26537   else
26538     # We're on a posix platform. Hooray! :)
26539     # First separate the path from the arguments. This will split at the first
26540     # space.
26541     complete="$GNM"
26542     path="${complete%% *}"
26543     tmp="$complete EOL"
26544     arguments="${tmp#* }"
26545 
26546     # Cannot rely on the command "which" here since it doesn't always work.
26547     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26548     if test -z "$is_absolute_path"; then
26549       # Path to executable is not absolute. Find it.
26550       IFS_save="$IFS"
26551       IFS=:
26552       for p in $PATH; do
26553         if test -f "$p/$path" && test -x "$p/$path"; then
26554           new_path="$p/$path"
26555           break
26556         fi
26557       done
26558       IFS="$IFS_save"
26559     else
26560       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26561 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26562       new_path="$path"
26563     fi
26564 
26565     if test "x$new_path" = x; then
26566       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26567 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26568       has_space=`$ECHO "$complete" | $GREP " "`
26569       if test "x$has_space" != x; then
26570         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26571 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26572       fi
26573       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26574     fi
26575   fi
26576 
26577   # Now join together the path and the arguments once again
26578   if test "x$arguments" != xEOL; then
26579     new_complete="$new_path ${arguments% *}"
26580   else
26581     new_complete="$new_path"
26582   fi
26583 
26584   if test "x$complete" != "x$new_complete"; then
26585     GNM="$new_complete"
26586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26587 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26588   fi
26589 
26590     # Extract the first word of "strip", so it can be a program name with args.
26591 set dummy strip; ac_word=$2
26592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26593 $as_echo_n "checking for $ac_word... " >&6; }
26594 if ${ac_cv_path_STRIP+:} false; then :
26595   $as_echo_n "(cached) " >&6
26596 else
26597   case $STRIP in
26598   [\\/]* | ?:[\\/]*)
26599   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26600   ;;
26601   *)
26602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26603 for as_dir in $PATH
26604 do
26605   IFS=$as_save_IFS
26606   test -z "$as_dir" && as_dir=.
26607     for ac_exec_ext in '' $ac_executable_extensions; do
26608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26609     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26611     break 2
26612   fi
26613 done
26614   done
26615 IFS=$as_save_IFS
26616 
26617   ;;
26618 esac
26619 fi
26620 STRIP=$ac_cv_path_STRIP
26621 if test -n "$STRIP"; then
26622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26623 $as_echo "$STRIP" >&6; }
26624 else
26625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26626 $as_echo "no" >&6; }
26627 fi
26628 
26629 
26630 
26631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26632 
26633   # First separate the path from the arguments. This will split at the first
26634   # space.
26635   complete="$STRIP"
26636   path="${complete%% *}"
26637   tmp="$complete EOL"
26638   arguments="${tmp#* }"
26639 
26640   # Input might be given as Windows format, start by converting to
26641   # unix format.
26642   new_path=`$CYGPATH -u "$path"`
26643 
26644   # Now try to locate executable using which
26645   new_path=`$WHICH "$new_path" 2> /dev/null`
26646   # bat and cmd files are not always considered executable in cygwin causing which
26647   # to not find them
26648   if test "x$new_path" = x \
26649       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26650       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26651     new_path=`$CYGPATH -u "$path"`
26652   fi
26653   if test "x$new_path" = x; then
26654     # Oops. Which didn't find the executable.
26655     # The splitting of arguments from the executable at a space might have been incorrect,
26656     # since paths with space are more likely in Windows. Give it another try with the whole
26657     # argument.
26658     path="$complete"
26659     arguments="EOL"
26660     new_path=`$CYGPATH -u "$path"`
26661     new_path=`$WHICH "$new_path" 2> /dev/null`
26662     # bat and cmd files are not always considered executable in cygwin causing which
26663     # to not find them
26664     if test "x$new_path" = x \
26665         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26666         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26667       new_path=`$CYGPATH -u "$path"`
26668     fi
26669     if test "x$new_path" = x; then
26670       # It's still not found. Now this is an unrecoverable error.
26671       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26672 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26673       has_space=`$ECHO "$complete" | $GREP " "`
26674       if test "x$has_space" != x; then
26675         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26676 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26677       fi
26678       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26679     fi
26680   fi
26681 
26682   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26683   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26684   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26685   # "foo.exe" is OK but "foo" is an error.
26686   #
26687   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26688   # It is also a way to make sure we got the proper file name for the real test later on.
26689   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26690   if test "x$test_shortpath" = x; then
26691     # Short path failed, file does not exist as specified.
26692     # Try adding .exe or .cmd
26693     if test -f "${new_path}.exe"; then
26694       input_to_shortpath="${new_path}.exe"
26695     elif test -f "${new_path}.cmd"; then
26696       input_to_shortpath="${new_path}.cmd"
26697     else
26698       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26699 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26700       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26701 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26702       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26703     fi
26704   else
26705     input_to_shortpath="$new_path"
26706   fi
26707 
26708   # Call helper function which possibly converts this using DOS-style short mode.
26709   # If so, the updated path is stored in $new_path.
26710   new_path="$input_to_shortpath"
26711 
26712   input_path="$input_to_shortpath"
26713   # Check if we need to convert this using DOS-style short mode. If the path
26714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26715   # take no chances and rewrite it.
26716   # Note: m4 eats our [], so we need to use [ and ] instead.
26717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26718   if test "x$has_forbidden_chars" != x; then
26719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26720     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26721     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26722     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26723       # Going to short mode and back again did indeed matter. Since short mode is
26724       # case insensitive, let's make it lowercase to improve readability.
26725       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26726       # Now convert it back to Unix-stile (cygpath)
26727       input_path=`$CYGPATH -u "$shortmode_path"`
26728       new_path="$input_path"
26729     fi
26730   fi
26731 
26732   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26733   if test "x$test_cygdrive_prefix" = x; then
26734     # As a simple fix, exclude /usr/bin since it's not a real path.
26735     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26736       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26737       # a path prefixed by /cygdrive for fixpath to work.
26738       new_path="$CYGWIN_ROOT_PATH$input_path"
26739     fi
26740   fi
26741 
26742   # remove trailing .exe if any
26743   new_path="${new_path/%.exe/}"
26744 
26745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26746 
26747   # First separate the path from the arguments. This will split at the first
26748   # space.
26749   complete="$STRIP"
26750   path="${complete%% *}"
26751   tmp="$complete EOL"
26752   arguments="${tmp#* }"
26753 
26754   # Input might be given as Windows format, start by converting to
26755   # unix format.
26756   new_path="$path"
26757 
26758   windows_path="$new_path"
26759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26760     unix_path=`$CYGPATH -u "$windows_path"`
26761     new_path="$unix_path"
26762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26764     new_path="$unix_path"
26765   fi
26766 
26767 
26768   # Now try to locate executable using which
26769   new_path=`$WHICH "$new_path" 2> /dev/null`
26770 
26771   if test "x$new_path" = x; then
26772     # Oops. Which didn't find the executable.
26773     # The splitting of arguments from the executable at a space might have been incorrect,
26774     # since paths with space are more likely in Windows. Give it another try with the whole
26775     # argument.
26776     path="$complete"
26777     arguments="EOL"
26778     new_path="$path"
26779 
26780   windows_path="$new_path"
26781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26782     unix_path=`$CYGPATH -u "$windows_path"`
26783     new_path="$unix_path"
26784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26785     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26786     new_path="$unix_path"
26787   fi
26788 
26789 
26790     new_path=`$WHICH "$new_path" 2> /dev/null`
26791 
26792     if test "x$new_path" = x; then
26793       # It's still not found. Now this is an unrecoverable error.
26794       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26795 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26796       has_space=`$ECHO "$complete" | $GREP " "`
26797       if test "x$has_space" != x; then
26798         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26799 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26800       fi
26801       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26802     fi
26803   fi
26804 
26805   # Now new_path has a complete unix path to the binary
26806   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26807     # Keep paths in /bin as-is, but remove trailing .exe if any
26808     new_path="${new_path/%.exe/}"
26809     # Do not save /bin paths to all_fixpath_prefixes!
26810   else
26811     # Not in mixed or Windows style, start by that.
26812     new_path=`cmd //c echo $new_path`
26813 
26814   input_path="$new_path"
26815   # Check if we need to convert this using DOS-style short mode. If the path
26816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26817   # take no chances and rewrite it.
26818   # Note: m4 eats our [], so we need to use [ and ] instead.
26819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26820   if test "x$has_forbidden_chars" != x; then
26821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26822     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26823   fi
26824 
26825     # Output is in $new_path
26826 
26827   windows_path="$new_path"
26828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26829     unix_path=`$CYGPATH -u "$windows_path"`
26830     new_path="$unix_path"
26831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26833     new_path="$unix_path"
26834   fi
26835 
26836     # remove trailing .exe if any
26837     new_path="${new_path/%.exe/}"
26838 
26839     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26840     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26841   fi
26842 
26843   else
26844     # We're on a posix platform. Hooray! :)
26845     # First separate the path from the arguments. This will split at the first
26846     # space.
26847     complete="$STRIP"
26848     path="${complete%% *}"
26849     tmp="$complete EOL"
26850     arguments="${tmp#* }"
26851 
26852     # Cannot rely on the command "which" here since it doesn't always work.
26853     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26854     if test -z "$is_absolute_path"; then
26855       # Path to executable is not absolute. Find it.
26856       IFS_save="$IFS"
26857       IFS=:
26858       for p in $PATH; do
26859         if test -f "$p/$path" && test -x "$p/$path"; then
26860           new_path="$p/$path"
26861           break
26862         fi
26863       done
26864       IFS="$IFS_save"
26865     else
26866       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26867 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26868       new_path="$path"
26869     fi
26870 
26871     if test "x$new_path" = x; then
26872       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26873 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26874       has_space=`$ECHO "$complete" | $GREP " "`
26875       if test "x$has_space" != x; then
26876         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26877 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26878       fi
26879       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26880     fi
26881   fi
26882 
26883   # Now join together the path and the arguments once again
26884   if test "x$arguments" != xEOL; then
26885     new_complete="$new_path ${arguments% *}"
26886   else
26887     new_complete="$new_path"
26888   fi
26889 
26890   if test "x$complete" != "x$new_complete"; then
26891     STRIP="$new_complete"
26892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26893 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26894   fi
26895 
26896     # Extract the first word of "mcs", so it can be a program name with args.
26897 set dummy mcs; ac_word=$2
26898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26899 $as_echo_n "checking for $ac_word... " >&6; }
26900 if ${ac_cv_path_MCS+:} false; then :
26901   $as_echo_n "(cached) " >&6
26902 else
26903   case $MCS in
26904   [\\/]* | ?:[\\/]*)
26905   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26906   ;;
26907   *)
26908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26909 for as_dir in $PATH
26910 do
26911   IFS=$as_save_IFS
26912   test -z "$as_dir" && as_dir=.
26913     for ac_exec_ext in '' $ac_executable_extensions; do
26914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26915     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26917     break 2
26918   fi
26919 done
26920   done
26921 IFS=$as_save_IFS
26922 
26923   ;;
26924 esac
26925 fi
26926 MCS=$ac_cv_path_MCS
26927 if test -n "$MCS"; then
26928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26929 $as_echo "$MCS" >&6; }
26930 else
26931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26932 $as_echo "no" >&6; }
26933 fi
26934 
26935 
26936 
26937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26938 
26939   # First separate the path from the arguments. This will split at the first
26940   # space.
26941   complete="$MCS"
26942   path="${complete%% *}"
26943   tmp="$complete EOL"
26944   arguments="${tmp#* }"
26945 
26946   # Input might be given as Windows format, start by converting to
26947   # unix format.
26948   new_path=`$CYGPATH -u "$path"`
26949 
26950   # Now try to locate executable using which
26951   new_path=`$WHICH "$new_path" 2> /dev/null`
26952   # bat and cmd files are not always considered executable in cygwin causing which
26953   # to not find them
26954   if test "x$new_path" = x \
26955       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26956       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26957     new_path=`$CYGPATH -u "$path"`
26958   fi
26959   if test "x$new_path" = x; then
26960     # Oops. Which didn't find the executable.
26961     # The splitting of arguments from the executable at a space might have been incorrect,
26962     # since paths with space are more likely in Windows. Give it another try with the whole
26963     # argument.
26964     path="$complete"
26965     arguments="EOL"
26966     new_path=`$CYGPATH -u "$path"`
26967     new_path=`$WHICH "$new_path" 2> /dev/null`
26968     # bat and cmd files are not always considered executable in cygwin causing which
26969     # to not find them
26970     if test "x$new_path" = x \
26971         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26972         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26973       new_path=`$CYGPATH -u "$path"`
26974     fi
26975     if test "x$new_path" = x; then
26976       # It's still not found. Now this is an unrecoverable error.
26977       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26978 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26979       has_space=`$ECHO "$complete" | $GREP " "`
26980       if test "x$has_space" != x; then
26981         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26982 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26983       fi
26984       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26985     fi
26986   fi
26987 
26988   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26989   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26990   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26991   # "foo.exe" is OK but "foo" is an error.
26992   #
26993   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26994   # It is also a way to make sure we got the proper file name for the real test later on.
26995   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26996   if test "x$test_shortpath" = x; then
26997     # Short path failed, file does not exist as specified.
26998     # Try adding .exe or .cmd
26999     if test -f "${new_path}.exe"; then
27000       input_to_shortpath="${new_path}.exe"
27001     elif test -f "${new_path}.cmd"; then
27002       input_to_shortpath="${new_path}.cmd"
27003     else
27004       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
27005 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
27006       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27007 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27008       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27009     fi
27010   else
27011     input_to_shortpath="$new_path"
27012   fi
27013 
27014   # Call helper function which possibly converts this using DOS-style short mode.
27015   # If so, the updated path is stored in $new_path.
27016   new_path="$input_to_shortpath"
27017 
27018   input_path="$input_to_shortpath"
27019   # Check if we need to convert this using DOS-style short mode. If the path
27020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27021   # take no chances and rewrite it.
27022   # Note: m4 eats our [], so we need to use [ and ] instead.
27023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27024   if test "x$has_forbidden_chars" != x; then
27025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27026     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27027     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27028     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27029       # Going to short mode and back again did indeed matter. Since short mode is
27030       # case insensitive, let's make it lowercase to improve readability.
27031       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27032       # Now convert it back to Unix-stile (cygpath)
27033       input_path=`$CYGPATH -u "$shortmode_path"`
27034       new_path="$input_path"
27035     fi
27036   fi
27037 
27038   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27039   if test "x$test_cygdrive_prefix" = x; then
27040     # As a simple fix, exclude /usr/bin since it's not a real path.
27041     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27042       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27043       # a path prefixed by /cygdrive for fixpath to work.
27044       new_path="$CYGWIN_ROOT_PATH$input_path"
27045     fi
27046   fi
27047 
27048   # remove trailing .exe if any
27049   new_path="${new_path/%.exe/}"
27050 
27051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27052 
27053   # First separate the path from the arguments. This will split at the first
27054   # space.
27055   complete="$MCS"
27056   path="${complete%% *}"
27057   tmp="$complete EOL"
27058   arguments="${tmp#* }"
27059 
27060   # Input might be given as Windows format, start by converting to
27061   # unix format.
27062   new_path="$path"
27063 
27064   windows_path="$new_path"
27065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27066     unix_path=`$CYGPATH -u "$windows_path"`
27067     new_path="$unix_path"
27068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27070     new_path="$unix_path"
27071   fi
27072 
27073 
27074   # Now try to locate executable using which
27075   new_path=`$WHICH "$new_path" 2> /dev/null`
27076 
27077   if test "x$new_path" = x; then
27078     # Oops. Which didn't find the executable.
27079     # The splitting of arguments from the executable at a space might have been incorrect,
27080     # since paths with space are more likely in Windows. Give it another try with the whole
27081     # argument.
27082     path="$complete"
27083     arguments="EOL"
27084     new_path="$path"
27085 
27086   windows_path="$new_path"
27087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27088     unix_path=`$CYGPATH -u "$windows_path"`
27089     new_path="$unix_path"
27090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27092     new_path="$unix_path"
27093   fi
27094 
27095 
27096     new_path=`$WHICH "$new_path" 2> /dev/null`
27097 
27098     if test "x$new_path" = x; then
27099       # It's still not found. Now this is an unrecoverable error.
27100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27101 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27102       has_space=`$ECHO "$complete" | $GREP " "`
27103       if test "x$has_space" != x; then
27104         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27105 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27106       fi
27107       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27108     fi
27109   fi
27110 
27111   # Now new_path has a complete unix path to the binary
27112   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27113     # Keep paths in /bin as-is, but remove trailing .exe if any
27114     new_path="${new_path/%.exe/}"
27115     # Do not save /bin paths to all_fixpath_prefixes!
27116   else
27117     # Not in mixed or Windows style, start by that.
27118     new_path=`cmd //c echo $new_path`
27119 
27120   input_path="$new_path"
27121   # Check if we need to convert this using DOS-style short mode. If the path
27122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27123   # take no chances and rewrite it.
27124   # Note: m4 eats our [], so we need to use [ and ] instead.
27125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27126   if test "x$has_forbidden_chars" != x; then
27127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27128     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27129   fi
27130 
27131     # Output is in $new_path
27132 
27133   windows_path="$new_path"
27134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27135     unix_path=`$CYGPATH -u "$windows_path"`
27136     new_path="$unix_path"
27137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27139     new_path="$unix_path"
27140   fi
27141 
27142     # remove trailing .exe if any
27143     new_path="${new_path/%.exe/}"
27144 
27145     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27146     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27147   fi
27148 
27149   else
27150     # We're on a posix platform. Hooray! :)
27151     # First separate the path from the arguments. This will split at the first
27152     # space.
27153     complete="$MCS"
27154     path="${complete%% *}"
27155     tmp="$complete EOL"
27156     arguments="${tmp#* }"
27157 
27158     # Cannot rely on the command "which" here since it doesn't always work.
27159     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27160     if test -z "$is_absolute_path"; then
27161       # Path to executable is not absolute. Find it.
27162       IFS_save="$IFS"
27163       IFS=:
27164       for p in $PATH; do
27165         if test -f "$p/$path" && test -x "$p/$path"; then
27166           new_path="$p/$path"
27167           break
27168         fi
27169       done
27170       IFS="$IFS_save"
27171     else
27172       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
27173 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
27174       new_path="$path"
27175     fi
27176 
27177     if test "x$new_path" = x; then
27178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27179 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27180       has_space=`$ECHO "$complete" | $GREP " "`
27181       if test "x$has_space" != x; then
27182         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27183 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27184       fi
27185       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27186     fi
27187   fi
27188 
27189   # Now join together the path and the arguments once again
27190   if test "x$arguments" != xEOL; then
27191     new_complete="$new_path ${arguments% *}"
27192   else
27193     new_complete="$new_path"
27194   fi
27195 
27196   if test "x$complete" != "x$new_complete"; then
27197     MCS="$new_complete"
27198     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
27199 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
27200   fi
27201 
27202   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
27203     # Extract the first word of "otool", so it can be a program name with args.
27204 set dummy otool; ac_word=$2
27205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27206 $as_echo_n "checking for $ac_word... " >&6; }
27207 if ${ac_cv_path_OTOOL+:} false; then :
27208   $as_echo_n "(cached) " >&6
27209 else
27210   case $OTOOL in
27211   [\\/]* | ?:[\\/]*)
27212   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
27213   ;;
27214   *)
27215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27216 for as_dir in $PATH
27217 do
27218   IFS=$as_save_IFS
27219   test -z "$as_dir" && as_dir=.
27220     for ac_exec_ext in '' $ac_executable_extensions; do
27221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27222     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
27223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27224     break 2
27225   fi
27226 done
27227   done
27228 IFS=$as_save_IFS
27229 
27230   ;;
27231 esac
27232 fi
27233 OTOOL=$ac_cv_path_OTOOL
27234 if test -n "$OTOOL"; then
27235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
27236 $as_echo "$OTOOL" >&6; }
27237 else
27238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27239 $as_echo "no" >&6; }
27240 fi
27241 
27242 
27243     if test "x$OTOOL" = "x"; then
27244       OTOOL="true"
27245     fi
27246     if test -n "$ac_tool_prefix"; then
27247   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
27248 set dummy ${ac_tool_prefix}nm; ac_word=$2
27249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27250 $as_echo_n "checking for $ac_word... " >&6; }
27251 if ${ac_cv_prog_NM+:} false; then :
27252   $as_echo_n "(cached) " >&6
27253 else
27254   if test -n "$NM"; then
27255   ac_cv_prog_NM="$NM" # Let the user override the test.
27256 else
27257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27258 for as_dir in $PATH
27259 do
27260   IFS=$as_save_IFS
27261   test -z "$as_dir" && as_dir=.
27262     for ac_exec_ext in '' $ac_executable_extensions; do
27263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27264     ac_cv_prog_NM="${ac_tool_prefix}nm"
27265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27266     break 2
27267   fi
27268 done
27269   done
27270 IFS=$as_save_IFS
27271 
27272 fi
27273 fi
27274 NM=$ac_cv_prog_NM
27275 if test -n "$NM"; then
27276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27277 $as_echo "$NM" >&6; }
27278 else
27279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27280 $as_echo "no" >&6; }
27281 fi
27282 
27283 
27284 fi
27285 if test -z "$ac_cv_prog_NM"; then
27286   ac_ct_NM=$NM
27287   # Extract the first word of "nm", so it can be a program name with args.
27288 set dummy nm; ac_word=$2
27289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27290 $as_echo_n "checking for $ac_word... " >&6; }
27291 if ${ac_cv_prog_ac_ct_NM+:} false; then :
27292   $as_echo_n "(cached) " >&6
27293 else
27294   if test -n "$ac_ct_NM"; then
27295   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27296 else
27297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27298 for as_dir in $PATH
27299 do
27300   IFS=$as_save_IFS
27301   test -z "$as_dir" && as_dir=.
27302     for ac_exec_ext in '' $ac_executable_extensions; do
27303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27304     ac_cv_prog_ac_ct_NM="nm"
27305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27306     break 2
27307   fi
27308 done
27309   done
27310 IFS=$as_save_IFS
27311 
27312 fi
27313 fi
27314 ac_ct_NM=$ac_cv_prog_ac_ct_NM
27315 if test -n "$ac_ct_NM"; then
27316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27317 $as_echo "$ac_ct_NM" >&6; }
27318 else
27319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27320 $as_echo "no" >&6; }
27321 fi
27322 
27323   if test "x$ac_ct_NM" = x; then
27324     NM=""
27325   else
27326     case $cross_compiling:$ac_tool_warned in
27327 yes:)
27328 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27329 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27330 ac_tool_warned=yes ;;
27331 esac
27332     NM=$ac_ct_NM
27333   fi
27334 else
27335   NM="$ac_cv_prog_NM"
27336 fi
27337 
27338 
27339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27340 
27341   # First separate the path from the arguments. This will split at the first
27342   # space.
27343   complete="$NM"
27344   path="${complete%% *}"
27345   tmp="$complete EOL"
27346   arguments="${tmp#* }"
27347 
27348   # Input might be given as Windows format, start by converting to
27349   # unix format.
27350   new_path=`$CYGPATH -u "$path"`
27351 
27352   # Now try to locate executable using which
27353   new_path=`$WHICH "$new_path" 2> /dev/null`
27354   # bat and cmd files are not always considered executable in cygwin causing which
27355   # to not find them
27356   if test "x$new_path" = x \
27357       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27358       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27359     new_path=`$CYGPATH -u "$path"`
27360   fi
27361   if test "x$new_path" = x; then
27362     # Oops. Which didn't find the executable.
27363     # The splitting of arguments from the executable at a space might have been incorrect,
27364     # since paths with space are more likely in Windows. Give it another try with the whole
27365     # argument.
27366     path="$complete"
27367     arguments="EOL"
27368     new_path=`$CYGPATH -u "$path"`
27369     new_path=`$WHICH "$new_path" 2> /dev/null`
27370     # bat and cmd files are not always considered executable in cygwin causing which
27371     # to not find them
27372     if test "x$new_path" = x \
27373         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27374         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27375       new_path=`$CYGPATH -u "$path"`
27376     fi
27377     if test "x$new_path" = x; then
27378       # It's still not found. Now this is an unrecoverable error.
27379       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27380 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27381       has_space=`$ECHO "$complete" | $GREP " "`
27382       if test "x$has_space" != x; then
27383         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27384 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27385       fi
27386       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27387     fi
27388   fi
27389 
27390   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27391   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27392   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27393   # "foo.exe" is OK but "foo" is an error.
27394   #
27395   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27396   # It is also a way to make sure we got the proper file name for the real test later on.
27397   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27398   if test "x$test_shortpath" = x; then
27399     # Short path failed, file does not exist as specified.
27400     # Try adding .exe or .cmd
27401     if test -f "${new_path}.exe"; then
27402       input_to_shortpath="${new_path}.exe"
27403     elif test -f "${new_path}.cmd"; then
27404       input_to_shortpath="${new_path}.cmd"
27405     else
27406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27407 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27408       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27409 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27410       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27411     fi
27412   else
27413     input_to_shortpath="$new_path"
27414   fi
27415 
27416   # Call helper function which possibly converts this using DOS-style short mode.
27417   # If so, the updated path is stored in $new_path.
27418   new_path="$input_to_shortpath"
27419 
27420   input_path="$input_to_shortpath"
27421   # Check if we need to convert this using DOS-style short mode. If the path
27422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27423   # take no chances and rewrite it.
27424   # Note: m4 eats our [], so we need to use [ and ] instead.
27425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27426   if test "x$has_forbidden_chars" != x; then
27427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27428     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27429     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27430     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27431       # Going to short mode and back again did indeed matter. Since short mode is
27432       # case insensitive, let's make it lowercase to improve readability.
27433       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27434       # Now convert it back to Unix-stile (cygpath)
27435       input_path=`$CYGPATH -u "$shortmode_path"`
27436       new_path="$input_path"
27437     fi
27438   fi
27439 
27440   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27441   if test "x$test_cygdrive_prefix" = x; then
27442     # As a simple fix, exclude /usr/bin since it's not a real path.
27443     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27444       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27445       # a path prefixed by /cygdrive for fixpath to work.
27446       new_path="$CYGWIN_ROOT_PATH$input_path"
27447     fi
27448   fi
27449 
27450   # remove trailing .exe if any
27451   new_path="${new_path/%.exe/}"
27452 
27453   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27454 
27455   # First separate the path from the arguments. This will split at the first
27456   # space.
27457   complete="$NM"
27458   path="${complete%% *}"
27459   tmp="$complete EOL"
27460   arguments="${tmp#* }"
27461 
27462   # Input might be given as Windows format, start by converting to
27463   # unix format.
27464   new_path="$path"
27465 
27466   windows_path="$new_path"
27467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27468     unix_path=`$CYGPATH -u "$windows_path"`
27469     new_path="$unix_path"
27470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27472     new_path="$unix_path"
27473   fi
27474 
27475 
27476   # Now try to locate executable using which
27477   new_path=`$WHICH "$new_path" 2> /dev/null`
27478 
27479   if test "x$new_path" = x; then
27480     # Oops. Which didn't find the executable.
27481     # The splitting of arguments from the executable at a space might have been incorrect,
27482     # since paths with space are more likely in Windows. Give it another try with the whole
27483     # argument.
27484     path="$complete"
27485     arguments="EOL"
27486     new_path="$path"
27487 
27488   windows_path="$new_path"
27489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27490     unix_path=`$CYGPATH -u "$windows_path"`
27491     new_path="$unix_path"
27492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27494     new_path="$unix_path"
27495   fi
27496 
27497 
27498     new_path=`$WHICH "$new_path" 2> /dev/null`
27499 
27500     if test "x$new_path" = x; then
27501       # It's still not found. Now this is an unrecoverable error.
27502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27503 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27504       has_space=`$ECHO "$complete" | $GREP " "`
27505       if test "x$has_space" != x; then
27506         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27507 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27508       fi
27509       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27510     fi
27511   fi
27512 
27513   # Now new_path has a complete unix path to the binary
27514   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27515     # Keep paths in /bin as-is, but remove trailing .exe if any
27516     new_path="${new_path/%.exe/}"
27517     # Do not save /bin paths to all_fixpath_prefixes!
27518   else
27519     # Not in mixed or Windows style, start by that.
27520     new_path=`cmd //c echo $new_path`
27521 
27522   input_path="$new_path"
27523   # Check if we need to convert this using DOS-style short mode. If the path
27524   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27525   # take no chances and rewrite it.
27526   # Note: m4 eats our [], so we need to use [ and ] instead.
27527   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27528   if test "x$has_forbidden_chars" != x; then
27529     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27530     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27531   fi
27532 
27533     # Output is in $new_path
27534 
27535   windows_path="$new_path"
27536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27537     unix_path=`$CYGPATH -u "$windows_path"`
27538     new_path="$unix_path"
27539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27541     new_path="$unix_path"
27542   fi
27543 
27544     # remove trailing .exe if any
27545     new_path="${new_path/%.exe/}"
27546 
27547     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27548     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27549   fi
27550 
27551   else
27552     # We're on a posix platform. Hooray! :)
27553     # First separate the path from the arguments. This will split at the first
27554     # space.
27555     complete="$NM"
27556     path="${complete%% *}"
27557     tmp="$complete EOL"
27558     arguments="${tmp#* }"
27559 
27560     # Cannot rely on the command "which" here since it doesn't always work.
27561     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27562     if test -z "$is_absolute_path"; then
27563       # Path to executable is not absolute. Find it.
27564       IFS_save="$IFS"
27565       IFS=:
27566       for p in $PATH; do
27567         if test -f "$p/$path" && test -x "$p/$path"; then
27568           new_path="$p/$path"
27569           break
27570         fi
27571       done
27572       IFS="$IFS_save"
27573     else
27574       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27575 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27576       new_path="$path"
27577     fi
27578 
27579     if test "x$new_path" = x; then
27580       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27581 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27582       has_space=`$ECHO "$complete" | $GREP " "`
27583       if test "x$has_space" != x; then
27584         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27585 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27586       fi
27587       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27588     fi
27589   fi
27590 
27591   # Now join together the path and the arguments once again
27592   if test "x$arguments" != xEOL; then
27593     new_complete="$new_path ${arguments% *}"
27594   else
27595     new_complete="$new_path"
27596   fi
27597 
27598   if test "x$complete" != "x$new_complete"; then
27599     NM="$new_complete"
27600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27601 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27602   fi
27603 
27604     GNM="$NM"
27605 
27606     if test -n "$ac_tool_prefix"; then
27607   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27608 set dummy ${ac_tool_prefix}strip; ac_word=$2
27609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27610 $as_echo_n "checking for $ac_word... " >&6; }
27611 if ${ac_cv_prog_STRIP+:} false; then :
27612   $as_echo_n "(cached) " >&6
27613 else
27614   if test -n "$STRIP"; then
27615   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27616 else
27617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27618 for as_dir in $PATH
27619 do
27620   IFS=$as_save_IFS
27621   test -z "$as_dir" && as_dir=.
27622     for ac_exec_ext in '' $ac_executable_extensions; do
27623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27624     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27626     break 2
27627   fi
27628 done
27629   done
27630 IFS=$as_save_IFS
27631 
27632 fi
27633 fi
27634 STRIP=$ac_cv_prog_STRIP
27635 if test -n "$STRIP"; then
27636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27637 $as_echo "$STRIP" >&6; }
27638 else
27639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27640 $as_echo "no" >&6; }
27641 fi
27642 
27643 
27644 fi
27645 if test -z "$ac_cv_prog_STRIP"; then
27646   ac_ct_STRIP=$STRIP
27647   # Extract the first word of "strip", so it can be a program name with args.
27648 set dummy strip; ac_word=$2
27649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27650 $as_echo_n "checking for $ac_word... " >&6; }
27651 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27652   $as_echo_n "(cached) " >&6
27653 else
27654   if test -n "$ac_ct_STRIP"; then
27655   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27656 else
27657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27658 for as_dir in $PATH
27659 do
27660   IFS=$as_save_IFS
27661   test -z "$as_dir" && as_dir=.
27662     for ac_exec_ext in '' $ac_executable_extensions; do
27663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27664     ac_cv_prog_ac_ct_STRIP="strip"
27665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27666     break 2
27667   fi
27668 done
27669   done
27670 IFS=$as_save_IFS
27671 
27672 fi
27673 fi
27674 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27675 if test -n "$ac_ct_STRIP"; then
27676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27677 $as_echo "$ac_ct_STRIP" >&6; }
27678 else
27679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27680 $as_echo "no" >&6; }
27681 fi
27682 
27683   if test "x$ac_ct_STRIP" = x; then
27684     STRIP=""
27685   else
27686     case $cross_compiling:$ac_tool_warned in
27687 yes:)
27688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27689 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27690 ac_tool_warned=yes ;;
27691 esac
27692     STRIP=$ac_ct_STRIP
27693   fi
27694 else
27695   STRIP="$ac_cv_prog_STRIP"
27696 fi
27697 
27698 
27699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27700 
27701   # First separate the path from the arguments. This will split at the first
27702   # space.
27703   complete="$STRIP"
27704   path="${complete%% *}"
27705   tmp="$complete EOL"
27706   arguments="${tmp#* }"
27707 
27708   # Input might be given as Windows format, start by converting to
27709   # unix format.
27710   new_path=`$CYGPATH -u "$path"`
27711 
27712   # Now try to locate executable using which
27713   new_path=`$WHICH "$new_path" 2> /dev/null`
27714   # bat and cmd files are not always considered executable in cygwin causing which
27715   # to not find them
27716   if test "x$new_path" = x \
27717       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27718       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27719     new_path=`$CYGPATH -u "$path"`
27720   fi
27721   if test "x$new_path" = x; then
27722     # Oops. Which didn't find the executable.
27723     # The splitting of arguments from the executable at a space might have been incorrect,
27724     # since paths with space are more likely in Windows. Give it another try with the whole
27725     # argument.
27726     path="$complete"
27727     arguments="EOL"
27728     new_path=`$CYGPATH -u "$path"`
27729     new_path=`$WHICH "$new_path" 2> /dev/null`
27730     # bat and cmd files are not always considered executable in cygwin causing which
27731     # to not find them
27732     if test "x$new_path" = x \
27733         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27734         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27735       new_path=`$CYGPATH -u "$path"`
27736     fi
27737     if test "x$new_path" = x; then
27738       # It's still not found. Now this is an unrecoverable error.
27739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27740 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27741       has_space=`$ECHO "$complete" | $GREP " "`
27742       if test "x$has_space" != x; then
27743         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27744 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27745       fi
27746       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27747     fi
27748   fi
27749 
27750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27753   # "foo.exe" is OK but "foo" is an error.
27754   #
27755   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27756   # It is also a way to make sure we got the proper file name for the real test later on.
27757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27758   if test "x$test_shortpath" = x; then
27759     # Short path failed, file does not exist as specified.
27760     # Try adding .exe or .cmd
27761     if test -f "${new_path}.exe"; then
27762       input_to_shortpath="${new_path}.exe"
27763     elif test -f "${new_path}.cmd"; then
27764       input_to_shortpath="${new_path}.cmd"
27765     else
27766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27767 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27768       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27769 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27770       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27771     fi
27772   else
27773     input_to_shortpath="$new_path"
27774   fi
27775 
27776   # Call helper function which possibly converts this using DOS-style short mode.
27777   # If so, the updated path is stored in $new_path.
27778   new_path="$input_to_shortpath"
27779 
27780   input_path="$input_to_shortpath"
27781   # Check if we need to convert this using DOS-style short mode. If the path
27782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27783   # take no chances and rewrite it.
27784   # Note: m4 eats our [], so we need to use [ and ] instead.
27785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27786   if test "x$has_forbidden_chars" != x; then
27787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27791       # Going to short mode and back again did indeed matter. Since short mode is
27792       # case insensitive, let's make it lowercase to improve readability.
27793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27794       # Now convert it back to Unix-stile (cygpath)
27795       input_path=`$CYGPATH -u "$shortmode_path"`
27796       new_path="$input_path"
27797     fi
27798   fi
27799 
27800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27801   if test "x$test_cygdrive_prefix" = x; then
27802     # As a simple fix, exclude /usr/bin since it's not a real path.
27803     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27805       # a path prefixed by /cygdrive for fixpath to work.
27806       new_path="$CYGWIN_ROOT_PATH$input_path"
27807     fi
27808   fi
27809 
27810   # remove trailing .exe if any
27811   new_path="${new_path/%.exe/}"
27812 
27813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27814 
27815   # First separate the path from the arguments. This will split at the first
27816   # space.
27817   complete="$STRIP"
27818   path="${complete%% *}"
27819   tmp="$complete EOL"
27820   arguments="${tmp#* }"
27821 
27822   # Input might be given as Windows format, start by converting to
27823   # unix format.
27824   new_path="$path"
27825 
27826   windows_path="$new_path"
27827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27828     unix_path=`$CYGPATH -u "$windows_path"`
27829     new_path="$unix_path"
27830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27832     new_path="$unix_path"
27833   fi
27834 
27835 
27836   # Now try to locate executable using which
27837   new_path=`$WHICH "$new_path" 2> /dev/null`
27838 
27839   if test "x$new_path" = x; then
27840     # Oops. Which didn't find the executable.
27841     # The splitting of arguments from the executable at a space might have been incorrect,
27842     # since paths with space are more likely in Windows. Give it another try with the whole
27843     # argument.
27844     path="$complete"
27845     arguments="EOL"
27846     new_path="$path"
27847 
27848   windows_path="$new_path"
27849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27850     unix_path=`$CYGPATH -u "$windows_path"`
27851     new_path="$unix_path"
27852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27854     new_path="$unix_path"
27855   fi
27856 
27857 
27858     new_path=`$WHICH "$new_path" 2> /dev/null`
27859 
27860     if test "x$new_path" = x; then
27861       # It's still not found. Now this is an unrecoverable error.
27862       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27863 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27864       has_space=`$ECHO "$complete" | $GREP " "`
27865       if test "x$has_space" != x; then
27866         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27867 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27868       fi
27869       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27870     fi
27871   fi
27872 
27873   # Now new_path has a complete unix path to the binary
27874   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27875     # Keep paths in /bin as-is, but remove trailing .exe if any
27876     new_path="${new_path/%.exe/}"
27877     # Do not save /bin paths to all_fixpath_prefixes!
27878   else
27879     # Not in mixed or Windows style, start by that.
27880     new_path=`cmd //c echo $new_path`
27881 
27882   input_path="$new_path"
27883   # Check if we need to convert this using DOS-style short mode. If the path
27884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27885   # take no chances and rewrite it.
27886   # Note: m4 eats our [], so we need to use [ and ] instead.
27887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27888   if test "x$has_forbidden_chars" != x; then
27889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27890     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27891   fi
27892 
27893     # Output is in $new_path
27894 
27895   windows_path="$new_path"
27896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27897     unix_path=`$CYGPATH -u "$windows_path"`
27898     new_path="$unix_path"
27899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27901     new_path="$unix_path"
27902   fi
27903 
27904     # remove trailing .exe if any
27905     new_path="${new_path/%.exe/}"
27906 
27907     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27908     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27909   fi
27910 
27911   else
27912     # We're on a posix platform. Hooray! :)
27913     # First separate the path from the arguments. This will split at the first
27914     # space.
27915     complete="$STRIP"
27916     path="${complete%% *}"
27917     tmp="$complete EOL"
27918     arguments="${tmp#* }"
27919 
27920     # Cannot rely on the command "which" here since it doesn't always work.
27921     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27922     if test -z "$is_absolute_path"; then
27923       # Path to executable is not absolute. Find it.
27924       IFS_save="$IFS"
27925       IFS=:
27926       for p in $PATH; do
27927         if test -f "$p/$path" && test -x "$p/$path"; then
27928           new_path="$p/$path"
27929           break
27930         fi
27931       done
27932       IFS="$IFS_save"
27933     else
27934       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27935 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27936       new_path="$path"
27937     fi
27938 
27939     if test "x$new_path" = x; then
27940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27941 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27942       has_space=`$ECHO "$complete" | $GREP " "`
27943       if test "x$has_space" != x; then
27944         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27945 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27946       fi
27947       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27948     fi
27949   fi
27950 
27951   # Now join together the path and the arguments once again
27952   if test "x$arguments" != xEOL; then
27953     new_complete="$new_path ${arguments% *}"
27954   else
27955     new_complete="$new_path"
27956   fi
27957 
27958   if test "x$complete" != "x$new_complete"; then
27959     STRIP="$new_complete"
27960     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27961 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27962   fi
27963 
27964   fi
27965 
27966   # objcopy is used for moving debug symbols to separate files when
27967   # full debug symbols are enabled.
27968   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27969     if test -n "$ac_tool_prefix"; then
27970   for ac_prog in gobjcopy objcopy
27971   do
27972     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27973 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27975 $as_echo_n "checking for $ac_word... " >&6; }
27976 if ${ac_cv_prog_OBJCOPY+:} false; then :
27977   $as_echo_n "(cached) " >&6
27978 else
27979   if test -n "$OBJCOPY"; then
27980   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27981 else
27982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27983 for as_dir in $PATH
27984 do
27985   IFS=$as_save_IFS
27986   test -z "$as_dir" && as_dir=.
27987     for ac_exec_ext in '' $ac_executable_extensions; do
27988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27989     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27991     break 2
27992   fi
27993 done
27994   done
27995 IFS=$as_save_IFS
27996 
27997 fi
27998 fi
27999 OBJCOPY=$ac_cv_prog_OBJCOPY
28000 if test -n "$OBJCOPY"; then
28001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
28002 $as_echo "$OBJCOPY" >&6; }
28003 else
28004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28005 $as_echo "no" >&6; }
28006 fi
28007 
28008 
28009     test -n "$OBJCOPY" && break
28010   done
28011 fi
28012 if test -z "$OBJCOPY"; then
28013   ac_ct_OBJCOPY=$OBJCOPY
28014   for ac_prog in gobjcopy objcopy
28015 do
28016   # Extract the first word of "$ac_prog", so it can be a program name with args.
28017 set dummy $ac_prog; ac_word=$2
28018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28019 $as_echo_n "checking for $ac_word... " >&6; }
28020 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
28021   $as_echo_n "(cached) " >&6
28022 else
28023   if test -n "$ac_ct_OBJCOPY"; then
28024   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
28025 else
28026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28027 for as_dir in $PATH
28028 do
28029   IFS=$as_save_IFS
28030   test -z "$as_dir" && as_dir=.
28031     for ac_exec_ext in '' $ac_executable_extensions; do
28032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28033     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
28034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28035     break 2
28036   fi
28037 done
28038   done
28039 IFS=$as_save_IFS
28040 
28041 fi
28042 fi
28043 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
28044 if test -n "$ac_ct_OBJCOPY"; then
28045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
28046 $as_echo "$ac_ct_OBJCOPY" >&6; }
28047 else
28048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28049 $as_echo "no" >&6; }
28050 fi
28051 
28052 
28053   test -n "$ac_ct_OBJCOPY" && break
28054 done
28055 
28056   if test "x$ac_ct_OBJCOPY" = x; then
28057     OBJCOPY=""
28058   else
28059     case $cross_compiling:$ac_tool_warned in
28060 yes:)
28061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28062 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28063 ac_tool_warned=yes ;;
28064 esac
28065     OBJCOPY=$ac_ct_OBJCOPY
28066   fi
28067 fi
28068 
28069     # Only call fixup if objcopy was found.
28070     if test -n "$OBJCOPY"; then
28071 
28072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28073 
28074   # First separate the path from the arguments. This will split at the first
28075   # space.
28076   complete="$OBJCOPY"
28077   path="${complete%% *}"
28078   tmp="$complete EOL"
28079   arguments="${tmp#* }"
28080 
28081   # Input might be given as Windows format, start by converting to
28082   # unix format.
28083   new_path=`$CYGPATH -u "$path"`
28084 
28085   # Now try to locate executable using which
28086   new_path=`$WHICH "$new_path" 2> /dev/null`
28087   # bat and cmd files are not always considered executable in cygwin causing which
28088   # to not find them
28089   if test "x$new_path" = x \
28090       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28091       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28092     new_path=`$CYGPATH -u "$path"`
28093   fi
28094   if test "x$new_path" = x; then
28095     # Oops. Which didn't find the executable.
28096     # The splitting of arguments from the executable at a space might have been incorrect,
28097     # since paths with space are more likely in Windows. Give it another try with the whole
28098     # argument.
28099     path="$complete"
28100     arguments="EOL"
28101     new_path=`$CYGPATH -u "$path"`
28102     new_path=`$WHICH "$new_path" 2> /dev/null`
28103     # bat and cmd files are not always considered executable in cygwin causing which
28104     # to not find them
28105     if test "x$new_path" = x \
28106         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28107         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28108       new_path=`$CYGPATH -u "$path"`
28109     fi
28110     if test "x$new_path" = x; then
28111       # It's still not found. Now this is an unrecoverable error.
28112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28113 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28114       has_space=`$ECHO "$complete" | $GREP " "`
28115       if test "x$has_space" != x; then
28116         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28117 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28118       fi
28119       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28120     fi
28121   fi
28122 
28123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28126   # "foo.exe" is OK but "foo" is an error.
28127   #
28128   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28129   # It is also a way to make sure we got the proper file name for the real test later on.
28130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28131   if test "x$test_shortpath" = x; then
28132     # Short path failed, file does not exist as specified.
28133     # Try adding .exe or .cmd
28134     if test -f "${new_path}.exe"; then
28135       input_to_shortpath="${new_path}.exe"
28136     elif test -f "${new_path}.cmd"; then
28137       input_to_shortpath="${new_path}.cmd"
28138     else
28139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
28140 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
28141       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28142 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28143       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28144     fi
28145   else
28146     input_to_shortpath="$new_path"
28147   fi
28148 
28149   # Call helper function which possibly converts this using DOS-style short mode.
28150   # If so, the updated path is stored in $new_path.
28151   new_path="$input_to_shortpath"
28152 
28153   input_path="$input_to_shortpath"
28154   # Check if we need to convert this using DOS-style short mode. If the path
28155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28156   # take no chances and rewrite it.
28157   # Note: m4 eats our [], so we need to use [ and ] instead.
28158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28159   if test "x$has_forbidden_chars" != x; then
28160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28161     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28162     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28163     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28164       # Going to short mode and back again did indeed matter. Since short mode is
28165       # case insensitive, let's make it lowercase to improve readability.
28166       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28167       # Now convert it back to Unix-stile (cygpath)
28168       input_path=`$CYGPATH -u "$shortmode_path"`
28169       new_path="$input_path"
28170     fi
28171   fi
28172 
28173   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28174   if test "x$test_cygdrive_prefix" = x; then
28175     # As a simple fix, exclude /usr/bin since it's not a real path.
28176     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28177       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28178       # a path prefixed by /cygdrive for fixpath to work.
28179       new_path="$CYGWIN_ROOT_PATH$input_path"
28180     fi
28181   fi
28182 
28183   # remove trailing .exe if any
28184   new_path="${new_path/%.exe/}"
28185 
28186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28187 
28188   # First separate the path from the arguments. This will split at the first
28189   # space.
28190   complete="$OBJCOPY"
28191   path="${complete%% *}"
28192   tmp="$complete EOL"
28193   arguments="${tmp#* }"
28194 
28195   # Input might be given as Windows format, start by converting to
28196   # unix format.
28197   new_path="$path"
28198 
28199   windows_path="$new_path"
28200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28201     unix_path=`$CYGPATH -u "$windows_path"`
28202     new_path="$unix_path"
28203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28205     new_path="$unix_path"
28206   fi
28207 
28208 
28209   # Now try to locate executable using which
28210   new_path=`$WHICH "$new_path" 2> /dev/null`
28211 
28212   if test "x$new_path" = x; then
28213     # Oops. Which didn't find the executable.
28214     # The splitting of arguments from the executable at a space might have been incorrect,
28215     # since paths with space are more likely in Windows. Give it another try with the whole
28216     # argument.
28217     path="$complete"
28218     arguments="EOL"
28219     new_path="$path"
28220 
28221   windows_path="$new_path"
28222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28223     unix_path=`$CYGPATH -u "$windows_path"`
28224     new_path="$unix_path"
28225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28227     new_path="$unix_path"
28228   fi
28229 
28230 
28231     new_path=`$WHICH "$new_path" 2> /dev/null`
28232 
28233     if test "x$new_path" = x; then
28234       # It's still not found. Now this is an unrecoverable error.
28235       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28236 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28237       has_space=`$ECHO "$complete" | $GREP " "`
28238       if test "x$has_space" != x; then
28239         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28240 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28241       fi
28242       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28243     fi
28244   fi
28245 
28246   # Now new_path has a complete unix path to the binary
28247   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28248     # Keep paths in /bin as-is, but remove trailing .exe if any
28249     new_path="${new_path/%.exe/}"
28250     # Do not save /bin paths to all_fixpath_prefixes!
28251   else
28252     # Not in mixed or Windows style, start by that.
28253     new_path=`cmd //c echo $new_path`
28254 
28255   input_path="$new_path"
28256   # Check if we need to convert this using DOS-style short mode. If the path
28257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28258   # take no chances and rewrite it.
28259   # Note: m4 eats our [], so we need to use [ and ] instead.
28260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28261   if test "x$has_forbidden_chars" != x; then
28262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28264   fi
28265 
28266     # Output is in $new_path
28267 
28268   windows_path="$new_path"
28269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28270     unix_path=`$CYGPATH -u "$windows_path"`
28271     new_path="$unix_path"
28272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28274     new_path="$unix_path"
28275   fi
28276 
28277     # remove trailing .exe if any
28278     new_path="${new_path/%.exe/}"
28279 
28280     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28281     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28282   fi
28283 
28284   else
28285     # We're on a posix platform. Hooray! :)
28286     # First separate the path from the arguments. This will split at the first
28287     # space.
28288     complete="$OBJCOPY"
28289     path="${complete%% *}"
28290     tmp="$complete EOL"
28291     arguments="${tmp#* }"
28292 
28293     # Cannot rely on the command "which" here since it doesn't always work.
28294     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28295     if test -z "$is_absolute_path"; then
28296       # Path to executable is not absolute. Find it.
28297       IFS_save="$IFS"
28298       IFS=:
28299       for p in $PATH; do
28300         if test -f "$p/$path" && test -x "$p/$path"; then
28301           new_path="$p/$path"
28302           break
28303         fi
28304       done
28305       IFS="$IFS_save"
28306     else
28307       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28308 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28309       new_path="$path"
28310     fi
28311 
28312     if test "x$new_path" = x; then
28313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28314 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28315       has_space=`$ECHO "$complete" | $GREP " "`
28316       if test "x$has_space" != x; then
28317         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28318 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28319       fi
28320       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28321     fi
28322   fi
28323 
28324   # Now join together the path and the arguments once again
28325   if test "x$arguments" != xEOL; then
28326     new_complete="$new_path ${arguments% *}"
28327   else
28328     new_complete="$new_path"
28329   fi
28330 
28331   if test "x$complete" != "x$new_complete"; then
28332     OBJCOPY="$new_complete"
28333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28334 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28335   fi
28336 
28337     fi
28338   fi
28339 
28340   if test -n "$ac_tool_prefix"; then
28341   for ac_prog in gobjdump objdump
28342   do
28343     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28344 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28346 $as_echo_n "checking for $ac_word... " >&6; }
28347 if ${ac_cv_prog_OBJDUMP+:} false; then :
28348   $as_echo_n "(cached) " >&6
28349 else
28350   if test -n "$OBJDUMP"; then
28351   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28352 else
28353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28354 for as_dir in $PATH
28355 do
28356   IFS=$as_save_IFS
28357   test -z "$as_dir" && as_dir=.
28358     for ac_exec_ext in '' $ac_executable_extensions; do
28359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28360     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28362     break 2
28363   fi
28364 done
28365   done
28366 IFS=$as_save_IFS
28367 
28368 fi
28369 fi
28370 OBJDUMP=$ac_cv_prog_OBJDUMP
28371 if test -n "$OBJDUMP"; then
28372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28373 $as_echo "$OBJDUMP" >&6; }
28374 else
28375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28376 $as_echo "no" >&6; }
28377 fi
28378 
28379 
28380     test -n "$OBJDUMP" && break
28381   done
28382 fi
28383 if test -z "$OBJDUMP"; then
28384   ac_ct_OBJDUMP=$OBJDUMP
28385   for ac_prog in gobjdump objdump
28386 do
28387   # Extract the first word of "$ac_prog", so it can be a program name with args.
28388 set dummy $ac_prog; ac_word=$2
28389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28390 $as_echo_n "checking for $ac_word... " >&6; }
28391 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28392   $as_echo_n "(cached) " >&6
28393 else
28394   if test -n "$ac_ct_OBJDUMP"; then
28395   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28396 else
28397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28398 for as_dir in $PATH
28399 do
28400   IFS=$as_save_IFS
28401   test -z "$as_dir" && as_dir=.
28402     for ac_exec_ext in '' $ac_executable_extensions; do
28403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28404     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28406     break 2
28407   fi
28408 done
28409   done
28410 IFS=$as_save_IFS
28411 
28412 fi
28413 fi
28414 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28415 if test -n "$ac_ct_OBJDUMP"; then
28416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28417 $as_echo "$ac_ct_OBJDUMP" >&6; }
28418 else
28419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28420 $as_echo "no" >&6; }
28421 fi
28422 
28423 
28424   test -n "$ac_ct_OBJDUMP" && break
28425 done
28426 
28427   if test "x$ac_ct_OBJDUMP" = x; then
28428     OBJDUMP=""
28429   else
28430     case $cross_compiling:$ac_tool_warned in
28431 yes:)
28432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28433 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28434 ac_tool_warned=yes ;;
28435 esac
28436     OBJDUMP=$ac_ct_OBJDUMP
28437   fi
28438 fi
28439 
28440   if test "x$OBJDUMP" != x; then
28441     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28442 
28443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28444 
28445   # First separate the path from the arguments. This will split at the first
28446   # space.
28447   complete="$OBJDUMP"
28448   path="${complete%% *}"
28449   tmp="$complete EOL"
28450   arguments="${tmp#* }"
28451 
28452   # Input might be given as Windows format, start by converting to
28453   # unix format.
28454   new_path=`$CYGPATH -u "$path"`
28455 
28456   # Now try to locate executable using which
28457   new_path=`$WHICH "$new_path" 2> /dev/null`
28458   # bat and cmd files are not always considered executable in cygwin causing which
28459   # to not find them
28460   if test "x$new_path" = x \
28461       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28462       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28463     new_path=`$CYGPATH -u "$path"`
28464   fi
28465   if test "x$new_path" = x; then
28466     # Oops. Which didn't find the executable.
28467     # The splitting of arguments from the executable at a space might have been incorrect,
28468     # since paths with space are more likely in Windows. Give it another try with the whole
28469     # argument.
28470     path="$complete"
28471     arguments="EOL"
28472     new_path=`$CYGPATH -u "$path"`
28473     new_path=`$WHICH "$new_path" 2> /dev/null`
28474     # bat and cmd files are not always considered executable in cygwin causing which
28475     # to not find them
28476     if test "x$new_path" = x \
28477         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28478         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28479       new_path=`$CYGPATH -u "$path"`
28480     fi
28481     if test "x$new_path" = x; then
28482       # It's still not found. Now this is an unrecoverable error.
28483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28484 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28485       has_space=`$ECHO "$complete" | $GREP " "`
28486       if test "x$has_space" != x; then
28487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28489       fi
28490       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28491     fi
28492   fi
28493 
28494   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28495   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28496   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28497   # "foo.exe" is OK but "foo" is an error.
28498   #
28499   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28500   # It is also a way to make sure we got the proper file name for the real test later on.
28501   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28502   if test "x$test_shortpath" = x; then
28503     # Short path failed, file does not exist as specified.
28504     # Try adding .exe or .cmd
28505     if test -f "${new_path}.exe"; then
28506       input_to_shortpath="${new_path}.exe"
28507     elif test -f "${new_path}.cmd"; then
28508       input_to_shortpath="${new_path}.cmd"
28509     else
28510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28511 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28512       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28513 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28514       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28515     fi
28516   else
28517     input_to_shortpath="$new_path"
28518   fi
28519 
28520   # Call helper function which possibly converts this using DOS-style short mode.
28521   # If so, the updated path is stored in $new_path.
28522   new_path="$input_to_shortpath"
28523 
28524   input_path="$input_to_shortpath"
28525   # Check if we need to convert this using DOS-style short mode. If the path
28526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28527   # take no chances and rewrite it.
28528   # Note: m4 eats our [], so we need to use [ and ] instead.
28529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28530   if test "x$has_forbidden_chars" != x; then
28531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28532     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28533     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28534     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28535       # Going to short mode and back again did indeed matter. Since short mode is
28536       # case insensitive, let's make it lowercase to improve readability.
28537       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28538       # Now convert it back to Unix-stile (cygpath)
28539       input_path=`$CYGPATH -u "$shortmode_path"`
28540       new_path="$input_path"
28541     fi
28542   fi
28543 
28544   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28545   if test "x$test_cygdrive_prefix" = x; then
28546     # As a simple fix, exclude /usr/bin since it's not a real path.
28547     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28548       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28549       # a path prefixed by /cygdrive for fixpath to work.
28550       new_path="$CYGWIN_ROOT_PATH$input_path"
28551     fi
28552   fi
28553 
28554   # remove trailing .exe if any
28555   new_path="${new_path/%.exe/}"
28556 
28557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28558 
28559   # First separate the path from the arguments. This will split at the first
28560   # space.
28561   complete="$OBJDUMP"
28562   path="${complete%% *}"
28563   tmp="$complete EOL"
28564   arguments="${tmp#* }"
28565 
28566   # Input might be given as Windows format, start by converting to
28567   # unix format.
28568   new_path="$path"
28569 
28570   windows_path="$new_path"
28571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28572     unix_path=`$CYGPATH -u "$windows_path"`
28573     new_path="$unix_path"
28574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28576     new_path="$unix_path"
28577   fi
28578 
28579 
28580   # Now try to locate executable using which
28581   new_path=`$WHICH "$new_path" 2> /dev/null`
28582 
28583   if test "x$new_path" = x; then
28584     # Oops. Which didn't find the executable.
28585     # The splitting of arguments from the executable at a space might have been incorrect,
28586     # since paths with space are more likely in Windows. Give it another try with the whole
28587     # argument.
28588     path="$complete"
28589     arguments="EOL"
28590     new_path="$path"
28591 
28592   windows_path="$new_path"
28593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28594     unix_path=`$CYGPATH -u "$windows_path"`
28595     new_path="$unix_path"
28596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28598     new_path="$unix_path"
28599   fi
28600 
28601 
28602     new_path=`$WHICH "$new_path" 2> /dev/null`
28603 
28604     if test "x$new_path" = x; then
28605       # It's still not found. Now this is an unrecoverable error.
28606       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28607 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28608       has_space=`$ECHO "$complete" | $GREP " "`
28609       if test "x$has_space" != x; then
28610         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28611 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28612       fi
28613       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28614     fi
28615   fi
28616 
28617   # Now new_path has a complete unix path to the binary
28618   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28619     # Keep paths in /bin as-is, but remove trailing .exe if any
28620     new_path="${new_path/%.exe/}"
28621     # Do not save /bin paths to all_fixpath_prefixes!
28622   else
28623     # Not in mixed or Windows style, start by that.
28624     new_path=`cmd //c echo $new_path`
28625 
28626   input_path="$new_path"
28627   # Check if we need to convert this using DOS-style short mode. If the path
28628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28629   # take no chances and rewrite it.
28630   # Note: m4 eats our [], so we need to use [ and ] instead.
28631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28632   if test "x$has_forbidden_chars" != x; then
28633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28634     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28635   fi
28636 
28637     # Output is in $new_path
28638 
28639   windows_path="$new_path"
28640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28641     unix_path=`$CYGPATH -u "$windows_path"`
28642     new_path="$unix_path"
28643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28645     new_path="$unix_path"
28646   fi
28647 
28648     # remove trailing .exe if any
28649     new_path="${new_path/%.exe/}"
28650 
28651     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28652     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28653   fi
28654 
28655   else
28656     # We're on a posix platform. Hooray! :)
28657     # First separate the path from the arguments. This will split at the first
28658     # space.
28659     complete="$OBJDUMP"
28660     path="${complete%% *}"
28661     tmp="$complete EOL"
28662     arguments="${tmp#* }"
28663 
28664     # Cannot rely on the command "which" here since it doesn't always work.
28665     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28666     if test -z "$is_absolute_path"; then
28667       # Path to executable is not absolute. Find it.
28668       IFS_save="$IFS"
28669       IFS=:
28670       for p in $PATH; do
28671         if test -f "$p/$path" && test -x "$p/$path"; then
28672           new_path="$p/$path"
28673           break
28674         fi
28675       done
28676       IFS="$IFS_save"
28677     else
28678       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28679 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28680       new_path="$path"
28681     fi
28682 
28683     if test "x$new_path" = x; then
28684       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28685 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28686       has_space=`$ECHO "$complete" | $GREP " "`
28687       if test "x$has_space" != x; then
28688         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28689 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28690       fi
28691       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28692     fi
28693   fi
28694 
28695   # Now join together the path and the arguments once again
28696   if test "x$arguments" != xEOL; then
28697     new_complete="$new_path ${arguments% *}"
28698   else
28699     new_complete="$new_path"
28700   fi
28701 
28702   if test "x$complete" != "x$new_complete"; then
28703     OBJDUMP="$new_complete"
28704     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28705 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28706   fi
28707 
28708   fi
28709 
28710 
28711 
28712   # Restore old path without tools dir
28713   PATH="$OLD_PATH"
28714 
28715 
28716 # FIXME: Currently we must test this after paths but before flags. Fix!
28717 
28718 # And we can test some aspects on the target using configure macros.
28719 
28720 
28721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28722 $as_echo_n "checking for ANSI C header files... " >&6; }
28723 if ${ac_cv_header_stdc+:} false; then :
28724   $as_echo_n "(cached) " >&6
28725 else
28726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28727 /* end confdefs.h.  */
28728 #include <stdlib.h>
28729 #include <stdarg.h>
28730 #include <string.h>
28731 #include <float.h>
28732 
28733 int
28734 main ()
28735 {
28736 
28737   ;
28738   return 0;
28739 }
28740 _ACEOF
28741 if ac_fn_cxx_try_compile "$LINENO"; then :
28742   ac_cv_header_stdc=yes
28743 else
28744   ac_cv_header_stdc=no
28745 fi
28746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28747 
28748 if test $ac_cv_header_stdc = yes; then
28749   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28750   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28751 /* end confdefs.h.  */
28752 #include <string.h>
28753 
28754 _ACEOF
28755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28756   $EGREP "memchr" >/dev/null 2>&1; then :
28757 
28758 else
28759   ac_cv_header_stdc=no
28760 fi
28761 rm -f conftest*
28762 
28763 fi
28764 
28765 if test $ac_cv_header_stdc = yes; then
28766   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28768 /* end confdefs.h.  */
28769 #include <stdlib.h>
28770 
28771 _ACEOF
28772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28773   $EGREP "free" >/dev/null 2>&1; then :
28774 
28775 else
28776   ac_cv_header_stdc=no
28777 fi
28778 rm -f conftest*
28779 
28780 fi
28781 
28782 if test $ac_cv_header_stdc = yes; then
28783   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28784   if test "$cross_compiling" = yes; then :
28785   :
28786 else
28787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28788 /* end confdefs.h.  */
28789 #include <ctype.h>
28790 #include <stdlib.h>
28791 #if ((' ' & 0x0FF) == 0x020)
28792 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28793 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28794 #else
28795 # define ISLOWER(c) \
28796                    (('a' <= (c) && (c) <= 'i') \
28797                      || ('j' <= (c) && (c) <= 'r') \
28798                      || ('s' <= (c) && (c) <= 'z'))
28799 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28800 #endif
28801 
28802 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28803 int
28804 main ()
28805 {
28806   int i;
28807   for (i = 0; i < 256; i++)
28808     if (XOR (islower (i), ISLOWER (i))
28809         || toupper (i) != TOUPPER (i))
28810       return 2;
28811   return 0;
28812 }
28813 _ACEOF
28814 if ac_fn_cxx_try_run "$LINENO"; then :
28815 
28816 else
28817   ac_cv_header_stdc=no
28818 fi
28819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28820   conftest.$ac_objext conftest.beam conftest.$ac_ext
28821 fi
28822 
28823 fi
28824 fi
28825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28826 $as_echo "$ac_cv_header_stdc" >&6; }
28827 if test $ac_cv_header_stdc = yes; then
28828 
28829 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28830 
28831 fi
28832 
28833 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28834 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28835                   inttypes.h stdint.h unistd.h
28836 do :
28837   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28838 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28839 "
28840 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28841   cat >>confdefs.h <<_ACEOF
28842 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28843 _ACEOF
28844 
28845 fi
28846 
28847 done
28848 
28849 
28850 
28851   ###############################################################################
28852   #
28853   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28854   # (The JVM can use 32 or 64 bit Java pointers but that decision
28855   # is made at runtime.)
28856   #
28857 
28858   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28859     # Always specify -m flag on Solaris
28860     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28861 
28862   # When we add flags to the "official" CFLAGS etc, we need to
28863   # keep track of these additions in ADDED_CFLAGS etc. These
28864   # will later be checked to make sure only controlled additions
28865   # have been made to CFLAGS etc.
28866   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28867   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28868   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28869 
28870   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28871   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28872   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28873 
28874   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28875   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28876   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28877 
28878   elif test "x$COMPILE_TYPE" = xreduced; then
28879     if test "x$OPENJDK_TARGET_OS" != xwindows; then
28880       # Specify -m if running reduced on other Posix platforms
28881 
28882   # When we add flags to the "official" CFLAGS etc, we need to
28883   # keep track of these additions in ADDED_CFLAGS etc. These
28884   # will later be checked to make sure only controlled additions
28885   # have been made to CFLAGS etc.
28886   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28887   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28888   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28889 
28890   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28891   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28892   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28893 
28894   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28895   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28896   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28897 
28898     fi
28899   fi
28900 
28901   # Make compilation sanity check
28902   for ac_header in stdio.h
28903 do :
28904   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28905 if test "x$ac_cv_header_stdio_h" = xyes; then :
28906   cat >>confdefs.h <<_ACEOF
28907 #define HAVE_STDIO_H 1
28908 _ACEOF
28909 
28910 else
28911 
28912     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28913 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28914     if test "x$COMPILE_TYPE" = xreduced; then
28915       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28916 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28917     elif test "x$COMPILE_TYPE" = xcross; then
28918       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28919 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28920     fi
28921     as_fn_error $? "Cannot continue." "$LINENO" 5
28922 
28923 fi
28924 
28925 done
28926 
28927 
28928   # The cast to long int works around a bug in the HP C Compiler
28929 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28930 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28931 # This bug is HP SR number 8606223364.
28932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28933 $as_echo_n "checking size of int *... " >&6; }
28934 if ${ac_cv_sizeof_int_p+:} false; then :
28935   $as_echo_n "(cached) " >&6
28936 else
28937   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28938 
28939 else
28940   if test "$ac_cv_type_int_p" = yes; then
28941      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28942 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28943 as_fn_error 77 "cannot compute sizeof (int *)
28944 See \`config.log' for more details" "$LINENO" 5; }
28945    else
28946      ac_cv_sizeof_int_p=0
28947    fi
28948 fi
28949 
28950 fi
28951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28952 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28953 
28954 
28955 
28956 cat >>confdefs.h <<_ACEOF
28957 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28958 _ACEOF
28959 
28960 
28961 
28962   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
28963   if test "x$ac_cv_sizeof_int_p" = x; then
28964     # The test failed, lets stick to the assumed value.
28965     { $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
28966 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28967   else
28968     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
28969 
28970     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28971       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
28972       # Let's try to implicitely set the compilers target architecture and retry the test
28973       { $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
28974 $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;}
28975       { $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
28976 $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;}
28977 
28978   # When we add flags to the "official" CFLAGS etc, we need to
28979   # keep track of these additions in ADDED_CFLAGS etc. These
28980   # will later be checked to make sure only controlled additions
28981   # have been made to CFLAGS etc.
28982   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28983   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28984   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28985 
28986   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28987   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28988   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28989 
28990   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28991   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28992   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28993 
28994 
28995       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
28996       unset ac_cv_sizeof_int_p
28997       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
28998       cat >>confdefs.h <<_ACEOF
28999 #undef SIZEOF_INT_P
29000 _ACEOF
29001 
29002       # The cast to long int works around a bug in the HP C Compiler
29003 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29004 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29005 # This bug is HP SR number 8606223364.
29006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29007 $as_echo_n "checking size of int *... " >&6; }
29008 if ${ac_cv_sizeof_int_p+:} false; then :
29009   $as_echo_n "(cached) " >&6
29010 else
29011   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29012 
29013 else
29014   if test "$ac_cv_type_int_p" = yes; then
29015      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29016 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29017 as_fn_error 77 "cannot compute sizeof (int *)
29018 See \`config.log' for more details" "$LINENO" 5; }
29019    else
29020      ac_cv_sizeof_int_p=0
29021    fi
29022 fi
29023 
29024 fi
29025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29026 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29027 
29028 
29029 
29030 cat >>confdefs.h <<_ACEOF
29031 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29032 _ACEOF
29033 
29034 
29035 
29036       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29037 
29038       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29039         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
29040       fi
29041     fi
29042   fi
29043 
29044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29045 $as_echo_n "checking for target address size... " >&6; }
29046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29047 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29048 
29049 
29050   ###############################################################################
29051   #
29052   # Is the target little of big endian?
29053   #
29054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29055 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29056 if ${ac_cv_c_bigendian+:} false; then :
29057   $as_echo_n "(cached) " >&6
29058 else
29059   ac_cv_c_bigendian=unknown
29060     # See if we're dealing with a universal compiler.
29061     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29062 /* end confdefs.h.  */
29063 #ifndef __APPLE_CC__
29064                not a universal capable compiler
29065              #endif
29066              typedef int dummy;
29067 
29068 _ACEOF
29069 if ac_fn_cxx_try_compile "$LINENO"; then :
29070 
29071         # Check for potential -arch flags.  It is not universal unless
29072         # there are at least two -arch flags with different values.
29073         ac_arch=
29074         ac_prev=
29075         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29076          if test -n "$ac_prev"; then
29077            case $ac_word in
29078              i?86 | x86_64 | ppc | ppc64)
29079                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29080                  ac_arch=$ac_word
29081                else
29082                  ac_cv_c_bigendian=universal
29083                  break
29084                fi
29085                ;;
29086            esac
29087            ac_prev=
29088          elif test "x$ac_word" = "x-arch"; then
29089            ac_prev=arch
29090          fi
29091        done
29092 fi
29093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29094     if test $ac_cv_c_bigendian = unknown; then
29095       # See if sys/param.h defines the BYTE_ORDER macro.
29096       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29097 /* end confdefs.h.  */
29098 #include <sys/types.h>
29099              #include <sys/param.h>
29100 
29101 int
29102 main ()
29103 {
29104 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29105                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29106                      && LITTLE_ENDIAN)
29107               bogus endian macros
29108              #endif
29109 
29110   ;
29111   return 0;
29112 }
29113 _ACEOF
29114 if ac_fn_cxx_try_compile "$LINENO"; then :
29115   # It does; now see whether it defined to BIG_ENDIAN or not.
29116          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29117 /* end confdefs.h.  */
29118 #include <sys/types.h>
29119                 #include <sys/param.h>
29120 
29121 int
29122 main ()
29123 {
29124 #if BYTE_ORDER != BIG_ENDIAN
29125                  not big endian
29126                 #endif
29127 
29128   ;
29129   return 0;
29130 }
29131 _ACEOF
29132 if ac_fn_cxx_try_compile "$LINENO"; then :
29133   ac_cv_c_bigendian=yes
29134 else
29135   ac_cv_c_bigendian=no
29136 fi
29137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29138 fi
29139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29140     fi
29141     if test $ac_cv_c_bigendian = unknown; then
29142       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29143       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29144 /* end confdefs.h.  */
29145 #include <limits.h>
29146 
29147 int
29148 main ()
29149 {
29150 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29151               bogus endian macros
29152              #endif
29153 
29154   ;
29155   return 0;
29156 }
29157 _ACEOF
29158 if ac_fn_cxx_try_compile "$LINENO"; then :
29159   # It does; now see whether it defined to _BIG_ENDIAN or not.
29160          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29161 /* end confdefs.h.  */
29162 #include <limits.h>
29163 
29164 int
29165 main ()
29166 {
29167 #ifndef _BIG_ENDIAN
29168                  not big endian
29169                 #endif
29170 
29171   ;
29172   return 0;
29173 }
29174 _ACEOF
29175 if ac_fn_cxx_try_compile "$LINENO"; then :
29176   ac_cv_c_bigendian=yes
29177 else
29178   ac_cv_c_bigendian=no
29179 fi
29180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29181 fi
29182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29183     fi
29184     if test $ac_cv_c_bigendian = unknown; then
29185       # Compile a test program.
29186       if test "$cross_compiling" = yes; then :
29187   # Try to guess by grepping values from an object file.
29188          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29189 /* end confdefs.h.  */
29190 short int ascii_mm[] =
29191                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29192                 short int ascii_ii[] =
29193                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29194                 int use_ascii (int i) {
29195                   return ascii_mm[i] + ascii_ii[i];
29196                 }
29197                 short int ebcdic_ii[] =
29198                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29199                 short int ebcdic_mm[] =
29200                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29201                 int use_ebcdic (int i) {
29202                   return ebcdic_mm[i] + ebcdic_ii[i];
29203                 }
29204                 extern int foo;
29205 
29206 int
29207 main ()
29208 {
29209 return use_ascii (foo) == use_ebcdic (foo);
29210   ;
29211   return 0;
29212 }
29213 _ACEOF
29214 if ac_fn_cxx_try_compile "$LINENO"; then :
29215   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29216               ac_cv_c_bigendian=yes
29217             fi
29218             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29219               if test "$ac_cv_c_bigendian" = unknown; then
29220                 ac_cv_c_bigendian=no
29221               else
29222                 # finding both strings is unlikely to happen, but who knows?
29223                 ac_cv_c_bigendian=unknown
29224               fi
29225             fi
29226 fi
29227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29228 else
29229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29230 /* end confdefs.h.  */
29231 $ac_includes_default
29232 int
29233 main ()
29234 {
29235 
29236              /* Are we little or big endian?  From Harbison&Steele.  */
29237              union
29238              {
29239                long int l;
29240                char c[sizeof (long int)];
29241              } u;
29242              u.l = 1;
29243              return u.c[sizeof (long int) - 1] == 1;
29244 
29245   ;
29246   return 0;
29247 }
29248 _ACEOF
29249 if ac_fn_cxx_try_run "$LINENO"; then :
29250   ac_cv_c_bigendian=no
29251 else
29252   ac_cv_c_bigendian=yes
29253 fi
29254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29255   conftest.$ac_objext conftest.beam conftest.$ac_ext
29256 fi
29257 
29258     fi
29259 fi
29260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29261 $as_echo "$ac_cv_c_bigendian" >&6; }
29262  case $ac_cv_c_bigendian in #(
29263    yes)
29264      ENDIAN="big";; #(
29265    no)
29266      ENDIAN="little" ;; #(
29267    universal)
29268      ENDIAN="universal_endianness"
29269      ;; #(
29270    *)
29271      ENDIAN="unknown" ;;
29272  esac
29273 
29274 
29275   if test "x$ENDIAN" = xuniversal_endianness; then
29276     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29277   fi
29278   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29279     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
29280   fi
29281 
29282 
29283 # Configure flags for the tools
29284 
29285 
29286   ###############################################################################
29287   #
29288   # How to compile shared libraries.
29289   #
29290 
29291   if test "x$GCC" = xyes; then
29292     COMPILER_NAME=gcc
29293     PICFLAG="-fPIC"
29294     LIBRARY_PREFIX=lib
29295     SHARED_LIBRARY='lib$1.so'
29296     STATIC_LIBRARY='lib$1.a'
29297     SHARED_LIBRARY_FLAGS="-shared"
29298     SHARED_LIBRARY_SUFFIX='.so'
29299     STATIC_LIBRARY_SUFFIX='.a'
29300     OBJ_SUFFIX='.o'
29301     EXE_SUFFIX=''
29302     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29303     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29304     C_FLAG_REORDER=''
29305     CXX_FLAG_REORDER=''
29306     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29307     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29308     LD="$CC"
29309     LDEXE="$CC"
29310     LDCXX="$CXX"
29311     LDEXECXX="$CXX"
29312     POST_STRIP_CMD="$STRIP -g"
29313 
29314     # Linking is different on MacOSX
29315     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29316       # Might change in the future to clang.
29317       COMPILER_NAME=gcc
29318       SHARED_LIBRARY='lib$1.dylib'
29319       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29320       SHARED_LIBRARY_SUFFIX='.dylib'
29321       EXE_SUFFIX=''
29322       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29323       SET_SHARED_LIBRARY_MAPFILE=''
29324       SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29325       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29326       POST_STRIP_CMD="$STRIP -S"
29327     fi
29328   else
29329     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29330       # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29331       COMPILER_NAME=ossc
29332       PICFLAG="-KPIC"
29333       LIBRARY_PREFIX=lib
29334       SHARED_LIBRARY='lib$1.so'
29335       STATIC_LIBRARY='lib$1.a'
29336       SHARED_LIBRARY_FLAGS="-G"
29337       SHARED_LIBRARY_SUFFIX='.so'
29338       STATIC_LIBRARY_SUFFIX='.a'
29339       OBJ_SUFFIX='.o'
29340       EXE_SUFFIX=''
29341       SET_SHARED_LIBRARY_NAME=''
29342       SET_SHARED_LIBRARY_MAPFILE='-M$1'
29343       C_FLAG_REORDER='-xF'
29344       CXX_FLAG_REORDER='-xF'
29345       SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29346       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29347       CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29348       CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29349       CFLAGS_JDKLIB_EXTRA='-xstrconst'
29350       POST_STRIP_CMD="$STRIP -x"
29351       POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29352     fi
29353     if test "x$OPENJDK_TARGET_OS" = xaix; then
29354         COMPILER_NAME=xlc
29355         PICFLAG="-qpic=large"
29356         LIBRARY_PREFIX=lib
29357         SHARED_LIBRARY='lib$1.so'
29358         STATIC_LIBRARY='lib$1.a'
29359         SHARED_LIBRARY_FLAGS="-qmkshrobj"
29360         SHARED_LIBRARY_SUFFIX='.so'
29361         STATIC_LIBRARY_SUFFIX='.a'
29362         OBJ_SUFFIX='.o'
29363         EXE_SUFFIX=''
29364         SET_SHARED_LIBRARY_NAME=''
29365         SET_SHARED_LIBRARY_MAPFILE=''
29366         C_FLAG_REORDER=''
29367         CXX_FLAG_REORDER=''
29368         SET_SHARED_LIBRARY_ORIGIN=''
29369         SET_EXECUTABLE_ORIGIN=""
29370         CFLAGS_JDK=""
29371         CXXFLAGS_JDK=""
29372         CFLAGS_JDKLIB_EXTRA=''
29373         POST_STRIP_CMD="$STRIP -X32_64"
29374         POST_MCS_CMD=""
29375     fi
29376     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29377       # If it is not gcc, then assume it is the MS Visual Studio compiler
29378       COMPILER_NAME=cl
29379       PICFLAG=""
29380       LIBRARY_PREFIX=
29381       SHARED_LIBRARY='$1.dll'
29382       STATIC_LIBRARY='$1.lib'
29383       SHARED_LIBRARY_FLAGS="-LD"
29384       SHARED_LIBRARY_SUFFIX='.dll'
29385       STATIC_LIBRARY_SUFFIX='.lib'
29386       OBJ_SUFFIX='.obj'
29387       EXE_SUFFIX='.exe'
29388       SET_SHARED_LIBRARY_NAME=''
29389       SET_SHARED_LIBRARY_MAPFILE=''
29390       SET_SHARED_LIBRARY_ORIGIN=''
29391       SET_EXECUTABLE_ORIGIN=''
29392     fi
29393   fi
29394 
29395 
29396 
29397 
29398 
29399 
29400 
29401 
29402 
29403 
29404 
29405 
29406 
29407 
29408 
29409 
29410 
29411 
29412 
29413   # The (cross) compiler is now configured, we can now test capabilities
29414   # of the target platform.
29415 
29416 
29417 
29418   ###############################################################################
29419   #
29420   # Setup the opt flags for different compilers
29421   # and different operating systems.
29422   #
29423 
29424   #
29425   # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29426   #
29427   if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29428     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29429     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29430     CFLAGS="$CFLAGS -mstackrealign"
29431     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29432 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29433     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29434 /* end confdefs.h.  */
29435 int main() { return 0; }
29436 _ACEOF
29437 if ac_fn_cxx_try_link "$LINENO"; then :
29438 
29439           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29440 $as_echo "yes" >&6; }
29441 
29442 else
29443 
29444           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29445 $as_echo "no" >&6; }
29446           as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29447 
29448 
29449 fi
29450 rm -f core conftest.err conftest.$ac_objext \
29451     conftest$ac_exeext conftest.$ac_ext
29452   fi
29453 
29454   C_FLAG_DEPS="-MMD -MF"
29455   CXX_FLAG_DEPS="-MMD -MF"
29456 
29457   case $COMPILER_TYPE in
29458     CC )
29459       case $COMPILER_NAME in
29460         gcc )
29461           case $OPENJDK_TARGET_OS in
29462             macosx )
29463               # On MacOSX we optimize for size, something
29464               # we should do for all platforms?
29465               C_O_FLAG_HI="-Os"
29466               C_O_FLAG_NORM="-Os"
29467               C_O_FLAG_NONE=""
29468               ;;
29469             *)
29470               C_O_FLAG_HI="-O3"
29471               C_O_FLAG_NORM="-O2"
29472               C_O_FLAG_NONE="-O0"
29473               ;;
29474           esac
29475           CXX_O_FLAG_HI="$C_O_FLAG_HI"
29476           CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29477           CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29478           CFLAGS_DEBUG_SYMBOLS="-g"
29479           CXXFLAGS_DEBUG_SYMBOLS="-g"
29480           if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29481             CFLAGS_DEBUG_SYMBOLS="-g1"
29482             CXXFLAGS_DEBUG_SYMBOLS="-g1"
29483           fi
29484           ;;
29485         ossc )
29486           #
29487           # Forte has different names for this with their C++ compiler...
29488           #
29489           C_FLAG_DEPS="-xMMD -xMF"
29490           CXX_FLAG_DEPS="-xMMD -xMF"
29491 
29492           # Extra options used with HIGHEST
29493           #
29494           # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29495           #          done with care, there are some assumptions below that need to
29496           #          be understood about the use of pointers, and IEEE behavior.
29497           #
29498           # Use non-standard floating point mode (not IEEE 754)
29499           CC_HIGHEST="$CC_HIGHEST -fns"
29500           # Do some simplification of floating point arithmetic (not IEEE 754)
29501           CC_HIGHEST="$CC_HIGHEST -fsimple"
29502           # Use single precision floating point with 'float'
29503           CC_HIGHEST="$CC_HIGHEST -fsingle"
29504           # Assume memory references via basic pointer types do not alias
29505           #   (Source with excessing pointer casting and data access with mixed
29506           #    pointer types are not recommended)
29507           CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29508           # Use intrinsic or inline versions for math/std functions
29509           #   (If you expect perfect errno behavior, do not use this)
29510           CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29511           # Loop data dependency optimizations (need -xO3 or higher)
29512           CC_HIGHEST="$CC_HIGHEST -xdepend"
29513           # Pointer parameters to functions do not overlap
29514           #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29515           #    If you pass in multiple pointers to the same data, do not use this)
29516           CC_HIGHEST="$CC_HIGHEST -xrestrict"
29517           # Inline some library routines
29518           #   (If you expect perfect errno behavior, do not use this)
29519           CC_HIGHEST="$CC_HIGHEST -xlibmil"
29520           # Use optimized math routines
29521           #   (If you expect perfect errno behavior, do not use this)
29522           #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29523           #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29524 
29525           if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29526             CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29527             CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29528           fi
29529 
29530           case $OPENJDK_TARGET_CPU_ARCH in
29531             x86)
29532               C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29533               C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29534               C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29535               C_O_FLAG_NONE="-xregs=no%frameptr"
29536               CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29537               CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29538               CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29539               CXX_O_FLAG_NONE="-xregs=no%frameptr"
29540               if test "x$OPENJDK_TARGET_CPU" = xx86; then
29541                 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29542                 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29543               fi
29544               ;;
29545             sparc)
29546               CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29547               CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29548               C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29549               C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29550               C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29551               C_O_FLAG_NONE=""
29552               CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29553               CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29554               CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29555               CXX_O_FLAG_NONE=""
29556               ;;
29557           esac
29558 
29559           CFLAGS_DEBUG_SYMBOLS="-g -xs"
29560           CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29561           ;;
29562         xlc )
29563           C_FLAG_DEPS="-qmakedep=gcc -MF"
29564           CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29565           C_O_FLAG_HIGHEST="-O3"
29566           C_O_FLAG_HI="-O3 -qstrict"
29567           C_O_FLAG_NORM="-O2"
29568           C_O_FLAG_NONE=""
29569           CXX_O_FLAG_HIGHEST="-O3"
29570           CXX_O_FLAG_HI="-O3 -qstrict"
29571           CXX_O_FLAG_NORM="-O2"
29572           CXX_O_FLAG_NONE=""
29573           CFLAGS_DEBUG_SYMBOLS="-g"
29574           CXXFLAGS_DEBUG_SYMBOLS="-g"
29575           LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29576           CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29577           CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29578           ;;
29579       esac
29580       ;;
29581     CL )
29582       C_O_FLAG_HIGHEST="-O2"
29583       C_O_FLAG_HI="-O1"
29584       C_O_FLAG_NORM="-O1"
29585       C_O_FLAG_NONE="-Od"
29586       CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29587       CXX_O_FLAG_HI="$C_O_FLAG_HI"
29588       CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29589       CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29590       ;;
29591   esac
29592 
29593   if test -z "$C_O_FLAG_HIGHEST"; then
29594     C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29595   fi
29596 
29597   if test -z "$CXX_O_FLAG_HIGHEST"; then
29598     CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29599   fi
29600 
29601 
29602 
29603 
29604 
29605 
29606 
29607 
29608 
29609 
29610 
29611 
29612 
29613 
29614   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29615     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29616 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29617   fi
29618 
29619   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29620     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29621 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29622   fi
29623 
29624   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29625     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29626 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29627   fi
29628 
29629 
29630 # Check whether --with-extra-cflags was given.
29631 if test "${with_extra_cflags+set}" = set; then :
29632   withval=$with_extra_cflags;
29633 fi
29634 
29635 
29636 
29637 # Check whether --with-extra-cxxflags was given.
29638 if test "${with_extra_cxxflags+set}" = set; then :
29639   withval=$with_extra_cxxflags;
29640 fi
29641 
29642 
29643 
29644 # Check whether --with-extra-ldflags was given.
29645 if test "${with_extra_ldflags+set}" = set; then :
29646   withval=$with_extra_ldflags;
29647 fi
29648 
29649 
29650   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29651   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29652   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29653 
29654   # Hotspot needs these set in their legacy form
29655   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29656   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29657   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29658 
29659 
29660 
29661 
29662 
29663   ###############################################################################
29664   #
29665   # Now setup the CFLAGS and LDFLAGS for the JDK build.
29666   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29667   #
29668   case $COMPILER_NAME in
29669     gcc )
29670       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29671       -pipe \
29672       -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29673       case $OPENJDK_TARGET_CPU_ARCH in
29674         arm )
29675           # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29676           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29677           ;;
29678         ppc )
29679           # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29680           ;;
29681         * )
29682           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29683           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29684           ;;
29685       esac
29686       ;;
29687     ossc )
29688       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29689       case $OPENJDK_TARGET_CPU_ARCH in
29690         x86 )
29691           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29692           CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29693           ;;
29694       esac
29695 
29696       CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29697       CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29698 
29699       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29700       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29701       ;;
29702     xlc )
29703       CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29704       CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29705 
29706       LDFLAGS_JDK="$LDFLAGS_JDK"
29707       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29708       ;;
29709     cl )
29710       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29711       -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29712       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29713       -DWIN32 -DIAL"
29714       case $OPENJDK_TARGET_CPU in
29715         x86 )
29716           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29717           ;;
29718         x86_64 )
29719           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29720           ;;
29721       esac
29722       ;;
29723   esac
29724 
29725   ###############################################################################
29726 
29727   # Adjust flags according to debug level.
29728   case $DEBUG_LEVEL in
29729     fastdebug )
29730       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29731       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29732       C_O_FLAG_HI="$C_O_FLAG_NORM"
29733       C_O_FLAG_NORM="$C_O_FLAG_NORM"
29734       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29735       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29736       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29737       ;;
29738     slowdebug )
29739       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29740       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29741       C_O_FLAG_HI="$C_O_FLAG_NONE"
29742       C_O_FLAG_NORM="$C_O_FLAG_NONE"
29743       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29744       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29745       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29746       ;;
29747   esac
29748 
29749   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29750 
29751   # The package path is used only on macosx?
29752   PACKAGE_PATH=/opt/local
29753 
29754 
29755   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29756     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29757     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29758     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29759     #   Note: -Dmacro         is the same as    #define macro 1
29760     #         -Dmacro=        is the same as    #define macro
29761     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29762       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29763     else
29764       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29765     fi
29766   else
29767     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29768   fi
29769   if test "x$OPENJDK_TARGET_OS" = xlinux; then
29770     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29771   fi
29772   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29773     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29774   fi
29775   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29776     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29777   fi
29778   if test "x$OPENJDK_TARGET_OS" = xaix; then
29779     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29780   fi
29781   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29782     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29783     # Setting these parameters makes it an error to link to macosx APIs that are
29784     # newer than the given OS version and makes the linked binaries compatible even
29785     # if built on a newer version of the OS.
29786     # The expected format is X.Y.Z
29787     MACOSX_VERSION_MIN=10.7.0
29788 
29789     # The macro takes the version with no dots, ex: 1070
29790     # Let the flags variables get resolved in make for easier override on make
29791     # command line.
29792     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29793     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29794   fi
29795   if test "x$OPENJDK_TARGET_OS" = xbsd; then
29796     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29797   fi
29798   if test "x$DEBUG_LEVEL" = xrelease; then
29799     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29800   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29801     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29802   fi
29803   else
29804     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29805   fi
29806 
29807   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29808   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29809 
29810   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29811       -I${JDK_OUTPUTDIR}/include \
29812       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29813       -I${JDK_TOPDIR}/src/share/javavm/export \
29814       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29815       -I${JDK_TOPDIR}/src/share/native/common \
29816       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29817 
29818   # The shared libraries are compiled using the picflag.
29819   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29820   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29821 
29822   # Executable flags
29823   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29824   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29825 
29826   # Now this is odd. The JDK native libraries have to link against libjvm.so
29827   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29828   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29829   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29830   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29831   # libraries will link to whatever is in memory. Yuck.
29832   #
29833   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29834   if test "x$COMPILER_NAME" = xcl; then
29835     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29836     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29837       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29838     fi
29839     # TODO: make -debug optional "--disable-full-debug-symbols"
29840     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29841     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29842     LDFLAGS_JDKLIB_SUFFIX=""
29843     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29844       LDFLAGS_STACK_SIZE=1048576
29845     else
29846       LDFLAGS_STACK_SIZE=327680
29847     fi
29848     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29849   else
29850     if test "x$COMPILER_NAME" = xgcc; then
29851       # If this is a --hash-style=gnu system, use --hash-style=both, why?
29852       HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29853       if test -n "$HAS_GNU_HASH"; then
29854         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29855       fi
29856       if test "x$OPENJDK_TARGET_OS" = xlinux; then
29857         # And since we now know that the linker is gnu, then add -z defs, to forbid
29858         # undefined symbols in object files.
29859         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29860         if test "x$DEBUG_LEVEL" = "xrelease"; then
29861           # When building release libraries, tell the linker optimize them.
29862           # Should this be supplied to the OSS linker as well?
29863           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29864         fi
29865       fi
29866     fi
29867     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29868         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29869 
29870     # On some platforms (mac) the linker warns about non existing -L dirs.
29871     # Add server first if available. Linking aginst client does not always produce the same results.
29872     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29873     # Default to server for other variants.
29874     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29875       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29876     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29877       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29878     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29879       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29880     else
29881       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29882     fi
29883 
29884     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29885     if test "x$COMPILER_NAME" = xossc; then
29886       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29887     fi
29888 
29889     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29890     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29891       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29892     fi
29893   fi
29894 
29895 
29896 
29897 
29898 
29899 
29900 
29901 
29902 
29903 
29904 
29905 
29906 
29907 
29908 
29909   # Some Zero and Shark settings.
29910   # ZERO_ARCHFLAG tells the compiler which mode to build for
29911   case "${OPENJDK_TARGET_CPU}" in
29912     s390)
29913       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
29914       ;;
29915     *)
29916       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29917   esac
29918 
29919   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29920 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29921   supports=yes
29922 
29923   saved_cflags="$CFLAGS"
29924   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29925   ac_ext=c
29926 ac_cpp='$CPP $CPPFLAGS'
29927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29930 
29931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29932 /* end confdefs.h.  */
29933 int i;
29934 _ACEOF
29935 if ac_fn_c_try_compile "$LINENO"; then :
29936 
29937 else
29938   supports=no
29939 fi
29940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29941   ac_ext=cpp
29942 ac_cpp='$CXXCPP $CPPFLAGS'
29943 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29944 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29945 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29946 
29947   CFLAGS="$saved_cflags"
29948 
29949   saved_cxxflags="$CXXFLAGS"
29950   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29951   ac_ext=cpp
29952 ac_cpp='$CXXCPP $CPPFLAGS'
29953 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29954 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29955 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29956 
29957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29958 /* end confdefs.h.  */
29959 int i;
29960 _ACEOF
29961 if ac_fn_cxx_try_compile "$LINENO"; then :
29962 
29963 else
29964   supports=no
29965 fi
29966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29967   ac_ext=cpp
29968 ac_cpp='$CXXCPP $CPPFLAGS'
29969 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29970 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29971 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29972 
29973   CXXFLAGS="$saved_cxxflags"
29974 
29975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29976 $as_echo "$supports" >&6; }
29977   if test "x$supports" = "xyes" ; then
29978     :
29979   else
29980     ZERO_ARCHFLAG=""
29981   fi
29982 
29983 
29984 
29985   # Check that the compiler supports -mX (or -qX on AIX) flags
29986   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29987 
29988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
29989 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29990   supports=yes
29991 
29992   saved_cflags="$CFLAGS"
29993   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29994   ac_ext=c
29995 ac_cpp='$CPP $CPPFLAGS'
29996 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29997 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29998 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29999 
30000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30001 /* end confdefs.h.  */
30002 int i;
30003 _ACEOF
30004 if ac_fn_c_try_compile "$LINENO"; then :
30005 
30006 else
30007   supports=no
30008 fi
30009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30010   ac_ext=cpp
30011 ac_cpp='$CXXCPP $CPPFLAGS'
30012 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30013 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30014 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30015 
30016   CFLAGS="$saved_cflags"
30017 
30018   saved_cxxflags="$CXXFLAGS"
30019   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30020   ac_ext=cpp
30021 ac_cpp='$CXXCPP $CPPFLAGS'
30022 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30023 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30024 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30025 
30026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30027 /* end confdefs.h.  */
30028 int i;
30029 _ACEOF
30030 if ac_fn_cxx_try_compile "$LINENO"; then :
30031 
30032 else
30033   supports=no
30034 fi
30035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30036   ac_ext=cpp
30037 ac_cpp='$CXXCPP $CPPFLAGS'
30038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30041 
30042   CXXFLAGS="$saved_cxxflags"
30043 
30044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30045 $as_echo "$supports" >&6; }
30046   if test "x$supports" = "xyes" ; then
30047     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30048   else
30049     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30050   fi
30051 
30052 
30053 
30054 
30055   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30056   USING_BROKEN_SUSE_LD=no
30057   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30058     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30059 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30060     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30061     echo "int main() { }" > main.c
30062     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30063       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30064 $as_echo "no" >&6; }
30065       USING_BROKEN_SUSE_LD=no
30066     else
30067       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30068 $as_echo "yes" >&6; }
30069       USING_BROKEN_SUSE_LD=yes
30070     fi
30071     rm -rf version-script.map main.c
30072   fi
30073 
30074 
30075 
30076 # Setup debug symbols (need objcopy from the toolchain for that)
30077 
30078   #
30079   # ENABLE_DEBUG_SYMBOLS
30080   # This must be done after the toolchain is setup, since we're looking at objcopy.
30081   #
30082   # Check whether --enable-debug-symbols was given.
30083 if test "${enable_debug_symbols+set}" = set; then :
30084   enableval=$enable_debug_symbols;
30085 fi
30086 
30087 
30088   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30089 $as_echo_n "checking if we should generate debug symbols... " >&6; }
30090 
30091   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30092     # explicit enabling of enable-debug-symbols and can't find objcopy
30093     #   this is an error
30094     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30095   fi
30096 
30097   if test "x$enable_debug_symbols" = "xyes"; then
30098     ENABLE_DEBUG_SYMBOLS=true
30099   elif test "x$enable_debug_symbols" = "xno"; then
30100     ENABLE_DEBUG_SYMBOLS=false
30101   else
30102     # Default is on if objcopy is found
30103     if test "x$OBJCOPY" != x; then
30104       ENABLE_DEBUG_SYMBOLS=true
30105     # MacOS X and Windows don't use objcopy but default is on for those OSes
30106     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30107       ENABLE_DEBUG_SYMBOLS=true
30108     else
30109       ENABLE_DEBUG_SYMBOLS=false
30110     fi
30111   fi
30112 
30113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30114 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30115 
30116   #
30117   # ZIP_DEBUGINFO_FILES
30118   #
30119   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30120 $as_echo_n "checking if we should zip debug-info files... " >&6; }
30121   # Check whether --enable-zip-debug-info was given.
30122 if test "${enable_zip_debug_info+set}" = set; then :
30123   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30124 else
30125   enable_zip_debug_info="yes"
30126 fi
30127 
30128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30129 $as_echo "${enable_zip_debug_info}" >&6; }
30130 
30131   if test "x${enable_zip_debug_info}" = "xno"; then
30132     ZIP_DEBUGINFO_FILES=false
30133   else
30134     ZIP_DEBUGINFO_FILES=true
30135   fi
30136 
30137 
30138 
30139 
30140 
30141 
30142 
30143 ###############################################################################
30144 #
30145 # Check dependencies for external and internal libraries.
30146 #
30147 ###############################################################################
30148 
30149 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30150 
30151   # When using cygwin or msys, we need a wrapper binary that renames
30152   # /cygdrive/c/ arguments into c:/ arguments and peeks into
30153   # @files and rewrites these too! This wrapper binary is
30154   # called fixpath.
30155   FIXPATH=
30156   if test "x$OPENJDK_BUILD_OS" = xwindows; then
30157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30158 $as_echo_n "checking if fixpath can be created... " >&6; }
30159     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30160     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30161     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30162       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30163       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30164       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30165       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30166     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30167       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30168       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30169 
30170       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30171       # @ was chosen as separator to minimize risk of other tools messing around with it
30172       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30173       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30174 
30175       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30176     fi
30177     rm -f $OUTPUT_ROOT/fixpath*
30178     cd $OUTPUT_ROOT
30179     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30180     cd $CURDIR
30181 
30182     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30184 $as_echo "no" >&6; }
30185       cat $OUTPUT_ROOT/fixpath1.log
30186       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30187     fi
30188     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30189 $as_echo "yes" >&6; }
30190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30191 $as_echo_n "checking if fixpath.exe works... " >&6; }
30192     cd $OUTPUT_ROOT
30193     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30194     cd $CURDIR
30195     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30196       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30197 $as_echo "no" >&6; }
30198       cat $OUTPUT_ROOT/fixpath2.log
30199       as_fn_error $? "fixpath did not work!" "$LINENO" 5
30200     fi
30201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30202 $as_echo "yes" >&6; }
30203     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30204   fi
30205 
30206 
30207 
30208 
30209 
30210 
30211   ###############################################################################
30212   #
30213   # OS specific settings that we never will need to probe.
30214   #
30215   if test "x$OPENJDK_TARGET_OS" = xlinux; then
30216     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30217 $as_echo_n "checking what is not needed on Linux?... " >&6; }
30218     PULSE_NOT_NEEDED=yes
30219     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30220 $as_echo "pulse" >&6; }
30221   fi
30222 
30223   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30224     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30225 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
30226     ALSA_NOT_NEEDED=yes
30227     PULSE_NOT_NEEDED=yes
30228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30229 $as_echo "alsa pulse" >&6; }
30230   fi
30231 
30232   if test "x$OPENJDK_TARGET_OS" = xaix; then
30233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30234 $as_echo_n "checking what is not needed on AIX?... " >&6; }
30235     ALSA_NOT_NEEDED=yes
30236     PULSE_NOT_NEEDED=yes
30237     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30238 $as_echo "alsa pulse" >&6; }
30239   fi
30240 
30241 
30242   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30244 $as_echo_n "checking what is not needed on Windows?... " >&6; }
30245     CUPS_NOT_NEEDED=yes
30246     ALSA_NOT_NEEDED=yes
30247     PULSE_NOT_NEEDED=yes
30248     X11_NOT_NEEDED=yes
30249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30250 $as_echo "alsa cups pulse x11" >&6; }
30251   fi
30252 
30253   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30254     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30255 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30256     ALSA_NOT_NEEDED=yes
30257     PULSE_NOT_NEEDED=yes
30258     X11_NOT_NEEDED=yes
30259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30260 $as_echo "alsa pulse x11" >&6; }
30261   fi
30262 
30263   if test "x$OPENJDK_TARGET_OS" = xbsd; then
30264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30265 $as_echo_n "checking what is not needed on bsd?... " >&6; }
30266     ALSA_NOT_NEEDED=yes
30267     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30268 $as_echo "alsa" >&6; }
30269   fi
30270 
30271   if test "x$OPENJDK" = "xfalse"; then
30272     FREETYPE_NOT_NEEDED=yes
30273   fi
30274 
30275   if test "x$SUPPORT_HEADFUL" = xno; then
30276     X11_NOT_NEEDED=yes
30277   fi
30278 
30279   # Deprecated and now ignored
30280 
30281   # Check whether --enable-macosx-runtime-support was given.
30282 if test "${enable_macosx_runtime_support+set}" = set; then :
30283   enableval=$enable_macosx_runtime_support;
30284 fi
30285 
30286   if test "x$enable_macosx_runtime_support" != x; then
30287     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30288 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30289   fi
30290 
30291 
30292 
30293 
30294   ###############################################################################
30295   #
30296   # Check for X Windows
30297   #
30298 
30299   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30300   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30301   # --x-libraries for the sysroot, if that seems to be correct.
30302   if test "x$SYS_ROOT" != "x/"; then
30303     if test "x$x_includes" = xNONE; then
30304       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30305         x_includes="$SYS_ROOT/usr/X11R6/include"
30306       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30307         x_includes="$SYS_ROOT/usr/include"
30308       fi
30309     fi
30310     if test "x$x_libraries" = xNONE; then
30311       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30312         x_libraries="$SYS_ROOT/usr/X11R6/lib"
30313       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30314         x_libraries="$SYS_ROOT/usr/lib64"
30315       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30316         x_libraries="$SYS_ROOT/usr/lib"
30317       fi
30318     fi
30319   fi
30320 
30321   # Now let autoconf do it's magic
30322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30323 $as_echo_n "checking for X... " >&6; }
30324 
30325 
30326 # Check whether --with-x was given.
30327 if test "${with_x+set}" = set; then :
30328   withval=$with_x;
30329 fi
30330 
30331 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30332 if test "x$with_x" = xno; then
30333   # The user explicitly disabled X.
30334   have_x=disabled
30335 else
30336   case $x_includes,$x_libraries in #(
30337     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30338     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30339   $as_echo_n "(cached) " >&6
30340 else
30341   # One or both of the vars are not set, and there is no cached value.
30342 ac_x_includes=no ac_x_libraries=no
30343 rm -f -r conftest.dir
30344 if mkdir conftest.dir; then
30345   cd conftest.dir
30346   cat >Imakefile <<'_ACEOF'
30347 incroot:
30348         @echo incroot='${INCROOT}'
30349 usrlibdir:
30350         @echo usrlibdir='${USRLIBDIR}'
30351 libdir:
30352         @echo libdir='${LIBDIR}'
30353 _ACEOF
30354   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30355     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30356     for ac_var in incroot usrlibdir libdir; do
30357       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30358     done
30359     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30360     for ac_extension in a so sl dylib la dll; do
30361       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30362          test -f "$ac_im_libdir/libX11.$ac_extension"; then
30363         ac_im_usrlibdir=$ac_im_libdir; break
30364       fi
30365     done
30366     # Screen out bogus values from the imake configuration.  They are
30367     # bogus both because they are the default anyway, and because
30368     # using them would break gcc on systems where it needs fixed includes.
30369     case $ac_im_incroot in
30370         /usr/include) ac_x_includes= ;;
30371         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30372     esac
30373     case $ac_im_usrlibdir in
30374         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
30375         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30376     esac
30377   fi
30378   cd ..
30379   rm -f -r conftest.dir
30380 fi
30381 
30382 # Standard set of common directories for X headers.
30383 # Check X11 before X11Rn because it is often a symlink to the current release.
30384 ac_x_header_dirs='
30385 /usr/X11/include
30386 /usr/X11R7/include
30387 /usr/X11R6/include
30388 /usr/X11R5/include
30389 /usr/X11R4/include
30390 
30391 /usr/include/X11
30392 /usr/include/X11R7
30393 /usr/include/X11R6
30394 /usr/include/X11R5
30395 /usr/include/X11R4
30396 
30397 /usr/local/X11/include
30398 /usr/local/X11R7/include
30399 /usr/local/X11R6/include
30400 /usr/local/X11R5/include
30401 /usr/local/X11R4/include
30402 
30403 /usr/local/include/X11
30404 /usr/local/include/X11R7
30405 /usr/local/include/X11R6
30406 /usr/local/include/X11R5
30407 /usr/local/include/X11R4
30408 
30409 /usr/X386/include
30410 /usr/x386/include
30411 /usr/XFree86/include/X11
30412 
30413 /usr/include
30414 /usr/local/include
30415 /usr/unsupported/include
30416 /usr/athena/include
30417 /usr/local/x11r5/include
30418 /usr/lpp/Xamples/include
30419 
30420 /usr/openwin/include
30421 /usr/openwin/share/include'
30422 
30423 if test "$ac_x_includes" = no; then
30424   # Guess where to find include files, by looking for Xlib.h.
30425   # First, try using that file with no special directory specified.
30426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30427 /* end confdefs.h.  */
30428 #include <X11/Xlib.h>
30429 _ACEOF
30430 if ac_fn_cxx_try_cpp "$LINENO"; then :
30431   # We can compile using X headers with no special include directory.
30432 ac_x_includes=
30433 else
30434   for ac_dir in $ac_x_header_dirs; do
30435   if test -r "$ac_dir/X11/Xlib.h"; then
30436     ac_x_includes=$ac_dir
30437     break
30438   fi
30439 done
30440 fi
30441 rm -f conftest.err conftest.i conftest.$ac_ext
30442 fi # $ac_x_includes = no
30443 
30444 if test "$ac_x_libraries" = no; then
30445   # Check for the libraries.
30446   # See if we find them without any special options.
30447   # Don't add to $LIBS permanently.
30448   ac_save_LIBS=$LIBS
30449   LIBS="-lX11 $LIBS"
30450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30451 /* end confdefs.h.  */
30452 #include <X11/Xlib.h>
30453 int
30454 main ()
30455 {
30456 XrmInitialize ()
30457   ;
30458   return 0;
30459 }
30460 _ACEOF
30461 if ac_fn_cxx_try_link "$LINENO"; then :
30462   LIBS=$ac_save_LIBS
30463 # We can link X programs with no special library path.
30464 ac_x_libraries=
30465 else
30466   LIBS=$ac_save_LIBS
30467 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30468 do
30469   # Don't even attempt the hair of trying to link an X program!
30470   for ac_extension in a so sl dylib la dll; do
30471     if test -r "$ac_dir/libX11.$ac_extension"; then
30472       ac_x_libraries=$ac_dir
30473       break 2
30474     fi
30475   done
30476 done
30477 fi
30478 rm -f core conftest.err conftest.$ac_objext \
30479     conftest$ac_exeext conftest.$ac_ext
30480 fi # $ac_x_libraries = no
30481 
30482 case $ac_x_includes,$ac_x_libraries in #(
30483   no,* | *,no | *\'*)
30484     # Didn't find X, or a directory has "'" in its name.
30485     ac_cv_have_x="have_x=no";; #(
30486   *)
30487     # Record where we found X for the cache.
30488     ac_cv_have_x="have_x=yes\
30489         ac_x_includes='$ac_x_includes'\
30490         ac_x_libraries='$ac_x_libraries'"
30491 esac
30492 fi
30493 ;; #(
30494     *) have_x=yes;;
30495   esac
30496   eval "$ac_cv_have_x"
30497 fi # $with_x != no
30498 
30499 if test "$have_x" != yes; then
30500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30501 $as_echo "$have_x" >&6; }
30502   no_x=yes
30503 else
30504   # If each of the values was on the command line, it overrides each guess.
30505   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30506   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30507   # Update the cache value to reflect the command line values.
30508   ac_cv_have_x="have_x=yes\
30509         ac_x_includes='$x_includes'\
30510         ac_x_libraries='$x_libraries'"
30511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30512 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30513 fi
30514 
30515   if test "$no_x" = yes; then
30516   # Not all programs may use this symbol, but it does not hurt to define it.
30517 
30518 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30519 
30520   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30521 else
30522   if test -n "$x_includes"; then
30523     X_CFLAGS="$X_CFLAGS -I$x_includes"
30524   fi
30525 
30526   # It would also be nice to do this for all -L options, not just this one.
30527   if test -n "$x_libraries"; then
30528     X_LIBS="$X_LIBS -L$x_libraries"
30529     # For Solaris; some versions of Sun CC require a space after -R and
30530     # others require no space.  Words are not sufficient . . . .
30531     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30532 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30533     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30534     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30535     ac_cxx_werror_flag=yes
30536     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30537 /* end confdefs.h.  */
30538 
30539 int
30540 main ()
30541 {
30542 
30543   ;
30544   return 0;
30545 }
30546 _ACEOF
30547 if ac_fn_cxx_try_link "$LINENO"; then :
30548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30549 $as_echo "no" >&6; }
30550        X_LIBS="$X_LIBS -R$x_libraries"
30551 else
30552   LIBS="$ac_xsave_LIBS -R $x_libraries"
30553        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30554 /* end confdefs.h.  */
30555 
30556 int
30557 main ()
30558 {
30559 
30560   ;
30561   return 0;
30562 }
30563 _ACEOF
30564 if ac_fn_cxx_try_link "$LINENO"; then :
30565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30566 $as_echo "yes" >&6; }
30567           X_LIBS="$X_LIBS -R $x_libraries"
30568 else
30569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30570 $as_echo "neither works" >&6; }
30571 fi
30572 rm -f core conftest.err conftest.$ac_objext \
30573     conftest$ac_exeext conftest.$ac_ext
30574 fi
30575 rm -f core conftest.err conftest.$ac_objext \
30576     conftest$ac_exeext conftest.$ac_ext
30577     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30578     LIBS=$ac_xsave_LIBS
30579   fi
30580 
30581   # Check for system-dependent libraries X programs must link with.
30582   # Do this before checking for the system-independent R6 libraries
30583   # (-lICE), since we may need -lsocket or whatever for X linking.
30584 
30585   if test "$ISC" = yes; then
30586     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30587   else
30588     # Martyn Johnson says this is needed for Ultrix, if the X
30589     # libraries were built with DECnet support.  And Karl Berry says
30590     # the Alpha needs dnet_stub (dnet does not exist).
30591     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30592     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30593 /* end confdefs.h.  */
30594 
30595 /* Override any GCC internal prototype to avoid an error.
30596    Use char because int might match the return type of a GCC
30597    builtin and then its argument prototype would still apply.  */
30598 #ifdef __cplusplus
30599 extern "C"
30600 #endif
30601 char XOpenDisplay ();
30602 int
30603 main ()
30604 {
30605 return XOpenDisplay ();
30606   ;
30607   return 0;
30608 }
30609 _ACEOF
30610 if ac_fn_cxx_try_link "$LINENO"; then :
30611 
30612 else
30613   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30614 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30615 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30616   $as_echo_n "(cached) " >&6
30617 else
30618   ac_check_lib_save_LIBS=$LIBS
30619 LIBS="-ldnet  $LIBS"
30620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30621 /* end confdefs.h.  */
30622 
30623 /* Override any GCC internal prototype to avoid an error.
30624    Use char because int might match the return type of a GCC
30625    builtin and then its argument prototype would still apply.  */
30626 #ifdef __cplusplus
30627 extern "C"
30628 #endif
30629 char dnet_ntoa ();
30630 int
30631 main ()
30632 {
30633 return dnet_ntoa ();
30634   ;
30635   return 0;
30636 }
30637 _ACEOF
30638 if ac_fn_cxx_try_link "$LINENO"; then :
30639   ac_cv_lib_dnet_dnet_ntoa=yes
30640 else
30641   ac_cv_lib_dnet_dnet_ntoa=no
30642 fi
30643 rm -f core conftest.err conftest.$ac_objext \
30644     conftest$ac_exeext conftest.$ac_ext
30645 LIBS=$ac_check_lib_save_LIBS
30646 fi
30647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30648 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30649 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30650   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30651 fi
30652 
30653     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30654       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30655 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30656 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30657   $as_echo_n "(cached) " >&6
30658 else
30659   ac_check_lib_save_LIBS=$LIBS
30660 LIBS="-ldnet_stub  $LIBS"
30661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30662 /* end confdefs.h.  */
30663 
30664 /* Override any GCC internal prototype to avoid an error.
30665    Use char because int might match the return type of a GCC
30666    builtin and then its argument prototype would still apply.  */
30667 #ifdef __cplusplus
30668 extern "C"
30669 #endif
30670 char dnet_ntoa ();
30671 int
30672 main ()
30673 {
30674 return dnet_ntoa ();
30675   ;
30676   return 0;
30677 }
30678 _ACEOF
30679 if ac_fn_cxx_try_link "$LINENO"; then :
30680   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30681 else
30682   ac_cv_lib_dnet_stub_dnet_ntoa=no
30683 fi
30684 rm -f core conftest.err conftest.$ac_objext \
30685     conftest$ac_exeext conftest.$ac_ext
30686 LIBS=$ac_check_lib_save_LIBS
30687 fi
30688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30689 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30690 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30691   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30692 fi
30693 
30694     fi
30695 fi
30696 rm -f core conftest.err conftest.$ac_objext \
30697     conftest$ac_exeext conftest.$ac_ext
30698     LIBS="$ac_xsave_LIBS"
30699 
30700     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30701     # to get the SysV transport functions.
30702     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30703     # needs -lnsl.
30704     # The nsl library prevents programs from opening the X display
30705     # on Irix 5.2, according to T.E. Dickey.
30706     # The functions gethostbyname, getservbyname, and inet_addr are
30707     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30708     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30709 if test "x$ac_cv_func_gethostbyname" = xyes; then :
30710 
30711 fi
30712 
30713     if test $ac_cv_func_gethostbyname = no; then
30714       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30715 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30716 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30717   $as_echo_n "(cached) " >&6
30718 else
30719   ac_check_lib_save_LIBS=$LIBS
30720 LIBS="-lnsl  $LIBS"
30721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30722 /* end confdefs.h.  */
30723 
30724 /* Override any GCC internal prototype to avoid an error.
30725    Use char because int might match the return type of a GCC
30726    builtin and then its argument prototype would still apply.  */
30727 #ifdef __cplusplus
30728 extern "C"
30729 #endif
30730 char gethostbyname ();
30731 int
30732 main ()
30733 {
30734 return gethostbyname ();
30735   ;
30736   return 0;
30737 }
30738 _ACEOF
30739 if ac_fn_cxx_try_link "$LINENO"; then :
30740   ac_cv_lib_nsl_gethostbyname=yes
30741 else
30742   ac_cv_lib_nsl_gethostbyname=no
30743 fi
30744 rm -f core conftest.err conftest.$ac_objext \
30745     conftest$ac_exeext conftest.$ac_ext
30746 LIBS=$ac_check_lib_save_LIBS
30747 fi
30748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30749 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30750 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30751   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30752 fi
30753 
30754       if test $ac_cv_lib_nsl_gethostbyname = no; then
30755         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30756 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30757 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30758   $as_echo_n "(cached) " >&6
30759 else
30760   ac_check_lib_save_LIBS=$LIBS
30761 LIBS="-lbsd  $LIBS"
30762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30763 /* end confdefs.h.  */
30764 
30765 /* Override any GCC internal prototype to avoid an error.
30766    Use char because int might match the return type of a GCC
30767    builtin and then its argument prototype would still apply.  */
30768 #ifdef __cplusplus
30769 extern "C"
30770 #endif
30771 char gethostbyname ();
30772 int
30773 main ()
30774 {
30775 return gethostbyname ();
30776   ;
30777   return 0;
30778 }
30779 _ACEOF
30780 if ac_fn_cxx_try_link "$LINENO"; then :
30781   ac_cv_lib_bsd_gethostbyname=yes
30782 else
30783   ac_cv_lib_bsd_gethostbyname=no
30784 fi
30785 rm -f core conftest.err conftest.$ac_objext \
30786     conftest$ac_exeext conftest.$ac_ext
30787 LIBS=$ac_check_lib_save_LIBS
30788 fi
30789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30790 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30791 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30792   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30793 fi
30794 
30795       fi
30796     fi
30797 
30798     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30799     # socket/setsockopt and other routines are undefined under SCO ODT
30800     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30801     # on later versions), says Simon Leinen: it contains gethostby*
30802     # variants that don't use the name server (or something).  -lsocket
30803     # must be given before -lnsl if both are needed.  We assume that
30804     # if connect needs -lnsl, so does gethostbyname.
30805     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30806 if test "x$ac_cv_func_connect" = xyes; then :
30807 
30808 fi
30809 
30810     if test $ac_cv_func_connect = no; then
30811       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30812 $as_echo_n "checking for connect in -lsocket... " >&6; }
30813 if ${ac_cv_lib_socket_connect+:} false; then :
30814   $as_echo_n "(cached) " >&6
30815 else
30816   ac_check_lib_save_LIBS=$LIBS
30817 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30819 /* end confdefs.h.  */
30820 
30821 /* Override any GCC internal prototype to avoid an error.
30822    Use char because int might match the return type of a GCC
30823    builtin and then its argument prototype would still apply.  */
30824 #ifdef __cplusplus
30825 extern "C"
30826 #endif
30827 char connect ();
30828 int
30829 main ()
30830 {
30831 return connect ();
30832   ;
30833   return 0;
30834 }
30835 _ACEOF
30836 if ac_fn_cxx_try_link "$LINENO"; then :
30837   ac_cv_lib_socket_connect=yes
30838 else
30839   ac_cv_lib_socket_connect=no
30840 fi
30841 rm -f core conftest.err conftest.$ac_objext \
30842     conftest$ac_exeext conftest.$ac_ext
30843 LIBS=$ac_check_lib_save_LIBS
30844 fi
30845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30846 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30847 if test "x$ac_cv_lib_socket_connect" = xyes; then :
30848   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30849 fi
30850 
30851     fi
30852 
30853     # Guillermo Gomez says -lposix is necessary on A/UX.
30854     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30855 if test "x$ac_cv_func_remove" = xyes; then :
30856 
30857 fi
30858 
30859     if test $ac_cv_func_remove = no; then
30860       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30861 $as_echo_n "checking for remove in -lposix... " >&6; }
30862 if ${ac_cv_lib_posix_remove+:} false; then :
30863   $as_echo_n "(cached) " >&6
30864 else
30865   ac_check_lib_save_LIBS=$LIBS
30866 LIBS="-lposix  $LIBS"
30867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30868 /* end confdefs.h.  */
30869 
30870 /* Override any GCC internal prototype to avoid an error.
30871    Use char because int might match the return type of a GCC
30872    builtin and then its argument prototype would still apply.  */
30873 #ifdef __cplusplus
30874 extern "C"
30875 #endif
30876 char remove ();
30877 int
30878 main ()
30879 {
30880 return remove ();
30881   ;
30882   return 0;
30883 }
30884 _ACEOF
30885 if ac_fn_cxx_try_link "$LINENO"; then :
30886   ac_cv_lib_posix_remove=yes
30887 else
30888   ac_cv_lib_posix_remove=no
30889 fi
30890 rm -f core conftest.err conftest.$ac_objext \
30891     conftest$ac_exeext conftest.$ac_ext
30892 LIBS=$ac_check_lib_save_LIBS
30893 fi
30894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30895 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30896 if test "x$ac_cv_lib_posix_remove" = xyes; then :
30897   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30898 fi
30899 
30900     fi
30901 
30902     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30903     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30904 if test "x$ac_cv_func_shmat" = xyes; then :
30905 
30906 fi
30907 
30908     if test $ac_cv_func_shmat = no; then
30909       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30910 $as_echo_n "checking for shmat in -lipc... " >&6; }
30911 if ${ac_cv_lib_ipc_shmat+:} false; then :
30912   $as_echo_n "(cached) " >&6
30913 else
30914   ac_check_lib_save_LIBS=$LIBS
30915 LIBS="-lipc  $LIBS"
30916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30917 /* end confdefs.h.  */
30918 
30919 /* Override any GCC internal prototype to avoid an error.
30920    Use char because int might match the return type of a GCC
30921    builtin and then its argument prototype would still apply.  */
30922 #ifdef __cplusplus
30923 extern "C"
30924 #endif
30925 char shmat ();
30926 int
30927 main ()
30928 {
30929 return shmat ();
30930   ;
30931   return 0;
30932 }
30933 _ACEOF
30934 if ac_fn_cxx_try_link "$LINENO"; then :
30935   ac_cv_lib_ipc_shmat=yes
30936 else
30937   ac_cv_lib_ipc_shmat=no
30938 fi
30939 rm -f core conftest.err conftest.$ac_objext \
30940     conftest$ac_exeext conftest.$ac_ext
30941 LIBS=$ac_check_lib_save_LIBS
30942 fi
30943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30944 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30945 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30946   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30947 fi
30948 
30949     fi
30950   fi
30951 
30952   # Check for libraries that X11R6 Xt/Xaw programs need.
30953   ac_save_LDFLAGS=$LDFLAGS
30954   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30955   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30956   # check for ICE first), but we must link in the order -lSM -lICE or
30957   # we get undefined symbols.  So assume we have SM if we have ICE.
30958   # These have to be linked with before -lX11, unlike the other
30959   # libraries we check for below, so use a different variable.
30960   # John Interrante, Karl Berry
30961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30962 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30963 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30964   $as_echo_n "(cached) " >&6
30965 else
30966   ac_check_lib_save_LIBS=$LIBS
30967 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30969 /* end confdefs.h.  */
30970 
30971 /* Override any GCC internal prototype to avoid an error.
30972    Use char because int might match the return type of a GCC
30973    builtin and then its argument prototype would still apply.  */
30974 #ifdef __cplusplus
30975 extern "C"
30976 #endif
30977 char IceConnectionNumber ();
30978 int
30979 main ()
30980 {
30981 return IceConnectionNumber ();
30982   ;
30983   return 0;
30984 }
30985 _ACEOF
30986 if ac_fn_cxx_try_link "$LINENO"; then :
30987   ac_cv_lib_ICE_IceConnectionNumber=yes
30988 else
30989   ac_cv_lib_ICE_IceConnectionNumber=no
30990 fi
30991 rm -f core conftest.err conftest.$ac_objext \
30992     conftest$ac_exeext conftest.$ac_ext
30993 LIBS=$ac_check_lib_save_LIBS
30994 fi
30995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30996 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30997 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30998   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30999 fi
31000 
31001   LDFLAGS=$ac_save_LDFLAGS
31002 
31003 fi
31004 
31005 
31006   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31007   # this doesn't make sense so we remove it.
31008   if test "x$COMPILE_TYPE" = xcross; then
31009     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31010   fi
31011 
31012   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31013 
31014   # Print a helpful message on how to acquire the necessary build dependency.
31015   # x11 is the help tag: freetype, cups, pulse, alsa etc
31016   MISSING_DEPENDENCY=x11
31017 
31018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31019     cygwin_help $MISSING_DEPENDENCY
31020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31021     msys_help $MISSING_DEPENDENCY
31022   else
31023     PKGHANDLER_COMMAND=
31024 
31025     case $PKGHANDLER in
31026       apt-get)
31027         apt_help     $MISSING_DEPENDENCY ;;
31028       yum)
31029         yum_help     $MISSING_DEPENDENCY ;;
31030       port)
31031         port_help    $MISSING_DEPENDENCY ;;
31032       pkgutil)
31033         pkgutil_help $MISSING_DEPENDENCY ;;
31034       pkgadd)
31035         pkgadd_help  $MISSING_DEPENDENCY ;;
31036     esac
31037 
31038     if test "x$PKGHANDLER_COMMAND" != x; then
31039       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31040     fi
31041   fi
31042 
31043     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31044   fi
31045 
31046   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31047     OPENWIN_HOME="/usr/openwin"
31048   fi
31049 
31050 
31051 
31052   #
31053   # Weird Sol10 something check...TODO change to try compile
31054   #
31055   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31056     if test "`uname -r`" = "5.10"; then
31057       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31058         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31059       fi
31060     fi
31061   fi
31062 
31063   ac_ext=c
31064 ac_cpp='$CPP $CPPFLAGS'
31065 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31066 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31067 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31068 
31069   OLD_CFLAGS="$CFLAGS"
31070   CFLAGS="$CFLAGS $X_CFLAGS"
31071 
31072   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31073   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31074 do :
31075   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31076 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31077         # include <X11/Xlib.h>
31078         # include <X11/Xutil.h>
31079 
31080 
31081 "
31082 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31083   cat >>confdefs.h <<_ACEOF
31084 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31085 _ACEOF
31086  X11_A_OK=yes
31087 else
31088   X11_A_OK=no; break
31089 fi
31090 
31091 done
31092 
31093 
31094   CFLAGS="$OLD_CFLAGS"
31095   ac_ext=cpp
31096 ac_cpp='$CXXCPP $CPPFLAGS'
31097 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31098 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31099 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31100 
31101 
31102   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31103 
31104   # Print a helpful message on how to acquire the necessary build dependency.
31105   # x11 is the help tag: freetype, cups, pulse, alsa etc
31106   MISSING_DEPENDENCY=x11
31107 
31108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31109     cygwin_help $MISSING_DEPENDENCY
31110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31111     msys_help $MISSING_DEPENDENCY
31112   else
31113     PKGHANDLER_COMMAND=
31114 
31115     case $PKGHANDLER in
31116       apt-get)
31117         apt_help     $MISSING_DEPENDENCY ;;
31118       yum)
31119         yum_help     $MISSING_DEPENDENCY ;;
31120       port)
31121         port_help    $MISSING_DEPENDENCY ;;
31122       pkgutil)
31123         pkgutil_help $MISSING_DEPENDENCY ;;
31124       pkgadd)
31125         pkgadd_help  $MISSING_DEPENDENCY ;;
31126     esac
31127 
31128     if test "x$PKGHANDLER_COMMAND" != x; then
31129       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31130     fi
31131   fi
31132 
31133     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31134   fi
31135 
31136 
31137 
31138 
31139 
31140 
31141   ###############################################################################
31142   #
31143   # The common unix printing system cups is used to print from java.
31144   #
31145 
31146 # Check whether --with-cups was given.
31147 if test "${with_cups+set}" = set; then :
31148   withval=$with_cups;
31149 fi
31150 
31151 
31152 # Check whether --with-cups-include was given.
31153 if test "${with_cups_include+set}" = set; then :
31154   withval=$with_cups_include;
31155 fi
31156 
31157 
31158   if test "x$CUPS_NOT_NEEDED" = xyes; then
31159     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31160       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31161 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31162     fi
31163     CUPS_CFLAGS=
31164   else
31165     CUPS_FOUND=no
31166 
31167     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31168       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31169     fi
31170 
31171     if test "x${with_cups}" != x; then
31172       CUPS_CFLAGS="-I${with_cups}/include"
31173       CUPS_FOUND=yes
31174     fi
31175     if test "x${with_cups_include}" != x; then
31176       CUPS_CFLAGS="-I${with_cups_include}"
31177       CUPS_FOUND=yes
31178     fi
31179     if test "x$CUPS_FOUND" = xno; then
31180 
31181 
31182   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31183     # Source the builddeps file again, to make sure it uses the latest variables!
31184     . $builddepsfile
31185     # Look for a target and build machine specific resource!
31186     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31187     if test "x$resource" = x; then
31188       # Ok, lets instead look for a target specific resource
31189       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31190     fi
31191     if test "x$resource" = x; then
31192       # Ok, lets instead look for a build specific resource
31193       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31194     fi
31195     if test "x$resource" = x; then
31196       # Ok, lets instead look for a generic resource
31197       # (The cups comes from M4 and not the shell, thus no need for eval here.)
31198       resource=${builddep_cups}
31199     fi
31200     if test "x$resource" != x; then
31201       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31202 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31203       # If the resource in the builddeps.conf file is an existing directory,
31204       # for example /java/linux/cups
31205       if test -d ${resource}; then
31206         depdir=${resource}
31207       else
31208 
31209   # cups is for example mymodule
31210   # $resource is for example libs/general/libmymod_1_2_3.zip
31211   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31212   # $with_builddeps_dir is for example /localhome/builddeps
31213   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31214   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31215   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31216   filename=`basename $resource`
31217   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31218   filebase=${filename%%.*}
31219   extension=${filename#*.}
31220   installdir=$with_builddeps_dir/$filebase
31221   if test ! -f $installdir/$filename.unpacked; then
31222     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31223 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31224     if test ! -d $installdir; then
31225       mkdir -p $installdir
31226     fi
31227     if test ! -d $installdir; then
31228       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31229     fi
31230     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31231     touch $tmpfile
31232     if test ! -f $tmpfile; then
31233       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31234     fi
31235 
31236   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31237   # $tmpfile is the local file name for the downloaded file.
31238   VALID_TOOL=no
31239   if test "x$BDEPS_FTP" = xwget; then
31240     VALID_TOOL=yes
31241     wget -O $tmpfile $with_builddeps_server/$resource
31242   fi
31243   if test "x$BDEPS_FTP" = xlftp; then
31244     VALID_TOOL=yes
31245     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31246   fi
31247   if test "x$BDEPS_FTP" = xftp; then
31248     VALID_TOOL=yes
31249     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31250     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31251     FTPUSERPWD=${FTPSERVER%%@*}
31252     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31253       FTPUSER=${userpwd%%:*}
31254       FTPPWD=${userpwd#*@}
31255       FTPSERVER=${FTPSERVER#*@}
31256     else
31257       FTPUSER=ftp
31258       FTPPWD=ftp
31259     fi
31260     # the "pass" command does not work on some
31261     # ftp clients (read ftp.exe) but if it works,
31262     # passive mode is better!
31263     ( \
31264         echo "user $FTPUSER $FTPPWD"        ; \
31265         echo "pass"                         ; \
31266         echo "bin"                          ; \
31267         echo "get $FTPPATH $tmpfile"              ; \
31268     ) | ftp -in $FTPSERVER
31269   fi
31270   if test "x$VALID_TOOL" != xyes; then
31271     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31272   fi
31273 
31274     mv $tmpfile $installdir/$filename
31275     if test ! -s $installdir/$filename; then
31276       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31277     fi
31278     case "$extension" in
31279       zip)  echo "Unzipping $installdir/$filename..."
31280         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31281         ;;
31282       tar.gz) echo "Untaring $installdir/$filename..."
31283         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31284         ;;
31285       tgz) echo "Untaring $installdir/$filename..."
31286         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31287         ;;
31288       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31289         ;;
31290     esac
31291   fi
31292   if test -f $installdir/$filename.unpacked; then
31293     depdir=$installdir
31294   fi
31295 
31296       fi
31297       # Source the builddeps file again, because in the previous command, the depdir
31298       # was updated to point at the current build dependency install directory.
31299       . $builddepsfile
31300       # Now extract variables from the builddeps.conf files.
31301       theroot=${builddep_cups_ROOT}
31302       thecflags=${builddep_cups_CFLAGS}
31303       thelibs=${builddep_cups_LIBS}
31304       if test "x$depdir" = x; then
31305         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31306       fi
31307       CUPS=$depdir
31308       if test "x$theroot" != x; then
31309         CUPS="$theroot"
31310       fi
31311       if test "x$thecflags" != x; then
31312         CUPS_CFLAGS="$thecflags"
31313       fi
31314       if test "x$thelibs" != x; then
31315         CUPS_LIBS="$thelibs"
31316       fi
31317       CUPS_FOUND=yes
31318 
31319     fi
31320 
31321   fi
31322 
31323     fi
31324     if test "x$CUPS_FOUND" = xno; then
31325       # Are the cups headers installed in the default /usr/include location?
31326       for ac_header in cups/cups.h cups/ppd.h
31327 do :
31328   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31329 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31330 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31331   cat >>confdefs.h <<_ACEOF
31332 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31333 _ACEOF
31334 
31335             CUPS_FOUND=yes
31336             CUPS_CFLAGS=
31337             DEFAULT_CUPS=yes
31338 
31339 
31340 fi
31341 
31342 done
31343 
31344     fi
31345     if test "x$CUPS_FOUND" = xno; then
31346       # Getting nervous now? Lets poke around for standard Solaris third-party
31347       # package installation locations.
31348       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31349 $as_echo_n "checking for cups headers... " >&6; }
31350       if test -s /opt/sfw/cups/include/cups/cups.h; then
31351         # An SFW package seems to be installed!
31352         CUPS_FOUND=yes
31353         CUPS_CFLAGS="-I/opt/sfw/cups/include"
31354       elif test -s /opt/csw/include/cups/cups.h; then
31355         # A CSW package seems to be installed!
31356         CUPS_FOUND=yes
31357         CUPS_CFLAGS="-I/opt/csw/include"
31358       fi
31359       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31360 $as_echo "$CUPS_FOUND" >&6; }
31361     fi
31362     if test "x$CUPS_FOUND" = xno; then
31363 
31364   # Print a helpful message on how to acquire the necessary build dependency.
31365   # cups is the help tag: freetype, cups, pulse, alsa etc
31366   MISSING_DEPENDENCY=cups
31367 
31368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31369     cygwin_help $MISSING_DEPENDENCY
31370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31371     msys_help $MISSING_DEPENDENCY
31372   else
31373     PKGHANDLER_COMMAND=
31374 
31375     case $PKGHANDLER in
31376       apt-get)
31377         apt_help     $MISSING_DEPENDENCY ;;
31378       yum)
31379         yum_help     $MISSING_DEPENDENCY ;;
31380       port)
31381         port_help    $MISSING_DEPENDENCY ;;
31382       pkgutil)
31383         pkgutil_help $MISSING_DEPENDENCY ;;
31384       pkgadd)
31385         pkgadd_help  $MISSING_DEPENDENCY ;;
31386     esac
31387 
31388     if test "x$PKGHANDLER_COMMAND" != x; then
31389       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31390     fi
31391   fi
31392 
31393       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31394     fi
31395   fi
31396 
31397 
31398 
31399 
31400 
31401 
31402   ###############################################################################
31403   #
31404   # The ubiquitous freetype library is used to render fonts.
31405   #
31406 
31407 # Check whether --with-freetype was given.
31408 if test "${with_freetype+set}" = set; then :
31409   withval=$with_freetype;
31410 fi
31411 
31412 
31413 # Check whether --with-freetype-include was given.
31414 if test "${with_freetype_include+set}" = set; then :
31415   withval=$with_freetype_include;
31416 fi
31417 
31418 
31419 # Check whether --with-freetype-lib was given.
31420 if test "${with_freetype_lib+set}" = set; then :
31421   withval=$with_freetype_lib;
31422 fi
31423 
31424   # Check whether --enable-freetype-bundling was given.
31425 if test "${enable_freetype_bundling+set}" = set; then :
31426   enableval=$enable_freetype_bundling;
31427 fi
31428 
31429 
31430   FREETYPE_CFLAGS=
31431   FREETYPE_LIBS=
31432   FREETYPE_BUNDLE_LIB_PATH=
31433 
31434   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31435     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31436       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31437 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31438     fi
31439     if test "x$enable_freetype_bundling" != x; then
31440       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31441 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31442     fi
31443   else
31444     # freetype is needed to build; go get it!
31445 
31446     BUNDLE_FREETYPE="$enable_freetype_bundling"
31447 
31448     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31449       # User has specified settings
31450 
31451       if test "x$BUNDLE_FREETYPE" = x; then
31452         # If not specified, default is to bundle freetype
31453         BUNDLE_FREETYPE=yes
31454       fi
31455 
31456       if test "x$with_freetype" != x; then
31457         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31458         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31459       fi
31460 
31461       # Allow --with-freetype-lib and --with-freetype-include to override
31462       if test "x$with_freetype_include" != x; then
31463         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31464       fi
31465       if test "x$with_freetype_lib" != x; then
31466         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31467       fi
31468 
31469       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31470         # Okay, we got it. Check that it works.
31471 
31472   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31473   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31474   METHOD="--with-freetype"
31475 
31476   # First check if the files exists.
31477   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31478     # We found an arbitrary include file. That's a good sign.
31479     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31480 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31481     FOUND_FREETYPE=yes
31482 
31483     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31484     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31485       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31486 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31487       FOUND_FREETYPE=no
31488     else
31489       if test "x$OPENJDK_TARGET_OS" = xwindows; then
31490         # On Windows, we will need both .lib and .dll file.
31491         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31492           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31493 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31494           FOUND_FREETYPE=no
31495         fi
31496       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
31497         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31498         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31499       fi
31500     fi
31501   fi
31502 
31503   if test "x$FOUND_FREETYPE" = xyes; then
31504 
31505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31506 
31507   # Input might be given as Windows format, start by converting to
31508   # unix format.
31509   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31510   new_path=`$CYGPATH -u "$path"`
31511 
31512   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31513   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31514   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31515   # "foo.exe" is OK but "foo" is an error.
31516   #
31517   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31518   # It is also a way to make sure we got the proper file name for the real test later on.
31519   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31520   if test "x$test_shortpath" = x; then
31521     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31522 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31523     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31524   fi
31525 
31526   # Call helper function which possibly converts this using DOS-style short mode.
31527   # If so, the updated path is stored in $new_path.
31528 
31529   input_path="$new_path"
31530   # Check if we need to convert this using DOS-style short mode. If the path
31531   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31532   # take no chances and rewrite it.
31533   # Note: m4 eats our [], so we need to use [ and ] instead.
31534   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31535   if test "x$has_forbidden_chars" != x; then
31536     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31537     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31538     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31539     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31540       # Going to short mode and back again did indeed matter. Since short mode is
31541       # case insensitive, let's make it lowercase to improve readability.
31542       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31543       # Now convert it back to Unix-stile (cygpath)
31544       input_path=`$CYGPATH -u "$shortmode_path"`
31545       new_path="$input_path"
31546     fi
31547   fi
31548 
31549   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31550   if test "x$test_cygdrive_prefix" = x; then
31551     # As a simple fix, exclude /usr/bin since it's not a real path.
31552     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31553       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31554       # a path prefixed by /cygdrive for fixpath to work.
31555       new_path="$CYGWIN_ROOT_PATH$input_path"
31556     fi
31557   fi
31558 
31559 
31560   if test "x$path" != "x$new_path"; then
31561     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31563 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31564   fi
31565 
31566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31567 
31568   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31569   has_colon=`$ECHO $path | $GREP ^.:`
31570   new_path="$path"
31571   if test "x$has_colon" = x; then
31572     # Not in mixed or Windows style, start by that.
31573     new_path=`cmd //c echo $path`
31574   fi
31575 
31576 
31577   input_path="$new_path"
31578   # Check if we need to convert this using DOS-style short mode. If the path
31579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31580   # take no chances and rewrite it.
31581   # Note: m4 eats our [], so we need to use [ and ] instead.
31582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31583   if test "x$has_forbidden_chars" != x; then
31584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31585     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31586   fi
31587 
31588 
31589   windows_path="$new_path"
31590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31591     unix_path=`$CYGPATH -u "$windows_path"`
31592     new_path="$unix_path"
31593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31595     new_path="$unix_path"
31596   fi
31597 
31598   if test "x$path" != "x$new_path"; then
31599     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31601 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31602   fi
31603 
31604   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31605   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31606 
31607   else
31608     # We're on a posix platform. Hooray! :)
31609     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31610     has_space=`$ECHO "$path" | $GREP " "`
31611     if test "x$has_space" != x; then
31612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31613 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31614       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31615     fi
31616 
31617     # Use eval to expand a potential ~
31618     eval path="$path"
31619     if test ! -f "$path" && test ! -d "$path"; then
31620       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31621     fi
31622 
31623     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31624   fi
31625 
31626 
31627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31628 
31629   # Input might be given as Windows format, start by converting to
31630   # unix format.
31631   path="$POTENTIAL_FREETYPE_LIB_PATH"
31632   new_path=`$CYGPATH -u "$path"`
31633 
31634   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31635   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31636   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31637   # "foo.exe" is OK but "foo" is an error.
31638   #
31639   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31640   # It is also a way to make sure we got the proper file name for the real test later on.
31641   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31642   if test "x$test_shortpath" = x; then
31643     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31644 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31645     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31646   fi
31647 
31648   # Call helper function which possibly converts this using DOS-style short mode.
31649   # If so, the updated path is stored in $new_path.
31650 
31651   input_path="$new_path"
31652   # Check if we need to convert this using DOS-style short mode. If the path
31653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31654   # take no chances and rewrite it.
31655   # Note: m4 eats our [], so we need to use [ and ] instead.
31656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31657   if test "x$has_forbidden_chars" != x; then
31658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31659     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31660     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31661     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31662       # Going to short mode and back again did indeed matter. Since short mode is
31663       # case insensitive, let's make it lowercase to improve readability.
31664       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31665       # Now convert it back to Unix-stile (cygpath)
31666       input_path=`$CYGPATH -u "$shortmode_path"`
31667       new_path="$input_path"
31668     fi
31669   fi
31670 
31671   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31672   if test "x$test_cygdrive_prefix" = x; then
31673     # As a simple fix, exclude /usr/bin since it's not a real path.
31674     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31675       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31676       # a path prefixed by /cygdrive for fixpath to work.
31677       new_path="$CYGWIN_ROOT_PATH$input_path"
31678     fi
31679   fi
31680 
31681 
31682   if test "x$path" != "x$new_path"; then
31683     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31684     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31685 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31686   fi
31687 
31688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31689 
31690   path="$POTENTIAL_FREETYPE_LIB_PATH"
31691   has_colon=`$ECHO $path | $GREP ^.:`
31692   new_path="$path"
31693   if test "x$has_colon" = x; then
31694     # Not in mixed or Windows style, start by that.
31695     new_path=`cmd //c echo $path`
31696   fi
31697 
31698 
31699   input_path="$new_path"
31700   # Check if we need to convert this using DOS-style short mode. If the path
31701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31702   # take no chances and rewrite it.
31703   # Note: m4 eats our [], so we need to use [ and ] instead.
31704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31705   if test "x$has_forbidden_chars" != x; then
31706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31707     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31708   fi
31709 
31710 
31711   windows_path="$new_path"
31712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31713     unix_path=`$CYGPATH -u "$windows_path"`
31714     new_path="$unix_path"
31715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31717     new_path="$unix_path"
31718   fi
31719 
31720   if test "x$path" != "x$new_path"; then
31721     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31723 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31724   fi
31725 
31726   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31727   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31728 
31729   else
31730     # We're on a posix platform. Hooray! :)
31731     path="$POTENTIAL_FREETYPE_LIB_PATH"
31732     has_space=`$ECHO "$path" | $GREP " "`
31733     if test "x$has_space" != x; then
31734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31735 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31736       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31737     fi
31738 
31739     # Use eval to expand a potential ~
31740     eval path="$path"
31741     if test ! -f "$path" && test ! -d "$path"; then
31742       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31743     fi
31744 
31745     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31746   fi
31747 
31748 
31749     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31750     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31751 $as_echo_n "checking for freetype includes... " >&6; }
31752     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31753 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31754     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31755     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31756 $as_echo_n "checking for freetype libraries... " >&6; }
31757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31758 $as_echo "$FREETYPE_LIB_PATH" >&6; }
31759   fi
31760 
31761         if test "x$FOUND_FREETYPE" != xyes; then
31762           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31763         fi
31764       else
31765         # User specified only one of lib or include. This is an error.
31766         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31767           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31768 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31769           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31770         else
31771           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31772 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31773           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31774         fi
31775       fi
31776     else
31777       # User did not specify settings, but we need freetype. Try to locate it.
31778 
31779       if test "x$BUNDLE_FREETYPE" = x; then
31780         # If not specified, default is to bundle freetype only on windows
31781         if test "x$OPENJDK_TARGET_OS" = xwindows; then
31782           BUNDLE_FREETYPE=yes
31783         else
31784           BUNDLE_FREETYPE=no
31785         fi
31786       fi
31787 
31788       if test "x$FOUND_FREETYPE" != xyes; then
31789         # Check builddeps
31790 
31791 
31792   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31793     # Source the builddeps file again, to make sure it uses the latest variables!
31794     . $builddepsfile
31795     # Look for a target and build machine specific resource!
31796     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31797     if test "x$resource" = x; then
31798       # Ok, lets instead look for a target specific resource
31799       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31800     fi
31801     if test "x$resource" = x; then
31802       # Ok, lets instead look for a build specific resource
31803       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31804     fi
31805     if test "x$resource" = x; then
31806       # Ok, lets instead look for a generic resource
31807       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31808       resource=${builddep_freetype2}
31809     fi
31810     if test "x$resource" != x; then
31811       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31812 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31813       # If the resource in the builddeps.conf file is an existing directory,
31814       # for example /java/linux/cups
31815       if test -d ${resource}; then
31816         depdir=${resource}
31817       else
31818 
31819   # freetype2 is for example mymodule
31820   # $resource is for example libs/general/libmymod_1_2_3.zip
31821   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31822   # $with_builddeps_dir is for example /localhome/builddeps
31823   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31824   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31825   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31826   filename=`basename $resource`
31827   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31828   filebase=${filename%%.*}
31829   extension=${filename#*.}
31830   installdir=$with_builddeps_dir/$filebase
31831   if test ! -f $installdir/$filename.unpacked; then
31832     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31833 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31834     if test ! -d $installdir; then
31835       mkdir -p $installdir
31836     fi
31837     if test ! -d $installdir; then
31838       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31839     fi
31840     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31841     touch $tmpfile
31842     if test ! -f $tmpfile; then
31843       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31844     fi
31845 
31846   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31847   # $tmpfile is the local file name for the downloaded file.
31848   VALID_TOOL=no
31849   if test "x$BDEPS_FTP" = xwget; then
31850     VALID_TOOL=yes
31851     wget -O $tmpfile $with_builddeps_server/$resource
31852   fi
31853   if test "x$BDEPS_FTP" = xlftp; then
31854     VALID_TOOL=yes
31855     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31856   fi
31857   if test "x$BDEPS_FTP" = xftp; then
31858     VALID_TOOL=yes
31859     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31860     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31861     FTPUSERPWD=${FTPSERVER%%@*}
31862     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31863       FTPUSER=${userpwd%%:*}
31864       FTPPWD=${userpwd#*@}
31865       FTPSERVER=${FTPSERVER#*@}
31866     else
31867       FTPUSER=ftp
31868       FTPPWD=ftp
31869     fi
31870     # the "pass" command does not work on some
31871     # ftp clients (read ftp.exe) but if it works,
31872     # passive mode is better!
31873     ( \
31874         echo "user $FTPUSER $FTPPWD"        ; \
31875         echo "pass"                         ; \
31876         echo "bin"                          ; \
31877         echo "get $FTPPATH $tmpfile"              ; \
31878     ) | ftp -in $FTPSERVER
31879   fi
31880   if test "x$VALID_TOOL" != xyes; then
31881     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31882   fi
31883 
31884     mv $tmpfile $installdir/$filename
31885     if test ! -s $installdir/$filename; then
31886       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31887     fi
31888     case "$extension" in
31889       zip)  echo "Unzipping $installdir/$filename..."
31890         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31891         ;;
31892       tar.gz) echo "Untaring $installdir/$filename..."
31893         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31894         ;;
31895       tgz) echo "Untaring $installdir/$filename..."
31896         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31897         ;;
31898       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31899         ;;
31900     esac
31901   fi
31902   if test -f $installdir/$filename.unpacked; then
31903     depdir=$installdir
31904   fi
31905 
31906       fi
31907       # Source the builddeps file again, because in the previous command, the depdir
31908       # was updated to point at the current build dependency install directory.
31909       . $builddepsfile
31910       # Now extract variables from the builddeps.conf files.
31911       theroot=${builddep_freetype2_ROOT}
31912       thecflags=${builddep_freetype2_CFLAGS}
31913       thelibs=${builddep_freetype2_LIBS}
31914       if test "x$depdir" = x; then
31915         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31916       fi
31917       FREETYPE=$depdir
31918       if test "x$theroot" != x; then
31919         FREETYPE="$theroot"
31920       fi
31921       if test "x$thecflags" != x; then
31922         FREETYPE_CFLAGS="$thecflags"
31923       fi
31924       if test "x$thelibs" != x; then
31925         FREETYPE_LIBS="$thelibs"
31926       fi
31927       FOUND_FREETYPE=yes
31928       else FOUND_FREETYPE=no
31929 
31930     fi
31931     else FOUND_FREETYPE=no
31932 
31933   fi
31934 
31935         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31936         if test "x$FOUND_FREETYPE" = xyes; then
31937           if test "x$BUNDLE_FREETYPE" = xyes; then
31938             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31939 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31940             FOUND_FREETYPE=no
31941           else
31942             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31943 $as_echo_n "checking for freetype... " >&6; }
31944             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31945 $as_echo "yes (using builddeps)" >&6; }
31946           fi
31947         fi
31948       fi
31949 
31950       if test "x$FOUND_FREETYPE" != xyes; then
31951         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31952         if test "x$PKG_CONFIG" != x; then
31953 
31954 pkg_failed=no
31955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31956 $as_echo_n "checking for FREETYPE... " >&6; }
31957 
31958 if test -n "$FREETYPE_CFLAGS"; then
31959     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31960  elif test -n "$PKG_CONFIG"; then
31961     if test -n "$PKG_CONFIG" && \
31962     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31963   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31964   ac_status=$?
31965   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31966   test $ac_status = 0; }; then
31967   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31968 else
31969   pkg_failed=yes
31970 fi
31971  else
31972     pkg_failed=untried
31973 fi
31974 if test -n "$FREETYPE_LIBS"; then
31975     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31976  elif test -n "$PKG_CONFIG"; then
31977     if test -n "$PKG_CONFIG" && \
31978     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31979   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31980   ac_status=$?
31981   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31982   test $ac_status = 0; }; then
31983   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31984 else
31985   pkg_failed=yes
31986 fi
31987  else
31988     pkg_failed=untried
31989 fi
31990 
31991 
31992 
31993 if test $pkg_failed = yes; then
31994 
31995 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31996         _pkg_short_errors_supported=yes
31997 else
31998         _pkg_short_errors_supported=no
31999 fi
32000         if test $_pkg_short_errors_supported = yes; then
32001                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
32002         else
32003                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
32004         fi
32005         # Put the nasty error message in config.log where it belongs
32006         echo "$FREETYPE_PKG_ERRORS" >&5
32007 
32008         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32009 $as_echo "no" >&6; }
32010                 FOUND_FREETYPE=no
32011 elif test $pkg_failed = untried; then
32012         FOUND_FREETYPE=no
32013 else
32014         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
32015         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
32016         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32017 $as_echo "yes" >&6; }
32018         FOUND_FREETYPE=yes
32019 fi
32020           if test "x$FOUND_FREETYPE" = xyes; then
32021             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32022             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
32023             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32024             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32025               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
32026             fi
32027             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32028             if test "x$BUNDLE_FREETYPE" = xyes; then
32029               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
32030 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
32031               FOUND_FREETYPE=no
32032             else
32033               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32034 $as_echo_n "checking for freetype... " >&6; }
32035               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
32036 $as_echo "yes (using pkg-config)" >&6; }
32037             fi
32038           fi
32039         fi
32040       fi
32041 
32042       if test "x$FOUND_FREETYPE" != xyes; then
32043         # Check in well-known locations
32044         if test "x$OPENJDK_TARGET_OS" = xwindows; then
32045           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32046 
32047   windows_path="$FREETYPE_BASE_DIR"
32048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32049     unix_path=`$CYGPATH -u "$windows_path"`
32050     FREETYPE_BASE_DIR="$unix_path"
32051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32053     FREETYPE_BASE_DIR="$unix_path"
32054   fi
32055 
32056 
32057   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32058   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32059   METHOD="well-known location"
32060 
32061   # First check if the files exists.
32062   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32063     # We found an arbitrary include file. That's a good sign.
32064     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32065 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32066     FOUND_FREETYPE=yes
32067 
32068     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32069     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32070       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32071 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32072       FOUND_FREETYPE=no
32073     else
32074       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32075         # On Windows, we will need both .lib and .dll file.
32076         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32077           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32078 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32079           FOUND_FREETYPE=no
32080         fi
32081       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
32082         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32083         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32084       fi
32085     fi
32086   fi
32087 
32088   if test "x$FOUND_FREETYPE" = xyes; then
32089 
32090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32091 
32092   # Input might be given as Windows format, start by converting to
32093   # unix format.
32094   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32095   new_path=`$CYGPATH -u "$path"`
32096 
32097   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32098   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32099   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32100   # "foo.exe" is OK but "foo" is an error.
32101   #
32102   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32103   # It is also a way to make sure we got the proper file name for the real test later on.
32104   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32105   if test "x$test_shortpath" = x; then
32106     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32107 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32108     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32109   fi
32110 
32111   # Call helper function which possibly converts this using DOS-style short mode.
32112   # If so, the updated path is stored in $new_path.
32113 
32114   input_path="$new_path"
32115   # Check if we need to convert this using DOS-style short mode. If the path
32116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32117   # take no chances and rewrite it.
32118   # Note: m4 eats our [], so we need to use [ and ] instead.
32119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32120   if test "x$has_forbidden_chars" != x; then
32121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32122     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32123     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32124     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32125       # Going to short mode and back again did indeed matter. Since short mode is
32126       # case insensitive, let's make it lowercase to improve readability.
32127       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32128       # Now convert it back to Unix-stile (cygpath)
32129       input_path=`$CYGPATH -u "$shortmode_path"`
32130       new_path="$input_path"
32131     fi
32132   fi
32133 
32134   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32135   if test "x$test_cygdrive_prefix" = x; then
32136     # As a simple fix, exclude /usr/bin since it's not a real path.
32137     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32138       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32139       # a path prefixed by /cygdrive for fixpath to work.
32140       new_path="$CYGWIN_ROOT_PATH$input_path"
32141     fi
32142   fi
32143 
32144 
32145   if test "x$path" != "x$new_path"; then
32146     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32147     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32148 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32149   fi
32150 
32151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32152 
32153   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32154   has_colon=`$ECHO $path | $GREP ^.:`
32155   new_path="$path"
32156   if test "x$has_colon" = x; then
32157     # Not in mixed or Windows style, start by that.
32158     new_path=`cmd //c echo $path`
32159   fi
32160 
32161 
32162   input_path="$new_path"
32163   # Check if we need to convert this using DOS-style short mode. If the path
32164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32165   # take no chances and rewrite it.
32166   # Note: m4 eats our [], so we need to use [ and ] instead.
32167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32168   if test "x$has_forbidden_chars" != x; then
32169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32170     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32171   fi
32172 
32173 
32174   windows_path="$new_path"
32175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32176     unix_path=`$CYGPATH -u "$windows_path"`
32177     new_path="$unix_path"
32178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32180     new_path="$unix_path"
32181   fi
32182 
32183   if test "x$path" != "x$new_path"; then
32184     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32185     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32186 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32187   fi
32188 
32189   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32190   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32191 
32192   else
32193     # We're on a posix platform. Hooray! :)
32194     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32195     has_space=`$ECHO "$path" | $GREP " "`
32196     if test "x$has_space" != x; then
32197       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32198 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32199       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32200     fi
32201 
32202     # Use eval to expand a potential ~
32203     eval path="$path"
32204     if test ! -f "$path" && test ! -d "$path"; then
32205       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32206     fi
32207 
32208     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32209   fi
32210 
32211 
32212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32213 
32214   # Input might be given as Windows format, start by converting to
32215   # unix format.
32216   path="$POTENTIAL_FREETYPE_LIB_PATH"
32217   new_path=`$CYGPATH -u "$path"`
32218 
32219   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32220   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32221   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32222   # "foo.exe" is OK but "foo" is an error.
32223   #
32224   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32225   # It is also a way to make sure we got the proper file name for the real test later on.
32226   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32227   if test "x$test_shortpath" = x; then
32228     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32229 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32230     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32231   fi
32232 
32233   # Call helper function which possibly converts this using DOS-style short mode.
32234   # If so, the updated path is stored in $new_path.
32235 
32236   input_path="$new_path"
32237   # Check if we need to convert this using DOS-style short mode. If the path
32238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32239   # take no chances and rewrite it.
32240   # Note: m4 eats our [], so we need to use [ and ] instead.
32241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32242   if test "x$has_forbidden_chars" != x; then
32243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32244     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32245     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32246     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32247       # Going to short mode and back again did indeed matter. Since short mode is
32248       # case insensitive, let's make it lowercase to improve readability.
32249       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32250       # Now convert it back to Unix-stile (cygpath)
32251       input_path=`$CYGPATH -u "$shortmode_path"`
32252       new_path="$input_path"
32253     fi
32254   fi
32255 
32256   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32257   if test "x$test_cygdrive_prefix" = x; then
32258     # As a simple fix, exclude /usr/bin since it's not a real path.
32259     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32260       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32261       # a path prefixed by /cygdrive for fixpath to work.
32262       new_path="$CYGWIN_ROOT_PATH$input_path"
32263     fi
32264   fi
32265 
32266 
32267   if test "x$path" != "x$new_path"; then
32268     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32270 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32271   fi
32272 
32273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32274 
32275   path="$POTENTIAL_FREETYPE_LIB_PATH"
32276   has_colon=`$ECHO $path | $GREP ^.:`
32277   new_path="$path"
32278   if test "x$has_colon" = x; then
32279     # Not in mixed or Windows style, start by that.
32280     new_path=`cmd //c echo $path`
32281   fi
32282 
32283 
32284   input_path="$new_path"
32285   # Check if we need to convert this using DOS-style short mode. If the path
32286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32287   # take no chances and rewrite it.
32288   # Note: m4 eats our [], so we need to use [ and ] instead.
32289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32290   if test "x$has_forbidden_chars" != x; then
32291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32292     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32293   fi
32294 
32295 
32296   windows_path="$new_path"
32297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32298     unix_path=`$CYGPATH -u "$windows_path"`
32299     new_path="$unix_path"
32300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32302     new_path="$unix_path"
32303   fi
32304 
32305   if test "x$path" != "x$new_path"; then
32306     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32308 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32309   fi
32310 
32311   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32312   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32313 
32314   else
32315     # We're on a posix platform. Hooray! :)
32316     path="$POTENTIAL_FREETYPE_LIB_PATH"
32317     has_space=`$ECHO "$path" | $GREP " "`
32318     if test "x$has_space" != x; then
32319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32320 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32321       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32322     fi
32323 
32324     # Use eval to expand a potential ~
32325     eval path="$path"
32326     if test ! -f "$path" && test ! -d "$path"; then
32327       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32328     fi
32329 
32330     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32331   fi
32332 
32333 
32334     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32335     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32336 $as_echo_n "checking for freetype includes... " >&6; }
32337     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32338 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32339     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32341 $as_echo_n "checking for freetype libraries... " >&6; }
32342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32343 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32344   fi
32345 
32346           if test "x$FOUND_FREETYPE" != xyes; then
32347             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32348 
32349   windows_path="$FREETYPE_BASE_DIR"
32350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32351     unix_path=`$CYGPATH -u "$windows_path"`
32352     FREETYPE_BASE_DIR="$unix_path"
32353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32355     FREETYPE_BASE_DIR="$unix_path"
32356   fi
32357 
32358 
32359   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32360   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32361   METHOD="well-known location"
32362 
32363   # First check if the files exists.
32364   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32365     # We found an arbitrary include file. That's a good sign.
32366     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32367 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32368     FOUND_FREETYPE=yes
32369 
32370     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32371     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32372       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32373 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32374       FOUND_FREETYPE=no
32375     else
32376       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32377         # On Windows, we will need both .lib and .dll file.
32378         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32379           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32380 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32381           FOUND_FREETYPE=no
32382         fi
32383       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
32384         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32385         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32386       fi
32387     fi
32388   fi
32389 
32390   if test "x$FOUND_FREETYPE" = xyes; then
32391 
32392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32393 
32394   # Input might be given as Windows format, start by converting to
32395   # unix format.
32396   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32397   new_path=`$CYGPATH -u "$path"`
32398 
32399   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32400   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32401   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32402   # "foo.exe" is OK but "foo" is an error.
32403   #
32404   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32405   # It is also a way to make sure we got the proper file name for the real test later on.
32406   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32407   if test "x$test_shortpath" = x; then
32408     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32409 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32410     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32411   fi
32412 
32413   # Call helper function which possibly converts this using DOS-style short mode.
32414   # If so, the updated path is stored in $new_path.
32415 
32416   input_path="$new_path"
32417   # Check if we need to convert this using DOS-style short mode. If the path
32418   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32419   # take no chances and rewrite it.
32420   # Note: m4 eats our [], so we need to use [ and ] instead.
32421   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32422   if test "x$has_forbidden_chars" != x; then
32423     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32424     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32425     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32426     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32427       # Going to short mode and back again did indeed matter. Since short mode is
32428       # case insensitive, let's make it lowercase to improve readability.
32429       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32430       # Now convert it back to Unix-stile (cygpath)
32431       input_path=`$CYGPATH -u "$shortmode_path"`
32432       new_path="$input_path"
32433     fi
32434   fi
32435 
32436   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32437   if test "x$test_cygdrive_prefix" = x; then
32438     # As a simple fix, exclude /usr/bin since it's not a real path.
32439     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32440       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32441       # a path prefixed by /cygdrive for fixpath to work.
32442       new_path="$CYGWIN_ROOT_PATH$input_path"
32443     fi
32444   fi
32445 
32446 
32447   if test "x$path" != "x$new_path"; then
32448     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32449     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32450 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32451   fi
32452 
32453   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32454 
32455   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32456   has_colon=`$ECHO $path | $GREP ^.:`
32457   new_path="$path"
32458   if test "x$has_colon" = x; then
32459     # Not in mixed or Windows style, start by that.
32460     new_path=`cmd //c echo $path`
32461   fi
32462 
32463 
32464   input_path="$new_path"
32465   # Check if we need to convert this using DOS-style short mode. If the path
32466   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32467   # take no chances and rewrite it.
32468   # Note: m4 eats our [], so we need to use [ and ] instead.
32469   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32470   if test "x$has_forbidden_chars" != x; then
32471     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32472     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32473   fi
32474 
32475 
32476   windows_path="$new_path"
32477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32478     unix_path=`$CYGPATH -u "$windows_path"`
32479     new_path="$unix_path"
32480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32481     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32482     new_path="$unix_path"
32483   fi
32484 
32485   if test "x$path" != "x$new_path"; then
32486     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32487     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32488 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32489   fi
32490 
32491   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32492   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32493 
32494   else
32495     # We're on a posix platform. Hooray! :)
32496     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32497     has_space=`$ECHO "$path" | $GREP " "`
32498     if test "x$has_space" != x; then
32499       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32500 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32501       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32502     fi
32503 
32504     # Use eval to expand a potential ~
32505     eval path="$path"
32506     if test ! -f "$path" && test ! -d "$path"; then
32507       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32508     fi
32509 
32510     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32511   fi
32512 
32513 
32514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32515 
32516   # Input might be given as Windows format, start by converting to
32517   # unix format.
32518   path="$POTENTIAL_FREETYPE_LIB_PATH"
32519   new_path=`$CYGPATH -u "$path"`
32520 
32521   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32522   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32523   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32524   # "foo.exe" is OK but "foo" is an error.
32525   #
32526   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32527   # It is also a way to make sure we got the proper file name for the real test later on.
32528   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32529   if test "x$test_shortpath" = x; then
32530     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32531 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32532     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32533   fi
32534 
32535   # Call helper function which possibly converts this using DOS-style short mode.
32536   # If so, the updated path is stored in $new_path.
32537 
32538   input_path="$new_path"
32539   # Check if we need to convert this using DOS-style short mode. If the path
32540   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32541   # take no chances and rewrite it.
32542   # Note: m4 eats our [], so we need to use [ and ] instead.
32543   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32544   if test "x$has_forbidden_chars" != x; then
32545     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32546     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32547     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32548     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32549       # Going to short mode and back again did indeed matter. Since short mode is
32550       # case insensitive, let's make it lowercase to improve readability.
32551       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32552       # Now convert it back to Unix-stile (cygpath)
32553       input_path=`$CYGPATH -u "$shortmode_path"`
32554       new_path="$input_path"
32555     fi
32556   fi
32557 
32558   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32559   if test "x$test_cygdrive_prefix" = x; then
32560     # As a simple fix, exclude /usr/bin since it's not a real path.
32561     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32562       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32563       # a path prefixed by /cygdrive for fixpath to work.
32564       new_path="$CYGWIN_ROOT_PATH$input_path"
32565     fi
32566   fi
32567 
32568 
32569   if test "x$path" != "x$new_path"; then
32570     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32571     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32572 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32573   fi
32574 
32575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32576 
32577   path="$POTENTIAL_FREETYPE_LIB_PATH"
32578   has_colon=`$ECHO $path | $GREP ^.:`
32579   new_path="$path"
32580   if test "x$has_colon" = x; then
32581     # Not in mixed or Windows style, start by that.
32582     new_path=`cmd //c echo $path`
32583   fi
32584 
32585 
32586   input_path="$new_path"
32587   # Check if we need to convert this using DOS-style short mode. If the path
32588   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32589   # take no chances and rewrite it.
32590   # Note: m4 eats our [], so we need to use [ and ] instead.
32591   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32592   if test "x$has_forbidden_chars" != x; then
32593     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32594     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32595   fi
32596 
32597 
32598   windows_path="$new_path"
32599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32600     unix_path=`$CYGPATH -u "$windows_path"`
32601     new_path="$unix_path"
32602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32604     new_path="$unix_path"
32605   fi
32606 
32607   if test "x$path" != "x$new_path"; then
32608     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32609     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32610 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32611   fi
32612 
32613   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32614   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32615 
32616   else
32617     # We're on a posix platform. Hooray! :)
32618     path="$POTENTIAL_FREETYPE_LIB_PATH"
32619     has_space=`$ECHO "$path" | $GREP " "`
32620     if test "x$has_space" != x; then
32621       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32622 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32623       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32624     fi
32625 
32626     # Use eval to expand a potential ~
32627     eval path="$path"
32628     if test ! -f "$path" && test ! -d "$path"; then
32629       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32630     fi
32631 
32632     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32633   fi
32634 
32635 
32636     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32637     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32638 $as_echo_n "checking for freetype includes... " >&6; }
32639     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32640 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32641     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32642     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32643 $as_echo_n "checking for freetype libraries... " >&6; }
32644     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32645 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32646   fi
32647 
32648           fi
32649         else
32650           if test "x$SYS_ROOT" = "x/"; then
32651             FREETYPE_ROOT=
32652           else
32653             FREETYPE_ROOT="$SYS_ROOT"
32654           fi
32655           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32656 
32657   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32658   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32659   METHOD="well-known location"
32660 
32661   # First check if the files exists.
32662   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32663     # We found an arbitrary include file. That's a good sign.
32664     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32665 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32666     FOUND_FREETYPE=yes
32667 
32668     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32669     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32670       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32671 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32672       FOUND_FREETYPE=no
32673     else
32674       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32675         # On Windows, we will need both .lib and .dll file.
32676         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32677           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32678 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32679           FOUND_FREETYPE=no
32680         fi
32681       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
32682         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32683         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32684       fi
32685     fi
32686   fi
32687 
32688   if test "x$FOUND_FREETYPE" = xyes; then
32689 
32690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32691 
32692   # Input might be given as Windows format, start by converting to
32693   # unix format.
32694   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32695   new_path=`$CYGPATH -u "$path"`
32696 
32697   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32698   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32699   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32700   # "foo.exe" is OK but "foo" is an error.
32701   #
32702   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32703   # It is also a way to make sure we got the proper file name for the real test later on.
32704   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32705   if test "x$test_shortpath" = x; then
32706     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32707 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32708     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32709   fi
32710 
32711   # Call helper function which possibly converts this using DOS-style short mode.
32712   # If so, the updated path is stored in $new_path.
32713 
32714   input_path="$new_path"
32715   # Check if we need to convert this using DOS-style short mode. If the path
32716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32717   # take no chances and rewrite it.
32718   # Note: m4 eats our [], so we need to use [ and ] instead.
32719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32720   if test "x$has_forbidden_chars" != x; then
32721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32722     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32723     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32724     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32725       # Going to short mode and back again did indeed matter. Since short mode is
32726       # case insensitive, let's make it lowercase to improve readability.
32727       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32728       # Now convert it back to Unix-stile (cygpath)
32729       input_path=`$CYGPATH -u "$shortmode_path"`
32730       new_path="$input_path"
32731     fi
32732   fi
32733 
32734   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32735   if test "x$test_cygdrive_prefix" = x; then
32736     # As a simple fix, exclude /usr/bin since it's not a real path.
32737     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32738       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32739       # a path prefixed by /cygdrive for fixpath to work.
32740       new_path="$CYGWIN_ROOT_PATH$input_path"
32741     fi
32742   fi
32743 
32744 
32745   if test "x$path" != "x$new_path"; then
32746     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32747     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32748 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32749   fi
32750 
32751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32752 
32753   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32754   has_colon=`$ECHO $path | $GREP ^.:`
32755   new_path="$path"
32756   if test "x$has_colon" = x; then
32757     # Not in mixed or Windows style, start by that.
32758     new_path=`cmd //c echo $path`
32759   fi
32760 
32761 
32762   input_path="$new_path"
32763   # Check if we need to convert this using DOS-style short mode. If the path
32764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32765   # take no chances and rewrite it.
32766   # Note: m4 eats our [], so we need to use [ and ] instead.
32767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32768   if test "x$has_forbidden_chars" != x; then
32769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32771   fi
32772 
32773 
32774   windows_path="$new_path"
32775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32776     unix_path=`$CYGPATH -u "$windows_path"`
32777     new_path="$unix_path"
32778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32780     new_path="$unix_path"
32781   fi
32782 
32783   if test "x$path" != "x$new_path"; then
32784     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32785     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32786 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32787   fi
32788 
32789   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32790   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32791 
32792   else
32793     # We're on a posix platform. Hooray! :)
32794     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32795     has_space=`$ECHO "$path" | $GREP " "`
32796     if test "x$has_space" != x; then
32797       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32798 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32799       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32800     fi
32801 
32802     # Use eval to expand a potential ~
32803     eval path="$path"
32804     if test ! -f "$path" && test ! -d "$path"; then
32805       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32806     fi
32807 
32808     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32809   fi
32810 
32811 
32812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32813 
32814   # Input might be given as Windows format, start by converting to
32815   # unix format.
32816   path="$POTENTIAL_FREETYPE_LIB_PATH"
32817   new_path=`$CYGPATH -u "$path"`
32818 
32819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32822   # "foo.exe" is OK but "foo" is an error.
32823   #
32824   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32825   # It is also a way to make sure we got the proper file name for the real test later on.
32826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32827   if test "x$test_shortpath" = x; then
32828     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32829 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32830     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32831   fi
32832 
32833   # Call helper function which possibly converts this using DOS-style short mode.
32834   # If so, the updated path is stored in $new_path.
32835 
32836   input_path="$new_path"
32837   # Check if we need to convert this using DOS-style short mode. If the path
32838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32839   # take no chances and rewrite it.
32840   # Note: m4 eats our [], so we need to use [ and ] instead.
32841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32842   if test "x$has_forbidden_chars" != x; then
32843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32844     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32845     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32846     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32847       # Going to short mode and back again did indeed matter. Since short mode is
32848       # case insensitive, let's make it lowercase to improve readability.
32849       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32850       # Now convert it back to Unix-stile (cygpath)
32851       input_path=`$CYGPATH -u "$shortmode_path"`
32852       new_path="$input_path"
32853     fi
32854   fi
32855 
32856   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32857   if test "x$test_cygdrive_prefix" = x; then
32858     # As a simple fix, exclude /usr/bin since it's not a real path.
32859     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32860       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32861       # a path prefixed by /cygdrive for fixpath to work.
32862       new_path="$CYGWIN_ROOT_PATH$input_path"
32863     fi
32864   fi
32865 
32866 
32867   if test "x$path" != "x$new_path"; then
32868     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32870 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32871   fi
32872 
32873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32874 
32875   path="$POTENTIAL_FREETYPE_LIB_PATH"
32876   has_colon=`$ECHO $path | $GREP ^.:`
32877   new_path="$path"
32878   if test "x$has_colon" = x; then
32879     # Not in mixed or Windows style, start by that.
32880     new_path=`cmd //c echo $path`
32881   fi
32882 
32883 
32884   input_path="$new_path"
32885   # Check if we need to convert this using DOS-style short mode. If the path
32886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32887   # take no chances and rewrite it.
32888   # Note: m4 eats our [], so we need to use [ and ] instead.
32889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32890   if test "x$has_forbidden_chars" != x; then
32891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32892     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32893   fi
32894 
32895 
32896   windows_path="$new_path"
32897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32898     unix_path=`$CYGPATH -u "$windows_path"`
32899     new_path="$unix_path"
32900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32902     new_path="$unix_path"
32903   fi
32904 
32905   if test "x$path" != "x$new_path"; then
32906     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32908 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32909   fi
32910 
32911   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32912   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32913 
32914   else
32915     # We're on a posix platform. Hooray! :)
32916     path="$POTENTIAL_FREETYPE_LIB_PATH"
32917     has_space=`$ECHO "$path" | $GREP " "`
32918     if test "x$has_space" != x; then
32919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32920 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32921       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32922     fi
32923 
32924     # Use eval to expand a potential ~
32925     eval path="$path"
32926     if test ! -f "$path" && test ! -d "$path"; then
32927       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32928     fi
32929 
32930     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32931   fi
32932 
32933 
32934     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32935     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32936 $as_echo_n "checking for freetype includes... " >&6; }
32937     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32938 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32939     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32941 $as_echo_n "checking for freetype libraries... " >&6; }
32942     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32943 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32944   fi
32945 
32946 
32947           if test "x$FOUND_FREETYPE" != xyes; then
32948             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32949 
32950   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32951   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32952   METHOD="well-known location"
32953 
32954   # First check if the files exists.
32955   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32956     # We found an arbitrary include file. That's a good sign.
32957     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32958 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32959     FOUND_FREETYPE=yes
32960 
32961     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32962     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32963       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32964 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32965       FOUND_FREETYPE=no
32966     else
32967       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32968         # On Windows, we will need both .lib and .dll file.
32969         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32970           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32971 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32972           FOUND_FREETYPE=no
32973         fi
32974       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
32975         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32976         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32977       fi
32978     fi
32979   fi
32980 
32981   if test "x$FOUND_FREETYPE" = xyes; then
32982 
32983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32984 
32985   # Input might be given as Windows format, start by converting to
32986   # unix format.
32987   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32988   new_path=`$CYGPATH -u "$path"`
32989 
32990   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32991   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32992   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32993   # "foo.exe" is OK but "foo" is an error.
32994   #
32995   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32996   # It is also a way to make sure we got the proper file name for the real test later on.
32997   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32998   if test "x$test_shortpath" = x; then
32999     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33000 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33001     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33002   fi
33003 
33004   # Call helper function which possibly converts this using DOS-style short mode.
33005   # If so, the updated path is stored in $new_path.
33006 
33007   input_path="$new_path"
33008   # Check if we need to convert this using DOS-style short mode. If the path
33009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33010   # take no chances and rewrite it.
33011   # Note: m4 eats our [], so we need to use [ and ] instead.
33012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33013   if test "x$has_forbidden_chars" != x; then
33014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33015     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33016     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33017     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33018       # Going to short mode and back again did indeed matter. Since short mode is
33019       # case insensitive, let's make it lowercase to improve readability.
33020       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33021       # Now convert it back to Unix-stile (cygpath)
33022       input_path=`$CYGPATH -u "$shortmode_path"`
33023       new_path="$input_path"
33024     fi
33025   fi
33026 
33027   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33028   if test "x$test_cygdrive_prefix" = x; then
33029     # As a simple fix, exclude /usr/bin since it's not a real path.
33030     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33031       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33032       # a path prefixed by /cygdrive for fixpath to work.
33033       new_path="$CYGWIN_ROOT_PATH$input_path"
33034     fi
33035   fi
33036 
33037 
33038   if test "x$path" != "x$new_path"; then
33039     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33041 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33042   fi
33043 
33044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33045 
33046   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33047   has_colon=`$ECHO $path | $GREP ^.:`
33048   new_path="$path"
33049   if test "x$has_colon" = x; then
33050     # Not in mixed or Windows style, start by that.
33051     new_path=`cmd //c echo $path`
33052   fi
33053 
33054 
33055   input_path="$new_path"
33056   # Check if we need to convert this using DOS-style short mode. If the path
33057   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33058   # take no chances and rewrite it.
33059   # Note: m4 eats our [], so we need to use [ and ] instead.
33060   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33061   if test "x$has_forbidden_chars" != x; then
33062     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33063     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33064   fi
33065 
33066 
33067   windows_path="$new_path"
33068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33069     unix_path=`$CYGPATH -u "$windows_path"`
33070     new_path="$unix_path"
33071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33073     new_path="$unix_path"
33074   fi
33075 
33076   if test "x$path" != "x$new_path"; then
33077     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33078     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33079 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33080   fi
33081 
33082   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33083   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33084 
33085   else
33086     # We're on a posix platform. Hooray! :)
33087     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33088     has_space=`$ECHO "$path" | $GREP " "`
33089     if test "x$has_space" != x; then
33090       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33091 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33092       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33093     fi
33094 
33095     # Use eval to expand a potential ~
33096     eval path="$path"
33097     if test ! -f "$path" && test ! -d "$path"; then
33098       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33099     fi
33100 
33101     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33102   fi
33103 
33104 
33105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33106 
33107   # Input might be given as Windows format, start by converting to
33108   # unix format.
33109   path="$POTENTIAL_FREETYPE_LIB_PATH"
33110   new_path=`$CYGPATH -u "$path"`
33111 
33112   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33113   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33114   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33115   # "foo.exe" is OK but "foo" is an error.
33116   #
33117   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33118   # It is also a way to make sure we got the proper file name for the real test later on.
33119   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33120   if test "x$test_shortpath" = x; then
33121     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33122 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33123     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33124   fi
33125 
33126   # Call helper function which possibly converts this using DOS-style short mode.
33127   # If so, the updated path is stored in $new_path.
33128 
33129   input_path="$new_path"
33130   # Check if we need to convert this using DOS-style short mode. If the path
33131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33132   # take no chances and rewrite it.
33133   # Note: m4 eats our [], so we need to use [ and ] instead.
33134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33135   if test "x$has_forbidden_chars" != x; then
33136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33137     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33138     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33139     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33140       # Going to short mode and back again did indeed matter. Since short mode is
33141       # case insensitive, let's make it lowercase to improve readability.
33142       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33143       # Now convert it back to Unix-stile (cygpath)
33144       input_path=`$CYGPATH -u "$shortmode_path"`
33145       new_path="$input_path"
33146     fi
33147   fi
33148 
33149   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33150   if test "x$test_cygdrive_prefix" = x; then
33151     # As a simple fix, exclude /usr/bin since it's not a real path.
33152     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33153       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33154       # a path prefixed by /cygdrive for fixpath to work.
33155       new_path="$CYGWIN_ROOT_PATH$input_path"
33156     fi
33157   fi
33158 
33159 
33160   if test "x$path" != "x$new_path"; then
33161     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33162     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33163 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33164   fi
33165 
33166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33167 
33168   path="$POTENTIAL_FREETYPE_LIB_PATH"
33169   has_colon=`$ECHO $path | $GREP ^.:`
33170   new_path="$path"
33171   if test "x$has_colon" = x; then
33172     # Not in mixed or Windows style, start by that.
33173     new_path=`cmd //c echo $path`
33174   fi
33175 
33176 
33177   input_path="$new_path"
33178   # Check if we need to convert this using DOS-style short mode. If the path
33179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33180   # take no chances and rewrite it.
33181   # Note: m4 eats our [], so we need to use [ and ] instead.
33182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33183   if test "x$has_forbidden_chars" != x; then
33184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33185     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33186   fi
33187 
33188 
33189   windows_path="$new_path"
33190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33191     unix_path=`$CYGPATH -u "$windows_path"`
33192     new_path="$unix_path"
33193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33195     new_path="$unix_path"
33196   fi
33197 
33198   if test "x$path" != "x$new_path"; then
33199     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33201 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33202   fi
33203 
33204   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33205   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33206 
33207   else
33208     # We're on a posix platform. Hooray! :)
33209     path="$POTENTIAL_FREETYPE_LIB_PATH"
33210     has_space=`$ECHO "$path" | $GREP " "`
33211     if test "x$has_space" != x; then
33212       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33213 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33214       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33215     fi
33216 
33217     # Use eval to expand a potential ~
33218     eval path="$path"
33219     if test ! -f "$path" && test ! -d "$path"; then
33220       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33221     fi
33222 
33223     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33224   fi
33225 
33226 
33227     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33229 $as_echo_n "checking for freetype includes... " >&6; }
33230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33231 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33232     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33234 $as_echo_n "checking for freetype libraries... " >&6; }
33235     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33236 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33237   fi
33238 
33239           fi
33240 
33241           if test "x$FOUND_FREETYPE" != xyes; then
33242             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33243             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33244 
33245   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33246   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33247   METHOD="well-known location"
33248 
33249   # First check if the files exists.
33250   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33251     # We found an arbitrary include file. That's a good sign.
33252     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33253 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33254     FOUND_FREETYPE=yes
33255 
33256     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33257     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33258       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33259 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33260       FOUND_FREETYPE=no
33261     else
33262       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33263         # On Windows, we will need both .lib and .dll file.
33264         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33265           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33266 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33267           FOUND_FREETYPE=no
33268         fi
33269       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
33270         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33271         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33272       fi
33273     fi
33274   fi
33275 
33276   if test "x$FOUND_FREETYPE" = xyes; then
33277 
33278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33279 
33280   # Input might be given as Windows format, start by converting to
33281   # unix format.
33282   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33283   new_path=`$CYGPATH -u "$path"`
33284 
33285   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33286   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33287   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33288   # "foo.exe" is OK but "foo" is an error.
33289   #
33290   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33291   # It is also a way to make sure we got the proper file name for the real test later on.
33292   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33293   if test "x$test_shortpath" = x; then
33294     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33295 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33296     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33297   fi
33298 
33299   # Call helper function which possibly converts this using DOS-style short mode.
33300   # If so, the updated path is stored in $new_path.
33301 
33302   input_path="$new_path"
33303   # Check if we need to convert this using DOS-style short mode. If the path
33304   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33305   # take no chances and rewrite it.
33306   # Note: m4 eats our [], so we need to use [ and ] instead.
33307   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33308   if test "x$has_forbidden_chars" != x; then
33309     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33310     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33311     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33312     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33313       # Going to short mode and back again did indeed matter. Since short mode is
33314       # case insensitive, let's make it lowercase to improve readability.
33315       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33316       # Now convert it back to Unix-stile (cygpath)
33317       input_path=`$CYGPATH -u "$shortmode_path"`
33318       new_path="$input_path"
33319     fi
33320   fi
33321 
33322   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33323   if test "x$test_cygdrive_prefix" = x; then
33324     # As a simple fix, exclude /usr/bin since it's not a real path.
33325     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33326       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33327       # a path prefixed by /cygdrive for fixpath to work.
33328       new_path="$CYGWIN_ROOT_PATH$input_path"
33329     fi
33330   fi
33331 
33332 
33333   if test "x$path" != "x$new_path"; then
33334     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33336 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33337   fi
33338 
33339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33340 
33341   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33342   has_colon=`$ECHO $path | $GREP ^.:`
33343   new_path="$path"
33344   if test "x$has_colon" = x; then
33345     # Not in mixed or Windows style, start by that.
33346     new_path=`cmd //c echo $path`
33347   fi
33348 
33349 
33350   input_path="$new_path"
33351   # Check if we need to convert this using DOS-style short mode. If the path
33352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33353   # take no chances and rewrite it.
33354   # Note: m4 eats our [], so we need to use [ and ] instead.
33355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33356   if test "x$has_forbidden_chars" != x; then
33357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33358     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33359   fi
33360 
33361 
33362   windows_path="$new_path"
33363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33364     unix_path=`$CYGPATH -u "$windows_path"`
33365     new_path="$unix_path"
33366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33368     new_path="$unix_path"
33369   fi
33370 
33371   if test "x$path" != "x$new_path"; then
33372     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33373     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33374 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33375   fi
33376 
33377   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33378   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33379 
33380   else
33381     # We're on a posix platform. Hooray! :)
33382     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33383     has_space=`$ECHO "$path" | $GREP " "`
33384     if test "x$has_space" != x; then
33385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33386 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33387       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33388     fi
33389 
33390     # Use eval to expand a potential ~
33391     eval path="$path"
33392     if test ! -f "$path" && test ! -d "$path"; then
33393       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33394     fi
33395 
33396     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33397   fi
33398 
33399 
33400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33401 
33402   # Input might be given as Windows format, start by converting to
33403   # unix format.
33404   path="$POTENTIAL_FREETYPE_LIB_PATH"
33405   new_path=`$CYGPATH -u "$path"`
33406 
33407   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33408   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33409   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33410   # "foo.exe" is OK but "foo" is an error.
33411   #
33412   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33413   # It is also a way to make sure we got the proper file name for the real test later on.
33414   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33415   if test "x$test_shortpath" = x; then
33416     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33417 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33418     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33419   fi
33420 
33421   # Call helper function which possibly converts this using DOS-style short mode.
33422   # If so, the updated path is stored in $new_path.
33423 
33424   input_path="$new_path"
33425   # Check if we need to convert this using DOS-style short mode. If the path
33426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33427   # take no chances and rewrite it.
33428   # Note: m4 eats our [], so we need to use [ and ] instead.
33429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33430   if test "x$has_forbidden_chars" != x; then
33431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33432     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33433     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33434     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33435       # Going to short mode and back again did indeed matter. Since short mode is
33436       # case insensitive, let's make it lowercase to improve readability.
33437       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33438       # Now convert it back to Unix-stile (cygpath)
33439       input_path=`$CYGPATH -u "$shortmode_path"`
33440       new_path="$input_path"
33441     fi
33442   fi
33443 
33444   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33445   if test "x$test_cygdrive_prefix" = x; then
33446     # As a simple fix, exclude /usr/bin since it's not a real path.
33447     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33448       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33449       # a path prefixed by /cygdrive for fixpath to work.
33450       new_path="$CYGWIN_ROOT_PATH$input_path"
33451     fi
33452   fi
33453 
33454 
33455   if test "x$path" != "x$new_path"; then
33456     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33457     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33458 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33459   fi
33460 
33461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33462 
33463   path="$POTENTIAL_FREETYPE_LIB_PATH"
33464   has_colon=`$ECHO $path | $GREP ^.:`
33465   new_path="$path"
33466   if test "x$has_colon" = x; then
33467     # Not in mixed or Windows style, start by that.
33468     new_path=`cmd //c echo $path`
33469   fi
33470 
33471 
33472   input_path="$new_path"
33473   # Check if we need to convert this using DOS-style short mode. If the path
33474   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33475   # take no chances and rewrite it.
33476   # Note: m4 eats our [], so we need to use [ and ] instead.
33477   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33478   if test "x$has_forbidden_chars" != x; then
33479     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33480     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33481   fi
33482 
33483 
33484   windows_path="$new_path"
33485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33486     unix_path=`$CYGPATH -u "$windows_path"`
33487     new_path="$unix_path"
33488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33490     new_path="$unix_path"
33491   fi
33492 
33493   if test "x$path" != "x$new_path"; then
33494     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33496 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33497   fi
33498 
33499   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33500   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33501 
33502   else
33503     # We're on a posix platform. Hooray! :)
33504     path="$POTENTIAL_FREETYPE_LIB_PATH"
33505     has_space=`$ECHO "$path" | $GREP " "`
33506     if test "x$has_space" != x; then
33507       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33508 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33509       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33510     fi
33511 
33512     # Use eval to expand a potential ~
33513     eval path="$path"
33514     if test ! -f "$path" && test ! -d "$path"; then
33515       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33516     fi
33517 
33518     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33519   fi
33520 
33521 
33522     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33523     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33524 $as_echo_n "checking for freetype includes... " >&6; }
33525     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33526 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33527     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33528     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33529 $as_echo_n "checking for freetype libraries... " >&6; }
33530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33531 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33532   fi
33533 
33534             else
33535 
33536   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33537   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33538   METHOD="well-known location"
33539 
33540   # First check if the files exists.
33541   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33542     # We found an arbitrary include file. That's a good sign.
33543     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33544 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33545     FOUND_FREETYPE=yes
33546 
33547     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33548     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33549       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33550 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33551       FOUND_FREETYPE=no
33552     else
33553       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33554         # On Windows, we will need both .lib and .dll file.
33555         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33556           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33557 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33558           FOUND_FREETYPE=no
33559         fi
33560       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
33561         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33562         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33563       fi
33564     fi
33565   fi
33566 
33567   if test "x$FOUND_FREETYPE" = xyes; then
33568 
33569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33570 
33571   # Input might be given as Windows format, start by converting to
33572   # unix format.
33573   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33574   new_path=`$CYGPATH -u "$path"`
33575 
33576   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33577   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33578   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33579   # "foo.exe" is OK but "foo" is an error.
33580   #
33581   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33582   # It is also a way to make sure we got the proper file name for the real test later on.
33583   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33584   if test "x$test_shortpath" = x; then
33585     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33586 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33587     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33588   fi
33589 
33590   # Call helper function which possibly converts this using DOS-style short mode.
33591   # If so, the updated path is stored in $new_path.
33592 
33593   input_path="$new_path"
33594   # Check if we need to convert this using DOS-style short mode. If the path
33595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33596   # take no chances and rewrite it.
33597   # Note: m4 eats our [], so we need to use [ and ] instead.
33598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33599   if test "x$has_forbidden_chars" != x; then
33600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33601     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33602     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33603     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33604       # Going to short mode and back again did indeed matter. Since short mode is
33605       # case insensitive, let's make it lowercase to improve readability.
33606       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33607       # Now convert it back to Unix-stile (cygpath)
33608       input_path=`$CYGPATH -u "$shortmode_path"`
33609       new_path="$input_path"
33610     fi
33611   fi
33612 
33613   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33614   if test "x$test_cygdrive_prefix" = x; then
33615     # As a simple fix, exclude /usr/bin since it's not a real path.
33616     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33617       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33618       # a path prefixed by /cygdrive for fixpath to work.
33619       new_path="$CYGWIN_ROOT_PATH$input_path"
33620     fi
33621   fi
33622 
33623 
33624   if test "x$path" != "x$new_path"; then
33625     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33626     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33627 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33628   fi
33629 
33630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33631 
33632   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33633   has_colon=`$ECHO $path | $GREP ^.:`
33634   new_path="$path"
33635   if test "x$has_colon" = x; then
33636     # Not in mixed or Windows style, start by that.
33637     new_path=`cmd //c echo $path`
33638   fi
33639 
33640 
33641   input_path="$new_path"
33642   # Check if we need to convert this using DOS-style short mode. If the path
33643   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33644   # take no chances and rewrite it.
33645   # Note: m4 eats our [], so we need to use [ and ] instead.
33646   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33647   if test "x$has_forbidden_chars" != x; then
33648     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33649     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33650   fi
33651 
33652 
33653   windows_path="$new_path"
33654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33655     unix_path=`$CYGPATH -u "$windows_path"`
33656     new_path="$unix_path"
33657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33658     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33659     new_path="$unix_path"
33660   fi
33661 
33662   if test "x$path" != "x$new_path"; then
33663     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33664     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33665 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33666   fi
33667 
33668   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33669   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33670 
33671   else
33672     # We're on a posix platform. Hooray! :)
33673     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33674     has_space=`$ECHO "$path" | $GREP " "`
33675     if test "x$has_space" != x; then
33676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33677 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33678       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33679     fi
33680 
33681     # Use eval to expand a potential ~
33682     eval path="$path"
33683     if test ! -f "$path" && test ! -d "$path"; then
33684       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33685     fi
33686 
33687     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33688   fi
33689 
33690 
33691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33692 
33693   # Input might be given as Windows format, start by converting to
33694   # unix format.
33695   path="$POTENTIAL_FREETYPE_LIB_PATH"
33696   new_path=`$CYGPATH -u "$path"`
33697 
33698   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33699   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33700   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33701   # "foo.exe" is OK but "foo" is an error.
33702   #
33703   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33704   # It is also a way to make sure we got the proper file name for the real test later on.
33705   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33706   if test "x$test_shortpath" = x; then
33707     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33708 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33709     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33710   fi
33711 
33712   # Call helper function which possibly converts this using DOS-style short mode.
33713   # If so, the updated path is stored in $new_path.
33714 
33715   input_path="$new_path"
33716   # Check if we need to convert this using DOS-style short mode. If the path
33717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33718   # take no chances and rewrite it.
33719   # Note: m4 eats our [], so we need to use [ and ] instead.
33720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33721   if test "x$has_forbidden_chars" != x; then
33722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33723     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33724     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33725     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33726       # Going to short mode and back again did indeed matter. Since short mode is
33727       # case insensitive, let's make it lowercase to improve readability.
33728       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33729       # Now convert it back to Unix-stile (cygpath)
33730       input_path=`$CYGPATH -u "$shortmode_path"`
33731       new_path="$input_path"
33732     fi
33733   fi
33734 
33735   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33736   if test "x$test_cygdrive_prefix" = x; then
33737     # As a simple fix, exclude /usr/bin since it's not a real path.
33738     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33739       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33740       # a path prefixed by /cygdrive for fixpath to work.
33741       new_path="$CYGWIN_ROOT_PATH$input_path"
33742     fi
33743   fi
33744 
33745 
33746   if test "x$path" != "x$new_path"; then
33747     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33749 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33750   fi
33751 
33752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33753 
33754   path="$POTENTIAL_FREETYPE_LIB_PATH"
33755   has_colon=`$ECHO $path | $GREP ^.:`
33756   new_path="$path"
33757   if test "x$has_colon" = x; then
33758     # Not in mixed or Windows style, start by that.
33759     new_path=`cmd //c echo $path`
33760   fi
33761 
33762 
33763   input_path="$new_path"
33764   # Check if we need to convert this using DOS-style short mode. If the path
33765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33766   # take no chances and rewrite it.
33767   # Note: m4 eats our [], so we need to use [ and ] instead.
33768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33769   if test "x$has_forbidden_chars" != x; then
33770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33771     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33772   fi
33773 
33774 
33775   windows_path="$new_path"
33776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33777     unix_path=`$CYGPATH -u "$windows_path"`
33778     new_path="$unix_path"
33779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33781     new_path="$unix_path"
33782   fi
33783 
33784   if test "x$path" != "x$new_path"; then
33785     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33787 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33788   fi
33789 
33790   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33791   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33792 
33793   else
33794     # We're on a posix platform. Hooray! :)
33795     path="$POTENTIAL_FREETYPE_LIB_PATH"
33796     has_space=`$ECHO "$path" | $GREP " "`
33797     if test "x$has_space" != x; then
33798       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33799 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33800       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33801     fi
33802 
33803     # Use eval to expand a potential ~
33804     eval path="$path"
33805     if test ! -f "$path" && test ! -d "$path"; then
33806       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33807     fi
33808 
33809     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33810   fi
33811 
33812 
33813     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33814     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33815 $as_echo_n "checking for freetype includes... " >&6; }
33816     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33817 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33818     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33820 $as_echo_n "checking for freetype libraries... " >&6; }
33821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33822 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33823   fi
33824 
33825               if test "x$FOUND_FREETYPE" != xyes; then
33826 
33827   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33828   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33829   METHOD="well-known location"
33830 
33831   # First check if the files exists.
33832   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33833     # We found an arbitrary include file. That's a good sign.
33834     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33835 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33836     FOUND_FREETYPE=yes
33837 
33838     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33839     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33840       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33841 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33842       FOUND_FREETYPE=no
33843     else
33844       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33845         # On Windows, we will need both .lib and .dll file.
33846         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33847           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33848 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33849           FOUND_FREETYPE=no
33850         fi
33851       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
33852         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33853         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33854       fi
33855     fi
33856   fi
33857 
33858   if test "x$FOUND_FREETYPE" = xyes; then
33859 
33860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33861 
33862   # Input might be given as Windows format, start by converting to
33863   # unix format.
33864   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33865   new_path=`$CYGPATH -u "$path"`
33866 
33867   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33868   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33869   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33870   # "foo.exe" is OK but "foo" is an error.
33871   #
33872   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33873   # It is also a way to make sure we got the proper file name for the real test later on.
33874   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33875   if test "x$test_shortpath" = x; then
33876     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33877 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33878     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33879   fi
33880 
33881   # Call helper function which possibly converts this using DOS-style short mode.
33882   # If so, the updated path is stored in $new_path.
33883 
33884   input_path="$new_path"
33885   # Check if we need to convert this using DOS-style short mode. If the path
33886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33887   # take no chances and rewrite it.
33888   # Note: m4 eats our [], so we need to use [ and ] instead.
33889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33890   if test "x$has_forbidden_chars" != x; then
33891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33892     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33893     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33894     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33895       # Going to short mode and back again did indeed matter. Since short mode is
33896       # case insensitive, let's make it lowercase to improve readability.
33897       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33898       # Now convert it back to Unix-stile (cygpath)
33899       input_path=`$CYGPATH -u "$shortmode_path"`
33900       new_path="$input_path"
33901     fi
33902   fi
33903 
33904   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33905   if test "x$test_cygdrive_prefix" = x; then
33906     # As a simple fix, exclude /usr/bin since it's not a real path.
33907     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33908       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33909       # a path prefixed by /cygdrive for fixpath to work.
33910       new_path="$CYGWIN_ROOT_PATH$input_path"
33911     fi
33912   fi
33913 
33914 
33915   if test "x$path" != "x$new_path"; then
33916     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33917     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33918 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33919   fi
33920 
33921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33922 
33923   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33924   has_colon=`$ECHO $path | $GREP ^.:`
33925   new_path="$path"
33926   if test "x$has_colon" = x; then
33927     # Not in mixed or Windows style, start by that.
33928     new_path=`cmd //c echo $path`
33929   fi
33930 
33931 
33932   input_path="$new_path"
33933   # Check if we need to convert this using DOS-style short mode. If the path
33934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33935   # take no chances and rewrite it.
33936   # Note: m4 eats our [], so we need to use [ and ] instead.
33937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33938   if test "x$has_forbidden_chars" != x; then
33939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33940     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33941   fi
33942 
33943 
33944   windows_path="$new_path"
33945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33946     unix_path=`$CYGPATH -u "$windows_path"`
33947     new_path="$unix_path"
33948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33950     new_path="$unix_path"
33951   fi
33952 
33953   if test "x$path" != "x$new_path"; then
33954     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33955     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33956 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33957   fi
33958 
33959   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33960   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33961 
33962   else
33963     # We're on a posix platform. Hooray! :)
33964     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33965     has_space=`$ECHO "$path" | $GREP " "`
33966     if test "x$has_space" != x; then
33967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33968 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33969       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33970     fi
33971 
33972     # Use eval to expand a potential ~
33973     eval path="$path"
33974     if test ! -f "$path" && test ! -d "$path"; then
33975       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33976     fi
33977 
33978     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33979   fi
33980 
33981 
33982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33983 
33984   # Input might be given as Windows format, start by converting to
33985   # unix format.
33986   path="$POTENTIAL_FREETYPE_LIB_PATH"
33987   new_path=`$CYGPATH -u "$path"`
33988 
33989   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33990   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33991   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33992   # "foo.exe" is OK but "foo" is an error.
33993   #
33994   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33995   # It is also a way to make sure we got the proper file name for the real test later on.
33996   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33997   if test "x$test_shortpath" = x; then
33998     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33999 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34000     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
34001   fi
34002 
34003   # Call helper function which possibly converts this using DOS-style short mode.
34004   # If so, the updated path is stored in $new_path.
34005 
34006   input_path="$new_path"
34007   # Check if we need to convert this using DOS-style short mode. If the path
34008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34009   # take no chances and rewrite it.
34010   # Note: m4 eats our [], so we need to use [ and ] instead.
34011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34012   if test "x$has_forbidden_chars" != x; then
34013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34014     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34015     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34016     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34017       # Going to short mode and back again did indeed matter. Since short mode is
34018       # case insensitive, let's make it lowercase to improve readability.
34019       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34020       # Now convert it back to Unix-stile (cygpath)
34021       input_path=`$CYGPATH -u "$shortmode_path"`
34022       new_path="$input_path"
34023     fi
34024   fi
34025 
34026   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34027   if test "x$test_cygdrive_prefix" = x; then
34028     # As a simple fix, exclude /usr/bin since it's not a real path.
34029     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34030       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34031       # a path prefixed by /cygdrive for fixpath to work.
34032       new_path="$CYGWIN_ROOT_PATH$input_path"
34033     fi
34034   fi
34035 
34036 
34037   if test "x$path" != "x$new_path"; then
34038     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34039     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34040 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34041   fi
34042 
34043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34044 
34045   path="$POTENTIAL_FREETYPE_LIB_PATH"
34046   has_colon=`$ECHO $path | $GREP ^.:`
34047   new_path="$path"
34048   if test "x$has_colon" = x; then
34049     # Not in mixed or Windows style, start by that.
34050     new_path=`cmd //c echo $path`
34051   fi
34052 
34053 
34054   input_path="$new_path"
34055   # Check if we need to convert this using DOS-style short mode. If the path
34056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34057   # take no chances and rewrite it.
34058   # Note: m4 eats our [], so we need to use [ and ] instead.
34059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34060   if test "x$has_forbidden_chars" != x; then
34061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34062     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34063   fi
34064 
34065 
34066   windows_path="$new_path"
34067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34068     unix_path=`$CYGPATH -u "$windows_path"`
34069     new_path="$unix_path"
34070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34072     new_path="$unix_path"
34073   fi
34074 
34075   if test "x$path" != "x$new_path"; then
34076     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34077     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34078 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34079   fi
34080 
34081   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34082   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34083 
34084   else
34085     # We're on a posix platform. Hooray! :)
34086     path="$POTENTIAL_FREETYPE_LIB_PATH"
34087     has_space=`$ECHO "$path" | $GREP " "`
34088     if test "x$has_space" != x; then
34089       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34090 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34091       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34092     fi
34093 
34094     # Use eval to expand a potential ~
34095     eval path="$path"
34096     if test ! -f "$path" && test ! -d "$path"; then
34097       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34098     fi
34099 
34100     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34101   fi
34102 
34103 
34104     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34106 $as_echo_n "checking for freetype includes... " >&6; }
34107     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34108 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34109     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34110     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34111 $as_echo_n "checking for freetype libraries... " >&6; }
34112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34113 $as_echo "$FREETYPE_LIB_PATH" >&6; }
34114   fi
34115 
34116               fi
34117             fi
34118           fi
34119         fi
34120       fi # end check in well-known locations
34121 
34122       if test "x$FOUND_FREETYPE" != xyes; then
34123 
34124   # Print a helpful message on how to acquire the necessary build dependency.
34125   # freetype is the help tag: freetype, cups, pulse, alsa etc
34126   MISSING_DEPENDENCY=freetype
34127 
34128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34129     cygwin_help $MISSING_DEPENDENCY
34130   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34131     msys_help $MISSING_DEPENDENCY
34132   else
34133     PKGHANDLER_COMMAND=
34134 
34135     case $PKGHANDLER in
34136       apt-get)
34137         apt_help     $MISSING_DEPENDENCY ;;
34138       yum)
34139         yum_help     $MISSING_DEPENDENCY ;;
34140       port)
34141         port_help    $MISSING_DEPENDENCY ;;
34142       pkgutil)
34143         pkgutil_help $MISSING_DEPENDENCY ;;
34144       pkgadd)
34145         pkgadd_help  $MISSING_DEPENDENCY ;;
34146     esac
34147 
34148     if test "x$PKGHANDLER_COMMAND" != x; then
34149       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34150     fi
34151   fi
34152 
34153         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34154       fi
34155     fi # end user specified settings
34156 
34157     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34158     if test "x$FREETYPE_CFLAGS" = x; then
34159 
34160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34161 
34162   # Input might be given as Windows format, start by converting to
34163   # unix format.
34164   path="$FREETYPE_INCLUDE_PATH"
34165   new_path=`$CYGPATH -u "$path"`
34166 
34167   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34168   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34169   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34170   # "foo.exe" is OK but "foo" is an error.
34171   #
34172   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34173   # It is also a way to make sure we got the proper file name for the real test later on.
34174   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34175   if test "x$test_shortpath" = x; then
34176     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34177 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34178     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34179   fi
34180 
34181   # Call helper function which possibly converts this using DOS-style short mode.
34182   # If so, the updated path is stored in $new_path.
34183 
34184   input_path="$new_path"
34185   # Check if we need to convert this using DOS-style short mode. If the path
34186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34187   # take no chances and rewrite it.
34188   # Note: m4 eats our [], so we need to use [ and ] instead.
34189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34190   if test "x$has_forbidden_chars" != x; then
34191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34192     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34193     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34194     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34195       # Going to short mode and back again did indeed matter. Since short mode is
34196       # case insensitive, let's make it lowercase to improve readability.
34197       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34198       # Now convert it back to Unix-stile (cygpath)
34199       input_path=`$CYGPATH -u "$shortmode_path"`
34200       new_path="$input_path"
34201     fi
34202   fi
34203 
34204   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34205   if test "x$test_cygdrive_prefix" = x; then
34206     # As a simple fix, exclude /usr/bin since it's not a real path.
34207     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34208       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34209       # a path prefixed by /cygdrive for fixpath to work.
34210       new_path="$CYGWIN_ROOT_PATH$input_path"
34211     fi
34212   fi
34213 
34214 
34215   if test "x$path" != "x$new_path"; then
34216     FREETYPE_INCLUDE_PATH="$new_path"
34217     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34218 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34219   fi
34220 
34221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34222 
34223   path="$FREETYPE_INCLUDE_PATH"
34224   has_colon=`$ECHO $path | $GREP ^.:`
34225   new_path="$path"
34226   if test "x$has_colon" = x; then
34227     # Not in mixed or Windows style, start by that.
34228     new_path=`cmd //c echo $path`
34229   fi
34230 
34231 
34232   input_path="$new_path"
34233   # Check if we need to convert this using DOS-style short mode. If the path
34234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34235   # take no chances and rewrite it.
34236   # Note: m4 eats our [], so we need to use [ and ] instead.
34237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34238   if test "x$has_forbidden_chars" != x; then
34239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34240     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34241   fi
34242 
34243 
34244   windows_path="$new_path"
34245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34246     unix_path=`$CYGPATH -u "$windows_path"`
34247     new_path="$unix_path"
34248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34249     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34250     new_path="$unix_path"
34251   fi
34252 
34253   if test "x$path" != "x$new_path"; then
34254     FREETYPE_INCLUDE_PATH="$new_path"
34255     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34256 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34257   fi
34258 
34259   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34260   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34261 
34262   else
34263     # We're on a posix platform. Hooray! :)
34264     path="$FREETYPE_INCLUDE_PATH"
34265     has_space=`$ECHO "$path" | $GREP " "`
34266     if test "x$has_space" != x; then
34267       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34268 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34269       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34270     fi
34271 
34272     # Use eval to expand a potential ~
34273     eval path="$path"
34274     if test ! -f "$path" && test ! -d "$path"; then
34275       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34276     fi
34277 
34278     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34279   fi
34280 
34281       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34282         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34283       else
34284         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34285       fi
34286     fi
34287 
34288     if test "x$FREETYPE_LIBS" = x; then
34289 
34290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34291 
34292   # Input might be given as Windows format, start by converting to
34293   # unix format.
34294   path="$FREETYPE_LIB_PATH"
34295   new_path=`$CYGPATH -u "$path"`
34296 
34297   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34298   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34299   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34300   # "foo.exe" is OK but "foo" is an error.
34301   #
34302   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34303   # It is also a way to make sure we got the proper file name for the real test later on.
34304   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34305   if test "x$test_shortpath" = x; then
34306     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34307 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34308     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34309   fi
34310 
34311   # Call helper function which possibly converts this using DOS-style short mode.
34312   # If so, the updated path is stored in $new_path.
34313 
34314   input_path="$new_path"
34315   # Check if we need to convert this using DOS-style short mode. If the path
34316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34317   # take no chances and rewrite it.
34318   # Note: m4 eats our [], so we need to use [ and ] instead.
34319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34320   if test "x$has_forbidden_chars" != x; then
34321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34322     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34323     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34324     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34325       # Going to short mode and back again did indeed matter. Since short mode is
34326       # case insensitive, let's make it lowercase to improve readability.
34327       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34328       # Now convert it back to Unix-stile (cygpath)
34329       input_path=`$CYGPATH -u "$shortmode_path"`
34330       new_path="$input_path"
34331     fi
34332   fi
34333 
34334   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34335   if test "x$test_cygdrive_prefix" = x; then
34336     # As a simple fix, exclude /usr/bin since it's not a real path.
34337     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34338       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34339       # a path prefixed by /cygdrive for fixpath to work.
34340       new_path="$CYGWIN_ROOT_PATH$input_path"
34341     fi
34342   fi
34343 
34344 
34345   if test "x$path" != "x$new_path"; then
34346     FREETYPE_LIB_PATH="$new_path"
34347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34348 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34349   fi
34350 
34351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34352 
34353   path="$FREETYPE_LIB_PATH"
34354   has_colon=`$ECHO $path | $GREP ^.:`
34355   new_path="$path"
34356   if test "x$has_colon" = x; then
34357     # Not in mixed or Windows style, start by that.
34358     new_path=`cmd //c echo $path`
34359   fi
34360 
34361 
34362   input_path="$new_path"
34363   # Check if we need to convert this using DOS-style short mode. If the path
34364   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34365   # take no chances and rewrite it.
34366   # Note: m4 eats our [], so we need to use [ and ] instead.
34367   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34368   if test "x$has_forbidden_chars" != x; then
34369     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34370     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34371   fi
34372 
34373 
34374   windows_path="$new_path"
34375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34376     unix_path=`$CYGPATH -u "$windows_path"`
34377     new_path="$unix_path"
34378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34380     new_path="$unix_path"
34381   fi
34382 
34383   if test "x$path" != "x$new_path"; then
34384     FREETYPE_LIB_PATH="$new_path"
34385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34386 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34387   fi
34388 
34389   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34390   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34391 
34392   else
34393     # We're on a posix platform. Hooray! :)
34394     path="$FREETYPE_LIB_PATH"
34395     has_space=`$ECHO "$path" | $GREP " "`
34396     if test "x$has_space" != x; then
34397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34398 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34399       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34400     fi
34401 
34402     # Use eval to expand a potential ~
34403     eval path="$path"
34404     if test ! -f "$path" && test ! -d "$path"; then
34405       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34406     fi
34407 
34408     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34409   fi
34410 
34411       if test "x$OPENJDK_TARGET_OS" = xwindows; then
34412         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34413       else
34414         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34415       fi
34416     fi
34417 
34418     # Try to compile it
34419     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34420 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
34421     ac_ext=cpp
34422 ac_cpp='$CXXCPP $CPPFLAGS'
34423 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34424 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34425 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34426 
34427     PREV_CXXCFLAGS="$CXXFLAGS"
34428     PREV_LIBS="$LIBS"
34429     PREV_CXX="$CXX"
34430     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34431     LIBS="$LIBS $FREETYPE_LIBS"
34432     CXX="$FIXPATH $CXX"
34433     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34434 /* end confdefs.h.  */
34435 
34436           #include<ft2build.h>
34437           #include FT_FREETYPE_H
34438           int main () {
34439             FT_Init_FreeType(NULL);
34440             return 0;
34441           }
34442 
34443 _ACEOF
34444 if ac_fn_cxx_try_link "$LINENO"; then :
34445 
34446           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34447 $as_echo "yes" >&6; }
34448 
34449 else
34450 
34451           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34452 $as_echo "no" >&6; }
34453           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34454 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34455           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34456 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34457 
34458 
34459   # Print a helpful message on how to acquire the necessary build dependency.
34460   # freetype is the help tag: freetype, cups, pulse, alsa etc
34461   MISSING_DEPENDENCY=freetype
34462 
34463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34464     cygwin_help $MISSING_DEPENDENCY
34465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34466     msys_help $MISSING_DEPENDENCY
34467   else
34468     PKGHANDLER_COMMAND=
34469 
34470     case $PKGHANDLER in
34471       apt-get)
34472         apt_help     $MISSING_DEPENDENCY ;;
34473       yum)
34474         yum_help     $MISSING_DEPENDENCY ;;
34475       port)
34476         port_help    $MISSING_DEPENDENCY ;;
34477       pkgutil)
34478         pkgutil_help $MISSING_DEPENDENCY ;;
34479       pkgadd)
34480         pkgadd_help  $MISSING_DEPENDENCY ;;
34481     esac
34482 
34483     if test "x$PKGHANDLER_COMMAND" != x; then
34484       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34485     fi
34486   fi
34487 
34488 
34489           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34490 
34491 
34492 fi
34493 rm -f core conftest.err conftest.$ac_objext \
34494     conftest$ac_exeext conftest.$ac_ext
34495     CXXCFLAGS="$PREV_CXXFLAGS"
34496     LIBS="$PREV_LIBS"
34497     CXX="$PREV_CXX"
34498     ac_ext=cpp
34499 ac_cpp='$CXXCPP $CPPFLAGS'
34500 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34501 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34502 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34503 
34504 
34505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34506 $as_echo_n "checking if we should bundle freetype... " >&6; }
34507     if test "x$BUNDLE_FREETYPE" = xyes; then
34508       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34509     fi
34510     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34511 $as_echo "$BUNDLE_FREETYPE" >&6; }
34512 
34513   fi # end freetype needed
34514 
34515 
34516 
34517 
34518 
34519 
34520 
34521   ###############################################################################
34522   #
34523   # Check for alsa headers and libraries. Used on Linux/GNU systems.
34524   #
34525 
34526 # Check whether --with-alsa was given.
34527 if test "${with_alsa+set}" = set; then :
34528   withval=$with_alsa;
34529 fi
34530 
34531 
34532 # Check whether --with-alsa-include was given.
34533 if test "${with_alsa_include+set}" = set; then :
34534   withval=$with_alsa_include;
34535 fi
34536 
34537 
34538 # Check whether --with-alsa-lib was given.
34539 if test "${with_alsa_lib+set}" = set; then :
34540   withval=$with_alsa_lib;
34541 fi
34542 
34543 
34544   if test "x$ALSA_NOT_NEEDED" = xyes; then
34545     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34546       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34547 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34548     fi
34549     ALSA_CFLAGS=
34550     ALSA_LIBS=
34551   else
34552     ALSA_FOUND=no
34553 
34554     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34555       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34556     fi
34557 
34558     if test "x${with_alsa}" != x; then
34559       ALSA_LIBS="-L${with_alsa}/lib -lasound"
34560       ALSA_CFLAGS="-I${with_alsa}/include"
34561       ALSA_FOUND=yes
34562     fi
34563     if test "x${with_alsa_include}" != x; then
34564       ALSA_CFLAGS="-I${with_alsa_include}"
34565       ALSA_FOUND=yes
34566     fi
34567     if test "x${with_alsa_lib}" != x; then
34568       ALSA_LIBS="-L${with_alsa_lib} -lasound"
34569       ALSA_FOUND=yes
34570     fi
34571     if test "x$ALSA_FOUND" = xno; then
34572 
34573 
34574   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34575     # Source the builddeps file again, to make sure it uses the latest variables!
34576     . $builddepsfile
34577     # Look for a target and build machine specific resource!
34578     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34579     if test "x$resource" = x; then
34580       # Ok, lets instead look for a target specific resource
34581       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34582     fi
34583     if test "x$resource" = x; then
34584       # Ok, lets instead look for a build specific resource
34585       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34586     fi
34587     if test "x$resource" = x; then
34588       # Ok, lets instead look for a generic resource
34589       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34590       resource=${builddep_alsa}
34591     fi
34592     if test "x$resource" != x; then
34593       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34594 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34595       # If the resource in the builddeps.conf file is an existing directory,
34596       # for example /java/linux/cups
34597       if test -d ${resource}; then
34598         depdir=${resource}
34599       else
34600 
34601   # alsa is for example mymodule
34602   # $resource is for example libs/general/libmymod_1_2_3.zip
34603   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34604   # $with_builddeps_dir is for example /localhome/builddeps
34605   # depdir is the name of the variable into which we store the depdir, eg MYMOD
34606   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34607   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34608   filename=`basename $resource`
34609   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34610   filebase=${filename%%.*}
34611   extension=${filename#*.}
34612   installdir=$with_builddeps_dir/$filebase
34613   if test ! -f $installdir/$filename.unpacked; then
34614     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34615 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34616     if test ! -d $installdir; then
34617       mkdir -p $installdir
34618     fi
34619     if test ! -d $installdir; then
34620       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34621     fi
34622     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34623     touch $tmpfile
34624     if test ! -f $tmpfile; then
34625       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34626     fi
34627 
34628   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34629   # $tmpfile is the local file name for the downloaded file.
34630   VALID_TOOL=no
34631   if test "x$BDEPS_FTP" = xwget; then
34632     VALID_TOOL=yes
34633     wget -O $tmpfile $with_builddeps_server/$resource
34634   fi
34635   if test "x$BDEPS_FTP" = xlftp; then
34636     VALID_TOOL=yes
34637     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34638   fi
34639   if test "x$BDEPS_FTP" = xftp; then
34640     VALID_TOOL=yes
34641     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34642     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34643     FTPUSERPWD=${FTPSERVER%%@*}
34644     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34645       FTPUSER=${userpwd%%:*}
34646       FTPPWD=${userpwd#*@}
34647       FTPSERVER=${FTPSERVER#*@}
34648     else
34649       FTPUSER=ftp
34650       FTPPWD=ftp
34651     fi
34652     # the "pass" command does not work on some
34653     # ftp clients (read ftp.exe) but if it works,
34654     # passive mode is better!
34655     ( \
34656         echo "user $FTPUSER $FTPPWD"        ; \
34657         echo "pass"                         ; \
34658         echo "bin"                          ; \
34659         echo "get $FTPPATH $tmpfile"              ; \
34660     ) | ftp -in $FTPSERVER
34661   fi
34662   if test "x$VALID_TOOL" != xyes; then
34663     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34664   fi
34665 
34666     mv $tmpfile $installdir/$filename
34667     if test ! -s $installdir/$filename; then
34668       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34669     fi
34670     case "$extension" in
34671       zip)  echo "Unzipping $installdir/$filename..."
34672         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34673         ;;
34674       tar.gz) echo "Untaring $installdir/$filename..."
34675         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34676         ;;
34677       tgz) echo "Untaring $installdir/$filename..."
34678         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34679         ;;
34680       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34681         ;;
34682     esac
34683   fi
34684   if test -f $installdir/$filename.unpacked; then
34685     depdir=$installdir
34686   fi
34687 
34688       fi
34689       # Source the builddeps file again, because in the previous command, the depdir
34690       # was updated to point at the current build dependency install directory.
34691       . $builddepsfile
34692       # Now extract variables from the builddeps.conf files.
34693       theroot=${builddep_alsa_ROOT}
34694       thecflags=${builddep_alsa_CFLAGS}
34695       thelibs=${builddep_alsa_LIBS}
34696       if test "x$depdir" = x; then
34697         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34698       fi
34699       ALSA=$depdir
34700       if test "x$theroot" != x; then
34701         ALSA="$theroot"
34702       fi
34703       if test "x$thecflags" != x; then
34704         ALSA_CFLAGS="$thecflags"
34705       fi
34706       if test "x$thelibs" != x; then
34707         ALSA_LIBS="$thelibs"
34708       fi
34709       ALSA_FOUND=yes
34710       else ALSA_FOUND=no
34711 
34712     fi
34713     else ALSA_FOUND=no
34714 
34715   fi
34716 
34717     fi
34718     if test "x$ALSA_FOUND" = xno; then
34719 
34720 pkg_failed=no
34721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34722 $as_echo_n "checking for ALSA... " >&6; }
34723 
34724 if test -n "$ALSA_CFLAGS"; then
34725     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34726  elif test -n "$PKG_CONFIG"; then
34727     if test -n "$PKG_CONFIG" && \
34728     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34729   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34730   ac_status=$?
34731   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34732   test $ac_status = 0; }; then
34733   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34734 else
34735   pkg_failed=yes
34736 fi
34737  else
34738     pkg_failed=untried
34739 fi
34740 if test -n "$ALSA_LIBS"; then
34741     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34742  elif test -n "$PKG_CONFIG"; then
34743     if test -n "$PKG_CONFIG" && \
34744     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34745   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34746   ac_status=$?
34747   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34748   test $ac_status = 0; }; then
34749   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34750 else
34751   pkg_failed=yes
34752 fi
34753  else
34754     pkg_failed=untried
34755 fi
34756 
34757 
34758 
34759 if test $pkg_failed = yes; then
34760 
34761 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34762         _pkg_short_errors_supported=yes
34763 else
34764         _pkg_short_errors_supported=no
34765 fi
34766         if test $_pkg_short_errors_supported = yes; then
34767                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34768         else
34769                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34770         fi
34771         # Put the nasty error message in config.log where it belongs
34772         echo "$ALSA_PKG_ERRORS" >&5
34773 
34774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34775 $as_echo "no" >&6; }
34776                 ALSA_FOUND=no
34777 elif test $pkg_failed = untried; then
34778         ALSA_FOUND=no
34779 else
34780         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34781         ALSA_LIBS=$pkg_cv_ALSA_LIBS
34782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34783 $as_echo "yes" >&6; }
34784         ALSA_FOUND=yes
34785 fi
34786     fi
34787     if test "x$ALSA_FOUND" = xno; then
34788       for ac_header in alsa/asoundlib.h
34789 do :
34790   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34791 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34792   cat >>confdefs.h <<_ACEOF
34793 #define HAVE_ALSA_ASOUNDLIB_H 1
34794 _ACEOF
34795 
34796             ALSA_FOUND=yes
34797             ALSA_CFLAGS=-Iignoreme
34798             ALSA_LIBS=-lasound
34799             DEFAULT_ALSA=yes
34800 
34801 else
34802   ALSA_FOUND=no
34803 fi
34804 
34805 done
34806 
34807     fi
34808     if test "x$ALSA_FOUND" = xno; then
34809 
34810   # Print a helpful message on how to acquire the necessary build dependency.
34811   # alsa is the help tag: freetype, cups, pulse, alsa etc
34812   MISSING_DEPENDENCY=alsa
34813 
34814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34815     cygwin_help $MISSING_DEPENDENCY
34816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34817     msys_help $MISSING_DEPENDENCY
34818   else
34819     PKGHANDLER_COMMAND=
34820 
34821     case $PKGHANDLER in
34822       apt-get)
34823         apt_help     $MISSING_DEPENDENCY ;;
34824       yum)
34825         yum_help     $MISSING_DEPENDENCY ;;
34826       port)
34827         port_help    $MISSING_DEPENDENCY ;;
34828       pkgutil)
34829         pkgutil_help $MISSING_DEPENDENCY ;;
34830       pkgadd)
34831         pkgadd_help  $MISSING_DEPENDENCY ;;
34832     esac
34833 
34834     if test "x$PKGHANDLER_COMMAND" != x; then
34835       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34836     fi
34837   fi
34838 
34839       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34840     fi
34841   fi
34842 
34843 
34844 
34845 
34846 
34847 
34848   ###############################################################################
34849   #
34850   # Check for the jpeg library
34851   #
34852 
34853   USE_EXTERNAL_LIBJPEG=true
34854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34855 $as_echo_n "checking for main in -ljpeg... " >&6; }
34856 if ${ac_cv_lib_jpeg_main+:} false; then :
34857   $as_echo_n "(cached) " >&6
34858 else
34859   ac_check_lib_save_LIBS=$LIBS
34860 LIBS="-ljpeg  $LIBS"
34861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34862 /* end confdefs.h.  */
34863 
34864 
34865 int
34866 main ()
34867 {
34868 return main ();
34869   ;
34870   return 0;
34871 }
34872 _ACEOF
34873 if ac_fn_cxx_try_link "$LINENO"; then :
34874   ac_cv_lib_jpeg_main=yes
34875 else
34876   ac_cv_lib_jpeg_main=no
34877 fi
34878 rm -f core conftest.err conftest.$ac_objext \
34879     conftest$ac_exeext conftest.$ac_ext
34880 LIBS=$ac_check_lib_save_LIBS
34881 fi
34882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34883 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
34884 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34885   cat >>confdefs.h <<_ACEOF
34886 #define HAVE_LIBJPEG 1
34887 _ACEOF
34888 
34889   LIBS="-ljpeg $LIBS"
34890 
34891 else
34892    USE_EXTERNAL_LIBJPEG=false
34893       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34894 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34895 
34896 fi
34897 
34898 
34899 
34900   ###############################################################################
34901   #
34902   # Check for the gif library
34903   #
34904 
34905 
34906 # Check whether --with-giflib was given.
34907 if test "${with_giflib+set}" = set; then :
34908   withval=$with_giflib;
34909 fi
34910 
34911 
34912 
34913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34914 $as_echo_n "checking for which giflib to use... " >&6; }
34915 
34916   # default is bundled
34917   DEFAULT_GIFLIB=bundled
34918 
34919   #
34920   # if user didn't specify, use DEFAULT_GIFLIB
34921   #
34922   if test "x${with_giflib}" = "x"; then
34923     with_giflib=${DEFAULT_GIFLIB}
34924   fi
34925 
34926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34927 $as_echo "${with_giflib}" >&6; }
34928 
34929   if test "x${with_giflib}" = "xbundled"; then
34930     USE_EXTERNAL_LIBGIF=false
34931   elif test "x${with_giflib}" = "xsystem"; then
34932     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34933 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34934 
34935 else
34936    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34937 fi
34938 
34939 
34940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34941 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34942 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34943   $as_echo_n "(cached) " >&6
34944 else
34945   ac_check_lib_save_LIBS=$LIBS
34946 LIBS="-lgif  $LIBS"
34947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34948 /* end confdefs.h.  */
34949 
34950 /* Override any GCC internal prototype to avoid an error.
34951    Use char because int might match the return type of a GCC
34952    builtin and then its argument prototype would still apply.  */
34953 #ifdef __cplusplus
34954 extern "C"
34955 #endif
34956 char DGifGetCode ();
34957 int
34958 main ()
34959 {
34960 return DGifGetCode ();
34961   ;
34962   return 0;
34963 }
34964 _ACEOF
34965 if ac_fn_cxx_try_link "$LINENO"; then :
34966   ac_cv_lib_gif_DGifGetCode=yes
34967 else
34968   ac_cv_lib_gif_DGifGetCode=no
34969 fi
34970 rm -f core conftest.err conftest.$ac_objext \
34971     conftest$ac_exeext conftest.$ac_ext
34972 LIBS=$ac_check_lib_save_LIBS
34973 fi
34974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34975 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34976 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34977   cat >>confdefs.h <<_ACEOF
34978 #define HAVE_LIBGIF 1
34979 _ACEOF
34980 
34981   LIBS="-lgif $LIBS"
34982 
34983 else
34984    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34985 fi
34986 
34987 
34988     USE_EXTERNAL_LIBGIF=true
34989   else
34990     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34991   fi
34992 
34993 
34994   ###############################################################################
34995   #
34996   # Check for the zlib library
34997   #
34998 
34999 
35000 # Check whether --with-zlib was given.
35001 if test "${with_zlib+set}" = set; then :
35002   withval=$with_zlib;
35003 fi
35004 
35005 
35006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
35007 $as_echo_n "checking for compress in -lz... " >&6; }
35008 if ${ac_cv_lib_z_compress+:} false; then :
35009   $as_echo_n "(cached) " >&6
35010 else
35011   ac_check_lib_save_LIBS=$LIBS
35012 LIBS="-lz  $LIBS"
35013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35014 /* end confdefs.h.  */
35015 
35016 /* Override any GCC internal prototype to avoid an error.
35017    Use char because int might match the return type of a GCC
35018    builtin and then its argument prototype would still apply.  */
35019 #ifdef __cplusplus
35020 extern "C"
35021 #endif
35022 char compress ();
35023 int
35024 main ()
35025 {
35026 return compress ();
35027   ;
35028   return 0;
35029 }
35030 _ACEOF
35031 if ac_fn_cxx_try_link "$LINENO"; then :
35032   ac_cv_lib_z_compress=yes
35033 else
35034   ac_cv_lib_z_compress=no
35035 fi
35036 rm -f core conftest.err conftest.$ac_objext \
35037     conftest$ac_exeext conftest.$ac_ext
35038 LIBS=$ac_check_lib_save_LIBS
35039 fi
35040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35041 $as_echo "$ac_cv_lib_z_compress" >&6; }
35042 if test "x$ac_cv_lib_z_compress" = xyes; then :
35043    ZLIB_FOUND=yes
35044 else
35045    ZLIB_FOUND=no
35046 fi
35047 
35048 
35049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35050 $as_echo_n "checking for which zlib to use... " >&6; }
35051 
35052   DEFAULT_ZLIB=bundled
35053   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35054     #
35055     # On macosx default is system...on others default is
35056     #
35057     DEFAULT_ZLIB=system
35058   fi
35059 
35060   if test "x${ZLIB_FOUND}" != "xyes"; then
35061     #
35062     # If we don't find any system...set default to bundled
35063     #
35064     DEFAULT_ZLIB=bundled
35065   fi
35066 
35067   #
35068   # If user didn't specify, use DEFAULT_ZLIB
35069   #
35070   if test "x${with_zlib}" = "x"; then
35071     with_zlib=${DEFAULT_ZLIB}
35072   fi
35073 
35074   if test "x${with_zlib}" = "xbundled"; then
35075     USE_EXTERNAL_LIBZ=false
35076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35077 $as_echo "bundled" >&6; }
35078   elif test "x${with_zlib}" = "xsystem"; then
35079     if test "x${ZLIB_FOUND}" = "xyes"; then
35080       USE_EXTERNAL_LIBZ=true
35081       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35082 $as_echo "system" >&6; }
35083     else
35084       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35085 $as_echo "system not found" >&6; }
35086       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35087     fi
35088   else
35089     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35090   fi
35091 
35092 
35093 
35094   ###############################################################################
35095   LIBZIP_CAN_USE_MMAP=true
35096 
35097 
35098 
35099   ###############################################################################
35100   #
35101   # Check if altzone exists in time.h
35102   #
35103 
35104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35105 /* end confdefs.h.  */
35106 #include <time.h>
35107 int
35108 main ()
35109 {
35110 return (int)altzone;
35111   ;
35112   return 0;
35113 }
35114 _ACEOF
35115 if ac_fn_cxx_try_link "$LINENO"; then :
35116   has_altzone=yes
35117 else
35118   has_altzone=no
35119 fi
35120 rm -f core conftest.err conftest.$ac_objext \
35121     conftest$ac_exeext conftest.$ac_ext
35122   if test "x$has_altzone" = xyes; then
35123 
35124 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35125 
35126   fi
35127 
35128   ###############################################################################
35129   #
35130   # Check the maths library
35131   #
35132 
35133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35134 $as_echo_n "checking for cos in -lm... " >&6; }
35135 if ${ac_cv_lib_m_cos+:} false; then :
35136   $as_echo_n "(cached) " >&6
35137 else
35138   ac_check_lib_save_LIBS=$LIBS
35139 LIBS="-lm  $LIBS"
35140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35141 /* end confdefs.h.  */
35142 
35143 /* Override any GCC internal prototype to avoid an error.
35144    Use char because int might match the return type of a GCC
35145    builtin and then its argument prototype would still apply.  */
35146 #ifdef __cplusplus
35147 extern "C"
35148 #endif
35149 char cos ();
35150 int
35151 main ()
35152 {
35153 return cos ();
35154   ;
35155   return 0;
35156 }
35157 _ACEOF
35158 if ac_fn_cxx_try_link "$LINENO"; then :
35159   ac_cv_lib_m_cos=yes
35160 else
35161   ac_cv_lib_m_cos=no
35162 fi
35163 rm -f core conftest.err conftest.$ac_objext \
35164     conftest$ac_exeext conftest.$ac_ext
35165 LIBS=$ac_check_lib_save_LIBS
35166 fi
35167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35168 $as_echo "$ac_cv_lib_m_cos" >&6; }
35169 if test "x$ac_cv_lib_m_cos" = xyes; then :
35170   cat >>confdefs.h <<_ACEOF
35171 #define HAVE_LIBM 1
35172 _ACEOF
35173 
35174   LIBS="-lm $LIBS"
35175 
35176 else
35177 
35178         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35179 $as_echo "$as_me: Maths library was not found" >&6;}
35180 
35181 
35182 fi
35183 
35184 
35185 
35186   ###############################################################################
35187   #
35188   # Check for libdl.so
35189 
35190   save_LIBS="$LIBS"
35191   LIBS=""
35192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35193 $as_echo_n "checking for dlopen in -ldl... " >&6; }
35194 if ${ac_cv_lib_dl_dlopen+:} false; then :
35195   $as_echo_n "(cached) " >&6
35196 else
35197   ac_check_lib_save_LIBS=$LIBS
35198 LIBS="-ldl  $LIBS"
35199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35200 /* end confdefs.h.  */
35201 
35202 /* Override any GCC internal prototype to avoid an error.
35203    Use char because int might match the return type of a GCC
35204    builtin and then its argument prototype would still apply.  */
35205 #ifdef __cplusplus
35206 extern "C"
35207 #endif
35208 char dlopen ();
35209 int
35210 main ()
35211 {
35212 return dlopen ();
35213   ;
35214   return 0;
35215 }
35216 _ACEOF
35217 if ac_fn_cxx_try_link "$LINENO"; then :
35218   ac_cv_lib_dl_dlopen=yes
35219 else
35220   ac_cv_lib_dl_dlopen=no
35221 fi
35222 rm -f core conftest.err conftest.$ac_objext \
35223     conftest$ac_exeext conftest.$ac_ext
35224 LIBS=$ac_check_lib_save_LIBS
35225 fi
35226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35227 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35228 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35229   cat >>confdefs.h <<_ACEOF
35230 #define HAVE_LIBDL 1
35231 _ACEOF
35232 
35233   LIBS="-ldl $LIBS"
35234 
35235 fi
35236 
35237   LIBDL="$LIBS"
35238 
35239   LIBS="$save_LIBS"
35240 
35241 
35242   ###############################################################################
35243   #
35244   # statically link libstdc++ before C++ ABI is stablized on Linux unless
35245   # dynamic build is configured on command line.
35246   #
35247 
35248 # Check whether --with-stdc++lib was given.
35249 if test "${with_stdc__lib+set}" = set; then :
35250   withval=$with_stdc__lib;
35251         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35252                 && test "x$with_stdc__lib" != xdefault; then
35253           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35254         fi
35255 
35256 else
35257   with_stdc__lib=default
35258 
35259 fi
35260 
35261 
35262   if test "x$OPENJDK_TARGET_OS" = xlinux; then
35263     # Test if -lstdc++ works.
35264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35265 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35266     ac_ext=cpp
35267 ac_cpp='$CXXCPP $CPPFLAGS'
35268 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35269 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35270 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35271 
35272     OLD_CXXFLAGS="$CXXFLAGS"
35273     CXXFLAGS="$CXXFLAGS -lstdc++"
35274     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35275 /* end confdefs.h.  */
35276 
35277 int
35278 main ()
35279 {
35280 return 0;
35281   ;
35282   return 0;
35283 }
35284 _ACEOF
35285 if ac_fn_cxx_try_link "$LINENO"; then :
35286   has_dynamic_libstdcxx=yes
35287 else
35288   has_dynamic_libstdcxx=no
35289 fi
35290 rm -f core conftest.err conftest.$ac_objext \
35291     conftest$ac_exeext conftest.$ac_ext
35292     CXXFLAGS="$OLD_CXXFLAGS"
35293     ac_ext=cpp
35294 ac_cpp='$CXXCPP $CPPFLAGS'
35295 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35296 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35297 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35298 
35299     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35300 $as_echo "$has_dynamic_libstdcxx" >&6; }
35301 
35302     # Test if stdc++ can be linked statically.
35303     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35304 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35305     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35306     ac_ext=cpp
35307 ac_cpp='$CXXCPP $CPPFLAGS'
35308 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35309 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35310 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35311 
35312     OLD_LIBS="$LIBS"
35313     OLD_CXX="$CXX"
35314     LIBS="$STATIC_STDCXX_FLAGS"
35315     CXX="$CC"
35316     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35317 /* end confdefs.h.  */
35318 
35319 int
35320 main ()
35321 {
35322 return 0;
35323   ;
35324   return 0;
35325 }
35326 _ACEOF
35327 if ac_fn_cxx_try_link "$LINENO"; then :
35328   has_static_libstdcxx=yes
35329 else
35330   has_static_libstdcxx=no
35331 fi
35332 rm -f core conftest.err conftest.$ac_objext \
35333     conftest$ac_exeext conftest.$ac_ext
35334     LIBS="$OLD_LIBS"
35335     CXX="$OLD_CXX"
35336     ac_ext=cpp
35337 ac_cpp='$CXXCPP $CPPFLAGS'
35338 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35339 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35340 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35341 
35342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35343 $as_echo "$has_static_libstdcxx" >&6; }
35344 
35345     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35346       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35347     fi
35348 
35349     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35350       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35351     fi
35352 
35353     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35354       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35355     fi
35356 
35357     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35358 $as_echo_n "checking how to link with libstdc++... " >&6; }
35359     # If dynamic was requested, it's available since it would fail above otherwise.
35360     # If dynamic wasn't requested, go with static unless it isn't available.
35361     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35362       LIBCXX="$LIBCXX -lstdc++"
35363       LDCXX="$CXX"
35364       STATIC_CXX_SETTING="STATIC_CXX=false"
35365       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35366 $as_echo "dynamic" >&6; }
35367     else
35368       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35369       LDCXX="$CC"
35370       STATIC_CXX_SETTING="STATIC_CXX=true"
35371       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35372 $as_echo "static" >&6; }
35373     fi
35374   fi
35375 
35376 
35377   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35378     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35379 
35380 pkg_failed=no
35381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35382 $as_echo_n "checking for LIBFFI... " >&6; }
35383 
35384 if test -n "$LIBFFI_CFLAGS"; then
35385     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35386  elif test -n "$PKG_CONFIG"; then
35387     if test -n "$PKG_CONFIG" && \
35388     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35389   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35390   ac_status=$?
35391   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35392   test $ac_status = 0; }; then
35393   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35394 else
35395   pkg_failed=yes
35396 fi
35397  else
35398     pkg_failed=untried
35399 fi
35400 if test -n "$LIBFFI_LIBS"; then
35401     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35402  elif test -n "$PKG_CONFIG"; then
35403     if test -n "$PKG_CONFIG" && \
35404     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35405   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35406   ac_status=$?
35407   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35408   test $ac_status = 0; }; then
35409   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35410 else
35411   pkg_failed=yes
35412 fi
35413  else
35414     pkg_failed=untried
35415 fi
35416 
35417 
35418 
35419 if test $pkg_failed = yes; then
35420 
35421 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35422         _pkg_short_errors_supported=yes
35423 else
35424         _pkg_short_errors_supported=no
35425 fi
35426         if test $_pkg_short_errors_supported = yes; then
35427                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35428         else
35429                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35430         fi
35431         # Put the nasty error message in config.log where it belongs
35432         echo "$LIBFFI_PKG_ERRORS" >&5
35433 
35434         as_fn_error $? "Package requirements (libffi) were not met:
35435 
35436 $LIBFFI_PKG_ERRORS
35437 
35438 Consider adjusting the PKG_CONFIG_PATH environment variable if you
35439 installed software in a non-standard prefix.
35440 
35441 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35442 and LIBFFI_LIBS to avoid the need to call pkg-config.
35443 See the pkg-config man page for more details.
35444 " "$LINENO" 5
35445 elif test $pkg_failed = untried; then
35446         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35447 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35448 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35449 is in your PATH or set the PKG_CONFIG environment variable to the full
35450 path to pkg-config.
35451 
35452 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35453 and LIBFFI_LIBS to avoid the need to call pkg-config.
35454 See the pkg-config man page for more details.
35455 
35456 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35457 See \`config.log' for more details" "$LINENO" 5; }
35458 else
35459         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35460         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35462 $as_echo "yes" >&6; }
35463         :
35464 fi
35465 
35466   fi
35467 
35468   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35469     # Extract the first word of "llvm-config", so it can be a program name with args.
35470 set dummy llvm-config; ac_word=$2
35471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35472 $as_echo_n "checking for $ac_word... " >&6; }
35473 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35474   $as_echo_n "(cached) " >&6
35475 else
35476   if test -n "$LLVM_CONFIG"; then
35477   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35478 else
35479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35480 for as_dir in $PATH
35481 do
35482   IFS=$as_save_IFS
35483   test -z "$as_dir" && as_dir=.
35484     for ac_exec_ext in '' $ac_executable_extensions; do
35485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35486     ac_cv_prog_LLVM_CONFIG="llvm-config"
35487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35488     break 2
35489   fi
35490 done
35491   done
35492 IFS=$as_save_IFS
35493 
35494 fi
35495 fi
35496 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35497 if test -n "$LLVM_CONFIG"; then
35498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35499 $as_echo "$LLVM_CONFIG" >&6; }
35500 else
35501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35502 $as_echo "no" >&6; }
35503 fi
35504 
35505 
35506 
35507     if test "x$LLVM_CONFIG" != xllvm-config; then
35508       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35509     fi
35510 
35511     llvm_components="jit mcjit engine nativecodegen native"
35512     unset LLVM_CFLAGS
35513     for flag in $("$LLVM_CONFIG" --cxxflags); do
35514       if echo "${flag}" | grep -q '^-[ID]'; then
35515         if test "${flag}" != "-D_DEBUG" ; then
35516           if test "${LLVM_CFLAGS}" != "" ; then
35517             LLVM_CFLAGS="${LLVM_CFLAGS} "
35518           fi
35519           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35520         fi
35521       fi
35522     done
35523     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35524     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35525 
35526     unset LLVM_LDFLAGS
35527     for flag in $("${LLVM_CONFIG}" --ldflags); do
35528       if echo "${flag}" | grep -q '^-L'; then
35529         if test "${LLVM_LDFLAGS}" != ""; then
35530           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35531         fi
35532         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35533       fi
35534     done
35535 
35536     unset LLVM_LIBS
35537     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35538       if echo "${flag}" | grep -q '^-l'; then
35539         if test "${LLVM_LIBS}" != ""; then
35540           LLVM_LIBS="${LLVM_LIBS} "
35541         fi
35542         LLVM_LIBS="${LLVM_LIBS}${flag}"
35543       fi
35544     done
35545 
35546 
35547 
35548 
35549   fi
35550 
35551   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35552   if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35553     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35554   fi
35555 
35556   # TODO better (platform agnostic) test
35557   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35558     LIBCXX="-lstdc++"
35559   fi
35560 
35561 
35562 
35563 
35564 
35565 ###############################################################################
35566 #
35567 # We need to do some final tweaking, when everything else is done.
35568 #
35569 ###############################################################################
35570 
35571 
35572   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35573 
35574 
35575   # The name of the Service Agent jar.
35576   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35577   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35578     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35579   fi
35580 
35581 
35582 
35583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35584 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35585 
35586     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35587       ENABLE_INTREE_EC=yes
35588       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35589 $as_echo "yes" >&6; }
35590     else
35591       ENABLE_INTREE_EC=no
35592       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35593 $as_echo "no" >&6; }
35594     fi
35595 
35596 
35597 
35598 
35599 ###############################################################################
35600 #
35601 # Configure parts of the build that only affect the build performance,
35602 # not the result.
35603 #
35604 ###############################################################################
35605 
35606 
35607   # How many cores do we have on this build system?
35608 
35609 # Check whether --with-num-cores was given.
35610 if test "${with_num_cores+set}" = set; then :
35611   withval=$with_num_cores;
35612 fi
35613 
35614   if test "x$with_num_cores" = x; then
35615     # The number of cores were not specified, try to probe them.
35616 
35617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35618 $as_echo_n "checking for number of cores... " >&6; }
35619   NUM_CORES=1
35620   FOUND_CORES=no
35621 
35622   if test -f /proc/cpuinfo; then
35623     # Looks like a Linux (or cygwin) system
35624     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35625     FOUND_CORES=yes
35626   elif test -x /usr/sbin/psrinfo; then
35627     # Looks like a Solaris system
35628     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35629     FOUND_CORES=yes
35630   elif test -x /usr/sbin/system_profiler; then
35631     # Looks like a MacOSX system
35632     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35633     FOUND_CORES=yes
35634   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
35635     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
35636     FOUND_CORES=yes
35637   elif test -n "$NUMBER_OF_PROCESSORS"; then
35638     # On windows, look in the env
35639     NUM_CORES=$NUMBER_OF_PROCESSORS
35640     FOUND_CORES=yes
35641   fi
35642 
35643   if test "x$FOUND_CORES" = xyes; then
35644     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35645 $as_echo "$NUM_CORES" >&6; }
35646   else
35647     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35648 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
35649     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35650 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35651   fi
35652 
35653   else
35654     NUM_CORES=$with_num_cores
35655   fi
35656 
35657 
35658 
35659   # How much memory do we have on this build system?
35660 
35661 # Check whether --with-memory-size was given.
35662 if test "${with_memory_size+set}" = set; then :
35663   withval=$with_memory_size;
35664 fi
35665 
35666   if test "x$with_memory_size" = x; then
35667     # The memory size was not specified, try to probe it.
35668 
35669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35670 $as_echo_n "checking for memory size... " >&6; }
35671   # Default to 1024 MB
35672   MEMORY_SIZE=1024
35673   FOUND_MEM=no
35674 
35675   if test -f /proc/meminfo; then
35676     # Looks like a Linux (or cygwin) system
35677     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35678     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35679     FOUND_MEM=yes
35680   elif test -x /usr/sbin/prtconf; then
35681     # Looks like a Solaris or AIX system
35682     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
35683     FOUND_MEM=yes
35684   elif test -x /usr/sbin/system_profiler; then
35685     # Looks like a MacOSX system
35686     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35687     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35688     FOUND_MEM=yes
35689   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35690     # Windows, but without cygwin
35691     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35692     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35693     FOUND_MEM=yes
35694   fi
35695 
35696   if test "x$FOUND_MEM" = xyes; then
35697     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35698 $as_echo "$MEMORY_SIZE MB" >&6; }
35699   else
35700     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35701 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35702     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35703 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35704   fi
35705 
35706   else
35707     MEMORY_SIZE=$with_memory_size
35708   fi
35709 
35710 
35711 
35712   # Provide a decent default number of parallel jobs for make depending on
35713   # number of cores, amount of memory and machine architecture.
35714 
35715 # Check whether --with-jobs was given.
35716 if test "${with_jobs+set}" = set; then :
35717   withval=$with_jobs;
35718 fi
35719 
35720   if test "x$with_jobs" = x; then
35721     # Number of jobs was not specified, calculate.
35722     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35723 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35724     # Approximate memory in GB, rounding up a bit.
35725     memory_gb=`expr $MEMORY_SIZE / 1100`
35726     # Pick the lowest of memory in gb and number of cores.
35727     if test "$memory_gb" -lt "$NUM_CORES"; then
35728       JOBS="$memory_gb"
35729     else
35730       JOBS="$NUM_CORES"
35731       # On bigger machines, leave some room for other processes to run
35732       if test "$JOBS" -gt "4"; then
35733         JOBS=`expr $JOBS '*' 90 / 100`
35734       fi
35735     fi
35736     # Cap number of jobs to 16
35737     if test "$JOBS" -gt "16"; then
35738       JOBS=16
35739     fi
35740     if test "$JOBS" -eq "0"; then
35741       JOBS=1
35742     fi
35743     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35744 $as_echo "$JOBS" >&6; }
35745   else
35746     JOBS=$with_jobs
35747   fi
35748 
35749 
35750 
35751 # Setup smart javac (after cores and memory have been setup)
35752 
35753 
35754 # Check whether --with-sjavac-server-java was given.
35755 if test "${with_sjavac_server_java+set}" = set; then :
35756   withval=$with_sjavac_server_java;
35757 fi
35758 
35759 
35760   if test "x$with_sjavac_server_java" != x; then
35761     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35762     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35763     if test "x$FOUND_VERSION" = x; then
35764       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35765     fi
35766   else
35767     SJAVAC_SERVER_JAVA=""
35768     # Hotspot specific options.
35769 
35770   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35771   $ECHO "Command: $JAVA -verbosegc -version" >&5
35772   OUTPUT=`$JAVA -verbosegc -version 2>&1`
35773   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35774   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35775   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35776     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35777     JVM_ARG_OK=true
35778   else
35779     $ECHO "Arg failed:" >&5
35780     $ECHO "$OUTPUT" >&5
35781     JVM_ARG_OK=false
35782   fi
35783 
35784     # JRockit specific options.
35785 
35786   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35787   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35788   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35789   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35790   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35791   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35792     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35793     JVM_ARG_OK=true
35794   else
35795     $ECHO "Arg failed:" >&5
35796     $ECHO "$OUTPUT" >&5
35797     JVM_ARG_OK=false
35798   fi
35799 
35800     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35801   fi
35802 
35803 
35804   if test "$MEMORY_SIZE" -gt "2500"; then
35805 
35806   $ECHO "Check if jvm arg is ok: -d64" >&5
35807   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35808   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35809   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35810   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35811   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35812     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35813     JVM_ARG_OK=true
35814   else
35815     $ECHO "Arg failed:" >&5
35816     $ECHO "$OUTPUT" >&5
35817     JVM_ARG_OK=false
35818   fi
35819 
35820     if test "$JVM_ARG_OK" = true; then
35821       JVM_64BIT=true
35822       JVM_ARG_OK=false
35823     fi
35824   fi
35825 
35826   if test "$JVM_64BIT" = true; then
35827     if test "$MEMORY_SIZE" -gt "17000"; then
35828 
35829   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35830   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35831   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35832   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35833   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35834   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35835     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35836     JVM_ARG_OK=true
35837   else
35838     $ECHO "Arg failed:" >&5
35839     $ECHO "$OUTPUT" >&5
35840     JVM_ARG_OK=false
35841   fi
35842 
35843     fi
35844     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35845 
35846   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35847   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35848   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35849   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35850   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35851   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35852     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35853     JVM_ARG_OK=true
35854   else
35855     $ECHO "Arg failed:" >&5
35856     $ECHO "$OUTPUT" >&5
35857     JVM_ARG_OK=false
35858   fi
35859 
35860     fi
35861     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35862 
35863   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35864   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35865   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35866   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35867   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35868   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35869     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35870     JVM_ARG_OK=true
35871   else
35872     $ECHO "Arg failed:" >&5
35873     $ECHO "$OUTPUT" >&5
35874     JVM_ARG_OK=false
35875   fi
35876 
35877     fi
35878     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35879 
35880   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35881   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35882   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35883   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35884   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35885   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35886     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35887     JVM_ARG_OK=true
35888   else
35889     $ECHO "Arg failed:" >&5
35890     $ECHO "$OUTPUT" >&5
35891     JVM_ARG_OK=false
35892   fi
35893 
35894     fi
35895   fi
35896   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35897 
35898   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35899   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35900   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35901   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35902   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35903   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35904     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35905     JVM_ARG_OK=true
35906   else
35907     $ECHO "Arg failed:" >&5
35908     $ECHO "$OUTPUT" >&5
35909     JVM_ARG_OK=false
35910   fi
35911 
35912   fi
35913   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35914 
35915   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35916   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35917   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35918   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35919   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35920   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35921     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35922     JVM_ARG_OK=true
35923   else
35924     $ECHO "Arg failed:" >&5
35925     $ECHO "$OUTPUT" >&5
35926     JVM_ARG_OK=false
35927   fi
35928 
35929   fi
35930   if test "$JVM_ARG_OK" = false; then
35931 
35932   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35933   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35934   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35935   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35936   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35937   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35938     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35939     JVM_ARG_OK=true
35940   else
35941     $ECHO "Arg failed:" >&5
35942     $ECHO "$OUTPUT" >&5
35943     JVM_ARG_OK=false
35944   fi
35945 
35946   fi
35947 
35948   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35949 $as_echo_n "checking whether to use sjavac... " >&6; }
35950   # Check whether --enable-sjavac was given.
35951 if test "${enable_sjavac+set}" = set; then :
35952   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35953 else
35954   ENABLE_SJAVAC='no'
35955 fi
35956 
35957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35958 $as_echo "$ENABLE_SJAVAC" >&6; }
35959 
35960 
35961   if test "x$ENABLE_SJAVAC" = xyes; then
35962     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35963   else
35964     SJAVAC_SERVER_DIR=
35965   fi
35966 
35967 
35968 
35969 # Can the C/C++ compiler use precompiled headers?
35970 
35971 
35972   ###############################################################################
35973   #
35974   # Can the C/C++ compiler use precompiled headers?
35975   #
35976   # Check whether --enable-precompiled-headers was given.
35977 if test "${enable_precompiled_headers+set}" = set; then :
35978   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35979 else
35980   ENABLE_PRECOMPH=yes
35981 fi
35982 
35983 
35984   USE_PRECOMPILED_HEADER=1
35985   if test "x$ENABLE_PRECOMPH" = xno; then
35986     USE_PRECOMPILED_HEADER=0
35987   fi
35988 
35989   if test "x$ENABLE_PRECOMPH" = xyes; then
35990     # Check that the compiler actually supports precomp headers.
35991     if test "x$GCC" = xyes; then
35992       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35993 $as_echo_n "checking that precompiled headers work... " >&6; }
35994       echo "int alfa();" > conftest.h
35995       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35996       if test ! -f conftest.hpp.gch; then
35997         USE_PRECOMPILED_HEADER=0
35998         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35999 $as_echo "no" >&6; }
36000       else
36001         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36002 $as_echo "yes" >&6; }
36003       fi
36004       rm -f conftest.h conftest.hpp.gch
36005     fi
36006   fi
36007 
36008 
36009 
36010 
36011 # Setup use of ccache, if available
36012 
36013   # Check whether --enable-ccache was given.
36014 if test "${enable_ccache+set}" = set; then :
36015   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
36016 else
36017   ENABLE_CCACHE=yes
36018 fi
36019 
36020   if test "x$ENABLE_CCACHE" = xyes; then
36021     OLD_PATH="$PATH"
36022     if test "x$TOOLS_DIR" != x; then
36023       PATH=$TOOLS_DIR:$PATH
36024     fi
36025     # Extract the first word of "ccache", so it can be a program name with args.
36026 set dummy ccache; ac_word=$2
36027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36028 $as_echo_n "checking for $ac_word... " >&6; }
36029 if ${ac_cv_path_CCACHE+:} false; then :
36030   $as_echo_n "(cached) " >&6
36031 else
36032   case $CCACHE in
36033   [\\/]* | ?:[\\/]*)
36034   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
36035   ;;
36036   *)
36037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36038 for as_dir in $PATH
36039 do
36040   IFS=$as_save_IFS
36041   test -z "$as_dir" && as_dir=.
36042     for ac_exec_ext in '' $ac_executable_extensions; do
36043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36044     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36046     break 2
36047   fi
36048 done
36049   done
36050 IFS=$as_save_IFS
36051 
36052   ;;
36053 esac
36054 fi
36055 CCACHE=$ac_cv_path_CCACHE
36056 if test -n "$CCACHE"; then
36057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36058 $as_echo "$CCACHE" >&6; }
36059 else
36060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36061 $as_echo "no" >&6; }
36062 fi
36063 
36064 
36065     PATH="$OLD_PATH"
36066   else
36067     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
36068 $as_echo_n "checking for ccache... " >&6; }
36069     { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
36070 $as_echo "explicitly disabled" >&6; }
36071     CCACHE=
36072   fi
36073 
36074 
36075 
36076 # Check whether --with-ccache-dir was given.
36077 if test "${with_ccache_dir+set}" = set; then :
36078   withval=$with_ccache_dir;
36079 fi
36080 
36081 
36082   if test "x$with_ccache_dir" != x; then
36083     # When using a non home ccache directory, assume the use is to share ccache files
36084     # with other users. Thus change the umask.
36085     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36086   fi
36087   CCACHE_FOUND=""
36088   if test "x$CCACHE" != x; then
36089 
36090   if test "x$CCACHE" != x; then
36091     CCACHE_FOUND="true"
36092     # Only use ccache if it is 3.1.4 or later, which supports
36093     # precompiled headers.
36094     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36095 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36096     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36097     if test "x$HAS_GOOD_CCACHE" = x; then
36098       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36099 $as_echo "no, disabling ccache" >&6; }
36100       CCACHE=
36101     else
36102       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36103 $as_echo "yes" >&6; }
36104       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36105 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36106       PUSHED_FLAGS="$CXXFLAGS"
36107       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36108       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36109 /* end confdefs.h.  */
36110 
36111 int
36112 main ()
36113 {
36114 
36115   ;
36116   return 0;
36117 }
36118 _ACEOF
36119 if ac_fn_cxx_try_compile "$LINENO"; then :
36120   CC_KNOWS_CCACHE_TRICK=yes
36121 else
36122   CC_KNOWS_CCACHE_TRICK=no
36123 fi
36124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36125       CXXFLAGS="$PUSHED_FLAGS"
36126       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36127         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36128 $as_echo "yes" >&6; }
36129       else
36130         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36131 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
36132         CCACHE=
36133       fi
36134     fi
36135   fi
36136 
36137   if test "x$CCACHE" != x; then
36138     CCACHE_SLOPPINESS=time_macros
36139     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36140     CCACHE_FLAGS=-fpch-preprocess
36141 
36142     if test "x$SET_CCACHE_DIR" != x; then
36143       mkdir -p $CCACHE_DIR > /dev/null 2>&1
36144       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36145     fi
36146   fi
36147 
36148   fi
36149 
36150 
36151 ###############################################################################
36152 #
36153 # And now the finish...
36154 #
36155 ###############################################################################
36156 
36157 # Check for some common pitfalls
36158 
36159   if test x"$OPENJDK_BUILD_OS" = xwindows; then
36160     file_to_test="$SRC_ROOT/LICENSE"
36161     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36162       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
36163     fi
36164   fi
36165 
36166 
36167   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36168 $as_echo_n "checking if build directory is on local disk... " >&6; }
36169 
36170   # df -l lists only local disks; if the given directory is not found then
36171   # a non-zero exit code is given
36172   if test "x$DF" = x; then
36173     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36174       # msys does not have df; use Windows "net use" instead.
36175       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36176       if test "x$IS_NETWORK_DISK" = x; then
36177         OUTPUT_DIR_IS_LOCAL="yes"
36178       else
36179         OUTPUT_DIR_IS_LOCAL="no"
36180       fi
36181     else
36182       # No df here, say it's local
36183       OUTPUT_DIR_IS_LOCAL="yes"
36184     fi
36185   else
36186     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36187       OUTPUT_DIR_IS_LOCAL="yes"
36188     else
36189       OUTPUT_DIR_IS_LOCAL="no"
36190     fi
36191   fi
36192 
36193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36194 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36195 
36196 
36197 
36198   # Check if the user has any old-style ALT_ variables set.
36199   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36200 
36201   # Before generating output files, test if they exist. If they do, this is a reconfigure.
36202   # Since we can't properly handle the dependencies for this, warn the user about the situation
36203   if test -e $OUTPUT_ROOT/spec.gmk; then
36204     IS_RECONFIGURE=yes
36205   else
36206     IS_RECONFIGURE=no
36207   fi
36208 
36209   if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36210     HIDE_PERFORMANCE_HINTS=yes
36211   else
36212     HIDE_PERFORMANCE_HINTS=no
36213     # Hide it the next time around...
36214     $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36215   fi
36216 
36217 
36218 # At the end, call the custom hook. (Dummy macro if no custom sources available)
36219 
36220 
36221 # We're messing a bit with internal autoconf variables to put the config.status
36222 # in the output directory instead of the current directory.
36223 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36224 
36225 # Create the actual output files. Now the main work of configure is done.
36226 cat >confcache <<\_ACEOF
36227 # This file is a shell script that caches the results of configure
36228 # tests run on this system so they can be shared between configure
36229 # scripts and configure runs, see configure's option --config-cache.
36230 # It is not useful on other systems.  If it contains results you don't
36231 # want to keep, you may remove or edit it.
36232 #
36233 # config.status only pays attention to the cache file if you give it
36234 # the --recheck option to rerun configure.
36235 #
36236 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36237 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36238 # following values.
36239 
36240 _ACEOF
36241 
36242 # The following way of writing the cache mishandles newlines in values,
36243 # but we know of no workaround that is simple, portable, and efficient.
36244 # So, we kill variables containing newlines.
36245 # Ultrix sh set writes to stderr and can't be redirected directly,
36246 # and sets the high bit in the cache file unless we assign to the vars.
36247 (
36248   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36249     eval ac_val=\$$ac_var
36250     case $ac_val in #(
36251     *${as_nl}*)
36252       case $ac_var in #(
36253       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36254 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36255       esac
36256       case $ac_var in #(
36257       _ | IFS | as_nl) ;; #(
36258       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36259       *) { eval $ac_var=; unset $ac_var;} ;;
36260       esac ;;
36261     esac
36262   done
36263 
36264   (set) 2>&1 |
36265     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36266     *${as_nl}ac_space=\ *)
36267       # `set' does not quote correctly, so add quotes: double-quote
36268       # substitution turns \\\\ into \\, and sed turns \\ into \.
36269       sed -n \
36270         "s/'/'\\\\''/g;
36271           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36272       ;; #(
36273     *)
36274       # `set' quotes correctly as required by POSIX, so do not add quotes.
36275       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36276       ;;
36277     esac |
36278     sort
36279 ) |
36280   sed '
36281      /^ac_cv_env_/b end
36282      t clear
36283      :clear
36284      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36285      t end
36286      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36287      :end' >>confcache
36288 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36289   if test -w "$cache_file"; then
36290     if test "x$cache_file" != "x/dev/null"; then
36291       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36292 $as_echo "$as_me: updating cache $cache_file" >&6;}
36293       if test ! -f "$cache_file" || test -h "$cache_file"; then
36294         cat confcache >"$cache_file"
36295       else
36296         case $cache_file in #(
36297         */* | ?:*)
36298           mv -f confcache "$cache_file"$$ &&
36299           mv -f "$cache_file"$$ "$cache_file" ;; #(
36300         *)
36301           mv -f confcache "$cache_file" ;;
36302         esac
36303       fi
36304     fi
36305   else
36306     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36307 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36308   fi
36309 fi
36310 rm -f confcache
36311 
36312 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36313 # Let make expand exec_prefix.
36314 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36315 
36316 DEFS=-DHAVE_CONFIG_H
36317 
36318 ac_libobjs=
36319 ac_ltlibobjs=
36320 U=
36321 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36322   # 1. Remove the extension, and $U if already installed.
36323   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36324   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36325   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36326   #    will be set to the directory where LIBOBJS objects are built.
36327   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36328   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36329 done
36330 LIBOBJS=$ac_libobjs
36331 
36332 LTLIBOBJS=$ac_ltlibobjs
36333 
36334 
36335 
36336 : "${CONFIG_STATUS=./config.status}"
36337 ac_write_fail=0
36338 ac_clean_files_save=$ac_clean_files
36339 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36340 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36341 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36342 as_write_fail=0
36343 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36344 #! $SHELL
36345 # Generated by $as_me.
36346 # Run this file to recreate the current configuration.
36347 # Compiler output produced by configure, useful for debugging
36348 # configure, is in config.log if it exists.
36349 
36350 debug=false
36351 ac_cs_recheck=false
36352 ac_cs_silent=false
36353 
36354 SHELL=\${CONFIG_SHELL-$SHELL}
36355 export SHELL
36356 _ASEOF
36357 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36358 ## -------------------- ##
36359 ## M4sh Initialization. ##
36360 ## -------------------- ##
36361 
36362 # Be more Bourne compatible
36363 DUALCASE=1; export DUALCASE # for MKS sh
36364 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36365   emulate sh
36366   NULLCMD=:
36367   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36368   # is contrary to our usage.  Disable this feature.
36369   alias -g '${1+"$@"}'='"$@"'
36370   setopt NO_GLOB_SUBST
36371 else
36372   case `(set -o) 2>/dev/null` in #(
36373   *posix*) :
36374     set -o posix ;; #(
36375   *) :
36376      ;;
36377 esac
36378 fi
36379 
36380 
36381 as_nl='
36382 '
36383 export as_nl
36384 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36385 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36386 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36387 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36388 # Prefer a ksh shell builtin over an external printf program on Solaris,
36389 # but without wasting forks for bash or zsh.
36390 if test -z "$BASH_VERSION$ZSH_VERSION" \
36391     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36392   as_echo='print -r --'
36393   as_echo_n='print -rn --'
36394 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36395   as_echo='printf %s\n'
36396   as_echo_n='printf %s'
36397 else
36398   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36399     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36400     as_echo_n='/usr/ucb/echo -n'
36401   else
36402     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36403     as_echo_n_body='eval
36404       arg=$1;
36405       case $arg in #(
36406       *"$as_nl"*)
36407         expr "X$arg" : "X\\(.*\\)$as_nl";
36408         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36409       esac;
36410       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36411     '
36412     export as_echo_n_body
36413     as_echo_n='sh -c $as_echo_n_body as_echo'
36414   fi
36415   export as_echo_body
36416   as_echo='sh -c $as_echo_body as_echo'
36417 fi
36418 
36419 # The user is always right.
36420 if test "${PATH_SEPARATOR+set}" != set; then
36421   PATH_SEPARATOR=:
36422   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36423     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36424       PATH_SEPARATOR=';'
36425   }
36426 fi
36427 
36428 
36429 # IFS
36430 # We need space, tab and new line, in precisely that order.  Quoting is
36431 # there to prevent editors from complaining about space-tab.
36432 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36433 # splitting by setting IFS to empty value.)
36434 IFS=" ""        $as_nl"
36435 
36436 # Find who we are.  Look in the path if we contain no directory separator.
36437 as_myself=
36438 case $0 in #((
36439   *[\\/]* ) as_myself=$0 ;;
36440   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36441 for as_dir in $PATH
36442 do
36443   IFS=$as_save_IFS
36444   test -z "$as_dir" && as_dir=.
36445     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36446   done
36447 IFS=$as_save_IFS
36448 
36449      ;;
36450 esac
36451 # We did not find ourselves, most probably we were run as `sh COMMAND'
36452 # in which case we are not to be found in the path.
36453 if test "x$as_myself" = x; then
36454   as_myself=$0
36455 fi
36456 if test ! -f "$as_myself"; then
36457   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36458   exit 1
36459 fi
36460 
36461 # Unset variables that we do not need and which cause bugs (e.g. in
36462 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36463 # suppresses any "Segmentation fault" message there.  '((' could
36464 # trigger a bug in pdksh 5.2.14.
36465 for as_var in BASH_ENV ENV MAIL MAILPATH
36466 do eval test x\${$as_var+set} = xset \
36467   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36468 done
36469 PS1='$ '
36470 PS2='> '
36471 PS4='+ '
36472 
36473 # NLS nuisances.
36474 LC_ALL=C
36475 export LC_ALL
36476 LANGUAGE=C
36477 export LANGUAGE
36478 
36479 # CDPATH.
36480 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36481 
36482 
36483 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36484 # ----------------------------------------
36485 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36486 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36487 # script with STATUS, using 1 if that was 0.
36488 as_fn_error ()
36489 {
36490   as_status=$1; test $as_status -eq 0 && as_status=1
36491   if test "$4"; then
36492     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36493     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36494   fi
36495   $as_echo "$as_me: error: $2" >&2
36496   as_fn_exit $as_status
36497 } # as_fn_error
36498 
36499 
36500 # as_fn_set_status STATUS
36501 # -----------------------
36502 # Set $? to STATUS, without forking.
36503 as_fn_set_status ()
36504 {
36505   return $1
36506 } # as_fn_set_status
36507 
36508 # as_fn_exit STATUS
36509 # -----------------
36510 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36511 as_fn_exit ()
36512 {
36513   set +e
36514   as_fn_set_status $1
36515   exit $1
36516 } # as_fn_exit
36517 
36518 # as_fn_unset VAR
36519 # ---------------
36520 # Portably unset VAR.
36521 as_fn_unset ()
36522 {
36523   { eval $1=; unset $1;}
36524 }
36525 as_unset=as_fn_unset
36526 # as_fn_append VAR VALUE
36527 # ----------------------
36528 # Append the text in VALUE to the end of the definition contained in VAR. Take
36529 # advantage of any shell optimizations that allow amortized linear growth over
36530 # repeated appends, instead of the typical quadratic growth present in naive
36531 # implementations.
36532 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36533   eval 'as_fn_append ()
36534   {
36535     eval $1+=\$2
36536   }'
36537 else
36538   as_fn_append ()
36539   {
36540     eval $1=\$$1\$2
36541   }
36542 fi # as_fn_append
36543 
36544 # as_fn_arith ARG...
36545 # ------------------
36546 # Perform arithmetic evaluation on the ARGs, and store the result in the
36547 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36548 # must be portable across $(()) and expr.
36549 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36550   eval 'as_fn_arith ()
36551   {
36552     as_val=$(( $* ))
36553   }'
36554 else
36555   as_fn_arith ()
36556   {
36557     as_val=`expr "$@" || test $? -eq 1`
36558   }
36559 fi # as_fn_arith
36560 
36561 
36562 if expr a : '\(a\)' >/dev/null 2>&1 &&
36563    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36564   as_expr=expr
36565 else
36566   as_expr=false
36567 fi
36568 
36569 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36570   as_basename=basename
36571 else
36572   as_basename=false
36573 fi
36574 
36575 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36576   as_dirname=dirname
36577 else
36578   as_dirname=false
36579 fi
36580 
36581 as_me=`$as_basename -- "$0" ||
36582 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36583          X"$0" : 'X\(//\)$' \| \
36584          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36585 $as_echo X/"$0" |
36586     sed '/^.*\/\([^/][^/]*\)\/*$/{
36587             s//\1/
36588             q
36589           }
36590           /^X\/\(\/\/\)$/{
36591             s//\1/
36592             q
36593           }
36594           /^X\/\(\/\).*/{
36595             s//\1/
36596             q
36597           }
36598           s/.*/./; q'`
36599 
36600 # Avoid depending upon Character Ranges.
36601 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36602 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36603 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36604 as_cr_digits='0123456789'
36605 as_cr_alnum=$as_cr_Letters$as_cr_digits
36606 
36607 ECHO_C= ECHO_N= ECHO_T=
36608 case `echo -n x` in #(((((
36609 -n*)
36610   case `echo 'xy\c'` in
36611   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
36612   xy)  ECHO_C='\c';;
36613   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36614        ECHO_T=' ';;
36615   esac;;
36616 *)
36617   ECHO_N='-n';;
36618 esac
36619 
36620 rm -f conf$$ conf$$.exe conf$$.file
36621 if test -d conf$$.dir; then
36622   rm -f conf$$.dir/conf$$.file
36623 else
36624   rm -f conf$$.dir
36625   mkdir conf$$.dir 2>/dev/null
36626 fi
36627 if (echo >conf$$.file) 2>/dev/null; then
36628   if ln -s conf$$.file conf$$ 2>/dev/null; then
36629     as_ln_s='ln -s'
36630     # ... but there are two gotchas:
36631     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36632     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36633     # In both cases, we have to default to `cp -pR'.
36634     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36635       as_ln_s='cp -pR'
36636   elif ln conf$$.file conf$$ 2>/dev/null; then
36637     as_ln_s=ln
36638   else
36639     as_ln_s='cp -pR'
36640   fi
36641 else
36642   as_ln_s='cp -pR'
36643 fi
36644 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36645 rmdir conf$$.dir 2>/dev/null
36646 
36647 
36648 # as_fn_mkdir_p
36649 # -------------
36650 # Create "$as_dir" as a directory, including parents if necessary.
36651 as_fn_mkdir_p ()
36652 {
36653 
36654   case $as_dir in #(
36655   -*) as_dir=./$as_dir;;
36656   esac
36657   test -d "$as_dir" || eval $as_mkdir_p || {
36658     as_dirs=
36659     while :; do
36660       case $as_dir in #(
36661       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36662       *) as_qdir=$as_dir;;
36663       esac
36664       as_dirs="'$as_qdir' $as_dirs"
36665       as_dir=`$as_dirname -- "$as_dir" ||
36666 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36667          X"$as_dir" : 'X\(//\)[^/]' \| \
36668          X"$as_dir" : 'X\(//\)$' \| \
36669          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36670 $as_echo X"$as_dir" |
36671     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36672             s//\1/
36673             q
36674           }
36675           /^X\(\/\/\)[^/].*/{
36676             s//\1/
36677             q
36678           }
36679           /^X\(\/\/\)$/{
36680             s//\1/
36681             q
36682           }
36683           /^X\(\/\).*/{
36684             s//\1/
36685             q
36686           }
36687           s/.*/./; q'`
36688       test -d "$as_dir" && break
36689     done
36690     test -z "$as_dirs" || eval "mkdir $as_dirs"
36691   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36692 
36693 
36694 } # as_fn_mkdir_p
36695 if mkdir -p . 2>/dev/null; then
36696   as_mkdir_p='mkdir -p "$as_dir"'
36697 else
36698   test -d ./-p && rmdir ./-p
36699   as_mkdir_p=false
36700 fi
36701 
36702 
36703 # as_fn_executable_p FILE
36704 # -----------------------
36705 # Test if FILE is an executable regular file.
36706 as_fn_executable_p ()
36707 {
36708   test -f "$1" && test -x "$1"
36709 } # as_fn_executable_p
36710 as_test_x='test -x'
36711 as_executable_p=as_fn_executable_p
36712 
36713 # Sed expression to map a string onto a valid CPP name.
36714 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36715 
36716 # Sed expression to map a string onto a valid variable name.
36717 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36718 
36719 
36720 exec 6>&1
36721 ## ----------------------------------- ##
36722 ## Main body of $CONFIG_STATUS script. ##
36723 ## ----------------------------------- ##
36724 _ASEOF
36725 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36726 
36727 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36728 # Save the log message, to keep $0 and so on meaningful, and to
36729 # report actual input values of CONFIG_FILES etc. instead of their
36730 # values after options handling.
36731 ac_log="
36732 This file was extended by OpenJDK $as_me jdk8, which was
36733 generated by GNU Autoconf 2.69.  Invocation command line was
36734 
36735   CONFIG_FILES    = $CONFIG_FILES
36736   CONFIG_HEADERS  = $CONFIG_HEADERS
36737   CONFIG_LINKS    = $CONFIG_LINKS
36738   CONFIG_COMMANDS = $CONFIG_COMMANDS
36739   $ $0 $@
36740 
36741 on `(hostname || uname -n) 2>/dev/null | sed 1q`
36742 "
36743 
36744 _ACEOF
36745 
36746 case $ac_config_files in *"
36747 "*) set x $ac_config_files; shift; ac_config_files=$*;;
36748 esac
36749 
36750 case $ac_config_headers in *"
36751 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36752 esac
36753 
36754 
36755 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36756 # Files that config.status was made for.
36757 config_files="$ac_config_files"
36758 config_headers="$ac_config_headers"
36759 
36760 _ACEOF
36761 
36762 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36763 ac_cs_usage="\
36764 \`$as_me' instantiates files and other configuration actions
36765 from templates according to the current configuration.  Unless the files
36766 and actions are specified as TAGs, all are instantiated by default.
36767 
36768 Usage: $0 [OPTION]... [TAG]...
36769 
36770   -h, --help       print this help, then exit
36771   -V, --version    print version number and configuration settings, then exit
36772       --config     print configuration, then exit
36773   -q, --quiet, --silent
36774                    do not print progress messages
36775   -d, --debug      don't remove temporary files
36776       --recheck    update $as_me by reconfiguring in the same conditions
36777       --file=FILE[:TEMPLATE]
36778                    instantiate the configuration file FILE
36779       --header=FILE[:TEMPLATE]
36780                    instantiate the configuration header FILE
36781 
36782 Configuration files:
36783 $config_files
36784 
36785 Configuration headers:
36786 $config_headers
36787 
36788 Report bugs to <build-dev@openjdk.java.net>.
36789 OpenJDK home page: <http://openjdk.java.net>."
36790 
36791 _ACEOF
36792 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36793 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36794 ac_cs_version="\\
36795 OpenJDK config.status jdk8
36796 configured by $0, generated by GNU Autoconf 2.69,
36797   with options \\"\$ac_cs_config\\"
36798 
36799 Copyright (C) 2012 Free Software Foundation, Inc.
36800 This config.status script is free software; the Free Software Foundation
36801 gives unlimited permission to copy, distribute and modify it."
36802 
36803 ac_pwd='$ac_pwd'
36804 srcdir='$srcdir'
36805 AWK='$AWK'
36806 test -n "\$AWK" || AWK=awk
36807 _ACEOF
36808 
36809 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36810 # The default lists apply if the user does not specify any file.
36811 ac_need_defaults=:
36812 while test $# != 0
36813 do
36814   case $1 in
36815   --*=?*)
36816     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36817     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36818     ac_shift=:
36819     ;;
36820   --*=)
36821     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36822     ac_optarg=
36823     ac_shift=:
36824     ;;
36825   *)
36826     ac_option=$1
36827     ac_optarg=$2
36828     ac_shift=shift
36829     ;;
36830   esac
36831 
36832   case $ac_option in
36833   # Handling of the options.
36834   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36835     ac_cs_recheck=: ;;
36836   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36837     $as_echo "$ac_cs_version"; exit ;;
36838   --config | --confi | --conf | --con | --co | --c )
36839     $as_echo "$ac_cs_config"; exit ;;
36840   --debug | --debu | --deb | --de | --d | -d )
36841     debug=: ;;
36842   --file | --fil | --fi | --f )
36843     $ac_shift
36844     case $ac_optarg in
36845     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36846     '') as_fn_error $? "missing file argument" ;;
36847     esac
36848     as_fn_append CONFIG_FILES " '$ac_optarg'"
36849     ac_need_defaults=false;;
36850   --header | --heade | --head | --hea )
36851     $ac_shift
36852     case $ac_optarg in
36853     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36854     esac
36855     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36856     ac_need_defaults=false;;
36857   --he | --h)
36858     # Conflict between --help and --header
36859     as_fn_error $? "ambiguous option: \`$1'
36860 Try \`$0 --help' for more information.";;
36861   --help | --hel | -h )
36862     $as_echo "$ac_cs_usage"; exit ;;
36863   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36864   | -silent | --silent | --silen | --sile | --sil | --si | --s)
36865     ac_cs_silent=: ;;
36866 
36867   # This is an error.
36868   -*) as_fn_error $? "unrecognized option: \`$1'
36869 Try \`$0 --help' for more information." ;;
36870 
36871   *) as_fn_append ac_config_targets " $1"
36872      ac_need_defaults=false ;;
36873 
36874   esac
36875   shift
36876 done
36877 
36878 ac_configure_extra_args=
36879 
36880 if $ac_cs_silent; then
36881   exec 6>/dev/null
36882   ac_configure_extra_args="$ac_configure_extra_args --silent"
36883 fi
36884 
36885 _ACEOF
36886 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36887 if \$ac_cs_recheck; then
36888   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36889   shift
36890   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36891   CONFIG_SHELL='$SHELL'
36892   export CONFIG_SHELL
36893   exec "\$@"
36894 fi
36895 
36896 _ACEOF
36897 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36898 exec 5>>config.log
36899 {
36900   echo
36901   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36902 ## Running $as_me. ##
36903 _ASBOX
36904   $as_echo "$ac_log"
36905 } >&5
36906 
36907 _ACEOF
36908 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36909 _ACEOF
36910 
36911 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36912 
36913 # Handling of arguments.
36914 for ac_config_target in $ac_config_targets
36915 do
36916   case $ac_config_target in
36917     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36918     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36919     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36920     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36921     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36922     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36923     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36924 
36925   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36926   esac
36927 done
36928 
36929 
36930 # If the user did not use the arguments to specify the items to instantiate,
36931 # then the envvar interface is used.  Set only those that are not.
36932 # We use the long form for the default assignment because of an extremely
36933 # bizarre bug on SunOS 4.1.3.
36934 if $ac_need_defaults; then
36935   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36936   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36937 fi
36938 
36939 # Have a temporary directory for convenience.  Make it in the build tree
36940 # simply because there is no reason against having it here, and in addition,
36941 # creating and moving files from /tmp can sometimes cause problems.
36942 # Hook for its removal unless debugging.
36943 # Note that there is a small window in which the directory will not be cleaned:
36944 # after its creation but before its name has been assigned to `$tmp'.
36945 $debug ||
36946 {
36947   tmp= ac_tmp=
36948   trap 'exit_status=$?
36949   : "${ac_tmp:=$tmp}"
36950   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36951 ' 0
36952   trap 'as_fn_exit 1' 1 2 13 15
36953 }
36954 # Create a (secure) tmp directory for tmp files.
36955 
36956 {
36957   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36958   test -d "$tmp"
36959 }  ||
36960 {
36961   tmp=./conf$$-$RANDOM
36962   (umask 077 && mkdir "$tmp")
36963 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36964 ac_tmp=$tmp
36965 
36966 # Set up the scripts for CONFIG_FILES section.
36967 # No need to generate them if there are no CONFIG_FILES.
36968 # This happens for instance with `./config.status config.h'.
36969 if test -n "$CONFIG_FILES"; then
36970 
36971 
36972 ac_cr=`echo X | tr X '\015'`
36973 # On cygwin, bash can eat \r inside `` if the user requested igncr.
36974 # But we know of no other shell where ac_cr would be empty at this
36975 # point, so we can use a bashism as a fallback.
36976 if test "x$ac_cr" = x; then
36977   eval ac_cr=\$\'\\r\'
36978 fi
36979 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36980 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36981   ac_cs_awk_cr='\\r'
36982 else
36983   ac_cs_awk_cr=$ac_cr
36984 fi
36985 
36986 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36987 _ACEOF
36988 
36989 
36990 {
36991   echo "cat >conf$$subs.awk <<_ACEOF" &&
36992   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36993   echo "_ACEOF"
36994 } >conf$$subs.sh ||
36995   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36996 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36997 ac_delim='%!_!# '
36998 for ac_last_try in false false false false false :; do
36999   . ./conf$$subs.sh ||
37000     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37001 
37002   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37003   if test $ac_delim_n = $ac_delim_num; then
37004     break
37005   elif $ac_last_try; then
37006     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37007   else
37008     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37009   fi
37010 done
37011 rm -f conf$$subs.sh
37012 
37013 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37014 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37015 _ACEOF
37016 sed -n '
37017 h
37018 s/^/S["/; s/!.*/"]=/
37019 p
37020 g
37021 s/^[^!]*!//
37022 :repl
37023 t repl
37024 s/'"$ac_delim"'$//
37025 t delim
37026 :nl
37027 h
37028 s/\(.\{148\}\)..*/\1/
37029 t more1
37030 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37031 p
37032 n
37033 b repl
37034 :more1
37035 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37036 p
37037 g
37038 s/.\{148\}//
37039 t nl
37040 :delim
37041 h
37042 s/\(.\{148\}\)..*/\1/
37043 t more2
37044 s/["\\]/\\&/g; s/^/"/; s/$/"/
37045 p
37046 b
37047 :more2
37048 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37049 p
37050 g
37051 s/.\{148\}//
37052 t delim
37053 ' <conf$$subs.awk | sed '
37054 /^[^""]/{
37055   N
37056   s/\n//
37057 }
37058 ' >>$CONFIG_STATUS || ac_write_fail=1
37059 rm -f conf$$subs.awk
37060 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37061 _ACAWK
37062 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37063   for (key in S) S_is_set[key] = 1
37064   FS = ""
37065 
37066 }
37067 {
37068   line = $ 0
37069   nfields = split(line, field, "@")
37070   substed = 0
37071   len = length(field[1])
37072   for (i = 2; i < nfields; i++) {
37073     key = field[i]
37074     keylen = length(key)
37075     if (S_is_set[key]) {
37076       value = S[key]
37077       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37078       len += length(value) + length(field[++i])
37079       substed = 1
37080     } else
37081       len += 1 + keylen
37082   }
37083 
37084   print line
37085 }
37086 
37087 _ACAWK
37088 _ACEOF
37089 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37090 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37091   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37092 else
37093   cat
37094 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37095   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37096 _ACEOF
37097 
37098 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37099 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37100 # trailing colons and then remove the whole line if VPATH becomes empty
37101 # (actually we leave an empty line to preserve line numbers).
37102 if test "x$srcdir" = x.; then
37103   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37104 h
37105 s///
37106 s/^/:/
37107 s/[      ]*$/:/
37108 s/:\$(srcdir):/:/g
37109 s/:\${srcdir}:/:/g
37110 s/:@srcdir@:/:/g
37111 s/^:*//
37112 s/:*$//
37113 x
37114 s/\(=[   ]*\).*/\1/
37115 G
37116 s/\n//
37117 s/^[^=]*=[       ]*$//
37118 }'
37119 fi
37120 
37121 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37122 fi # test -n "$CONFIG_FILES"
37123 
37124 # Set up the scripts for CONFIG_HEADERS section.
37125 # No need to generate them if there are no CONFIG_HEADERS.
37126 # This happens for instance with `./config.status Makefile'.
37127 if test -n "$CONFIG_HEADERS"; then
37128 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37129 BEGIN {
37130 _ACEOF
37131 
37132 # Transform confdefs.h into an awk script `defines.awk', embedded as
37133 # here-document in config.status, that substitutes the proper values into
37134 # config.h.in to produce config.h.
37135 
37136 # Create a delimiter string that does not exist in confdefs.h, to ease
37137 # handling of long lines.
37138 ac_delim='%!_!# '
37139 for ac_last_try in false false :; do
37140   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37141   if test -z "$ac_tt"; then
37142     break
37143   elif $ac_last_try; then
37144     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37145   else
37146     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37147   fi
37148 done
37149 
37150 # For the awk script, D is an array of macro values keyed by name,
37151 # likewise P contains macro parameters if any.  Preserve backslash
37152 # newline sequences.
37153 
37154 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37155 sed -n '
37156 s/.\{148\}/&'"$ac_delim"'/g
37157 t rset
37158 :rset
37159 s/^[     ]*#[    ]*define[       ][      ]*/ /
37160 t def
37161 d
37162 :def
37163 s/\\$//
37164 t bsnl
37165 s/["\\]/\\&/g
37166 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37167 D["\1"]=" \3"/p
37168 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37169 d
37170 :bsnl
37171 s/["\\]/\\&/g
37172 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37173 D["\1"]=" \3\\\\\\n"\\/p
37174 t cont
37175 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37176 t cont
37177 d
37178 :cont
37179 n
37180 s/.\{148\}/&'"$ac_delim"'/g
37181 t clear
37182 :clear
37183 s/\\$//
37184 t bsnlc
37185 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37186 d
37187 :bsnlc
37188 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37189 b cont
37190 ' <confdefs.h | sed '
37191 s/'"$ac_delim"'/"\\\
37192 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37193 
37194 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37195   for (key in D) D_is_set[key] = 1
37196   FS = ""
37197 }
37198 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37199   line = \$ 0
37200   split(line, arg, " ")
37201   if (arg[1] == "#") {
37202     defundef = arg[2]
37203     mac1 = arg[3]
37204   } else {
37205     defundef = substr(arg[1], 2)
37206     mac1 = arg[2]
37207   }
37208   split(mac1, mac2, "(") #)
37209   macro = mac2[1]
37210   prefix = substr(line, 1, index(line, defundef) - 1)
37211   if (D_is_set[macro]) {
37212     # Preserve the white space surrounding the "#".
37213     print prefix "define", macro P[macro] D[macro]
37214     next
37215   } else {
37216     # Replace #undef with comments.  This is necessary, for example,
37217     # in the case of _POSIX_SOURCE, which is predefined and required
37218     # on some systems where configure will not decide to define it.
37219     if (defundef == "undef") {
37220       print "/*", prefix defundef, macro, "*/"
37221       next
37222     }
37223   }
37224 }
37225 { print }
37226 _ACAWK
37227 _ACEOF
37228 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37229   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37230 fi # test -n "$CONFIG_HEADERS"
37231 
37232 
37233 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37234 shift
37235 for ac_tag
37236 do
37237   case $ac_tag in
37238   :[FHLC]) ac_mode=$ac_tag; continue;;
37239   esac
37240   case $ac_mode$ac_tag in
37241   :[FHL]*:*);;
37242   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37243   :[FH]-) ac_tag=-:-;;
37244   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37245   esac
37246   ac_save_IFS=$IFS
37247   IFS=:
37248   set x $ac_tag
37249   IFS=$ac_save_IFS
37250   shift
37251   ac_file=$1
37252   shift
37253 
37254   case $ac_mode in
37255   :L) ac_source=$1;;
37256   :[FH])
37257     ac_file_inputs=
37258     for ac_f
37259     do
37260       case $ac_f in
37261       -) ac_f="$ac_tmp/stdin";;
37262       *) # Look for the file first in the build tree, then in the source tree
37263          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37264          # because $ac_f cannot contain `:'.
37265          test -f "$ac_f" ||
37266            case $ac_f in
37267            [\\/$]*) false;;
37268            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37269            esac ||
37270            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37271       esac
37272       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37273       as_fn_append ac_file_inputs " '$ac_f'"
37274     done
37275 
37276     # Let's still pretend it is `configure' which instantiates (i.e., don't
37277     # use $as_me), people would be surprised to read:
37278     #    /* config.h.  Generated by config.status.  */
37279     configure_input='Generated from '`
37280           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37281         `' by configure.'
37282     if test x"$ac_file" != x-; then
37283       configure_input="$ac_file.  $configure_input"
37284       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37285 $as_echo "$as_me: creating $ac_file" >&6;}
37286     fi
37287     # Neutralize special characters interpreted by sed in replacement strings.
37288     case $configure_input in #(
37289     *\&* | *\|* | *\\* )
37290        ac_sed_conf_input=`$as_echo "$configure_input" |
37291        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37292     *) ac_sed_conf_input=$configure_input;;
37293     esac
37294 
37295     case $ac_tag in
37296     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37297       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37298     esac
37299     ;;
37300   esac
37301 
37302   ac_dir=`$as_dirname -- "$ac_file" ||
37303 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37304          X"$ac_file" : 'X\(//\)[^/]' \| \
37305          X"$ac_file" : 'X\(//\)$' \| \
37306          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37307 $as_echo X"$ac_file" |
37308     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37309             s//\1/
37310             q
37311           }
37312           /^X\(\/\/\)[^/].*/{
37313             s//\1/
37314             q
37315           }
37316           /^X\(\/\/\)$/{
37317             s//\1/
37318             q
37319           }
37320           /^X\(\/\).*/{
37321             s//\1/
37322             q
37323           }
37324           s/.*/./; q'`
37325   as_dir="$ac_dir"; as_fn_mkdir_p
37326   ac_builddir=.
37327 
37328 case "$ac_dir" in
37329 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37330 *)
37331   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37332   # A ".." for each directory in $ac_dir_suffix.
37333   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37334   case $ac_top_builddir_sub in
37335   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37336   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37337   esac ;;
37338 esac
37339 ac_abs_top_builddir=$ac_pwd
37340 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37341 # for backward compatibility:
37342 ac_top_builddir=$ac_top_build_prefix
37343 
37344 case $srcdir in
37345   .)  # We are building in place.
37346     ac_srcdir=.
37347     ac_top_srcdir=$ac_top_builddir_sub
37348     ac_abs_top_srcdir=$ac_pwd ;;
37349   [\\/]* | ?:[\\/]* )  # Absolute name.
37350     ac_srcdir=$srcdir$ac_dir_suffix;
37351     ac_top_srcdir=$srcdir
37352     ac_abs_top_srcdir=$srcdir ;;
37353   *) # Relative name.
37354     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37355     ac_top_srcdir=$ac_top_build_prefix$srcdir
37356     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37357 esac
37358 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37359 
37360 
37361   case $ac_mode in
37362   :F)
37363   #
37364   # CONFIG_FILE
37365   #
37366 
37367 _ACEOF
37368 
37369 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37370 # If the template does not know about datarootdir, expand it.
37371 # FIXME: This hack should be removed a few years after 2.60.
37372 ac_datarootdir_hack=; ac_datarootdir_seen=
37373 ac_sed_dataroot='
37374 /datarootdir/ {
37375   p
37376   q
37377 }
37378 /@datadir@/p
37379 /@docdir@/p
37380 /@infodir@/p
37381 /@localedir@/p
37382 /@mandir@/p'
37383 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37384 *datarootdir*) ac_datarootdir_seen=yes;;
37385 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37386   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37387 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37388 _ACEOF
37389 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37390   ac_datarootdir_hack='
37391   s&@datadir@&$datadir&g
37392   s&@docdir@&$docdir&g
37393   s&@infodir@&$infodir&g
37394   s&@localedir@&$localedir&g
37395   s&@mandir@&$mandir&g
37396   s&\\\${datarootdir}&$datarootdir&g' ;;
37397 esac
37398 _ACEOF
37399 
37400 # Neutralize VPATH when `$srcdir' = `.'.
37401 # Shell code in configure.ac might set extrasub.
37402 # FIXME: do we really want to maintain this feature?
37403 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37404 ac_sed_extra="$ac_vpsub
37405 $extrasub
37406 _ACEOF
37407 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37408 :t
37409 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37410 s|@configure_input@|$ac_sed_conf_input|;t t
37411 s&@top_builddir@&$ac_top_builddir_sub&;t t
37412 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37413 s&@srcdir@&$ac_srcdir&;t t
37414 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37415 s&@top_srcdir@&$ac_top_srcdir&;t t
37416 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37417 s&@builddir@&$ac_builddir&;t t
37418 s&@abs_builddir@&$ac_abs_builddir&;t t
37419 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37420 $ac_datarootdir_hack
37421 "
37422 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37423   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37424 
37425 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37426   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37427   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37428       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37429   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37430 which seems to be undefined.  Please make sure it is defined" >&5
37431 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37432 which seems to be undefined.  Please make sure it is defined" >&2;}
37433 
37434   rm -f "$ac_tmp/stdin"
37435   case $ac_file in
37436   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37437   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37438   esac \
37439   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37440  ;;
37441   :H)
37442   #
37443   # CONFIG_HEADER
37444   #
37445   if test x"$ac_file" != x-; then
37446     {
37447       $as_echo "/* $configure_input  */" \
37448       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37449     } >"$ac_tmp/config.h" \
37450       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37451     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37452       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37453 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37454     else
37455       rm -f "$ac_file"
37456       mv "$ac_tmp/config.h" "$ac_file" \
37457         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37458     fi
37459   else
37460     $as_echo "/* $configure_input  */" \
37461       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37462       || as_fn_error $? "could not create -" "$LINENO" 5
37463   fi
37464  ;;
37465 
37466 
37467   esac
37468 
37469 done # for ac_tag
37470 
37471 
37472 as_fn_exit 0
37473 _ACEOF
37474 ac_clean_files=$ac_clean_files_save
37475 
37476 test $ac_write_fail = 0 ||
37477   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37478 
37479 
37480 # configure is writing to config.log, and then calls config.status.
37481 # config.status does its own redirection, appending to config.log.
37482 # Unfortunately, on DOS this fails, as config.log is still kept open
37483 # by configure, so config.status won't be able to write to it; its
37484 # output is simply discarded.  So we exec the FD to /dev/null,
37485 # effectively closing config.log, so it can be properly (re)opened and
37486 # appended to by config.status.  When coming back to configure, we
37487 # need to make the FD available again.
37488 if test "$no_create" != yes; then
37489   ac_cs_success=:
37490   ac_config_status_args=
37491   test "$silent" = yes &&
37492     ac_config_status_args="$ac_config_status_args --quiet"
37493   exec 5>/dev/null
37494   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37495   exec 5>>config.log
37496   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37497   # would make configure fail if this is the last instruction.
37498   $ac_cs_success || as_fn_exit 1
37499 fi
37500 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37501   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37502 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37503 fi
37504 
37505 
37506 
37507 # Try to move the config.log file to the output directory.
37508 if test -e ./config.log; then
37509   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37510 fi
37511 
37512 # Make the compare script executable
37513 $CHMOD +x $OUTPUT_ROOT/compare.sh
37514 
37515 # Finally output some useful information to the user
37516 
37517   # Finally output some useful information to the user
37518 
37519   if test "x$CCACHE_FOUND" != x; then
37520     if  test "x$HAS_GOOD_CCACHE" = x; then
37521       CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37522       CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37523     else
37524       CCACHE_STATUS="installed and in use"
37525     fi
37526   else
37527     if test "x$GCC" = xyes; then
37528       CCACHE_STATUS="not installed (consider installing)"
37529       CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37530     else
37531       CCACHE_STATUS="not available for your system"
37532     fi
37533   fi
37534 
37535   printf "\n"
37536   printf "====================================================\n"
37537   printf "A new configuration has been successfully created in\n"
37538   printf "$OUTPUT_ROOT\n"
37539   if test "x$CONFIGURE_COMMAND_LINE" != x; then
37540     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37541   else
37542     printf "using default settings.\n"
37543   fi
37544 
37545   printf "\n"
37546   printf "Configuration summary:\n"
37547   printf "* Debug level:    $DEBUG_LEVEL\n"
37548   printf "* JDK variant:    $JDK_VARIANT\n"
37549   printf "* JVM variants:   $with_jvm_variants\n"
37550   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37551 
37552   printf "\n"
37553   printf "Tools summary:\n"
37554   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37555     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37556   fi
37557   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37558   printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37559   printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37560 
37561   printf "\n"
37562   printf "Build performance summary:\n"
37563   printf "* Cores to use:   $JOBS\n"
37564   printf "* Memory limit:   $MEMORY_SIZE MB\n"
37565   printf "* ccache status:  $CCACHE_STATUS\n"
37566   printf "\n"
37567 
37568   if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37569     printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37570     printf "$CCACHE_HELP_MSG\n"
37571 
37572   # Print a helpful message on how to acquire the necessary build dependency.
37573   # ccache is the help tag: freetype, cups, pulse, alsa etc
37574   MISSING_DEPENDENCY=ccache
37575 
37576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37577     cygwin_help $MISSING_DEPENDENCY
37578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37579     msys_help $MISSING_DEPENDENCY
37580   else
37581     PKGHANDLER_COMMAND=
37582 
37583     case $PKGHANDLER in
37584       apt-get)
37585         apt_help     $MISSING_DEPENDENCY ;;
37586       yum)
37587         yum_help     $MISSING_DEPENDENCY ;;
37588       port)
37589         port_help    $MISSING_DEPENDENCY ;;
37590       pkgutil)
37591         pkgutil_help $MISSING_DEPENDENCY ;;
37592       pkgadd)
37593         pkgadd_help  $MISSING_DEPENDENCY ;;
37594     esac
37595 
37596     if test "x$PKGHANDLER_COMMAND" != x; then
37597       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37598     fi
37599   fi
37600 
37601     printf "$HELP_MSG\n"
37602     printf "\n"
37603   fi
37604 
37605   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37606     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37607     printf "will result in longer build times.\n"
37608     printf "\n"
37609   fi
37610 
37611   if test "x$FOUND_ALT_VARIABLES" != "x"; then
37612     printf "WARNING: You have old-style ALT_ environment variables set.\n"
37613     printf "These are not respected, and will be ignored. It is recommended\n"
37614     printf "that you clean your environment. The following variables are set:\n"
37615     printf "$FOUND_ALT_VARIABLES\n"
37616     printf "\n"
37617   fi
37618 
37619   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37620     printf "WARNING: Your build output directory is not on a local disk.\n"
37621     printf "This will severely degrade build performance!\n"
37622     printf "It is recommended that you create an output directory on a local disk,\n"
37623     printf "and run the configure script again from that directory.\n"
37624     printf "\n"
37625   fi
37626 
37627   if test "x$IS_RECONFIGURE" = "xyes"; then
37628     printf "WARNING: The result of this configuration has overridden an older\n"
37629     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37630     printf "proper build. Failure to do so might result in strange build problems.\n"
37631     printf "\n"
37632   fi
37633