1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
   9 #
  10 #
  11 # This configure script is free software; the Free Software Foundation
  12 # gives unlimited permission to copy, distribute and modify it.
  13 ## -------------------- ##
  14 ## M4sh Initialization. ##
  15 ## -------------------- ##
  16 
  17 # Be more Bourne compatible
  18 DUALCASE=1; export DUALCASE # for MKS sh
  19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  20   emulate sh
  21   NULLCMD=:
  22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  23   # is contrary to our usage.  Disable this feature.
  24   alias -g '${1+"$@"}'='"$@"'
  25   setopt NO_GLOB_SUBST
  26 else
  27   case `(set -o) 2>/dev/null` in #(
  28   *posix*) :
  29     set -o posix ;; #(
  30   *) :
  31      ;;
  32 esac
  33 fi
  34 
  35 
  36 as_nl='
  37 '
  38 export as_nl
  39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  43 # Prefer a ksh shell builtin over an external printf program on Solaris,
  44 # but without wasting forks for bash or zsh.
  45 if test -z "$BASH_VERSION$ZSH_VERSION" \
  46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  47   as_echo='print -r --'
  48   as_echo_n='print -rn --'
  49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  50   as_echo='printf %s\n'
  51   as_echo_n='printf %s'
  52 else
  53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  55     as_echo_n='/usr/ucb/echo -n'
  56   else
  57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  58     as_echo_n_body='eval
  59       arg=$1;
  60       case $arg in #(
  61       *"$as_nl"*)
  62         expr "X$arg" : "X\\(.*\\)$as_nl";
  63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  64       esac;
  65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  66     '
  67     export as_echo_n_body
  68     as_echo_n='sh -c $as_echo_n_body as_echo'
  69   fi
  70   export as_echo_body
  71   as_echo='sh -c $as_echo_body as_echo'
  72 fi
  73 
  74 # The user is always right.
  75 if test "${PATH_SEPARATOR+set}" != set; then
  76   PATH_SEPARATOR=:
  77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  79       PATH_SEPARATOR=';'
  80   }
  81 fi
  82 
  83 
  84 # IFS
  85 # We need space, tab and new line, in precisely that order.  Quoting is
  86 # there to prevent editors from complaining about space-tab.
  87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  88 # splitting by setting IFS to empty value.)
  89 IFS=" ""        $as_nl"
  90 
  91 # Find who we are.  Look in the path if we contain no directory separator.
  92 as_myself=
  93 case $0 in #((
  94   *[\\/]* ) as_myself=$0 ;;
  95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  96 for as_dir in $PATH
  97 do
  98   IFS=$as_save_IFS
  99   test -z "$as_dir" && as_dir=.
 100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 101   done
 102 IFS=$as_save_IFS
 103 
 104      ;;
 105 esac
 106 # We did not find ourselves, most probably we were run as `sh COMMAND'
 107 # in which case we are not to be found in the path.
 108 if test "x$as_myself" = x; then
 109   as_myself=$0
 110 fi
 111 if test ! -f "$as_myself"; then
 112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 113   exit 1
 114 fi
 115 
 116 # Unset variables that we do not need and which cause bugs (e.g. in
 117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 118 # suppresses any "Segmentation fault" message there.  '((' could
 119 # trigger a bug in pdksh 5.2.14.
 120 for as_var in BASH_ENV ENV MAIL MAILPATH
 121 do eval test x\${$as_var+set} = xset \
 122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 123 done
 124 PS1='$ '
 125 PS2='> '
 126 PS4='+ '
 127 
 128 # NLS nuisances.
 129 LC_ALL=C
 130 export LC_ALL
 131 LANGUAGE=C
 132 export LANGUAGE
 133 
 134 # CDPATH.
 135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 136 
 137 # Use a proper internal environment variable to ensure we don't fall
 138   # into an infinite loop, continuously re-executing ourselves.
 139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 140     _as_can_reexec=no; export _as_can_reexec;
 141     # We cannot yet assume a decent shell, so we have to provide a
 142 # neutralization value for shells without unset; and this also
 143 # works around shells that cannot unset nonexistent variables.
 144 # Preserve -v and -x to the replacement shell.
 145 BASH_ENV=/dev/null
 146 ENV=/dev/null
 147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 148 case $- in # ((((
 149   *v*x* | *x*v* ) as_opts=-vx ;;
 150   *v* ) as_opts=-v ;;
 151   *x* ) as_opts=-x ;;
 152   * ) as_opts= ;;
 153 esac
 154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 155 # Admittedly, this is quite paranoid, since all the known shells bail
 156 # out after a failed `exec'.
 157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 158 as_fn_exit 255
 159   fi
 160   # We don't want this to propagate to other subprocesses.
 161           { _as_can_reexec=; unset _as_can_reexec;}
 162 if test "x$CONFIG_SHELL" = x; then
 163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 164   emulate sh
 165   NULLCMD=:
 166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 167   # is contrary to our usage.  Disable this feature.
 168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 169   setopt NO_GLOB_SUBST
 170 else
 171   case \`(set -o) 2>/dev/null\` in #(
 172   *posix*) :
 173     set -o posix ;; #(
 174   *) :
 175      ;;
 176 esac
 177 fi
 178 "
 179   as_required="as_fn_return () { (exit \$1); }
 180 as_fn_success () { as_fn_return 0; }
 181 as_fn_failure () { as_fn_return 1; }
 182 as_fn_ret_success () { return 0; }
 183 as_fn_ret_failure () { return 1; }
 184 
 185 exitcode=0
 186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 191 
 192 else
 193   exitcode=1; echo positional parameters were not saved.
 194 fi
 195 test x\$exitcode = x0 || exit 1
 196 test -x / || exit 1"
 197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 201 test \$(( 1 + 1 )) = 2 || exit 1"
 202   if (eval "$as_required") 2>/dev/null; then :
 203   as_have_required=yes
 204 else
 205   as_have_required=no
 206 fi
 207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 208 
 209 else
 210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 211 as_found=false
 212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 213 do
 214   IFS=$as_save_IFS
 215   test -z "$as_dir" && as_dir=.
 216   as_found=:
 217   case $as_dir in #(
 218          /*)
 219            for as_base in sh bash ksh sh5; do
 220              # Try only shells that exist, to save several forks.
 221              as_shell=$as_dir/$as_base
 222              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 223                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 224   CONFIG_SHELL=$as_shell as_have_required=yes
 225                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 226   break 2
 227 fi
 228 fi
 229            done;;
 230        esac
 231   as_found=false
 232 done
 233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 234               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 235   CONFIG_SHELL=$SHELL as_have_required=yes
 236 fi; }
 237 IFS=$as_save_IFS
 238 
 239 
 240       if test "x$CONFIG_SHELL" != x; then :
 241   export CONFIG_SHELL
 242              # We cannot yet assume a decent shell, so we have to provide a
 243 # neutralization value for shells without unset; and this also
 244 # works around shells that cannot unset nonexistent variables.
 245 # Preserve -v and -x to the replacement shell.
 246 BASH_ENV=/dev/null
 247 ENV=/dev/null
 248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 249 case $- in # ((((
 250   *v*x* | *x*v* ) as_opts=-vx ;;
 251   *v* ) as_opts=-v ;;
 252   *x* ) as_opts=-x ;;
 253   * ) as_opts= ;;
 254 esac
 255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 256 # Admittedly, this is quite paranoid, since all the known shells bail
 257 # out after a failed `exec'.
 258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 259 exit 255
 260 fi
 261 
 262     if test x$as_have_required = xno; then :
 263   $as_echo "$0: This script requires a shell more modern than all"
 264   $as_echo "$0: the shells that I found on your system."
 265   if test x${ZSH_VERSION+set} = xset ; then
 266     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 267     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 268   else
 269     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 270 $0: build-dev@openjdk.java.net about your system, including
 271 $0: any error possibly output before this message. Then
 272 $0: install a modern shell, or manually run the script
 273 $0: under such a shell if you do have one."
 274   fi
 275   exit 1
 276 fi
 277 fi
 278 fi
 279 SHELL=${CONFIG_SHELL-/bin/sh}
 280 export SHELL
 281 # Unset more variables known to interfere with behavior of common tools.
 282 CLICOLOR_FORCE= GREP_OPTIONS=
 283 unset CLICOLOR_FORCE GREP_OPTIONS
 284 
 285 ## --------------------- ##
 286 ## M4sh Shell Functions. ##
 287 ## --------------------- ##
 288 # as_fn_unset VAR
 289 # ---------------
 290 # Portably unset VAR.
 291 as_fn_unset ()
 292 {
 293   { eval $1=; unset $1;}
 294 }
 295 as_unset=as_fn_unset
 296 
 297 # as_fn_set_status STATUS
 298 # -----------------------
 299 # Set $? to STATUS, without forking.
 300 as_fn_set_status ()
 301 {
 302   return $1
 303 } # as_fn_set_status
 304 
 305 # as_fn_exit STATUS
 306 # -----------------
 307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 308 as_fn_exit ()
 309 {
 310   set +e
 311   as_fn_set_status $1
 312   exit $1
 313 } # as_fn_exit
 314 
 315 # as_fn_mkdir_p
 316 # -------------
 317 # Create "$as_dir" as a directory, including parents if necessary.
 318 as_fn_mkdir_p ()
 319 {
 320 
 321   case $as_dir in #(
 322   -*) as_dir=./$as_dir;;
 323   esac
 324   test -d "$as_dir" || eval $as_mkdir_p || {
 325     as_dirs=
 326     while :; do
 327       case $as_dir in #(
 328       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 329       *) as_qdir=$as_dir;;
 330       esac
 331       as_dirs="'$as_qdir' $as_dirs"
 332       as_dir=`$as_dirname -- "$as_dir" ||
 333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 334          X"$as_dir" : 'X\(//\)[^/]' \| \
 335          X"$as_dir" : 'X\(//\)$' \| \
 336          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 337 $as_echo X"$as_dir" |
 338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 339             s//\1/
 340             q
 341           }
 342           /^X\(\/\/\)[^/].*/{
 343             s//\1/
 344             q
 345           }
 346           /^X\(\/\/\)$/{
 347             s//\1/
 348             q
 349           }
 350           /^X\(\/\).*/{
 351             s//\1/
 352             q
 353           }
 354           s/.*/./; q'`
 355       test -d "$as_dir" && break
 356     done
 357     test -z "$as_dirs" || eval "mkdir $as_dirs"
 358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 359 
 360 
 361 } # as_fn_mkdir_p
 362 
 363 # as_fn_executable_p FILE
 364 # -----------------------
 365 # Test if FILE is an executable regular file.
 366 as_fn_executable_p ()
 367 {
 368   test -f "$1" && test -x "$1"
 369 } # as_fn_executable_p
 370 # as_fn_append VAR VALUE
 371 # ----------------------
 372 # Append the text in VALUE to the end of the definition contained in VAR. Take
 373 # advantage of any shell optimizations that allow amortized linear growth over
 374 # repeated appends, instead of the typical quadratic growth present in naive
 375 # implementations.
 376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 377   eval 'as_fn_append ()
 378   {
 379     eval $1+=\$2
 380   }'
 381 else
 382   as_fn_append ()
 383   {
 384     eval $1=\$$1\$2
 385   }
 386 fi # as_fn_append
 387 
 388 # as_fn_arith ARG...
 389 # ------------------
 390 # Perform arithmetic evaluation on the ARGs, and store the result in the
 391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 392 # must be portable across $(()) and expr.
 393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 394   eval 'as_fn_arith ()
 395   {
 396     as_val=$(( $* ))
 397   }'
 398 else
 399   as_fn_arith ()
 400   {
 401     as_val=`expr "$@" || test $? -eq 1`
 402   }
 403 fi # as_fn_arith
 404 
 405 
 406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 407 # ----------------------------------------
 408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 410 # script with STATUS, using 1 if that was 0.
 411 as_fn_error ()
 412 {
 413   as_status=$1; test $as_status -eq 0 && as_status=1
 414   if test "$4"; then
 415     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 416     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 417   fi
 418   $as_echo "$as_me: error: $2" >&2
 419   as_fn_exit $as_status
 420 } # as_fn_error
 421 
 422 if expr a : '\(a\)' >/dev/null 2>&1 &&
 423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 424   as_expr=expr
 425 else
 426   as_expr=false
 427 fi
 428 
 429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 430   as_basename=basename
 431 else
 432   as_basename=false
 433 fi
 434 
 435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 436   as_dirname=dirname
 437 else
 438   as_dirname=false
 439 fi
 440 
 441 as_me=`$as_basename -- "$0" ||
 442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 443          X"$0" : 'X\(//\)$' \| \
 444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 445 $as_echo X/"$0" |
 446     sed '/^.*\/\([^/][^/]*\)\/*$/{
 447             s//\1/
 448             q
 449           }
 450           /^X\/\(\/\/\)$/{
 451             s//\1/
 452             q
 453           }
 454           /^X\/\(\/\).*/{
 455             s//\1/
 456             q
 457           }
 458           s/.*/./; q'`
 459 
 460 # Avoid depending upon Character Ranges.
 461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 464 as_cr_digits='0123456789'
 465 as_cr_alnum=$as_cr_Letters$as_cr_digits
 466 
 467 
 468   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 469   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 470   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 471   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 472   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 473   sed -n '
 474     p
 475     /[$]LINENO/=
 476   ' <$as_myself |
 477     sed '
 478       s/[$]LINENO.*/&-/
 479       t lineno
 480       b
 481       :lineno
 482       N
 483       :loop
 484       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 485       t loop
 486       s/-\n.*//
 487     ' >$as_me.lineno &&
 488   chmod +x "$as_me.lineno" ||
 489     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 490 
 491   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 492   # already done that, so ensure we don't try to do so again and fall
 493   # in an infinite loop.  This has already happened in practice.
 494   _as_can_reexec=no; export _as_can_reexec
 495   # Don't try to exec as it changes $[0], causing all sort of problems
 496   # (the dirname of $[0] is not the place where we might find the
 497   # original and so on.  Autoconf is especially sensitive to this).
 498   . "./$as_me.lineno"
 499   # Exit status is that of the last command.
 500   exit
 501 }
 502 
 503 ECHO_C= ECHO_N= ECHO_T=
 504 case `echo -n x` in #(((((
 505 -n*)
 506   case `echo 'xy\c'` in
 507   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 508   xy)  ECHO_C='\c';;
 509   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 510        ECHO_T=' ';;
 511   esac;;
 512 *)
 513   ECHO_N='-n';;
 514 esac
 515 
 516 rm -f conf$$ conf$$.exe conf$$.file
 517 if test -d conf$$.dir; then
 518   rm -f conf$$.dir/conf$$.file
 519 else
 520   rm -f conf$$.dir
 521   mkdir conf$$.dir 2>/dev/null
 522 fi
 523 if (echo >conf$$.file) 2>/dev/null; then
 524   if ln -s conf$$.file conf$$ 2>/dev/null; then
 525     as_ln_s='ln -s'
 526     # ... but there are two gotchas:
 527     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 528     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 529     # In both cases, we have to default to `cp -pR'.
 530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 531       as_ln_s='cp -pR'
 532   elif ln conf$$.file conf$$ 2>/dev/null; then
 533     as_ln_s=ln
 534   else
 535     as_ln_s='cp -pR'
 536   fi
 537 else
 538   as_ln_s='cp -pR'
 539 fi
 540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 541 rmdir conf$$.dir 2>/dev/null
 542 
 543 if mkdir -p . 2>/dev/null; then
 544   as_mkdir_p='mkdir -p "$as_dir"'
 545 else
 546   test -d ./-p && rmdir ./-p
 547   as_mkdir_p=false
 548 fi
 549 
 550 as_test_x='test -x'
 551 as_executable_p=as_fn_executable_p
 552 
 553 # Sed expression to map a string onto a valid CPP name.
 554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 555 
 556 # Sed expression to map a string onto a valid variable name.
 557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 558 
 559 
 560 test -n "$DJDIR" || exec 7<&0 </dev/null
 561 exec 6>&1
 562 
 563 # Name of the host.
 564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 565 # so uname gets run too.
 566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 567 
 568 #
 569 # Initializations.
 570 #
 571 ac_default_prefix=/usr/local
 572 ac_clean_files=
 573 ac_config_libobj_dir=.
 574 LIBOBJS=
 575 cross_compiling=no
 576 subdirs=
 577 MFLAGS=
 578 MAKEFLAGS=
 579 
 580 # Identity of this package.
 581 PACKAGE_NAME='OpenJDK'
 582 PACKAGE_TARNAME='openjdk'
 583 PACKAGE_VERSION='jdk8'
 584 PACKAGE_STRING='OpenJDK jdk8'
 585 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 586 PACKAGE_URL='http://openjdk.java.net'
 587 
 588 # Factoring default headers for most tests.
 589 ac_includes_default="\
 590 #include <stdio.h>
 591 #ifdef HAVE_SYS_TYPES_H
 592 # include <sys/types.h>
 593 #endif
 594 #ifdef HAVE_SYS_STAT_H
 595 # include <sys/stat.h>
 596 #endif
 597 #ifdef STDC_HEADERS
 598 # include <stdlib.h>
 599 # include <stddef.h>
 600 #else
 601 # ifdef HAVE_STDLIB_H
 602 #  include <stdlib.h>
 603 # endif
 604 #endif
 605 #ifdef HAVE_STRING_H
 606 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 607 #  include <memory.h>
 608 # endif
 609 # include <string.h>
 610 #endif
 611 #ifdef HAVE_STRINGS_H
 612 # include <strings.h>
 613 #endif
 614 #ifdef HAVE_INTTYPES_H
 615 # include <inttypes.h>
 616 #endif
 617 #ifdef HAVE_STDINT_H
 618 # include <stdint.h>
 619 #endif
 620 #ifdef HAVE_UNISTD_H
 621 # include <unistd.h>
 622 #endif"
 623 
 624 ac_subst_vars='LTLIBOBJS
 625 LIBOBJS
 626 CCACHE
 627 USE_PRECOMPILED_HEADER
 628 SJAVAC_SERVER_DIR
 629 ENABLE_SJAVAC
 630 SJAVAC_SERVER_JAVA
 631 JOBS
 632 MEMORY_SIZE
 633 NUM_CORES
 634 ENABLE_INTREE_EC
 635 SALIB_NAME
 636 HOTSPOT_MAKE_ARGS
 637 LIBCXX
 638 LLVM_LIBS
 639 LLVM_LDFLAGS
 640 LLVM_CFLAGS
 641 LLVM_CONFIG
 642 LIBFFI_LIBS
 643 LIBFFI_CFLAGS
 644 STATIC_CXX_SETTING
 645 LIBDL
 646 LIBM
 647 LIBZIP_CAN_USE_MMAP
 648 USE_EXTERNAL_LIBZ
 649 USE_EXTERNAL_LIBGIF
 650 USE_EXTERNAL_LIBJPEG
 651 ALSA_LIBS
 652 ALSA_CFLAGS
 653 FREETYPE_BUNDLE_LIB_PATH
 654 FREETYPE_LIBS
 655 FREETYPE_CFLAGS
 656 CUPS_CFLAGS
 657 OPENWIN_HOME
 658 X_EXTRA_LIBS
 659 X_LIBS
 660 X_PRE_LIBS
 661 X_CFLAGS
 662 XMKMF
 663 FIXPATH
 664 CXXFLAGS_DEBUG_SYMBOLS
 665 CFLAGS_DEBUG_SYMBOLS
 666 ZIP_DEBUGINFO_FILES
 667 ENABLE_DEBUG_SYMBOLS
 668 USING_BROKEN_SUSE_LD
 669 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 670 ZERO_ARCHFLAG
 671 LDFLAGS_CXX_JDK
 672 LDFLAGS_JDKEXE_SUFFIX
 673 LDFLAGS_JDKLIB_SUFFIX
 674 LDFLAGS_JDKEXE
 675 LDFLAGS_JDKLIB
 676 CXXFLAGS_JDKEXE
 677 CXXFLAGS_JDKLIB
 678 CFLAGS_JDKEXE
 679 CFLAGS_JDKLIB
 680 MACOSX_VERSION_MIN
 681 PACKAGE_PATH
 682 LEGACY_EXTRA_LDFLAGS
 683 LEGACY_EXTRA_CXXFLAGS
 684 LEGACY_EXTRA_CFLAGS
 685 CXX_FLAG_DEPS
 686 C_FLAG_DEPS
 687 CXX_O_FLAG_NONE
 688 CXX_O_FLAG_NORM
 689 CXX_O_FLAG_HI
 690 CXX_O_FLAG_HIGHEST
 691 C_O_FLAG_NONE
 692 C_O_FLAG_NORM
 693 C_O_FLAG_HI
 694 C_O_FLAG_HIGHEST
 695 POST_MCS_CMD
 696 POST_STRIP_CMD
 697 SET_EXECUTABLE_ORIGIN
 698 SET_SHARED_LIBRARY_ORIGIN
 699 CXX_FLAG_REORDER
 700 C_FLAG_REORDER
 701 SET_SHARED_LIBRARY_MAPFILE
 702 SET_SHARED_LIBRARY_NAME
 703 SHARED_LIBRARY_FLAGS
 704 EXE_SUFFIX
 705 STATIC_LIBRARY_SUFFIX
 706 SHARED_LIBRARY_SUFFIX
 707 LIBRARY_PREFIX
 708 STATIC_LIBRARY
 709 SHARED_LIBRARY
 710 OBJ_SUFFIX
 711 COMPILER_NAME
 712 JT_HOME
 713 JTREGEXE
 714 ac_ct_OBJDUMP
 715 OBJDUMP
 716 ac_ct_OBJCOPY
 717 OBJCOPY
 718 OTOOL
 719 MCS
 720 STRIP
 721 GNM
 722 NM
 723 AS
 724 CXXCPP
 725 CPP
 726 COMPILER_TYPE
 727 RC_FLAGS
 728 DUMPBIN
 729 WINAR
 730 HOTSPOT_RC
 731 HOTSPOT_MT
 732 RC
 733 MT
 734 WINLD
 735 HOTSPOT_LD
 736 HOTSPOT_CXX
 737 ARFLAGS
 738 AR
 739 LDEXECXX
 740 LDCXX
 741 LDEXE
 742 LD
 743 ac_ct_OBJC
 744 OBJCFLAGS
 745 OBJC
 746 ac_ct_CXX
 747 CXXFLAGS
 748 CXX
 749 ac_ct_PROPER_COMPILER_CXX
 750 PROPER_COMPILER_CXX
 751 POTENTIAL_CXX
 752 TOOLS_DIR_CXX
 753 COMPILER_TARGET_BITS_FLAG
 754 OBJEXT
 755 EXEEXT
 756 ac_ct_CC
 757 CPPFLAGS
 758 LDFLAGS
 759 CFLAGS
 760 CC
 761 ac_ct_PROPER_COMPILER_CC
 762 PROPER_COMPILER_CC
 763 POTENTIAL_CC
 764 TOOLS_DIR_CC
 765 SDKPATH
 766 XCODEBUILD
 767 SET_DEVELOPER_DIR
 768 BUILD_LD
 769 BUILD_CXX
 770 BUILD_CC
 771 MSVCR_DLL
 772 VS_PATH
 773 VS_LIB
 774 VS_INCLUDE
 775 CYGWIN_LINK
 776 AR_OUT_OPTION
 777 LD_OUT_OPTION
 778 EXE_OUT_OPTION
 779 CC_OUT_OPTION
 780 BUILD_HOTSPOT
 781 HOTSPOT_DIST
 782 BUILD_OUTPUT
 783 OVERRIDE_SRC_ROOT
 784 ADD_SRC_ROOT
 785 JDK_TOPDIR
 786 NASHORN_TOPDIR
 787 HOTSPOT_TOPDIR
 788 JAXWS_TOPDIR
 789 JAXP_TOPDIR
 790 CORBA_TOPDIR
 791 LANGTOOLS_TOPDIR
 792 JAVA_FLAGS_SMALL
 793 JAVA_FLAGS_BIG
 794 JAVA_FLAGS
 795 JAVAC_FLAGS
 796 BOOT_JDK_SOURCETARGET
 797 BOOT_JDK
 798 BOOT_TOOLSJAR
 799 BOOT_RTJAR
 800 JAVA_CHECK
 801 JAVAC_CHECK
 802 COOKED_BUILD_NUMBER
 803 JDK_VERSION
 804 COPYRIGHT_YEAR
 805 MACOSX_BUNDLE_ID_BASE
 806 MACOSX_BUNDLE_NAME_BASE
 807 COMPANY_NAME
 808 JDK_RC_PLATFORM_NAME
 809 PRODUCT_SUFFIX
 810 PRODUCT_NAME
 811 LAUNCHER_NAME
 812 MILESTONE
 813 JDK_BUILD_NUMBER
 814 JDK_UPDATE_VERSION
 815 JDK_MICRO_VERSION
 816 JDK_MINOR_VERSION
 817 JDK_MAJOR_VERSION
 818 USER_RELEASE_SUFFIX
 819 COMPRESS_JARS
 820 UNLIMITED_CRYPTO
 821 CACERTS_FILE
 822 TEST_IN_BUILD
 823 BUILD_HEADLESS
 824 SUPPORT_HEADFUL
 825 SUPPORT_HEADLESS
 826 BDEPS_FTP
 827 BDEPS_UNZIP
 828 OS_VERSION_MICRO
 829 OS_VERSION_MINOR
 830 OS_VERSION_MAJOR
 831 PKG_CONFIG
 832 CODESIGN
 833 XATTR
 834 DSYMUTIL
 835 IS_GNU_TIME
 836 TIME
 837 STAT
 838 HG
 839 READELF
 840 LDD
 841 ZIP
 842 UNZIP
 843 FIND_DELETE
 844 MAKE
 845 CHECK_TOOLSDIR_MAKE
 846 CHECK_TOOLSDIR_GMAKE
 847 CHECK_MAKE
 848 CHECK_GMAKE
 849 PKGHANDLER
 850 OUTPUT_ROOT
 851 CONF_NAME
 852 SPEC
 853 BUILD_VARIANT_RELEASE
 854 DEBUG_CLASSFILES
 855 FASTDEBUG
 856 VARIANT
 857 DEBUG_LEVEL
 858 MACOSX_UNIVERSAL
 859 INCLUDE_SA
 860 JVM_VARIANT_CORE
 861 JVM_VARIANT_ZEROSHARK
 862 JVM_VARIANT_ZERO
 863 JVM_VARIANT_KERNEL
 864 JVM_VARIANT_MINIMAL1
 865 JVM_VARIANT_CLIENT
 866 JVM_VARIANT_SERVER
 867 JVM_VARIANTS
 868 JVM_INTERPRETER
 869 JDK_VARIANT
 870 SET_OPENJDK
 871 BUILD_LOG_WRAPPER
 872 BUILD_LOG_PREVIOUS
 873 BUILD_LOG
 874 SYS_ROOT
 875 PATH_SEP
 876 SRC_ROOT
 877 ZERO_ARCHDEF
 878 DEFINE_CROSS_COMPILE_ARCH
 879 LP64
 880 OPENJDK_TARGET_OS_EXPORT_DIR
 881 OPENJDK_TARGET_OS_API_DIR
 882 OPENJDK_TARGET_CPU_JLI_CFLAGS
 883 OPENJDK_TARGET_CPU_OSARCH
 884 OPENJDK_TARGET_CPU_ISADIR
 885 OPENJDK_TARGET_CPU_LIBDIR
 886 OPENJDK_TARGET_CPU_LEGACY_LIB
 887 OPENJDK_TARGET_CPU_LEGACY
 888 REQUIRED_OS_VERSION
 889 REQUIRED_OS_NAME
 890 COMPILE_TYPE
 891 OPENJDK_TARGET_CPU_ENDIAN
 892 OPENJDK_TARGET_CPU_BITS
 893 OPENJDK_TARGET_CPU_ARCH
 894 OPENJDK_TARGET_CPU
 895 OPENJDK_TARGET_OS_API
 896 OPENJDK_TARGET_OS
 897 OPENJDK_BUILD_CPU_ENDIAN
 898 OPENJDK_BUILD_CPU_BITS
 899 OPENJDK_BUILD_CPU_ARCH
 900 OPENJDK_BUILD_CPU
 901 OPENJDK_BUILD_OS_API
 902 OPENJDK_BUILD_OS
 903 OPENJDK_BUILD_AUTOCONF_NAME
 904 OPENJDK_TARGET_AUTOCONF_NAME
 905 target_os
 906 target_vendor
 907 target_cpu
 908 target
 909 host_os
 910 host_vendor
 911 host_cpu
 912 host
 913 build_os
 914 build_vendor
 915 build_cpu
 916 build
 917 SETFILE
 918 DF
 919 READLINK
 920 CYGPATH
 921 NAWK
 922 SED
 923 FGREP
 924 EGREP
 925 GREP
 926 AWK
 927 XARGS
 928 WHICH
 929 WC
 930 UNIQ
 931 UNAME
 932 TR
 933 TOUCH
 934 TEE
 935 TAR
 936 TAIL
 937 SORT
 938 SH
 939 RM
 940 PRINTF
 941 MV
 942 MKTEMP
 943 MKDIR
 944 LS
 945 LN
 946 HEAD
 947 FIND
 948 FILE
 949 EXPR
 950 ECHO
 951 DIRNAME
 952 DIFF
 953 DATE
 954 CUT
 955 CPIO
 956 CP
 957 COMM
 958 CMP
 959 CHMOD
 960 CAT
 961 BASH
 962 BASENAME
 963 DATE_WHEN_CONFIGURED
 964 CONFIGURE_COMMAND_LINE
 965 CUSTOM_MAKE_DIR
 966 target_alias
 967 host_alias
 968 build_alias
 969 LIBS
 970 ECHO_T
 971 ECHO_N
 972 ECHO_C
 973 DEFS
 974 mandir
 975 localedir
 976 libdir
 977 psdir
 978 pdfdir
 979 dvidir
 980 htmldir
 981 infodir
 982 docdir
 983 oldincludedir
 984 includedir
 985 localstatedir
 986 sharedstatedir
 987 sysconfdir
 988 datadir
 989 datarootdir
 990 libexecdir
 991 sbindir
 992 bindir
 993 program_transform_name
 994 prefix
 995 exec_prefix
 996 PACKAGE_URL
 997 PACKAGE_BUGREPORT
 998 PACKAGE_STRING
 999 PACKAGE_VERSION
1000 PACKAGE_TARNAME
1001 PACKAGE_NAME
1002 PATH_SEPARATOR
1003 SHELL'
1004 ac_subst_files=''
1005 ac_user_opts='
1006 enable_option_checking
1007 with_custom_make_dir
1008 with_target_bits
1009 with_sys_root
1010 with_tools_dir
1011 with_xcode_path
1012 with_devkit
1013 enable_openjdk_only
1014 with_jdk_variant
1015 with_jvm_interpreter
1016 with_jvm_variants
1017 enable_debug
1018 with_debug_level
1019 with_conf_name
1020 with_builddeps_conf
1021 with_builddeps_server
1022 with_builddeps_dir
1023 with_builddeps_group
1024 enable_headful
1025 enable_hotspot_test_in_build
1026 with_cacerts_file
1027 enable_unlimited_crypto
1028 with_milestone
1029 with_update_version
1030 with_user_release_suffix
1031 with_build_number
1032 with_copyright_year
1033 with_boot_jdk
1034 with_boot_jdk_jvmargs
1035 with_add_source_root
1036 with_override_source_root
1037 with_adds_and_overrides
1038 with_override_langtools
1039 with_override_corba
1040 with_override_jaxp
1041 with_override_jaxws
1042 with_override_hotspot
1043 with_override_nashorn
1044 with_override_jdk
1045 with_import_hotspot
1046 with_msvcr_dll
1047 with_dxsdk
1048 with_dxsdk_lib
1049 with_dxsdk_include
1050 with_jtreg
1051 with_extra_cflags
1052 with_extra_cxxflags
1053 with_extra_ldflags
1054 enable_debug_symbols
1055 enable_zip_debug_info
1056 enable_macosx_runtime_support
1057 with_x
1058 with_cups
1059 with_cups_include
1060 with_freetype
1061 with_freetype_include
1062 with_freetype_lib
1063 enable_freetype_bundling
1064 with_alsa
1065 with_alsa_include
1066 with_alsa_lib
1067 with_giflib
1068 with_zlib
1069 with_stdc__lib
1070 with_num_cores
1071 with_memory_size
1072 with_jobs
1073 with_sjavac_server_java
1074 enable_sjavac
1075 enable_precompiled_headers
1076 enable_ccache
1077 with_ccache_dir
1078 '
1079       ac_precious_vars='build_alias
1080 host_alias
1081 target_alias
1082 PKG_CONFIG
1083 CC
1084 CFLAGS
1085 LDFLAGS
1086 LIBS
1087 CPPFLAGS
1088 CXX
1089 CXXFLAGS
1090 CCC
1091 OBJC
1092 OBJCFLAGS
1093 CPP
1094 CXXCPP
1095 XMKMF
1096 FREETYPE_CFLAGS
1097 FREETYPE_LIBS
1098 ALSA_CFLAGS
1099 ALSA_LIBS
1100 LIBFFI_CFLAGS
1101 LIBFFI_LIBS'
1102 
1103 
1104 # Initialize some variables set by options.
1105 ac_init_help=
1106 ac_init_version=false
1107 ac_unrecognized_opts=
1108 ac_unrecognized_sep=
1109 # The variables have the same names as the options, with
1110 # dashes changed to underlines.
1111 cache_file=/dev/null
1112 exec_prefix=NONE
1113 no_create=
1114 no_recursion=
1115 prefix=NONE
1116 program_prefix=NONE
1117 program_suffix=NONE
1118 program_transform_name=s,x,x,
1119 silent=
1120 site=
1121 srcdir=
1122 verbose=
1123 x_includes=NONE
1124 x_libraries=NONE
1125 
1126 # Installation directory options.
1127 # These are left unexpanded so users can "make install exec_prefix=/foo"
1128 # and all the variables that are supposed to be based on exec_prefix
1129 # by default will actually change.
1130 # Use braces instead of parens because sh, perl, etc. also accept them.
1131 # (The list follows the same order as the GNU Coding Standards.)
1132 bindir='${exec_prefix}/bin'
1133 sbindir='${exec_prefix}/sbin'
1134 libexecdir='${exec_prefix}/libexec'
1135 datarootdir='${prefix}/share'
1136 datadir='${datarootdir}'
1137 sysconfdir='${prefix}/etc'
1138 sharedstatedir='${prefix}/com'
1139 localstatedir='${prefix}/var'
1140 includedir='${prefix}/include'
1141 oldincludedir='/usr/include'
1142 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1143 infodir='${datarootdir}/info'
1144 htmldir='${docdir}'
1145 dvidir='${docdir}'
1146 pdfdir='${docdir}'
1147 psdir='${docdir}'
1148 libdir='${exec_prefix}/lib'
1149 localedir='${datarootdir}/locale'
1150 mandir='${datarootdir}/man'
1151 
1152 ac_prev=
1153 ac_dashdash=
1154 for ac_option
1155 do
1156   # If the previous option needs an argument, assign it.
1157   if test -n "$ac_prev"; then
1158     eval $ac_prev=\$ac_option
1159     ac_prev=
1160     continue
1161   fi
1162 
1163   case $ac_option in
1164   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1165   *=)   ac_optarg= ;;
1166   *)    ac_optarg=yes ;;
1167   esac
1168 
1169   # Accept the important Cygnus configure options, so we can diagnose typos.
1170 
1171   case $ac_dashdash$ac_option in
1172   --)
1173     ac_dashdash=yes ;;
1174 
1175   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1176     ac_prev=bindir ;;
1177   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1178     bindir=$ac_optarg ;;
1179 
1180   -build | --build | --buil | --bui | --bu)
1181     ac_prev=build_alias ;;
1182   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1183     build_alias=$ac_optarg ;;
1184 
1185   -cache-file | --cache-file | --cache-fil | --cache-fi \
1186   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1187     ac_prev=cache_file ;;
1188   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1189   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1190     cache_file=$ac_optarg ;;
1191 
1192   --config-cache | -C)
1193     cache_file=config.cache ;;
1194 
1195   -datadir | --datadir | --datadi | --datad)
1196     ac_prev=datadir ;;
1197   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1198     datadir=$ac_optarg ;;
1199 
1200   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1201   | --dataroo | --dataro | --datar)
1202     ac_prev=datarootdir ;;
1203   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1204   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1205     datarootdir=$ac_optarg ;;
1206 
1207   -disable-* | --disable-*)
1208     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1209     # Reject names that are not valid shell variable names.
1210     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1211       as_fn_error $? "invalid feature name: $ac_useropt"
1212     ac_useropt_orig=$ac_useropt
1213     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214     case $ac_user_opts in
1215       *"
1216 "enable_$ac_useropt"
1217 "*) ;;
1218       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1219          ac_unrecognized_sep=', ';;
1220     esac
1221     eval enable_$ac_useropt=no ;;
1222 
1223   -docdir | --docdir | --docdi | --doc | --do)
1224     ac_prev=docdir ;;
1225   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1226     docdir=$ac_optarg ;;
1227 
1228   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1229     ac_prev=dvidir ;;
1230   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1231     dvidir=$ac_optarg ;;
1232 
1233   -enable-* | --enable-*)
1234     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1235     # Reject names that are not valid shell variable names.
1236     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1237       as_fn_error $? "invalid feature name: $ac_useropt"
1238     ac_useropt_orig=$ac_useropt
1239     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1240     case $ac_user_opts in
1241       *"
1242 "enable_$ac_useropt"
1243 "*) ;;
1244       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1245          ac_unrecognized_sep=', ';;
1246     esac
1247     eval enable_$ac_useropt=\$ac_optarg ;;
1248 
1249   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1250   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1251   | --exec | --exe | --ex)
1252     ac_prev=exec_prefix ;;
1253   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1254   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1255   | --exec=* | --exe=* | --ex=*)
1256     exec_prefix=$ac_optarg ;;
1257 
1258   -gas | --gas | --ga | --g)
1259     # Obsolete; use --with-gas.
1260     with_gas=yes ;;
1261 
1262   -help | --help | --hel | --he | -h)
1263     ac_init_help=long ;;
1264   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1265     ac_init_help=recursive ;;
1266   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1267     ac_init_help=short ;;
1268 
1269   -host | --host | --hos | --ho)
1270     ac_prev=host_alias ;;
1271   -host=* | --host=* | --hos=* | --ho=*)
1272     host_alias=$ac_optarg ;;
1273 
1274   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1275     ac_prev=htmldir ;;
1276   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1277   | --ht=*)
1278     htmldir=$ac_optarg ;;
1279 
1280   -includedir | --includedir | --includedi | --included | --include \
1281   | --includ | --inclu | --incl | --inc)
1282     ac_prev=includedir ;;
1283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1284   | --includ=* | --inclu=* | --incl=* | --inc=*)
1285     includedir=$ac_optarg ;;
1286 
1287   -infodir | --infodir | --infodi | --infod | --info | --inf)
1288     ac_prev=infodir ;;
1289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1290     infodir=$ac_optarg ;;
1291 
1292   -libdir | --libdir | --libdi | --libd)
1293     ac_prev=libdir ;;
1294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1295     libdir=$ac_optarg ;;
1296 
1297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1298   | --libexe | --libex | --libe)
1299     ac_prev=libexecdir ;;
1300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1301   | --libexe=* | --libex=* | --libe=*)
1302     libexecdir=$ac_optarg ;;
1303 
1304   -localedir | --localedir | --localedi | --localed | --locale)
1305     ac_prev=localedir ;;
1306   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1307     localedir=$ac_optarg ;;
1308 
1309   -localstatedir | --localstatedir | --localstatedi | --localstated \
1310   | --localstate | --localstat | --localsta | --localst | --locals)
1311     ac_prev=localstatedir ;;
1312   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1313   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1314     localstatedir=$ac_optarg ;;
1315 
1316   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1317     ac_prev=mandir ;;
1318   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1319     mandir=$ac_optarg ;;
1320 
1321   -nfp | --nfp | --nf)
1322     # Obsolete; use --without-fp.
1323     with_fp=no ;;
1324 
1325   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1326   | --no-cr | --no-c | -n)
1327     no_create=yes ;;
1328 
1329   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1330   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1331     no_recursion=yes ;;
1332 
1333   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1334   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1335   | --oldin | --oldi | --old | --ol | --o)
1336     ac_prev=oldincludedir ;;
1337   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1338   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1339   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1340     oldincludedir=$ac_optarg ;;
1341 
1342   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1343     ac_prev=prefix ;;
1344   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1345     prefix=$ac_optarg ;;
1346 
1347   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1348   | --program-pre | --program-pr | --program-p)
1349     ac_prev=program_prefix ;;
1350   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1351   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1352     program_prefix=$ac_optarg ;;
1353 
1354   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1355   | --program-suf | --program-su | --program-s)
1356     ac_prev=program_suffix ;;
1357   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1358   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1359     program_suffix=$ac_optarg ;;
1360 
1361   -program-transform-name | --program-transform-name \
1362   | --program-transform-nam | --program-transform-na \
1363   | --program-transform-n | --program-transform- \
1364   | --program-transform | --program-transfor \
1365   | --program-transfo | --program-transf \
1366   | --program-trans | --program-tran \
1367   | --progr-tra | --program-tr | --program-t)
1368     ac_prev=program_transform_name ;;
1369   -program-transform-name=* | --program-transform-name=* \
1370   | --program-transform-nam=* | --program-transform-na=* \
1371   | --program-transform-n=* | --program-transform-=* \
1372   | --program-transform=* | --program-transfor=* \
1373   | --program-transfo=* | --program-transf=* \
1374   | --program-trans=* | --program-tran=* \
1375   | --progr-tra=* | --program-tr=* | --program-t=*)
1376     program_transform_name=$ac_optarg ;;
1377 
1378   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1379     ac_prev=pdfdir ;;
1380   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1381     pdfdir=$ac_optarg ;;
1382 
1383   -psdir | --psdir | --psdi | --psd | --ps)
1384     ac_prev=psdir ;;
1385   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1386     psdir=$ac_optarg ;;
1387 
1388   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1389   | -silent | --silent | --silen | --sile | --sil)
1390     silent=yes ;;
1391 
1392   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1393     ac_prev=sbindir ;;
1394   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1395   | --sbi=* | --sb=*)
1396     sbindir=$ac_optarg ;;
1397 
1398   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1399   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1400   | --sharedst | --shareds | --shared | --share | --shar \
1401   | --sha | --sh)
1402     ac_prev=sharedstatedir ;;
1403   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1404   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1405   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1406   | --sha=* | --sh=*)
1407     sharedstatedir=$ac_optarg ;;
1408 
1409   -site | --site | --sit)
1410     ac_prev=site ;;
1411   -site=* | --site=* | --sit=*)
1412     site=$ac_optarg ;;
1413 
1414   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1415     ac_prev=srcdir ;;
1416   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1417     srcdir=$ac_optarg ;;
1418 
1419   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1420   | --syscon | --sysco | --sysc | --sys | --sy)
1421     ac_prev=sysconfdir ;;
1422   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1423   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1424     sysconfdir=$ac_optarg ;;
1425 
1426   -target | --target | --targe | --targ | --tar | --ta | --t)
1427     ac_prev=target_alias ;;
1428   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1429     target_alias=$ac_optarg ;;
1430 
1431   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1432     verbose=yes ;;
1433 
1434   -version | --version | --versio | --versi | --vers | -V)
1435     ac_init_version=: ;;
1436 
1437   -with-* | --with-*)
1438     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1439     # Reject names that are not valid shell variable names.
1440     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1441       as_fn_error $? "invalid package name: $ac_useropt"
1442     ac_useropt_orig=$ac_useropt
1443     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1444     case $ac_user_opts in
1445       *"
1446 "with_$ac_useropt"
1447 "*) ;;
1448       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1449          ac_unrecognized_sep=', ';;
1450     esac
1451     eval with_$ac_useropt=\$ac_optarg ;;
1452 
1453   -without-* | --without-*)
1454     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1455     # Reject names that are not valid shell variable names.
1456     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1457       as_fn_error $? "invalid package name: $ac_useropt"
1458     ac_useropt_orig=$ac_useropt
1459     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1460     case $ac_user_opts in
1461       *"
1462 "with_$ac_useropt"
1463 "*) ;;
1464       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1465          ac_unrecognized_sep=', ';;
1466     esac
1467     eval with_$ac_useropt=no ;;
1468 
1469   --x)
1470     # Obsolete; use --with-x.
1471     with_x=yes ;;
1472 
1473   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1474   | --x-incl | --x-inc | --x-in | --x-i)
1475     ac_prev=x_includes ;;
1476   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1477   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1478     x_includes=$ac_optarg ;;
1479 
1480   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1481   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1482     ac_prev=x_libraries ;;
1483   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1484   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1485     x_libraries=$ac_optarg ;;
1486 
1487   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1488 Try \`$0 --help' for more information"
1489     ;;
1490 
1491   *=*)
1492     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1493     # Reject names that are not valid shell variable names.
1494     case $ac_envvar in #(
1495       '' | [0-9]* | *[!_$as_cr_alnum]* )
1496       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1497     esac
1498     eval $ac_envvar=\$ac_optarg
1499     export $ac_envvar ;;
1500 
1501   *)
1502     # FIXME: should be removed in autoconf 3.0.
1503     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1504     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1505       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1506     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1507     ;;
1508 
1509   esac
1510 done
1511 
1512 if test -n "$ac_prev"; then
1513   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1514   as_fn_error $? "missing argument to $ac_option"
1515 fi
1516 
1517 if test -n "$ac_unrecognized_opts"; then
1518   case $enable_option_checking in
1519     no) ;;
1520     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1521     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1522   esac
1523 fi
1524 
1525 # Check all directory arguments for consistency.
1526 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1527                 datadir sysconfdir sharedstatedir localstatedir includedir \
1528                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1529                 libdir localedir mandir
1530 do
1531   eval ac_val=\$$ac_var
1532   # Remove trailing slashes.
1533   case $ac_val in
1534     */ )
1535       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1536       eval $ac_var=\$ac_val;;
1537   esac
1538   # Be sure to have absolute directory names.
1539   case $ac_val in
1540     [\\/$]* | ?:[\\/]* )  continue;;
1541     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1542   esac
1543   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1544 done
1545 
1546 # There might be people who depend on the old broken behavior: `$host'
1547 # used to hold the argument of --host etc.
1548 # FIXME: To remove some day.
1549 build=$build_alias
1550 host=$host_alias
1551 target=$target_alias
1552 
1553 # FIXME: To remove some day.
1554 if test "x$host_alias" != x; then
1555   if test "x$build_alias" = x; then
1556     cross_compiling=maybe
1557   elif test "x$build_alias" != "x$host_alias"; then
1558     cross_compiling=yes
1559   fi
1560 fi
1561 
1562 ac_tool_prefix=
1563 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1564 
1565 test "$silent" = yes && exec 6>/dev/null
1566 
1567 
1568 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1569 ac_ls_di=`ls -di .` &&
1570 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1571   as_fn_error $? "working directory cannot be determined"
1572 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1573   as_fn_error $? "pwd does not report name of working directory"
1574 
1575 
1576 # Find the source files, if location was not specified.
1577 if test -z "$srcdir"; then
1578   ac_srcdir_defaulted=yes
1579   # Try the directory containing this script, then the parent directory.
1580   ac_confdir=`$as_dirname -- "$as_myself" ||
1581 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1582          X"$as_myself" : 'X\(//\)[^/]' \| \
1583          X"$as_myself" : 'X\(//\)$' \| \
1584          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1585 $as_echo X"$as_myself" |
1586     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1587             s//\1/
1588             q
1589           }
1590           /^X\(\/\/\)[^/].*/{
1591             s//\1/
1592             q
1593           }
1594           /^X\(\/\/\)$/{
1595             s//\1/
1596             q
1597           }
1598           /^X\(\/\).*/{
1599             s//\1/
1600             q
1601           }
1602           s/.*/./; q'`
1603   srcdir=$ac_confdir
1604   if test ! -r "$srcdir/$ac_unique_file"; then
1605     srcdir=..
1606   fi
1607 else
1608   ac_srcdir_defaulted=no
1609 fi
1610 if test ! -r "$srcdir/$ac_unique_file"; then
1611   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1612   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1613 fi
1614 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1615 ac_abs_confdir=`(
1616         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1617         pwd)`
1618 # When building in place, set srcdir=.
1619 if test "$ac_abs_confdir" = "$ac_pwd"; then
1620   srcdir=.
1621 fi
1622 # Remove unnecessary trailing slashes from srcdir.
1623 # Double slashes in file names in object file debugging info
1624 # mess up M-x gdb in Emacs.
1625 case $srcdir in
1626 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1627 esac
1628 for ac_var in $ac_precious_vars; do
1629   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1630   eval ac_env_${ac_var}_value=\$${ac_var}
1631   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1632   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1633 done
1634 
1635 #
1636 # Report the --help message.
1637 #
1638 if test "$ac_init_help" = "long"; then
1639   # Omit some internal or obsolete options to make the list less imposing.
1640   # This message is too long to be a string in the A/UX 3.1 sh.
1641   cat <<_ACEOF
1642 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1643 
1644 Usage: $0 [OPTION]... [VAR=VALUE]...
1645 
1646 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1647 VAR=VALUE.  See below for descriptions of some of the useful variables.
1648 
1649 Defaults for the options are specified in brackets.
1650 
1651 Configuration:
1652   -h, --help              display this help and exit
1653       --help=short        display options specific to this package
1654       --help=recursive    display the short help of all the included packages
1655   -V, --version           display version information and exit
1656   -q, --quiet, --silent   do not print \`checking ...' messages
1657       --cache-file=FILE   cache test results in FILE [disabled]
1658   -C, --config-cache      alias for \`--cache-file=config.cache'
1659   -n, --no-create         do not create output files
1660       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1661 
1662 Installation directories:
1663   --prefix=PREFIX         install architecture-independent files in PREFIX
1664                           [$ac_default_prefix]
1665   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1666                           [PREFIX]
1667 
1668 By default, \`make install' will install all the files in
1669 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1670 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1671 for instance \`--prefix=\$HOME'.
1672 
1673 For better control, use the options below.
1674 
1675 Fine tuning of the installation directories:
1676   --bindir=DIR            user executables [EPREFIX/bin]
1677   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1678   --libexecdir=DIR        program executables [EPREFIX/libexec]
1679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1682   --libdir=DIR            object code libraries [EPREFIX/lib]
1683   --includedir=DIR        C header files [PREFIX/include]
1684   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1685   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1686   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1687   --infodir=DIR           info documentation [DATAROOTDIR/info]
1688   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1689   --mandir=DIR            man documentation [DATAROOTDIR/man]
1690   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1691   --htmldir=DIR           html documentation [DOCDIR]
1692   --dvidir=DIR            dvi documentation [DOCDIR]
1693   --pdfdir=DIR            pdf documentation [DOCDIR]
1694   --psdir=DIR             ps documentation [DOCDIR]
1695 _ACEOF
1696 
1697   cat <<\_ACEOF
1698 
1699 X features:
1700   --x-includes=DIR    X include files are in DIR
1701   --x-libraries=DIR   X library files are in DIR
1702 
1703 System types:
1704   --build=BUILD     configure for building on BUILD [guessed]
1705   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1706   --target=TARGET   configure for building compilers for TARGET [HOST]
1707 _ACEOF
1708 fi
1709 
1710 if test -n "$ac_init_help"; then
1711   case $ac_init_help in
1712      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1713    esac
1714   cat <<\_ACEOF
1715 
1716 Optional Features:
1717   --disable-option-checking  ignore unrecognized --enable/--with options
1718   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1719   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1720   --enable-openjdk-only   suppress building custom source even if present
1721                           [disabled]
1722   --enable-debug          set the debug level to fastdebug (shorthand for
1723                           --with-debug-level=fastdebug) [disabled]
1724   --disable-headful       disable building headful support (graphical UI
1725                           support) [enabled]
1726   --enable-hotspot-test-in-build
1727                           run the Queens test after Hotspot build [disabled]
1728   --enable-unlimited-crypto
1729                           Enable unlimited crypto policy [disabled]
1730   --disable-debug-symbols disable generation of debug symbols [enabled]
1731   --disable-zip-debug-info
1732                           disable zipping of debug-info files [enabled]
1733   --enable-macosx-runtime-support
1734                           Deprecated. Option is kept for backwards
1735                           compatibility and is ignored
1736   --disable-freetype-bundling
1737                           disable bundling of the freetype library with the
1738                           build result [enabled on Windows or when using
1739                           --with-freetype, disabled otherwise]
1740   --enable-sjavac         use sjavac to do fast incremental compiles
1741                           [disabled]
1742   --disable-precompiled-headers
1743                           disable using precompiled headers when compiling C++
1744                           [enabled]
1745   --disable-ccache        disable using ccache to speed up recompilations
1746                           [enabled]
1747 
1748 Optional Packages:
1749   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1750   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1751   --with-custom-make-dir  use this directory for custom build/make files
1752   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1753                           support it), e.g. --with-target-bits=32 [guessed]
1754   --with-sys-root         pass this sys-root to the compilers and tools (for
1755                           cross-compiling)
1756   --with-tools-dir        search this directory for compilers and tools (for
1757                           cross-compiling)
1758   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1759                           10.9 and later)
1760   --with-devkit           use this directory as base for tools-dir and
1761                           sys-root (for cross-compiling)
1762   --with-jdk-variant      JDK variant to build (normal) [normal]
1763   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1764   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1765                           client, minimal1, kernel, zero, zeroshark, core)
1766                           [server]
1767   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1768                           [release]
1769   --with-conf-name        use this as the name of the configuration [generated
1770                           from important configuration options]
1771   --with-builddeps-conf   use this configuration file for the builddeps
1772   --with-builddeps-server download and use build dependencies from this server
1773                           url
1774   --with-builddeps-dir    store downloaded build dependencies here
1775                           [/localhome/builddeps]
1776   --with-builddeps-group  chgrp the downloaded build dependencies to this
1777                           group
1778   --with-cacerts-file     specify alternative cacerts file
1779   --with-milestone        Set milestone value for build [internal]
1780   --with-update-version   Set update version value for build [b00]
1781   --with-user-release-suffix
1782                           Add a custom string to the version string if build
1783                           number isn't set.[username_builddateb00]
1784   --with-build-number     Set build number value for build [b00]
1785   --with-copyright-year   Set copyright year value for build [current year]
1786   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1787   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1788                           invocations of the Boot JDK, overriding the default
1789                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1790                           -enableassertions"
1791   --with-add-source-root  for each and every source directory, look in this
1792                           additional source root for the same directory; if it
1793                           exists and have files in it, include it in the build
1794   --with-override-source-root
1795                           for each and every source directory, look in this
1796                           override source root for the same directory; if it
1797                           exists, use that directory instead and ignore the
1798                           directory in the original source root
1799   --with-adds-and-overrides
1800                           use the subdirs 'adds' and 'overrides' in the
1801                           specified directory as add-source-root and
1802                           override-source-root
1803   --with-override-langtools
1804                           use this langtools dir for the build
1805   --with-override-corba   use this corba dir for the build
1806   --with-override-jaxp    use this jaxp dir for the build
1807   --with-override-jaxws   use this jaxws dir for the build
1808   --with-override-hotspot use this hotspot dir for the build
1809   --with-override-nashorn use this nashorn dir for the build
1810   --with-override-jdk     use this jdk dir for the build
1811   --with-import-hotspot   import hotspot binaries from this jdk image or
1812                           hotspot build dist dir instead of building from
1813                           source
1814   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1815                           only) [probed]
1816   --with-dxsdk            Deprecated. Option is kept for backwards
1817                           compatibility and is ignored
1818   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1819                           compatibility and is ignored
1820   --with-dxsdk-include    Deprecated. Option is kept for backwards
1821                           compatibility and is ignored
1822   --with-jtreg            Regression Test Harness [probed]
1823   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1824   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1825   --with-extra-ldflags    extra flags to be used when linking jdk
1826   --with-x                use the X Window System
1827   --with-cups             specify prefix directory for the cups package
1828                           (expecting the headers under PATH/include)
1829   --with-cups-include     specify directory for the cups include files
1830   --with-freetype         specify prefix directory for the freetype package
1831                           (expecting the libraries under PATH/lib and the
1832                           headers under PATH/include)
1833   --with-freetype-include specify directory for the freetype include files
1834   --with-freetype-lib     specify directory for the freetype library
1835   --with-alsa             specify prefix directory for the alsa package
1836                           (expecting the libraries under PATH/lib and the
1837                           headers under PATH/include)
1838   --with-alsa-include     specify directory for the alsa include files
1839   --with-alsa-lib         specify directory for the alsa library
1840   --with-giflib           use giflib from build system or OpenJDK source
1841                           (system, bundled) [bundled]
1842   --with-zlib             use zlib from build system or OpenJDK source
1843                           (system, bundled) [bundled]
1844   --with-stdc++lib=<static>,<dynamic>,<default>
1845                           force linking of the C++ runtime on Linux to either
1846                           static or dynamic, default is static with dynamic as
1847                           fallback
1848   --with-num-cores        number of cores in the build system, e.g.
1849                           --with-num-cores=8 [probed]
1850   --with-memory-size      memory (in MB) available in the build system, e.g.
1851                           --with-memory-size=1024 [probed]
1852   --with-jobs             number of parallel jobs to let make run [calculated
1853                           based on cores and memory]
1854   --with-sjavac-server-java
1855                           use this java binary for running the sjavac
1856                           background server [Boot JDK java]
1857   --with-ccache-dir       where to store ccache files [~/.ccache]
1858 
1859 Some influential environment variables:
1860   PKG_CONFIG  path to pkg-config utility
1861   CC          C compiler command
1862   CFLAGS      C compiler flags
1863   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1864               nonstandard directory <lib dir>
1865   LIBS        libraries to pass to the linker, e.g. -l<library>
1866   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1867               you have headers in a nonstandard directory <include dir>
1868   CXX         C++ compiler command
1869   CXXFLAGS    C++ compiler flags
1870   OBJC        Objective C compiler command
1871   OBJCFLAGS   Objective C compiler flags
1872   CPP         C preprocessor
1873   CXXCPP      C++ preprocessor
1874   XMKMF       Path to xmkmf, Makefile generator for X Window System
1875   FREETYPE_CFLAGS
1876               C compiler flags for FREETYPE, overriding pkg-config
1877   FREETYPE_LIBS
1878               linker flags for FREETYPE, overriding pkg-config
1879   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1880   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1881   LIBFFI_CFLAGS
1882               C compiler flags for LIBFFI, overriding pkg-config
1883   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1884 
1885 Use these variables to override the choices made by `configure' or to help
1886 it to find libraries and programs with nonstandard names/locations.
1887 
1888 Report bugs to <build-dev@openjdk.java.net>.
1889 OpenJDK home page: <http://openjdk.java.net>.
1890 _ACEOF
1891 ac_status=$?
1892 fi
1893 
1894 if test "$ac_init_help" = "recursive"; then
1895   # If there are subdirs, report their specific --help.
1896   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1897     test -d "$ac_dir" ||
1898       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1899       continue
1900     ac_builddir=.
1901 
1902 case "$ac_dir" in
1903 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1904 *)
1905   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1906   # A ".." for each directory in $ac_dir_suffix.
1907   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1908   case $ac_top_builddir_sub in
1909   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1910   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1911   esac ;;
1912 esac
1913 ac_abs_top_builddir=$ac_pwd
1914 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1915 # for backward compatibility:
1916 ac_top_builddir=$ac_top_build_prefix
1917 
1918 case $srcdir in
1919   .)  # We are building in place.
1920     ac_srcdir=.
1921     ac_top_srcdir=$ac_top_builddir_sub
1922     ac_abs_top_srcdir=$ac_pwd ;;
1923   [\\/]* | ?:[\\/]* )  # Absolute name.
1924     ac_srcdir=$srcdir$ac_dir_suffix;
1925     ac_top_srcdir=$srcdir
1926     ac_abs_top_srcdir=$srcdir ;;
1927   *) # Relative name.
1928     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1929     ac_top_srcdir=$ac_top_build_prefix$srcdir
1930     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1931 esac
1932 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1933 
1934     cd "$ac_dir" || { ac_status=$?; continue; }
1935     # Check for guested configure.
1936     if test -f "$ac_srcdir/configure.gnu"; then
1937       echo &&
1938       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1939     elif test -f "$ac_srcdir/configure"; then
1940       echo &&
1941       $SHELL "$ac_srcdir/configure" --help=recursive
1942     else
1943       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1944     fi || ac_status=$?
1945     cd "$ac_pwd" || { ac_status=$?; break; }
1946   done
1947 fi
1948 
1949 test -n "$ac_init_help" && exit $ac_status
1950 if $ac_init_version; then
1951   cat <<\_ACEOF
1952 OpenJDK configure jdk8
1953 generated by GNU Autoconf 2.69
1954 
1955 Copyright (C) 2012 Free Software Foundation, Inc.
1956 This configure script is free software; the Free Software Foundation
1957 gives unlimited permission to copy, distribute and modify it.
1958 _ACEOF
1959   exit
1960 fi
1961 
1962 ## ------------------------ ##
1963 ## Autoconf initialization. ##
1964 ## ------------------------ ##
1965 
1966 # ac_fn_c_try_compile LINENO
1967 # --------------------------
1968 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1969 ac_fn_c_try_compile ()
1970 {
1971   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972   rm -f conftest.$ac_objext
1973   if { { ac_try="$ac_compile"
1974 case "(($ac_try" in
1975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976   *) ac_try_echo=$ac_try;;
1977 esac
1978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979 $as_echo "$ac_try_echo"; } >&5
1980   (eval "$ac_compile") 2>conftest.err
1981   ac_status=$?
1982   if test -s conftest.err; then
1983     grep -v '^ *+' conftest.err >conftest.er1
1984     cat conftest.er1 >&5
1985     mv -f conftest.er1 conftest.err
1986   fi
1987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1988   test $ac_status = 0; } && {
1989          test -z "$ac_c_werror_flag" ||
1990          test ! -s conftest.err
1991        } && test -s conftest.$ac_objext; then :
1992   ac_retval=0
1993 else
1994   $as_echo "$as_me: failed program was:" >&5
1995 sed 's/^/| /' conftest.$ac_ext >&5
1996 
1997         ac_retval=1
1998 fi
1999   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2000   as_fn_set_status $ac_retval
2001 
2002 } # ac_fn_c_try_compile
2003 
2004 # ac_fn_cxx_try_compile LINENO
2005 # ----------------------------
2006 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2007 ac_fn_cxx_try_compile ()
2008 {
2009   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010   rm -f conftest.$ac_objext
2011   if { { ac_try="$ac_compile"
2012 case "(($ac_try" in
2013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2014   *) ac_try_echo=$ac_try;;
2015 esac
2016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2017 $as_echo "$ac_try_echo"; } >&5
2018   (eval "$ac_compile") 2>conftest.err
2019   ac_status=$?
2020   if test -s conftest.err; then
2021     grep -v '^ *+' conftest.err >conftest.er1
2022     cat conftest.er1 >&5
2023     mv -f conftest.er1 conftest.err
2024   fi
2025   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2026   test $ac_status = 0; } && {
2027          test -z "$ac_cxx_werror_flag" ||
2028          test ! -s conftest.err
2029        } && test -s conftest.$ac_objext; then :
2030   ac_retval=0
2031 else
2032   $as_echo "$as_me: failed program was:" >&5
2033 sed 's/^/| /' conftest.$ac_ext >&5
2034 
2035         ac_retval=1
2036 fi
2037   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2038   as_fn_set_status $ac_retval
2039 
2040 } # ac_fn_cxx_try_compile
2041 
2042 # ac_fn_objc_try_compile LINENO
2043 # -----------------------------
2044 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2045 ac_fn_objc_try_compile ()
2046 {
2047   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048   rm -f conftest.$ac_objext
2049   if { { ac_try="$ac_compile"
2050 case "(($ac_try" in
2051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2052   *) ac_try_echo=$ac_try;;
2053 esac
2054 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2055 $as_echo "$ac_try_echo"; } >&5
2056   (eval "$ac_compile") 2>conftest.err
2057   ac_status=$?
2058   if test -s conftest.err; then
2059     grep -v '^ *+' conftest.err >conftest.er1
2060     cat conftest.er1 >&5
2061     mv -f conftest.er1 conftest.err
2062   fi
2063   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2064   test $ac_status = 0; } && {
2065          test -z "$ac_objc_werror_flag" ||
2066          test ! -s conftest.err
2067        } && test -s conftest.$ac_objext; then :
2068   ac_retval=0
2069 else
2070   $as_echo "$as_me: failed program was:" >&5
2071 sed 's/^/| /' conftest.$ac_ext >&5
2072 
2073         ac_retval=1
2074 fi
2075   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2076   as_fn_set_status $ac_retval
2077 
2078 } # ac_fn_objc_try_compile
2079 
2080 # ac_fn_c_try_cpp LINENO
2081 # ----------------------
2082 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2083 ac_fn_c_try_cpp ()
2084 {
2085   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2086   if { { ac_try="$ac_cpp conftest.$ac_ext"
2087 case "(($ac_try" in
2088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2089   *) ac_try_echo=$ac_try;;
2090 esac
2091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2092 $as_echo "$ac_try_echo"; } >&5
2093   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2094   ac_status=$?
2095   if test -s conftest.err; then
2096     grep -v '^ *+' conftest.err >conftest.er1
2097     cat conftest.er1 >&5
2098     mv -f conftest.er1 conftest.err
2099   fi
2100   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2101   test $ac_status = 0; } > conftest.i && {
2102          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2103          test ! -s conftest.err
2104        }; then :
2105   ac_retval=0
2106 else
2107   $as_echo "$as_me: failed program was:" >&5
2108 sed 's/^/| /' conftest.$ac_ext >&5
2109 
2110     ac_retval=1
2111 fi
2112   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2113   as_fn_set_status $ac_retval
2114 
2115 } # ac_fn_c_try_cpp
2116 
2117 # ac_fn_cxx_try_cpp LINENO
2118 # ------------------------
2119 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2120 ac_fn_cxx_try_cpp ()
2121 {
2122   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123   if { { ac_try="$ac_cpp conftest.$ac_ext"
2124 case "(($ac_try" in
2125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2126   *) ac_try_echo=$ac_try;;
2127 esac
2128 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2129 $as_echo "$ac_try_echo"; } >&5
2130   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2131   ac_status=$?
2132   if test -s conftest.err; then
2133     grep -v '^ *+' conftest.err >conftest.er1
2134     cat conftest.er1 >&5
2135     mv -f conftest.er1 conftest.err
2136   fi
2137   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2138   test $ac_status = 0; } > conftest.i && {
2139          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2140          test ! -s conftest.err
2141        }; then :
2142   ac_retval=0
2143 else
2144   $as_echo "$as_me: failed program was:" >&5
2145 sed 's/^/| /' conftest.$ac_ext >&5
2146 
2147     ac_retval=1
2148 fi
2149   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2150   as_fn_set_status $ac_retval
2151 
2152 } # ac_fn_cxx_try_cpp
2153 
2154 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2155 # ---------------------------------------------------------
2156 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2157 # the include files in INCLUDES and setting the cache variable VAR
2158 # accordingly.
2159 ac_fn_cxx_check_header_mongrel ()
2160 {
2161   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2162   if eval \${$3+:} false; then :
2163   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2164 $as_echo_n "checking for $2... " >&6; }
2165 if eval \${$3+:} false; then :
2166   $as_echo_n "(cached) " >&6
2167 fi
2168 eval ac_res=\$$3
2169                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170 $as_echo "$ac_res" >&6; }
2171 else
2172   # Is the header compilable?
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2174 $as_echo_n "checking $2 usability... " >&6; }
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176 /* end confdefs.h.  */
2177 $4
2178 #include <$2>
2179 _ACEOF
2180 if ac_fn_cxx_try_compile "$LINENO"; then :
2181   ac_header_compiler=yes
2182 else
2183   ac_header_compiler=no
2184 fi
2185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2187 $as_echo "$ac_header_compiler" >&6; }
2188 
2189 # Is the header present?
2190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2191 $as_echo_n "checking $2 presence... " >&6; }
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193 /* end confdefs.h.  */
2194 #include <$2>
2195 _ACEOF
2196 if ac_fn_cxx_try_cpp "$LINENO"; then :
2197   ac_header_preproc=yes
2198 else
2199   ac_header_preproc=no
2200 fi
2201 rm -f conftest.err conftest.i conftest.$ac_ext
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2203 $as_echo "$ac_header_preproc" >&6; }
2204 
2205 # So?  What about this header?
2206 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2207   yes:no: )
2208     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2209 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2210     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2211 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2212     ;;
2213   no:yes:* )
2214     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2215 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2216     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2217 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2218     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2219 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2220     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2221 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2223 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2224 ( $as_echo "## ----------------------------------------- ##
2225 ## Report this to build-dev@openjdk.java.net ##
2226 ## ----------------------------------------- ##"
2227      ) | sed "s/^/$as_me: WARNING:     /" >&2
2228     ;;
2229 esac
2230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2231 $as_echo_n "checking for $2... " >&6; }
2232 if eval \${$3+:} false; then :
2233   $as_echo_n "(cached) " >&6
2234 else
2235   eval "$3=\$ac_header_compiler"
2236 fi
2237 eval ac_res=\$$3
2238                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239 $as_echo "$ac_res" >&6; }
2240 fi
2241   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242 
2243 } # ac_fn_cxx_check_header_mongrel
2244 
2245 # ac_fn_cxx_try_run LINENO
2246 # ------------------------
2247 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2248 # that executables *can* be run.
2249 ac_fn_cxx_try_run ()
2250 {
2251   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252   if { { ac_try="$ac_link"
2253 case "(($ac_try" in
2254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2255   *) ac_try_echo=$ac_try;;
2256 esac
2257 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2258 $as_echo "$ac_try_echo"; } >&5
2259   (eval "$ac_link") 2>&5
2260   ac_status=$?
2261   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2262   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2263   { { case "(($ac_try" in
2264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2265   *) ac_try_echo=$ac_try;;
2266 esac
2267 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2268 $as_echo "$ac_try_echo"; } >&5
2269   (eval "$ac_try") 2>&5
2270   ac_status=$?
2271   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2272   test $ac_status = 0; }; }; then :
2273   ac_retval=0
2274 else
2275   $as_echo "$as_me: program exited with status $ac_status" >&5
2276        $as_echo "$as_me: failed program was:" >&5
2277 sed 's/^/| /' conftest.$ac_ext >&5
2278 
2279        ac_retval=$ac_status
2280 fi
2281   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2282   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2283   as_fn_set_status $ac_retval
2284 
2285 } # ac_fn_cxx_try_run
2286 
2287 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2288 # ---------------------------------------------------------
2289 # Tests whether HEADER exists and can be compiled using the include files in
2290 # INCLUDES, setting the cache variable VAR accordingly.
2291 ac_fn_cxx_check_header_compile ()
2292 {
2293   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2295 $as_echo_n "checking for $2... " >&6; }
2296 if eval \${$3+:} false; then :
2297   $as_echo_n "(cached) " >&6
2298 else
2299   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300 /* end confdefs.h.  */
2301 $4
2302 #include <$2>
2303 _ACEOF
2304 if ac_fn_cxx_try_compile "$LINENO"; then :
2305   eval "$3=yes"
2306 else
2307   eval "$3=no"
2308 fi
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 fi
2311 eval ac_res=\$$3
2312                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2313 $as_echo "$ac_res" >&6; }
2314   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2315 
2316 } # ac_fn_cxx_check_header_compile
2317 
2318 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2319 # ----------------------------------------------
2320 # Tries to find the compile-time value of EXPR in a program that includes
2321 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2322 # computed
2323 ac_fn_cxx_compute_int ()
2324 {
2325   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2326   if test "$cross_compiling" = yes; then
2327     # Depending upon the size, compute the lo and hi bounds.
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h.  */
2330 $4
2331 int
2332 main ()
2333 {
2334 static int test_array [1 - 2 * !(($2) >= 0)];
2335 test_array [0] = 0;
2336 return test_array [0];
2337 
2338   ;
2339   return 0;
2340 }
2341 _ACEOF
2342 if ac_fn_cxx_try_compile "$LINENO"; then :
2343   ac_lo=0 ac_mid=0
2344   while :; do
2345     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346 /* end confdefs.h.  */
2347 $4
2348 int
2349 main ()
2350 {
2351 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2352 test_array [0] = 0;
2353 return test_array [0];
2354 
2355   ;
2356   return 0;
2357 }
2358 _ACEOF
2359 if ac_fn_cxx_try_compile "$LINENO"; then :
2360   ac_hi=$ac_mid; break
2361 else
2362   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2363                         if test $ac_lo -le $ac_mid; then
2364                           ac_lo= ac_hi=
2365                           break
2366                         fi
2367                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2368 fi
2369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370   done
2371 else
2372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373 /* end confdefs.h.  */
2374 $4
2375 int
2376 main ()
2377 {
2378 static int test_array [1 - 2 * !(($2) < 0)];
2379 test_array [0] = 0;
2380 return test_array [0];
2381 
2382   ;
2383   return 0;
2384 }
2385 _ACEOF
2386 if ac_fn_cxx_try_compile "$LINENO"; then :
2387   ac_hi=-1 ac_mid=-1
2388   while :; do
2389     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390 /* end confdefs.h.  */
2391 $4
2392 int
2393 main ()
2394 {
2395 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2396 test_array [0] = 0;
2397 return test_array [0];
2398 
2399   ;
2400   return 0;
2401 }
2402 _ACEOF
2403 if ac_fn_cxx_try_compile "$LINENO"; then :
2404   ac_lo=$ac_mid; break
2405 else
2406   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2407                         if test $ac_mid -le $ac_hi; then
2408                           ac_lo= ac_hi=
2409                           break
2410                         fi
2411                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2412 fi
2413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414   done
2415 else
2416   ac_lo= ac_hi=
2417 fi
2418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419 fi
2420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421 # Binary search between lo and hi bounds.
2422 while test "x$ac_lo" != "x$ac_hi"; do
2423   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425 /* end confdefs.h.  */
2426 $4
2427 int
2428 main ()
2429 {
2430 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2431 test_array [0] = 0;
2432 return test_array [0];
2433 
2434   ;
2435   return 0;
2436 }
2437 _ACEOF
2438 if ac_fn_cxx_try_compile "$LINENO"; then :
2439   ac_hi=$ac_mid
2440 else
2441   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2442 fi
2443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2444 done
2445 case $ac_lo in #((
2446 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2447 '') ac_retval=1 ;;
2448 esac
2449   else
2450     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2451 /* end confdefs.h.  */
2452 $4
2453 static long int longval () { return $2; }
2454 static unsigned long int ulongval () { return $2; }
2455 #include <stdio.h>
2456 #include <stdlib.h>
2457 int
2458 main ()
2459 {
2460 
2461   FILE *f = fopen ("conftest.val", "w");
2462   if (! f)
2463     return 1;
2464   if (($2) < 0)
2465     {
2466       long int i = longval ();
2467       if (i != ($2))
2468         return 1;
2469       fprintf (f, "%ld", i);
2470     }
2471   else
2472     {
2473       unsigned long int i = ulongval ();
2474       if (i != ($2))
2475         return 1;
2476       fprintf (f, "%lu", i);
2477     }
2478   /* Do not output a trailing newline, as this causes \r\n confusion
2479      on some platforms.  */
2480   return ferror (f) || fclose (f) != 0;
2481 
2482   ;
2483   return 0;
2484 }
2485 _ACEOF
2486 if ac_fn_cxx_try_run "$LINENO"; then :
2487   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2488 else
2489   ac_retval=1
2490 fi
2491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2492   conftest.$ac_objext conftest.beam conftest.$ac_ext
2493 rm -f conftest.val
2494 
2495   fi
2496   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2497   as_fn_set_status $ac_retval
2498 
2499 } # ac_fn_cxx_compute_int
2500 
2501 # ac_fn_cxx_try_link LINENO
2502 # -------------------------
2503 # Try to link conftest.$ac_ext, and return whether this succeeded.
2504 ac_fn_cxx_try_link ()
2505 {
2506   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2507   rm -f conftest.$ac_objext conftest$ac_exeext
2508   if { { ac_try="$ac_link"
2509 case "(($ac_try" in
2510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511   *) ac_try_echo=$ac_try;;
2512 esac
2513 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514 $as_echo "$ac_try_echo"; } >&5
2515   (eval "$ac_link") 2>conftest.err
2516   ac_status=$?
2517   if test -s conftest.err; then
2518     grep -v '^ *+' conftest.err >conftest.er1
2519     cat conftest.er1 >&5
2520     mv -f conftest.er1 conftest.err
2521   fi
2522   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523   test $ac_status = 0; } && {
2524          test -z "$ac_cxx_werror_flag" ||
2525          test ! -s conftest.err
2526        } && test -s conftest$ac_exeext && {
2527          test "$cross_compiling" = yes ||
2528          test -x conftest$ac_exeext
2529        }; then :
2530   ac_retval=0
2531 else
2532   $as_echo "$as_me: failed program was:" >&5
2533 sed 's/^/| /' conftest.$ac_ext >&5
2534 
2535         ac_retval=1
2536 fi
2537   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2538   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2539   # interfere with the next link command; also delete a directory that is
2540   # left behind by Apple's compiler.  We do this before executing the actions.
2541   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2542   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2543   as_fn_set_status $ac_retval
2544 
2545 } # ac_fn_cxx_try_link
2546 
2547 # ac_fn_cxx_check_func LINENO FUNC VAR
2548 # ------------------------------------
2549 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2550 ac_fn_cxx_check_func ()
2551 {
2552   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2554 $as_echo_n "checking for $2... " >&6; }
2555 if eval \${$3+:} false; then :
2556   $as_echo_n "(cached) " >&6
2557 else
2558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2559 /* end confdefs.h.  */
2560 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2561    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2562 #define $2 innocuous_$2
2563 
2564 /* System header to define __stub macros and hopefully few prototypes,
2565     which can conflict with char $2 (); below.
2566     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2567     <limits.h> exists even on freestanding compilers.  */
2568 
2569 #ifdef __STDC__
2570 # include <limits.h>
2571 #else
2572 # include <assert.h>
2573 #endif
2574 
2575 #undef $2
2576 
2577 /* Override any GCC internal prototype to avoid an error.
2578    Use char because int might match the return type of a GCC
2579    builtin and then its argument prototype would still apply.  */
2580 #ifdef __cplusplus
2581 extern "C"
2582 #endif
2583 char $2 ();
2584 /* The GNU C library defines this for functions which it implements
2585     to always fail with ENOSYS.  Some functions are actually named
2586     something starting with __ and the normal name is an alias.  */
2587 #if defined __stub_$2 || defined __stub___$2
2588 choke me
2589 #endif
2590 
2591 int
2592 main ()
2593 {
2594 return $2 ();
2595   ;
2596   return 0;
2597 }
2598 _ACEOF
2599 if ac_fn_cxx_try_link "$LINENO"; then :
2600   eval "$3=yes"
2601 else
2602   eval "$3=no"
2603 fi
2604 rm -f core conftest.err conftest.$ac_objext \
2605     conftest$ac_exeext conftest.$ac_ext
2606 fi
2607 eval ac_res=\$$3
2608                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2609 $as_echo "$ac_res" >&6; }
2610   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2611 
2612 } # ac_fn_cxx_check_func
2613 
2614 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2615 # -------------------------------------------------------
2616 # Tests whether HEADER exists and can be compiled using the include files in
2617 # INCLUDES, setting the cache variable VAR accordingly.
2618 ac_fn_c_check_header_compile ()
2619 {
2620   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2622 $as_echo_n "checking for $2... " >&6; }
2623 if eval \${$3+:} false; then :
2624   $as_echo_n "(cached) " >&6
2625 else
2626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627 /* end confdefs.h.  */
2628 $4
2629 #include <$2>
2630 _ACEOF
2631 if ac_fn_c_try_compile "$LINENO"; then :
2632   eval "$3=yes"
2633 else
2634   eval "$3=no"
2635 fi
2636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637 fi
2638 eval ac_res=\$$3
2639                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2640 $as_echo "$ac_res" >&6; }
2641   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2642 
2643 } # ac_fn_c_check_header_compile
2644 cat >config.log <<_ACEOF
2645 This file contains any messages produced by compilers while
2646 running configure, to aid debugging if configure makes a mistake.
2647 
2648 It was created by OpenJDK $as_me jdk8, which was
2649 generated by GNU Autoconf 2.69.  Invocation command line was
2650 
2651   $ $0 $@
2652 
2653 _ACEOF
2654 exec 5>>config.log
2655 {
2656 cat <<_ASUNAME
2657 ## --------- ##
2658 ## Platform. ##
2659 ## --------- ##
2660 
2661 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2662 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2663 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2664 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2665 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2666 
2667 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2668 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2669 
2670 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2671 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2672 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2673 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2674 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2675 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2676 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2677 
2678 _ASUNAME
2679 
2680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2681 for as_dir in $PATH
2682 do
2683   IFS=$as_save_IFS
2684   test -z "$as_dir" && as_dir=.
2685     $as_echo "PATH: $as_dir"
2686   done
2687 IFS=$as_save_IFS
2688 
2689 } >&5
2690 
2691 cat >&5 <<_ACEOF
2692 
2693 
2694 ## ----------- ##
2695 ## Core tests. ##
2696 ## ----------- ##
2697 
2698 _ACEOF
2699 
2700 
2701 # Keep a trace of the command line.
2702 # Strip out --no-create and --no-recursion so they do not pile up.
2703 # Strip out --silent because we don't want to record it for future runs.
2704 # Also quote any args containing shell meta-characters.
2705 # Make two passes to allow for proper duplicate-argument suppression.
2706 ac_configure_args=
2707 ac_configure_args0=
2708 ac_configure_args1=
2709 ac_must_keep_next=false
2710 for ac_pass in 1 2
2711 do
2712   for ac_arg
2713   do
2714     case $ac_arg in
2715     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2716     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2717     | -silent | --silent | --silen | --sile | --sil)
2718       continue ;;
2719     *\'*)
2720       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2721     esac
2722     case $ac_pass in
2723     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2724     2)
2725       as_fn_append ac_configure_args1 " '$ac_arg'"
2726       if test $ac_must_keep_next = true; then
2727         ac_must_keep_next=false # Got value, back to normal.
2728       else
2729         case $ac_arg in
2730           *=* | --config-cache | -C | -disable-* | --disable-* \
2731           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2732           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2733           | -with-* | --with-* | -without-* | --without-* | --x)
2734             case "$ac_configure_args0 " in
2735               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2736             esac
2737             ;;
2738           -* ) ac_must_keep_next=true ;;
2739         esac
2740       fi
2741       as_fn_append ac_configure_args " '$ac_arg'"
2742       ;;
2743     esac
2744   done
2745 done
2746 { ac_configure_args0=; unset ac_configure_args0;}
2747 { ac_configure_args1=; unset ac_configure_args1;}
2748 
2749 # When interrupted or exit'd, cleanup temporary files, and complete
2750 # config.log.  We remove comments because anyway the quotes in there
2751 # would cause problems or look ugly.
2752 # WARNING: Use '\'' to represent an apostrophe within the trap.
2753 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2754 trap 'exit_status=$?
2755   # Save into config.log some information that might help in debugging.
2756   {
2757     echo
2758 
2759     $as_echo "## ---------------- ##
2760 ## Cache variables. ##
2761 ## ---------------- ##"
2762     echo
2763     # The following way of writing the cache mishandles newlines in values,
2764 (
2765   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2766     eval ac_val=\$$ac_var
2767     case $ac_val in #(
2768     *${as_nl}*)
2769       case $ac_var in #(
2770       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2771 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2772       esac
2773       case $ac_var in #(
2774       _ | IFS | as_nl) ;; #(
2775       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2776       *) { eval $ac_var=; unset $ac_var;} ;;
2777       esac ;;
2778     esac
2779   done
2780   (set) 2>&1 |
2781     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2782     *${as_nl}ac_space=\ *)
2783       sed -n \
2784         "s/'\''/'\''\\\\'\'''\''/g;
2785           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2786       ;; #(
2787     *)
2788       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2789       ;;
2790     esac |
2791     sort
2792 )
2793     echo
2794 
2795     $as_echo "## ----------------- ##
2796 ## Output variables. ##
2797 ## ----------------- ##"
2798     echo
2799     for ac_var in $ac_subst_vars
2800     do
2801       eval ac_val=\$$ac_var
2802       case $ac_val in
2803       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2804       esac
2805       $as_echo "$ac_var='\''$ac_val'\''"
2806     done | sort
2807     echo
2808 
2809     if test -n "$ac_subst_files"; then
2810       $as_echo "## ------------------- ##
2811 ## File substitutions. ##
2812 ## ------------------- ##"
2813       echo
2814       for ac_var in $ac_subst_files
2815       do
2816         eval ac_val=\$$ac_var
2817         case $ac_val in
2818         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2819         esac
2820         $as_echo "$ac_var='\''$ac_val'\''"
2821       done | sort
2822       echo
2823     fi
2824 
2825     if test -s confdefs.h; then
2826       $as_echo "## ----------- ##
2827 ## confdefs.h. ##
2828 ## ----------- ##"
2829       echo
2830       cat confdefs.h
2831       echo
2832     fi
2833     test "$ac_signal" != 0 &&
2834       $as_echo "$as_me: caught signal $ac_signal"
2835     $as_echo "$as_me: exit $exit_status"
2836   } >&5
2837   rm -f core *.core core.conftest.* &&
2838     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2839     exit $exit_status
2840 ' 0
2841 for ac_signal in 1 2 13 15; do
2842   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2843 done
2844 ac_signal=0
2845 
2846 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2847 rm -f -r conftest* confdefs.h
2848 
2849 $as_echo "/* confdefs.h */" > confdefs.h
2850 
2851 # Predefined preprocessor variables.
2852 
2853 cat >>confdefs.h <<_ACEOF
2854 #define PACKAGE_NAME "$PACKAGE_NAME"
2855 _ACEOF
2856 
2857 cat >>confdefs.h <<_ACEOF
2858 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2859 _ACEOF
2860 
2861 cat >>confdefs.h <<_ACEOF
2862 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2863 _ACEOF
2864 
2865 cat >>confdefs.h <<_ACEOF
2866 #define PACKAGE_STRING "$PACKAGE_STRING"
2867 _ACEOF
2868 
2869 cat >>confdefs.h <<_ACEOF
2870 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2871 _ACEOF
2872 
2873 cat >>confdefs.h <<_ACEOF
2874 #define PACKAGE_URL "$PACKAGE_URL"
2875 _ACEOF
2876 
2877 
2878 # Let the site file select an alternate cache file if it wants to.
2879 # Prefer an explicitly selected file to automatically selected ones.
2880 ac_site_file1=NONE
2881 ac_site_file2=NONE
2882 if test -n "$CONFIG_SITE"; then
2883   # We do not want a PATH search for config.site.
2884   case $CONFIG_SITE in #((
2885     -*)  ac_site_file1=./$CONFIG_SITE;;
2886     */*) ac_site_file1=$CONFIG_SITE;;
2887     *)   ac_site_file1=./$CONFIG_SITE;;
2888   esac
2889 elif test "x$prefix" != xNONE; then
2890   ac_site_file1=$prefix/share/config.site
2891   ac_site_file2=$prefix/etc/config.site
2892 else
2893   ac_site_file1=$ac_default_prefix/share/config.site
2894   ac_site_file2=$ac_default_prefix/etc/config.site
2895 fi
2896 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2897 do
2898   test "x$ac_site_file" = xNONE && continue
2899   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2900     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2901 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2902     sed 's/^/| /' "$ac_site_file" >&5
2903     . "$ac_site_file" \
2904       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2906 as_fn_error $? "failed to load site script $ac_site_file
2907 See \`config.log' for more details" "$LINENO" 5; }
2908   fi
2909 done
2910 
2911 if test -r "$cache_file"; then
2912   # Some versions of bash will fail to source /dev/null (special files
2913   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2914   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2915     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2916 $as_echo "$as_me: loading cache $cache_file" >&6;}
2917     case $cache_file in
2918       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2919       *)                      . "./$cache_file";;
2920     esac
2921   fi
2922 else
2923   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2924 $as_echo "$as_me: creating cache $cache_file" >&6;}
2925   >$cache_file
2926 fi
2927 
2928 # Check that the precious variables saved in the cache have kept the same
2929 # value.
2930 ac_cache_corrupted=false
2931 for ac_var in $ac_precious_vars; do
2932   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2933   eval ac_new_set=\$ac_env_${ac_var}_set
2934   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2935   eval ac_new_val=\$ac_env_${ac_var}_value
2936   case $ac_old_set,$ac_new_set in
2937     set,)
2938       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2939 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2940       ac_cache_corrupted=: ;;
2941     ,set)
2942       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2943 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2944       ac_cache_corrupted=: ;;
2945     ,);;
2946     *)
2947       if test "x$ac_old_val" != "x$ac_new_val"; then
2948         # differences in whitespace do not lead to failure.
2949         ac_old_val_w=`echo x $ac_old_val`
2950         ac_new_val_w=`echo x $ac_new_val`
2951         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2952           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2953 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2954           ac_cache_corrupted=:
2955         else
2956           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2957 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2958           eval $ac_var=\$ac_old_val
2959         fi
2960         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2961 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2962         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2963 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2964       fi;;
2965   esac
2966   # Pass precious variables to config.status.
2967   if test "$ac_new_set" = set; then
2968     case $ac_new_val in
2969     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2970     *) ac_arg=$ac_var=$ac_new_val ;;
2971     esac
2972     case " $ac_configure_args " in
2973       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2974       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2975     esac
2976   fi
2977 done
2978 if $ac_cache_corrupted; then
2979   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2980 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2981   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2982 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2983   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2984 fi
2985 ## -------------------- ##
2986 ## Main body of script. ##
2987 ## -------------------- ##
2988 
2989 ac_ext=c
2990 ac_cpp='$CPP $CPPFLAGS'
2991 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2992 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2993 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2994 
2995 
2996 
2997 ac_aux_dir=
2998 for ac_dir in build-aux "$srcdir"/build-aux; do
2999   if test -f "$ac_dir/install-sh"; then
3000     ac_aux_dir=$ac_dir
3001     ac_install_sh="$ac_aux_dir/install-sh -c"
3002     break
3003   elif test -f "$ac_dir/install.sh"; then
3004     ac_aux_dir=$ac_dir
3005     ac_install_sh="$ac_aux_dir/install.sh -c"
3006     break
3007   elif test -f "$ac_dir/shtool"; then
3008     ac_aux_dir=$ac_dir
3009     ac_install_sh="$ac_aux_dir/shtool install -c"
3010     break
3011   fi
3012 done
3013 if test -z "$ac_aux_dir"; then
3014   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3015 fi
3016 
3017 # These three variables are undocumented and unsupported,
3018 # and are intended to be withdrawn in a future Autoconf release.
3019 # They can cause serious problems if a builder's source tree is in a directory
3020 # whose full name contains unusual characters.
3021 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3022 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3023 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3024 
3025 
3026 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3027 
3028 #
3029 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3030 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3031 #
3032 # This code is free software; you can redistribute it and/or modify it
3033 # under the terms of the GNU General Public License version 2 only, as
3034 # published by the Free Software Foundation.  Oracle designates this
3035 # particular file as subject to the "Classpath" exception as provided
3036 # by Oracle in the LICENSE file that accompanied this code.
3037 #
3038 # This code is distributed in the hope that it will be useful, but WITHOUT
3039 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3040 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3041 # version 2 for more details (a copy is included in the LICENSE file that
3042 # accompanied this code).
3043 #
3044 # You should have received a copy of the GNU General Public License version
3045 # 2 along with this work; if not, write to the Free Software Foundation,
3046 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3047 #
3048 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3049 # or visit www.oracle.com if you need additional information or have any
3050 # questions.
3051 #
3052 
3053 #
3054 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3055 #
3056 # This program is free software; you can redistribute it and/or modify
3057 # it under the terms of the GNU General Public License as published by
3058 # the Free Software Foundation; either version 2 of the License, or
3059 # (at your option) any later version.
3060 #
3061 # This program is distributed in the hope that it will be useful, but
3062 # WITHOUT ANY WARRANTY; without even the implied warranty of
3063 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3064 # General Public License for more details.
3065 #
3066 # You should have received a copy of the GNU General Public License
3067 # along with this program; if not, write to the Free Software
3068 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3069 #
3070 # As a special exception to the GNU General Public License, if you
3071 # distribute this file as part of a program that contains a
3072 # configuration script generated by Autoconf, you may include it under
3073 # the same distribution terms that you use for the rest of that program.
3074 
3075 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3076 # ----------------------------------
3077 # PKG_PROG_PKG_CONFIG
3078 
3079 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3080 #
3081 # Check to see whether a particular set of modules exists.  Similar
3082 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3083 #
3084 #
3085 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3086 # this or PKG_CHECK_MODULES is called, or make sure to call
3087 # PKG_CHECK_EXISTS manually
3088 # --------------------------------------------------------------
3089 
3090 
3091 
3092 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3093 # ---------------------------------------------
3094 # _PKG_CONFIG
3095 
3096 # _PKG_SHORT_ERRORS_SUPPORTED
3097 # -----------------------------
3098 # _PKG_SHORT_ERRORS_SUPPORTED
3099 
3100 
3101 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3102 # [ACTION-IF-NOT-FOUND])
3103 #
3104 #
3105 # Note that if there is a possibility the first call to
3106 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3107 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3108 #
3109 #
3110 # --------------------------------------------------------------
3111 # PKG_CHECK_MODULES
3112 
3113 
3114 # Include these first...
3115 #
3116 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3117 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3118 #
3119 # This code is free software; you can redistribute it and/or modify it
3120 # under the terms of the GNU General Public License version 2 only, as
3121 # published by the Free Software Foundation.  Oracle designates this
3122 # particular file as subject to the "Classpath" exception as provided
3123 # by Oracle in the LICENSE file that accompanied this code.
3124 #
3125 # This code is distributed in the hope that it will be useful, but WITHOUT
3126 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3127 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3128 # version 2 for more details (a copy is included in the LICENSE file that
3129 # accompanied this code).
3130 #
3131 # You should have received a copy of the GNU General Public License version
3132 # 2 along with this work; if not, write to the Free Software Foundation,
3133 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3134 #
3135 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3136 # or visit www.oracle.com if you need additional information or have any
3137 # questions.
3138 #
3139 
3140 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3141 # If so, then append $1 to $2 \
3142 # Also set JVM_ARG_OK to true/false depending on outcome.
3143 
3144 
3145 # Appends a string to a path variable, only adding the : when needed.
3146 
3147 
3148 # This will make sure the given variable points to a full and proper
3149 # path. This means:
3150 # 1) There will be no spaces in the path. On posix platforms,
3151 #    spaces in the path will result in an error. On Windows,
3152 #    the path will be rewritten using short-style to be space-free.
3153 # 2) The path will be absolute, and it will be in unix-style (on
3154 #     cygwin).
3155 # $1: The name of the variable to fix
3156 
3157 
3158 # This will make sure the given variable points to a executable
3159 # with a full and proper path. This means:
3160 # 1) There will be no spaces in the path. On posix platforms,
3161 #    spaces in the path will result in an error. On Windows,
3162 #    the path will be rewritten using short-style to be space-free.
3163 # 2) The path will be absolute, and it will be in unix-style (on
3164 #     cygwin).
3165 # Any arguments given to the executable is preserved.
3166 # If the input variable does not have a directory specification, then
3167 # it need to be in the PATH.
3168 # $1: The name of the variable to fix
3169 
3170 
3171 
3172 
3173 # Register a --with argument but mark it as deprecated
3174 # $1: The name of the with argument to deprecate, not including --with-
3175 
3176 
3177 # Register a --enable argument but mark it as deprecated
3178 # $1: The name of the with argument to deprecate, not including --enable-
3179 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3180 
3181 
3182 
3183 
3184 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3185 # $1: variable to check
3186 # $2: executable name to print in warning (optional)
3187 
3188 
3189 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3190 # Arguments as AC_PATH_PROG:
3191 # $1: variable to set
3192 # $2: executable name to look for
3193 
3194 
3195 # Setup the most fundamental tools that relies on not much else to set up,
3196 # but is used by much of the early bootstrap code.
3197 
3198 
3199 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3200 
3201 
3202 
3203 
3204 
3205 
3206 
3207 #%%% Simple tools %%%
3208 
3209 # Check if we have found a usable version of make
3210 # $1: the path to a potential make binary (or empty)
3211 # $2: the description on how we found this
3212 
3213 
3214 # Goes looking for a usable version of GNU make.
3215 
3216 
3217 
3218 
3219 
3220 
3221 # Check if build directory is on local disk. If not possible to determine,
3222 # we prefer to claim it's local.
3223 # Argument 1: directory to test
3224 # Argument 2: what to do if it is on local disk
3225 # Argument 3: what to do otherwise (remote disk or failure)
3226 
3227 
3228 # Check that source files have basic read permissions set. This might
3229 # not be the case in cygwin in certain conditions.
3230 
3231 
3232 
3233 
3234 #
3235 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3236 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3237 #
3238 # This code is free software; you can redistribute it and/or modify it
3239 # under the terms of the GNU General Public License version 2 only, as
3240 # published by the Free Software Foundation.  Oracle designates this
3241 # particular file as subject to the "Classpath" exception as provided
3242 # by Oracle in the LICENSE file that accompanied this code.
3243 #
3244 # This code is distributed in the hope that it will be useful, but WITHOUT
3245 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3246 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3247 # version 2 for more details (a copy is included in the LICENSE file that
3248 # accompanied this code).
3249 #
3250 # You should have received a copy of the GNU General Public License version
3251 # 2 along with this work; if not, write to the Free Software Foundation,
3252 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3253 #
3254 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3255 # or visit www.oracle.com if you need additional information or have any
3256 # questions.
3257 #
3258 
3259 
3260 
3261 
3262 
3263 # Helper function which possibly converts a path using DOS-style short mode.
3264 # If so, the updated path is stored in $new_path.
3265 # $1: The path to check
3266 
3267 
3268 # Helper function which possibly converts a path using DOS-style short mode.
3269 # If so, the updated path is stored in $new_path.
3270 # $1: The path to check
3271 
3272 
3273 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3274 # and could probably be heavily simplified. However, all changes in this
3275 # area tend to need lot of testing in different scenarios, and in lack of
3276 # proper unit testing, cleaning this up has not been deemed worth the effort
3277 # at the moment.
3278 
3279 
3280 
3281 
3282 
3283 
3284 
3285 
3286 
3287 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3288 
3289 
3290 
3291 
3292 #
3293 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3294 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3295 #
3296 # This code is free software; you can redistribute it and/or modify it
3297 # under the terms of the GNU General Public License version 2 only, as
3298 # published by the Free Software Foundation.  Oracle designates this
3299 # particular file as subject to the "Classpath" exception as provided
3300 # by Oracle in the LICENSE file that accompanied this code.
3301 #
3302 # This code is distributed in the hope that it will be useful, but WITHOUT
3303 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3304 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3305 # version 2 for more details (a copy is included in the LICENSE file that
3306 # accompanied this code).
3307 #
3308 # You should have received a copy of the GNU General Public License version
3309 # 2 along with this work; if not, write to the Free Software Foundation,
3310 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3311 #
3312 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3313 # or visit www.oracle.com if you need additional information or have any
3314 # questions.
3315 #
3316 
3317 
3318 
3319 
3320 
3321 
3322 
3323 
3324 
3325 
3326 
3327 # ... then the rest
3328 #
3329 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3330 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3331 #
3332 # This code is free software; you can redistribute it and/or modify it
3333 # under the terms of the GNU General Public License version 2 only, as
3334 # published by the Free Software Foundation.  Oracle designates this
3335 # particular file as subject to the "Classpath" exception as provided
3336 # by Oracle in the LICENSE file that accompanied this code.
3337 #
3338 # This code is distributed in the hope that it will be useful, but WITHOUT
3339 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3340 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3341 # version 2 for more details (a copy is included in the LICENSE file that
3342 # accompanied this code).
3343 #
3344 # You should have received a copy of the GNU General Public License version
3345 # 2 along with this work; if not, write to the Free Software Foundation,
3346 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3347 #
3348 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3349 # or visit www.oracle.com if you need additional information or have any
3350 # questions.
3351 #
3352 
3353 # Execute the check given as argument, and verify the result
3354 # If the Boot JDK was previously found, do nothing
3355 # $1 A command line (typically autoconf macro) to execute
3356 
3357 
3358 # Test: Is bootjdk explicitely set by command line arguments?
3359 
3360 
3361 # Test: Is bootjdk available from builddeps?
3362 
3363 
3364 # Test: Is $JAVA_HOME set?
3365 
3366 
3367 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3368 
3369 
3370 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3371 
3372 
3373 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3374 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3375 # $1 = Path to directory containing jdk installations.
3376 # $2 = String to append to the found JDK directory to get the proper JDK home
3377 
3378 
3379 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3380 # environmental variable as base for where to look.
3381 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3382 
3383 
3384 # Test: Is there a JDK installed in default, well-known locations?
3385 
3386 
3387 # Check that a command-line tool in the Boot JDK is correct
3388 # $1 = name of variable to assign
3389 # $2 = name of binary
3390 
3391 
3392 ###############################################################################
3393 #
3394 # We need a Boot JDK to bootstrap the build.
3395 #
3396 
3397 
3398 
3399 
3400 
3401 #
3402 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3403 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3404 #
3405 # This code is free software; you can redistribute it and/or modify it
3406 # under the terms of the GNU General Public License version 2 only, as
3407 # published by the Free Software Foundation.  Oracle designates this
3408 # particular file as subject to the "Classpath" exception as provided
3409 # by Oracle in the LICENSE file that accompanied this code.
3410 #
3411 # This code is distributed in the hope that it will be useful, but WITHOUT
3412 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3413 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3414 # version 2 for more details (a copy is included in the LICENSE file that
3415 # accompanied this code).
3416 #
3417 # You should have received a copy of the GNU General Public License version
3418 # 2 along with this work; if not, write to the Free Software Foundation,
3419 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3420 #
3421 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3422 # or visit www.oracle.com if you need additional information or have any
3423 # questions.
3424 #
3425 
3426 
3427 
3428 
3429 
3430 
3431 
3432 
3433 
3434 
3435 
3436 
3437 
3438 
3439 
3440 
3441 
3442 
3443 
3444 
3445 #
3446 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3447 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3448 #
3449 # This code is free software; you can redistribute it and/or modify it
3450 # under the terms of the GNU General Public License version 2 only, as
3451 # published by the Free Software Foundation.  Oracle designates this
3452 # particular file as subject to the "Classpath" exception as provided
3453 # by Oracle in the LICENSE file that accompanied this code.
3454 #
3455 # This code is distributed in the hope that it will be useful, but WITHOUT
3456 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3457 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3458 # version 2 for more details (a copy is included in the LICENSE file that
3459 # accompanied this code).
3460 #
3461 # You should have received a copy of the GNU General Public License version
3462 # 2 along with this work; if not, write to the Free Software Foundation,
3463 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3464 #
3465 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3466 # or visit www.oracle.com if you need additional information or have any
3467 # questions.
3468 #
3469 
3470 
3471 
3472 
3473 
3474 cygwin_help() {
3475   case $1 in
3476     unzip)
3477       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3478       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3479       ;;
3480     zip)
3481       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3482       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3483       ;;
3484     make)
3485       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3486       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3487       ;;
3488     freetype)
3489       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3490         HELP_MSG="To install freetype, run:
3491 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3492 chmod +x /tmp/freetype-setup.exe
3493 /tmp/freetype-setup.exe
3494 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3495 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3496       else
3497         HELP_MSG="You need to build a 64-bit version of freetype.
3498 This is not readily available.
3499 You can find source code and build instructions on
3500 http://www.freetype.org/
3501 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3502       fi
3503       ;;
3504   esac
3505 }
3506 
3507 msys_help() {
3508   PKGHANDLER_COMMAND=""
3509 }
3510 
3511 apt_help() {
3512   case $1 in
3513     devkit)
3514       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3515     openjdk)
3516       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3517     alsa)
3518       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3519     cups)
3520       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3521     freetype)
3522       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3523     pulse)
3524       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3525     x11)
3526       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3527     ccache)
3528       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3529   esac
3530 }
3531 
3532 yum_help() {
3533   case $1 in
3534     devkit)
3535       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3536     openjdk)
3537       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3538     alsa)
3539       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3540     cups)
3541       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3542     freetype)
3543       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3544     pulse)
3545       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3546     x11)
3547       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3548     ccache)
3549       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3550   esac
3551 }
3552 
3553 port_help() {
3554   PKGHANDLER_COMMAND=""
3555 }
3556 
3557 pkgutil_help() {
3558   PKGHANDLER_COMMAND=""
3559 }
3560 
3561 pkgadd_help() {
3562   PKGHANDLER_COMMAND=""
3563 }
3564 
3565 
3566 
3567 #
3568 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3569 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3570 #
3571 # This code is free software; you can redistribute it and/or modify it
3572 # under the terms of the GNU General Public License version 2 only, as
3573 # published by the Free Software Foundation.  Oracle designates this
3574 # particular file as subject to the "Classpath" exception as provided
3575 # by Oracle in the LICENSE file that accompanied this code.
3576 #
3577 # This code is distributed in the hope that it will be useful, but WITHOUT
3578 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3579 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3580 # version 2 for more details (a copy is included in the LICENSE file that
3581 # accompanied this code).
3582 #
3583 # You should have received a copy of the GNU General Public License version
3584 # 2 along with this work; if not, write to the Free Software Foundation,
3585 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3586 #
3587 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3588 # or visit www.oracle.com if you need additional information or have any
3589 # questions.
3590 #
3591 
3592 
3593 
3594 
3595 
3596 
3597 
3598 
3599 
3600 
3601 ###############################################################################
3602 #
3603 # Should we build only OpenJDK even if closed sources are present?
3604 #
3605 
3606 
3607 
3608 
3609 ###############################################################################
3610 #
3611 # Setup version numbers
3612 #
3613 
3614 
3615 
3616 
3617 
3618 
3619 # Support for customization of the build process. Some build files
3620 # will include counterparts from this location, if they exist. This allows
3621 # for a degree of customization of the build targets and the rules/recipes
3622 # to create them
3623 
3624 # Check whether --with-custom-make-dir was given.
3625 if test "${with_custom_make_dir+set}" = set; then :
3626   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3627 fi
3628 
3629 
3630 
3631 #
3632 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3633 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3634 #
3635 # This code is free software; you can redistribute it and/or modify it
3636 # under the terms of the GNU General Public License version 2 only, as
3637 # published by the Free Software Foundation.  Oracle designates this
3638 # particular file as subject to the "Classpath" exception as provided
3639 # by Oracle in the LICENSE file that accompanied this code.
3640 #
3641 # This code is distributed in the hope that it will be useful, but WITHOUT
3642 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3643 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3644 # version 2 for more details (a copy is included in the LICENSE file that
3645 # accompanied this code).
3646 #
3647 # You should have received a copy of the GNU General Public License version
3648 # 2 along with this work; if not, write to the Free Software Foundation,
3649 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3650 #
3651 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3652 # or visit www.oracle.com if you need additional information or have any
3653 # questions.
3654 #
3655 
3656 
3657 
3658 
3659 
3660 
3661 
3662 
3663 
3664 
3665 
3666 
3667 
3668 
3669 
3670 
3671 
3672 #
3673 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3674 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3675 #
3676 # This code is free software; you can redistribute it and/or modify it
3677 # under the terms of the GNU General Public License version 2 only, as
3678 # published by the Free Software Foundation.  Oracle designates this
3679 # particular file as subject to the "Classpath" exception as provided
3680 # by Oracle in the LICENSE file that accompanied this code.
3681 #
3682 # This code is distributed in the hope that it will be useful, but WITHOUT
3683 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3684 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3685 # version 2 for more details (a copy is included in the LICENSE file that
3686 # accompanied this code).
3687 #
3688 # You should have received a copy of the GNU General Public License version
3689 # 2 along with this work; if not, write to the Free Software Foundation,
3690 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3691 #
3692 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3693 # or visit www.oracle.com if you need additional information or have any
3694 # questions.
3695 #
3696 
3697 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3698 # Converts autoconf style CPU name to OpenJDK style, into
3699 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3700 
3701 
3702 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3703 # Converts autoconf style OS name to OpenJDK style, into
3704 # VAR_OS and VAR_OS_API.
3705 
3706 
3707 # Expects $host_os $host_cpu $build_os and $build_cpu
3708 # and $with_target_bits to have been setup!
3709 #
3710 # Translate the standard triplet(quadruplet) definition
3711 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3712 # OPENJDK_BUILD_OS, etc.
3713 
3714 
3715 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3716 # accordingly. Must be done after setting up build and target system, but before
3717 # doing anything else with these values.
3718 
3719 
3720 # Setup the legacy variables, for controlling the old makefiles.
3721 #
3722 
3723 
3724 
3725 
3726 #%%% Build and target systems %%%
3727 
3728 
3729 
3730 
3731 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3732 # Add -mX to various FLAGS variables.
3733 
3734 
3735 
3736 
3737 
3738 
3739 #
3740 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742 #
3743 # This code is free software; you can redistribute it and/or modify it
3744 # under the terms of the GNU General Public License version 2 only, as
3745 # published by the Free Software Foundation.  Oracle designates this
3746 # particular file as subject to the "Classpath" exception as provided
3747 # by Oracle in the LICENSE file that accompanied this code.
3748 #
3749 # This code is distributed in the hope that it will be useful, but WITHOUT
3750 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752 # version 2 for more details (a copy is included in the LICENSE file that
3753 # accompanied this code).
3754 #
3755 # You should have received a copy of the GNU General Public License version
3756 # 2 along with this work; if not, write to the Free Software Foundation,
3757 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758 #
3759 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760 # or visit www.oracle.com if you need additional information or have any
3761 # questions.
3762 #
3763 
3764 
3765 
3766 
3767 
3768 
3769 
3770 
3771 #
3772 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3773 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3774 #
3775 # This code is free software; you can redistribute it and/or modify it
3776 # under the terms of the GNU General Public License version 2 only, as
3777 # published by the Free Software Foundation.  Oracle designates this
3778 # particular file as subject to the "Classpath" exception as provided
3779 # by Oracle in the LICENSE file that accompanied this code.
3780 #
3781 # This code is distributed in the hope that it will be useful, but WITHOUT
3782 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3783 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3784 # version 2 for more details (a copy is included in the LICENSE file that
3785 # accompanied this code).
3786 #
3787 # You should have received a copy of the GNU General Public License version
3788 # 2 along with this work; if not, write to the Free Software Foundation,
3789 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3790 #
3791 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3792 # or visit www.oracle.com if you need additional information or have any
3793 # questions.
3794 #
3795 
3796 # $1 = compiler to test (CC or CXX)
3797 # $2 = human readable name of compiler (C or C++)
3798 
3799 
3800 
3801 
3802 
3803 # $1 = compiler to test (CC or CXX)
3804 # $2 = human readable name of compiler (C or C++)
3805 # $3 = list of compiler names to search for
3806 
3807 
3808 
3809 
3810 
3811 
3812 
3813 
3814 
3815 
3816 
3817 
3818 
3819 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3820 #                                   [RUN-IF-FALSE])
3821 # ------------------------------------------------------------
3822 # Check that the c and c++ compilers support an argument
3823 
3824 
3825 
3826 
3827 # Setup the JTREG paths
3828 
3829 
3830 #
3831 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3832 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3833 #
3834 # This code is free software; you can redistribute it and/or modify it
3835 # under the terms of the GNU General Public License version 2 only, as
3836 # published by the Free Software Foundation.  Oracle designates this
3837 # particular file as subject to the "Classpath" exception as provided
3838 # by Oracle in the LICENSE file that accompanied this code.
3839 #
3840 # This code is distributed in the hope that it will be useful, but WITHOUT
3841 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3842 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3843 # version 2 for more details (a copy is included in the LICENSE file that
3844 # accompanied this code).
3845 #
3846 # You should have received a copy of the GNU General Public License version
3847 # 2 along with this work; if not, write to the Free Software Foundation,
3848 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3849 #
3850 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3851 # or visit www.oracle.com if you need additional information or have any
3852 # questions.
3853 #
3854 
3855 
3856 
3857 
3858 
3859 
3860 
3861 # Check if the VS env variables were setup prior to running configure.
3862 # If not, then find vcvarsall.bat and run it automatically, and integrate
3863 # the set env variables into the spec file.
3864 
3865 
3866 
3867 
3868 
3869 
3870 
3871 
3872 
3873 
3874 
3875 # This line needs to be here, verbatim, after all includes and the dummy hook
3876 # definitions. It is replaced with custom functionality when building
3877 # custom sources.
3878 #CUSTOM_AUTOCONF_INCLUDE
3879 
3880 # Do not change or remove the following line, it is needed for consistency checks:
3881 DATE_WHEN_GENERATED=1430836833
3882 
3883 ###############################################################################
3884 #
3885 # Initialization / Boot-strapping
3886 #
3887 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3888 # thus it jumps back and forth, each time gaining something needed later on.
3889 #
3890 ###############################################################################
3891 
3892 # Basic initialization that must happen first of all
3893 
3894   # Save the original command line. This is passed to us by the wrapper configure script.
3895 
3896   DATE_WHEN_CONFIGURED=`LANG=C date`
3897 
3898   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3899 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3900   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3901 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3902 
3903 
3904 
3905   # Start with tools that do not need have cross compilation support
3906   # and can be expected to be found in the default PATH. These tools are
3907   # used by configure. Nor are these tools expected to be found in the
3908   # devkit from the builddeps server either, since they are
3909   # needed to download the devkit.
3910 
3911   # First are all the simple required tools.
3912 
3913   for ac_prog in basename
3914 do
3915   # Extract the first word of "$ac_prog", so it can be a program name with args.
3916 set dummy $ac_prog; ac_word=$2
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3918 $as_echo_n "checking for $ac_word... " >&6; }
3919 if ${ac_cv_path_BASENAME+:} false; then :
3920   $as_echo_n "(cached) " >&6
3921 else
3922   case $BASENAME in
3923   [\\/]* | ?:[\\/]*)
3924   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3925   ;;
3926   *)
3927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3928 for as_dir in $PATH
3929 do
3930   IFS=$as_save_IFS
3931   test -z "$as_dir" && as_dir=.
3932     for ac_exec_ext in '' $ac_executable_extensions; do
3933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3934     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3936     break 2
3937   fi
3938 done
3939   done
3940 IFS=$as_save_IFS
3941 
3942   ;;
3943 esac
3944 fi
3945 BASENAME=$ac_cv_path_BASENAME
3946 if test -n "$BASENAME"; then
3947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3948 $as_echo "$BASENAME" >&6; }
3949 else
3950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3951 $as_echo "no" >&6; }
3952 fi
3953 
3954 
3955   test -n "$BASENAME" && break
3956 done
3957 
3958 
3959   if test "x$BASENAME" = x; then
3960     if test "xbasename" = x; then
3961       PROG_NAME=basename
3962     else
3963       PROG_NAME=basename
3964     fi
3965     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3966 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3967     as_fn_error $? "Cannot continue" "$LINENO" 5
3968   fi
3969 
3970 
3971 
3972   for ac_prog in bash
3973 do
3974   # Extract the first word of "$ac_prog", so it can be a program name with args.
3975 set dummy $ac_prog; ac_word=$2
3976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3977 $as_echo_n "checking for $ac_word... " >&6; }
3978 if ${ac_cv_path_BASH+:} false; then :
3979   $as_echo_n "(cached) " >&6
3980 else
3981   case $BASH in
3982   [\\/]* | ?:[\\/]*)
3983   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3984   ;;
3985   *)
3986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3987 for as_dir in $PATH
3988 do
3989   IFS=$as_save_IFS
3990   test -z "$as_dir" && as_dir=.
3991     for ac_exec_ext in '' $ac_executable_extensions; do
3992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3993     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3995     break 2
3996   fi
3997 done
3998   done
3999 IFS=$as_save_IFS
4000 
4001   ;;
4002 esac
4003 fi
4004 BASH=$ac_cv_path_BASH
4005 if test -n "$BASH"; then
4006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4007 $as_echo "$BASH" >&6; }
4008 else
4009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4010 $as_echo "no" >&6; }
4011 fi
4012 
4013 
4014   test -n "$BASH" && break
4015 done
4016 
4017 
4018   if test "x$BASH" = x; then
4019     if test "xbash" = x; then
4020       PROG_NAME=bash
4021     else
4022       PROG_NAME=bash
4023     fi
4024     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4025 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4026     as_fn_error $? "Cannot continue" "$LINENO" 5
4027   fi
4028 
4029 
4030 
4031   for ac_prog in cat
4032 do
4033   # Extract the first word of "$ac_prog", so it can be a program name with args.
4034 set dummy $ac_prog; ac_word=$2
4035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4036 $as_echo_n "checking for $ac_word... " >&6; }
4037 if ${ac_cv_path_CAT+:} false; then :
4038   $as_echo_n "(cached) " >&6
4039 else
4040   case $CAT in
4041   [\\/]* | ?:[\\/]*)
4042   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4043   ;;
4044   *)
4045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4046 for as_dir in $PATH
4047 do
4048   IFS=$as_save_IFS
4049   test -z "$as_dir" && as_dir=.
4050     for ac_exec_ext in '' $ac_executable_extensions; do
4051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4052     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4054     break 2
4055   fi
4056 done
4057   done
4058 IFS=$as_save_IFS
4059 
4060   ;;
4061 esac
4062 fi
4063 CAT=$ac_cv_path_CAT
4064 if test -n "$CAT"; then
4065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4066 $as_echo "$CAT" >&6; }
4067 else
4068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4069 $as_echo "no" >&6; }
4070 fi
4071 
4072 
4073   test -n "$CAT" && break
4074 done
4075 
4076 
4077   if test "x$CAT" = x; then
4078     if test "xcat" = x; then
4079       PROG_NAME=cat
4080     else
4081       PROG_NAME=cat
4082     fi
4083     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4084 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4085     as_fn_error $? "Cannot continue" "$LINENO" 5
4086   fi
4087 
4088 
4089 
4090   for ac_prog in chmod
4091 do
4092   # Extract the first word of "$ac_prog", so it can be a program name with args.
4093 set dummy $ac_prog; ac_word=$2
4094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4095 $as_echo_n "checking for $ac_word... " >&6; }
4096 if ${ac_cv_path_CHMOD+:} false; then :
4097   $as_echo_n "(cached) " >&6
4098 else
4099   case $CHMOD in
4100   [\\/]* | ?:[\\/]*)
4101   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4102   ;;
4103   *)
4104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4105 for as_dir in $PATH
4106 do
4107   IFS=$as_save_IFS
4108   test -z "$as_dir" && as_dir=.
4109     for ac_exec_ext in '' $ac_executable_extensions; do
4110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4111     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4113     break 2
4114   fi
4115 done
4116   done
4117 IFS=$as_save_IFS
4118 
4119   ;;
4120 esac
4121 fi
4122 CHMOD=$ac_cv_path_CHMOD
4123 if test -n "$CHMOD"; then
4124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4125 $as_echo "$CHMOD" >&6; }
4126 else
4127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4128 $as_echo "no" >&6; }
4129 fi
4130 
4131 
4132   test -n "$CHMOD" && break
4133 done
4134 
4135 
4136   if test "x$CHMOD" = x; then
4137     if test "xchmod" = x; then
4138       PROG_NAME=chmod
4139     else
4140       PROG_NAME=chmod
4141     fi
4142     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4143 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4144     as_fn_error $? "Cannot continue" "$LINENO" 5
4145   fi
4146 
4147 
4148 
4149   for ac_prog in cmp
4150 do
4151   # Extract the first word of "$ac_prog", so it can be a program name with args.
4152 set dummy $ac_prog; ac_word=$2
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4154 $as_echo_n "checking for $ac_word... " >&6; }
4155 if ${ac_cv_path_CMP+:} false; then :
4156   $as_echo_n "(cached) " >&6
4157 else
4158   case $CMP in
4159   [\\/]* | ?:[\\/]*)
4160   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4161   ;;
4162   *)
4163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4164 for as_dir in $PATH
4165 do
4166   IFS=$as_save_IFS
4167   test -z "$as_dir" && as_dir=.
4168     for ac_exec_ext in '' $ac_executable_extensions; do
4169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4170     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4172     break 2
4173   fi
4174 done
4175   done
4176 IFS=$as_save_IFS
4177 
4178   ;;
4179 esac
4180 fi
4181 CMP=$ac_cv_path_CMP
4182 if test -n "$CMP"; then
4183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4184 $as_echo "$CMP" >&6; }
4185 else
4186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4187 $as_echo "no" >&6; }
4188 fi
4189 
4190 
4191   test -n "$CMP" && break
4192 done
4193 
4194 
4195   if test "x$CMP" = x; then
4196     if test "xcmp" = x; then
4197       PROG_NAME=cmp
4198     else
4199       PROG_NAME=cmp
4200     fi
4201     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4202 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4203     as_fn_error $? "Cannot continue" "$LINENO" 5
4204   fi
4205 
4206 
4207 
4208   for ac_prog in comm
4209 do
4210   # Extract the first word of "$ac_prog", so it can be a program name with args.
4211 set dummy $ac_prog; ac_word=$2
4212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4213 $as_echo_n "checking for $ac_word... " >&6; }
4214 if ${ac_cv_path_COMM+:} false; then :
4215   $as_echo_n "(cached) " >&6
4216 else
4217   case $COMM in
4218   [\\/]* | ?:[\\/]*)
4219   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4220   ;;
4221   *)
4222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223 for as_dir in $PATH
4224 do
4225   IFS=$as_save_IFS
4226   test -z "$as_dir" && as_dir=.
4227     for ac_exec_ext in '' $ac_executable_extensions; do
4228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4229     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4231     break 2
4232   fi
4233 done
4234   done
4235 IFS=$as_save_IFS
4236 
4237   ;;
4238 esac
4239 fi
4240 COMM=$ac_cv_path_COMM
4241 if test -n "$COMM"; then
4242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4243 $as_echo "$COMM" >&6; }
4244 else
4245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4246 $as_echo "no" >&6; }
4247 fi
4248 
4249 
4250   test -n "$COMM" && break
4251 done
4252 
4253 
4254   if test "x$COMM" = x; then
4255     if test "xcomm" = x; then
4256       PROG_NAME=comm
4257     else
4258       PROG_NAME=comm
4259     fi
4260     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4261 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4262     as_fn_error $? "Cannot continue" "$LINENO" 5
4263   fi
4264 
4265 
4266 
4267   for ac_prog in cp
4268 do
4269   # Extract the first word of "$ac_prog", so it can be a program name with args.
4270 set dummy $ac_prog; ac_word=$2
4271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4272 $as_echo_n "checking for $ac_word... " >&6; }
4273 if ${ac_cv_path_CP+:} false; then :
4274   $as_echo_n "(cached) " >&6
4275 else
4276   case $CP in
4277   [\\/]* | ?:[\\/]*)
4278   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4279   ;;
4280   *)
4281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4282 for as_dir in $PATH
4283 do
4284   IFS=$as_save_IFS
4285   test -z "$as_dir" && as_dir=.
4286     for ac_exec_ext in '' $ac_executable_extensions; do
4287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4288     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4290     break 2
4291   fi
4292 done
4293   done
4294 IFS=$as_save_IFS
4295 
4296   ;;
4297 esac
4298 fi
4299 CP=$ac_cv_path_CP
4300 if test -n "$CP"; then
4301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4302 $as_echo "$CP" >&6; }
4303 else
4304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4305 $as_echo "no" >&6; }
4306 fi
4307 
4308 
4309   test -n "$CP" && break
4310 done
4311 
4312 
4313   if test "x$CP" = x; then
4314     if test "xcp" = x; then
4315       PROG_NAME=cp
4316     else
4317       PROG_NAME=cp
4318     fi
4319     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4320 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4321     as_fn_error $? "Cannot continue" "$LINENO" 5
4322   fi
4323 
4324 
4325 
4326   for ac_prog in cpio
4327 do
4328   # Extract the first word of "$ac_prog", so it can be a program name with args.
4329 set dummy $ac_prog; ac_word=$2
4330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4331 $as_echo_n "checking for $ac_word... " >&6; }
4332 if ${ac_cv_path_CPIO+:} false; then :
4333   $as_echo_n "(cached) " >&6
4334 else
4335   case $CPIO in
4336   [\\/]* | ?:[\\/]*)
4337   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4338   ;;
4339   *)
4340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4341 for as_dir in $PATH
4342 do
4343   IFS=$as_save_IFS
4344   test -z "$as_dir" && as_dir=.
4345     for ac_exec_ext in '' $ac_executable_extensions; do
4346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4347     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4349     break 2
4350   fi
4351 done
4352   done
4353 IFS=$as_save_IFS
4354 
4355   ;;
4356 esac
4357 fi
4358 CPIO=$ac_cv_path_CPIO
4359 if test -n "$CPIO"; then
4360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4361 $as_echo "$CPIO" >&6; }
4362 else
4363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4364 $as_echo "no" >&6; }
4365 fi
4366 
4367 
4368   test -n "$CPIO" && break
4369 done
4370 
4371 
4372   if test "x$CPIO" = x; then
4373     if test "xcpio" = x; then
4374       PROG_NAME=cpio
4375     else
4376       PROG_NAME=cpio
4377     fi
4378     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4379 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4380     as_fn_error $? "Cannot continue" "$LINENO" 5
4381   fi
4382 
4383 
4384 
4385   for ac_prog in cut
4386 do
4387   # Extract the first word of "$ac_prog", so it can be a program name with args.
4388 set dummy $ac_prog; ac_word=$2
4389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4390 $as_echo_n "checking for $ac_word... " >&6; }
4391 if ${ac_cv_path_CUT+:} false; then :
4392   $as_echo_n "(cached) " >&6
4393 else
4394   case $CUT in
4395   [\\/]* | ?:[\\/]*)
4396   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4397   ;;
4398   *)
4399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400 for as_dir in $PATH
4401 do
4402   IFS=$as_save_IFS
4403   test -z "$as_dir" && as_dir=.
4404     for ac_exec_ext in '' $ac_executable_extensions; do
4405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4406     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4408     break 2
4409   fi
4410 done
4411   done
4412 IFS=$as_save_IFS
4413 
4414   ;;
4415 esac
4416 fi
4417 CUT=$ac_cv_path_CUT
4418 if test -n "$CUT"; then
4419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4420 $as_echo "$CUT" >&6; }
4421 else
4422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4423 $as_echo "no" >&6; }
4424 fi
4425 
4426 
4427   test -n "$CUT" && break
4428 done
4429 
4430 
4431   if test "x$CUT" = x; then
4432     if test "xcut" = x; then
4433       PROG_NAME=cut
4434     else
4435       PROG_NAME=cut
4436     fi
4437     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4438 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4439     as_fn_error $? "Cannot continue" "$LINENO" 5
4440   fi
4441 
4442 
4443 
4444   for ac_prog in date
4445 do
4446   # Extract the first word of "$ac_prog", so it can be a program name with args.
4447 set dummy $ac_prog; ac_word=$2
4448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4449 $as_echo_n "checking for $ac_word... " >&6; }
4450 if ${ac_cv_path_DATE+:} false; then :
4451   $as_echo_n "(cached) " >&6
4452 else
4453   case $DATE in
4454   [\\/]* | ?:[\\/]*)
4455   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4456   ;;
4457   *)
4458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459 for as_dir in $PATH
4460 do
4461   IFS=$as_save_IFS
4462   test -z "$as_dir" && as_dir=.
4463     for ac_exec_ext in '' $ac_executable_extensions; do
4464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4465     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4467     break 2
4468   fi
4469 done
4470   done
4471 IFS=$as_save_IFS
4472 
4473   ;;
4474 esac
4475 fi
4476 DATE=$ac_cv_path_DATE
4477 if test -n "$DATE"; then
4478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4479 $as_echo "$DATE" >&6; }
4480 else
4481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4482 $as_echo "no" >&6; }
4483 fi
4484 
4485 
4486   test -n "$DATE" && break
4487 done
4488 
4489 
4490   if test "x$DATE" = x; then
4491     if test "xdate" = x; then
4492       PROG_NAME=date
4493     else
4494       PROG_NAME=date
4495     fi
4496     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4497 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4498     as_fn_error $? "Cannot continue" "$LINENO" 5
4499   fi
4500 
4501 
4502 
4503   for ac_prog in gdiff diff
4504 do
4505   # Extract the first word of "$ac_prog", so it can be a program name with args.
4506 set dummy $ac_prog; ac_word=$2
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4508 $as_echo_n "checking for $ac_word... " >&6; }
4509 if ${ac_cv_path_DIFF+:} false; then :
4510   $as_echo_n "(cached) " >&6
4511 else
4512   case $DIFF in
4513   [\\/]* | ?:[\\/]*)
4514   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4515   ;;
4516   *)
4517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518 for as_dir in $PATH
4519 do
4520   IFS=$as_save_IFS
4521   test -z "$as_dir" && as_dir=.
4522     for ac_exec_ext in '' $ac_executable_extensions; do
4523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4524     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526     break 2
4527   fi
4528 done
4529   done
4530 IFS=$as_save_IFS
4531 
4532   ;;
4533 esac
4534 fi
4535 DIFF=$ac_cv_path_DIFF
4536 if test -n "$DIFF"; then
4537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4538 $as_echo "$DIFF" >&6; }
4539 else
4540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4541 $as_echo "no" >&6; }
4542 fi
4543 
4544 
4545   test -n "$DIFF" && break
4546 done
4547 
4548 
4549   if test "x$DIFF" = x; then
4550     if test "xgdiff diff" = x; then
4551       PROG_NAME=diff
4552     else
4553       PROG_NAME=gdiff diff
4554     fi
4555     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4556 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4557     as_fn_error $? "Cannot continue" "$LINENO" 5
4558   fi
4559 
4560 
4561 
4562   for ac_prog in dirname
4563 do
4564   # Extract the first word of "$ac_prog", so it can be a program name with args.
4565 set dummy $ac_prog; ac_word=$2
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567 $as_echo_n "checking for $ac_word... " >&6; }
4568 if ${ac_cv_path_DIRNAME+:} false; then :
4569   $as_echo_n "(cached) " >&6
4570 else
4571   case $DIRNAME in
4572   [\\/]* | ?:[\\/]*)
4573   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4574   ;;
4575   *)
4576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577 for as_dir in $PATH
4578 do
4579   IFS=$as_save_IFS
4580   test -z "$as_dir" && as_dir=.
4581     for ac_exec_ext in '' $ac_executable_extensions; do
4582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4583     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4585     break 2
4586   fi
4587 done
4588   done
4589 IFS=$as_save_IFS
4590 
4591   ;;
4592 esac
4593 fi
4594 DIRNAME=$ac_cv_path_DIRNAME
4595 if test -n "$DIRNAME"; then
4596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4597 $as_echo "$DIRNAME" >&6; }
4598 else
4599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600 $as_echo "no" >&6; }
4601 fi
4602 
4603 
4604   test -n "$DIRNAME" && break
4605 done
4606 
4607 
4608   if test "x$DIRNAME" = x; then
4609     if test "xdirname" = x; then
4610       PROG_NAME=dirname
4611     else
4612       PROG_NAME=dirname
4613     fi
4614     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4615 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4616     as_fn_error $? "Cannot continue" "$LINENO" 5
4617   fi
4618 
4619 
4620 
4621   for ac_prog in echo
4622 do
4623   # Extract the first word of "$ac_prog", so it can be a program name with args.
4624 set dummy $ac_prog; ac_word=$2
4625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626 $as_echo_n "checking for $ac_word... " >&6; }
4627 if ${ac_cv_path_ECHO+:} false; then :
4628   $as_echo_n "(cached) " >&6
4629 else
4630   case $ECHO in
4631   [\\/]* | ?:[\\/]*)
4632   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4633   ;;
4634   *)
4635   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636 for as_dir in $PATH
4637 do
4638   IFS=$as_save_IFS
4639   test -z "$as_dir" && as_dir=.
4640     for ac_exec_ext in '' $ac_executable_extensions; do
4641   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4642     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644     break 2
4645   fi
4646 done
4647   done
4648 IFS=$as_save_IFS
4649 
4650   ;;
4651 esac
4652 fi
4653 ECHO=$ac_cv_path_ECHO
4654 if test -n "$ECHO"; then
4655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4656 $as_echo "$ECHO" >&6; }
4657 else
4658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659 $as_echo "no" >&6; }
4660 fi
4661 
4662 
4663   test -n "$ECHO" && break
4664 done
4665 
4666 
4667   if test "x$ECHO" = x; then
4668     if test "xecho" = x; then
4669       PROG_NAME=echo
4670     else
4671       PROG_NAME=echo
4672     fi
4673     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4674 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4675     as_fn_error $? "Cannot continue" "$LINENO" 5
4676   fi
4677 
4678 
4679 
4680   for ac_prog in expr
4681 do
4682   # Extract the first word of "$ac_prog", so it can be a program name with args.
4683 set dummy $ac_prog; ac_word=$2
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685 $as_echo_n "checking for $ac_word... " >&6; }
4686 if ${ac_cv_path_EXPR+:} false; then :
4687   $as_echo_n "(cached) " >&6
4688 else
4689   case $EXPR in
4690   [\\/]* | ?:[\\/]*)
4691   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4692   ;;
4693   *)
4694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695 for as_dir in $PATH
4696 do
4697   IFS=$as_save_IFS
4698   test -z "$as_dir" && as_dir=.
4699     for ac_exec_ext in '' $ac_executable_extensions; do
4700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4701     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703     break 2
4704   fi
4705 done
4706   done
4707 IFS=$as_save_IFS
4708 
4709   ;;
4710 esac
4711 fi
4712 EXPR=$ac_cv_path_EXPR
4713 if test -n "$EXPR"; then
4714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4715 $as_echo "$EXPR" >&6; }
4716 else
4717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718 $as_echo "no" >&6; }
4719 fi
4720 
4721 
4722   test -n "$EXPR" && break
4723 done
4724 
4725 
4726   if test "x$EXPR" = x; then
4727     if test "xexpr" = x; then
4728       PROG_NAME=expr
4729     else
4730       PROG_NAME=expr
4731     fi
4732     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4733 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4734     as_fn_error $? "Cannot continue" "$LINENO" 5
4735   fi
4736 
4737 
4738 
4739   for ac_prog in file
4740 do
4741   # Extract the first word of "$ac_prog", so it can be a program name with args.
4742 set dummy $ac_prog; ac_word=$2
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744 $as_echo_n "checking for $ac_word... " >&6; }
4745 if ${ac_cv_path_FILE+:} false; then :
4746   $as_echo_n "(cached) " >&6
4747 else
4748   case $FILE in
4749   [\\/]* | ?:[\\/]*)
4750   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4751   ;;
4752   *)
4753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754 for as_dir in $PATH
4755 do
4756   IFS=$as_save_IFS
4757   test -z "$as_dir" && as_dir=.
4758     for ac_exec_ext in '' $ac_executable_extensions; do
4759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4760     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4762     break 2
4763   fi
4764 done
4765   done
4766 IFS=$as_save_IFS
4767 
4768   ;;
4769 esac
4770 fi
4771 FILE=$ac_cv_path_FILE
4772 if test -n "$FILE"; then
4773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4774 $as_echo "$FILE" >&6; }
4775 else
4776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777 $as_echo "no" >&6; }
4778 fi
4779 
4780 
4781   test -n "$FILE" && break
4782 done
4783 
4784 
4785   if test "x$FILE" = x; then
4786     if test "xfile" = x; then
4787       PROG_NAME=file
4788     else
4789       PROG_NAME=file
4790     fi
4791     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4792 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4793     as_fn_error $? "Cannot continue" "$LINENO" 5
4794   fi
4795 
4796 
4797 
4798   for ac_prog in find
4799 do
4800   # Extract the first word of "$ac_prog", so it can be a program name with args.
4801 set dummy $ac_prog; ac_word=$2
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4803 $as_echo_n "checking for $ac_word... " >&6; }
4804 if ${ac_cv_path_FIND+:} false; then :
4805   $as_echo_n "(cached) " >&6
4806 else
4807   case $FIND in
4808   [\\/]* | ?:[\\/]*)
4809   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4810   ;;
4811   *)
4812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4813 for as_dir in $PATH
4814 do
4815   IFS=$as_save_IFS
4816   test -z "$as_dir" && as_dir=.
4817     for ac_exec_ext in '' $ac_executable_extensions; do
4818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4819     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4821     break 2
4822   fi
4823 done
4824   done
4825 IFS=$as_save_IFS
4826 
4827   ;;
4828 esac
4829 fi
4830 FIND=$ac_cv_path_FIND
4831 if test -n "$FIND"; then
4832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4833 $as_echo "$FIND" >&6; }
4834 else
4835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4836 $as_echo "no" >&6; }
4837 fi
4838 
4839 
4840   test -n "$FIND" && break
4841 done
4842 
4843 
4844   if test "x$FIND" = x; then
4845     if test "xfind" = x; then
4846       PROG_NAME=find
4847     else
4848       PROG_NAME=find
4849     fi
4850     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4851 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4852     as_fn_error $? "Cannot continue" "$LINENO" 5
4853   fi
4854 
4855 
4856 
4857   for ac_prog in head
4858 do
4859   # Extract the first word of "$ac_prog", so it can be a program name with args.
4860 set dummy $ac_prog; ac_word=$2
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4862 $as_echo_n "checking for $ac_word... " >&6; }
4863 if ${ac_cv_path_HEAD+:} false; then :
4864   $as_echo_n "(cached) " >&6
4865 else
4866   case $HEAD in
4867   [\\/]* | ?:[\\/]*)
4868   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4869   ;;
4870   *)
4871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4872 for as_dir in $PATH
4873 do
4874   IFS=$as_save_IFS
4875   test -z "$as_dir" && as_dir=.
4876     for ac_exec_ext in '' $ac_executable_extensions; do
4877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4878     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4880     break 2
4881   fi
4882 done
4883   done
4884 IFS=$as_save_IFS
4885 
4886   ;;
4887 esac
4888 fi
4889 HEAD=$ac_cv_path_HEAD
4890 if test -n "$HEAD"; then
4891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4892 $as_echo "$HEAD" >&6; }
4893 else
4894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895 $as_echo "no" >&6; }
4896 fi
4897 
4898 
4899   test -n "$HEAD" && break
4900 done
4901 
4902 
4903   if test "x$HEAD" = x; then
4904     if test "xhead" = x; then
4905       PROG_NAME=head
4906     else
4907       PROG_NAME=head
4908     fi
4909     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4910 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4911     as_fn_error $? "Cannot continue" "$LINENO" 5
4912   fi
4913 
4914 
4915 
4916   for ac_prog in ln
4917 do
4918   # Extract the first word of "$ac_prog", so it can be a program name with args.
4919 set dummy $ac_prog; ac_word=$2
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921 $as_echo_n "checking for $ac_word... " >&6; }
4922 if ${ac_cv_path_LN+:} false; then :
4923   $as_echo_n "(cached) " >&6
4924 else
4925   case $LN in
4926   [\\/]* | ?:[\\/]*)
4927   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4928   ;;
4929   *)
4930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931 for as_dir in $PATH
4932 do
4933   IFS=$as_save_IFS
4934   test -z "$as_dir" && as_dir=.
4935     for ac_exec_ext in '' $ac_executable_extensions; do
4936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4937     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939     break 2
4940   fi
4941 done
4942   done
4943 IFS=$as_save_IFS
4944 
4945   ;;
4946 esac
4947 fi
4948 LN=$ac_cv_path_LN
4949 if test -n "$LN"; then
4950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4951 $as_echo "$LN" >&6; }
4952 else
4953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954 $as_echo "no" >&6; }
4955 fi
4956 
4957 
4958   test -n "$LN" && break
4959 done
4960 
4961 
4962   if test "x$LN" = x; then
4963     if test "xln" = x; then
4964       PROG_NAME=ln
4965     else
4966       PROG_NAME=ln
4967     fi
4968     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4969 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4970     as_fn_error $? "Cannot continue" "$LINENO" 5
4971   fi
4972 
4973 
4974 
4975   for ac_prog in ls
4976 do
4977   # Extract the first word of "$ac_prog", so it can be a program name with args.
4978 set dummy $ac_prog; ac_word=$2
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980 $as_echo_n "checking for $ac_word... " >&6; }
4981 if ${ac_cv_path_LS+:} false; then :
4982   $as_echo_n "(cached) " >&6
4983 else
4984   case $LS in
4985   [\\/]* | ?:[\\/]*)
4986   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4987   ;;
4988   *)
4989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990 for as_dir in $PATH
4991 do
4992   IFS=$as_save_IFS
4993   test -z "$as_dir" && as_dir=.
4994     for ac_exec_ext in '' $ac_executable_extensions; do
4995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4996     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4998     break 2
4999   fi
5000 done
5001   done
5002 IFS=$as_save_IFS
5003 
5004   ;;
5005 esac
5006 fi
5007 LS=$ac_cv_path_LS
5008 if test -n "$LS"; then
5009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5010 $as_echo "$LS" >&6; }
5011 else
5012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013 $as_echo "no" >&6; }
5014 fi
5015 
5016 
5017   test -n "$LS" && break
5018 done
5019 
5020 
5021   if test "x$LS" = x; then
5022     if test "xls" = x; then
5023       PROG_NAME=ls
5024     else
5025       PROG_NAME=ls
5026     fi
5027     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5028 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5029     as_fn_error $? "Cannot continue" "$LINENO" 5
5030   fi
5031 
5032 
5033 
5034   for ac_prog in mkdir
5035 do
5036   # Extract the first word of "$ac_prog", so it can be a program name with args.
5037 set dummy $ac_prog; ac_word=$2
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039 $as_echo_n "checking for $ac_word... " >&6; }
5040 if ${ac_cv_path_MKDIR+:} false; then :
5041   $as_echo_n "(cached) " >&6
5042 else
5043   case $MKDIR in
5044   [\\/]* | ?:[\\/]*)
5045   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5046   ;;
5047   *)
5048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049 for as_dir in $PATH
5050 do
5051   IFS=$as_save_IFS
5052   test -z "$as_dir" && as_dir=.
5053     for ac_exec_ext in '' $ac_executable_extensions; do
5054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057     break 2
5058   fi
5059 done
5060   done
5061 IFS=$as_save_IFS
5062 
5063   ;;
5064 esac
5065 fi
5066 MKDIR=$ac_cv_path_MKDIR
5067 if test -n "$MKDIR"; then
5068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5069 $as_echo "$MKDIR" >&6; }
5070 else
5071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072 $as_echo "no" >&6; }
5073 fi
5074 
5075 
5076   test -n "$MKDIR" && break
5077 done
5078 
5079 
5080   if test "x$MKDIR" = x; then
5081     if test "xmkdir" = x; then
5082       PROG_NAME=mkdir
5083     else
5084       PROG_NAME=mkdir
5085     fi
5086     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5087 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5088     as_fn_error $? "Cannot continue" "$LINENO" 5
5089   fi
5090 
5091 
5092 
5093   for ac_prog in mktemp
5094 do
5095   # Extract the first word of "$ac_prog", so it can be a program name with args.
5096 set dummy $ac_prog; ac_word=$2
5097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5098 $as_echo_n "checking for $ac_word... " >&6; }
5099 if ${ac_cv_path_MKTEMP+:} false; then :
5100   $as_echo_n "(cached) " >&6
5101 else
5102   case $MKTEMP in
5103   [\\/]* | ?:[\\/]*)
5104   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5105   ;;
5106   *)
5107   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108 for as_dir in $PATH
5109 do
5110   IFS=$as_save_IFS
5111   test -z "$as_dir" && as_dir=.
5112     for ac_exec_ext in '' $ac_executable_extensions; do
5113   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5114     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5116     break 2
5117   fi
5118 done
5119   done
5120 IFS=$as_save_IFS
5121 
5122   ;;
5123 esac
5124 fi
5125 MKTEMP=$ac_cv_path_MKTEMP
5126 if test -n "$MKTEMP"; then
5127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5128 $as_echo "$MKTEMP" >&6; }
5129 else
5130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131 $as_echo "no" >&6; }
5132 fi
5133 
5134 
5135   test -n "$MKTEMP" && break
5136 done
5137 
5138 
5139   if test "x$MKTEMP" = x; then
5140     if test "xmktemp" = x; then
5141       PROG_NAME=mktemp
5142     else
5143       PROG_NAME=mktemp
5144     fi
5145     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5146 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5147     as_fn_error $? "Cannot continue" "$LINENO" 5
5148   fi
5149 
5150 
5151 
5152   for ac_prog in mv
5153 do
5154   # Extract the first word of "$ac_prog", so it can be a program name with args.
5155 set dummy $ac_prog; ac_word=$2
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157 $as_echo_n "checking for $ac_word... " >&6; }
5158 if ${ac_cv_path_MV+:} false; then :
5159   $as_echo_n "(cached) " >&6
5160 else
5161   case $MV in
5162   [\\/]* | ?:[\\/]*)
5163   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5164   ;;
5165   *)
5166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5167 for as_dir in $PATH
5168 do
5169   IFS=$as_save_IFS
5170   test -z "$as_dir" && as_dir=.
5171     for ac_exec_ext in '' $ac_executable_extensions; do
5172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5173     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5175     break 2
5176   fi
5177 done
5178   done
5179 IFS=$as_save_IFS
5180 
5181   ;;
5182 esac
5183 fi
5184 MV=$ac_cv_path_MV
5185 if test -n "$MV"; then
5186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5187 $as_echo "$MV" >&6; }
5188 else
5189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5190 $as_echo "no" >&6; }
5191 fi
5192 
5193 
5194   test -n "$MV" && break
5195 done
5196 
5197 
5198   if test "x$MV" = x; then
5199     if test "xmv" = x; then
5200       PROG_NAME=mv
5201     else
5202       PROG_NAME=mv
5203     fi
5204     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5205 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5206     as_fn_error $? "Cannot continue" "$LINENO" 5
5207   fi
5208 
5209 
5210 
5211   for ac_prog in printf
5212 do
5213   # Extract the first word of "$ac_prog", so it can be a program name with args.
5214 set dummy $ac_prog; ac_word=$2
5215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216 $as_echo_n "checking for $ac_word... " >&6; }
5217 if ${ac_cv_path_PRINTF+:} false; then :
5218   $as_echo_n "(cached) " >&6
5219 else
5220   case $PRINTF in
5221   [\\/]* | ?:[\\/]*)
5222   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5223   ;;
5224   *)
5225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5226 for as_dir in $PATH
5227 do
5228   IFS=$as_save_IFS
5229   test -z "$as_dir" && as_dir=.
5230     for ac_exec_ext in '' $ac_executable_extensions; do
5231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5232     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5234     break 2
5235   fi
5236 done
5237   done
5238 IFS=$as_save_IFS
5239 
5240   ;;
5241 esac
5242 fi
5243 PRINTF=$ac_cv_path_PRINTF
5244 if test -n "$PRINTF"; then
5245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5246 $as_echo "$PRINTF" >&6; }
5247 else
5248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5249 $as_echo "no" >&6; }
5250 fi
5251 
5252 
5253   test -n "$PRINTF" && break
5254 done
5255 
5256 
5257   if test "x$PRINTF" = x; then
5258     if test "xprintf" = x; then
5259       PROG_NAME=printf
5260     else
5261       PROG_NAME=printf
5262     fi
5263     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5264 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5265     as_fn_error $? "Cannot continue" "$LINENO" 5
5266   fi
5267 
5268 
5269 
5270   for ac_prog in rm
5271 do
5272   # Extract the first word of "$ac_prog", so it can be a program name with args.
5273 set dummy $ac_prog; ac_word=$2
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5275 $as_echo_n "checking for $ac_word... " >&6; }
5276 if ${ac_cv_path_RM+:} false; then :
5277   $as_echo_n "(cached) " >&6
5278 else
5279   case $RM in
5280   [\\/]* | ?:[\\/]*)
5281   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5282   ;;
5283   *)
5284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285 for as_dir in $PATH
5286 do
5287   IFS=$as_save_IFS
5288   test -z "$as_dir" && as_dir=.
5289     for ac_exec_ext in '' $ac_executable_extensions; do
5290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5291     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5293     break 2
5294   fi
5295 done
5296   done
5297 IFS=$as_save_IFS
5298 
5299   ;;
5300 esac
5301 fi
5302 RM=$ac_cv_path_RM
5303 if test -n "$RM"; then
5304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5305 $as_echo "$RM" >&6; }
5306 else
5307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308 $as_echo "no" >&6; }
5309 fi
5310 
5311 
5312   test -n "$RM" && break
5313 done
5314 
5315 
5316   if test "x$RM" = x; then
5317     if test "xrm" = x; then
5318       PROG_NAME=rm
5319     else
5320       PROG_NAME=rm
5321     fi
5322     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5323 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5324     as_fn_error $? "Cannot continue" "$LINENO" 5
5325   fi
5326 
5327 
5328 
5329   for ac_prog in sh
5330 do
5331   # Extract the first word of "$ac_prog", so it can be a program name with args.
5332 set dummy $ac_prog; ac_word=$2
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334 $as_echo_n "checking for $ac_word... " >&6; }
5335 if ${ac_cv_path_SH+:} false; then :
5336   $as_echo_n "(cached) " >&6
5337 else
5338   case $SH in
5339   [\\/]* | ?:[\\/]*)
5340   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5341   ;;
5342   *)
5343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344 for as_dir in $PATH
5345 do
5346   IFS=$as_save_IFS
5347   test -z "$as_dir" && as_dir=.
5348     for ac_exec_ext in '' $ac_executable_extensions; do
5349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352     break 2
5353   fi
5354 done
5355   done
5356 IFS=$as_save_IFS
5357 
5358   ;;
5359 esac
5360 fi
5361 SH=$ac_cv_path_SH
5362 if test -n "$SH"; then
5363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5364 $as_echo "$SH" >&6; }
5365 else
5366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367 $as_echo "no" >&6; }
5368 fi
5369 
5370 
5371   test -n "$SH" && break
5372 done
5373 
5374 
5375   if test "x$SH" = x; then
5376     if test "xsh" = x; then
5377       PROG_NAME=sh
5378     else
5379       PROG_NAME=sh
5380     fi
5381     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5382 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5383     as_fn_error $? "Cannot continue" "$LINENO" 5
5384   fi
5385 
5386 
5387 
5388   for ac_prog in sort
5389 do
5390   # Extract the first word of "$ac_prog", so it can be a program name with args.
5391 set dummy $ac_prog; ac_word=$2
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393 $as_echo_n "checking for $ac_word... " >&6; }
5394 if ${ac_cv_path_SORT+:} false; then :
5395   $as_echo_n "(cached) " >&6
5396 else
5397   case $SORT in
5398   [\\/]* | ?:[\\/]*)
5399   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5400   ;;
5401   *)
5402   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403 for as_dir in $PATH
5404 do
5405   IFS=$as_save_IFS
5406   test -z "$as_dir" && as_dir=.
5407     for ac_exec_ext in '' $ac_executable_extensions; do
5408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411     break 2
5412   fi
5413 done
5414   done
5415 IFS=$as_save_IFS
5416 
5417   ;;
5418 esac
5419 fi
5420 SORT=$ac_cv_path_SORT
5421 if test -n "$SORT"; then
5422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5423 $as_echo "$SORT" >&6; }
5424 else
5425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426 $as_echo "no" >&6; }
5427 fi
5428 
5429 
5430   test -n "$SORT" && break
5431 done
5432 
5433 
5434   if test "x$SORT" = x; then
5435     if test "xsort" = x; then
5436       PROG_NAME=sort
5437     else
5438       PROG_NAME=sort
5439     fi
5440     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5441 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5442     as_fn_error $? "Cannot continue" "$LINENO" 5
5443   fi
5444 
5445 
5446 
5447   for ac_prog in tail
5448 do
5449   # Extract the first word of "$ac_prog", so it can be a program name with args.
5450 set dummy $ac_prog; ac_word=$2
5451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452 $as_echo_n "checking for $ac_word... " >&6; }
5453 if ${ac_cv_path_TAIL+:} false; then :
5454   $as_echo_n "(cached) " >&6
5455 else
5456   case $TAIL in
5457   [\\/]* | ?:[\\/]*)
5458   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5459   ;;
5460   *)
5461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5462 for as_dir in $PATH
5463 do
5464   IFS=$as_save_IFS
5465   test -z "$as_dir" && as_dir=.
5466     for ac_exec_ext in '' $ac_executable_extensions; do
5467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5468     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5470     break 2
5471   fi
5472 done
5473   done
5474 IFS=$as_save_IFS
5475 
5476   ;;
5477 esac
5478 fi
5479 TAIL=$ac_cv_path_TAIL
5480 if test -n "$TAIL"; then
5481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5482 $as_echo "$TAIL" >&6; }
5483 else
5484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485 $as_echo "no" >&6; }
5486 fi
5487 
5488 
5489   test -n "$TAIL" && break
5490 done
5491 
5492 
5493   if test "x$TAIL" = x; then
5494     if test "xtail" = x; then
5495       PROG_NAME=tail
5496     else
5497       PROG_NAME=tail
5498     fi
5499     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5500 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5501     as_fn_error $? "Cannot continue" "$LINENO" 5
5502   fi
5503 
5504 
5505 
5506   for ac_prog in tar
5507 do
5508   # Extract the first word of "$ac_prog", so it can be a program name with args.
5509 set dummy $ac_prog; ac_word=$2
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5511 $as_echo_n "checking for $ac_word... " >&6; }
5512 if ${ac_cv_path_TAR+:} false; then :
5513   $as_echo_n "(cached) " >&6
5514 else
5515   case $TAR in
5516   [\\/]* | ?:[\\/]*)
5517   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5518   ;;
5519   *)
5520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521 for as_dir in $PATH
5522 do
5523   IFS=$as_save_IFS
5524   test -z "$as_dir" && as_dir=.
5525     for ac_exec_ext in '' $ac_executable_extensions; do
5526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5527     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5529     break 2
5530   fi
5531 done
5532   done
5533 IFS=$as_save_IFS
5534 
5535   ;;
5536 esac
5537 fi
5538 TAR=$ac_cv_path_TAR
5539 if test -n "$TAR"; then
5540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5541 $as_echo "$TAR" >&6; }
5542 else
5543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544 $as_echo "no" >&6; }
5545 fi
5546 
5547 
5548   test -n "$TAR" && break
5549 done
5550 
5551 
5552   if test "x$TAR" = x; then
5553     if test "xtar" = x; then
5554       PROG_NAME=tar
5555     else
5556       PROG_NAME=tar
5557     fi
5558     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5559 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5560     as_fn_error $? "Cannot continue" "$LINENO" 5
5561   fi
5562 
5563 
5564 
5565   for ac_prog in tee
5566 do
5567   # Extract the first word of "$ac_prog", so it can be a program name with args.
5568 set dummy $ac_prog; ac_word=$2
5569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570 $as_echo_n "checking for $ac_word... " >&6; }
5571 if ${ac_cv_path_TEE+:} false; then :
5572   $as_echo_n "(cached) " >&6
5573 else
5574   case $TEE in
5575   [\\/]* | ?:[\\/]*)
5576   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5577   ;;
5578   *)
5579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580 for as_dir in $PATH
5581 do
5582   IFS=$as_save_IFS
5583   test -z "$as_dir" && as_dir=.
5584     for ac_exec_ext in '' $ac_executable_extensions; do
5585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5586     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5588     break 2
5589   fi
5590 done
5591   done
5592 IFS=$as_save_IFS
5593 
5594   ;;
5595 esac
5596 fi
5597 TEE=$ac_cv_path_TEE
5598 if test -n "$TEE"; then
5599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5600 $as_echo "$TEE" >&6; }
5601 else
5602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603 $as_echo "no" >&6; }
5604 fi
5605 
5606 
5607   test -n "$TEE" && break
5608 done
5609 
5610 
5611   if test "x$TEE" = x; then
5612     if test "xtee" = x; then
5613       PROG_NAME=tee
5614     else
5615       PROG_NAME=tee
5616     fi
5617     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5618 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5619     as_fn_error $? "Cannot continue" "$LINENO" 5
5620   fi
5621 
5622 
5623 
5624   for ac_prog in touch
5625 do
5626   # Extract the first word of "$ac_prog", so it can be a program name with args.
5627 set dummy $ac_prog; ac_word=$2
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5629 $as_echo_n "checking for $ac_word... " >&6; }
5630 if ${ac_cv_path_TOUCH+:} false; then :
5631   $as_echo_n "(cached) " >&6
5632 else
5633   case $TOUCH in
5634   [\\/]* | ?:[\\/]*)
5635   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5636   ;;
5637   *)
5638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639 for as_dir in $PATH
5640 do
5641   IFS=$as_save_IFS
5642   test -z "$as_dir" && as_dir=.
5643     for ac_exec_ext in '' $ac_executable_extensions; do
5644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5645     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5647     break 2
5648   fi
5649 done
5650   done
5651 IFS=$as_save_IFS
5652 
5653   ;;
5654 esac
5655 fi
5656 TOUCH=$ac_cv_path_TOUCH
5657 if test -n "$TOUCH"; then
5658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5659 $as_echo "$TOUCH" >&6; }
5660 else
5661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662 $as_echo "no" >&6; }
5663 fi
5664 
5665 
5666   test -n "$TOUCH" && break
5667 done
5668 
5669 
5670   if test "x$TOUCH" = x; then
5671     if test "xtouch" = x; then
5672       PROG_NAME=touch
5673     else
5674       PROG_NAME=touch
5675     fi
5676     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5677 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5678     as_fn_error $? "Cannot continue" "$LINENO" 5
5679   fi
5680 
5681 
5682 
5683   for ac_prog in tr
5684 do
5685   # Extract the first word of "$ac_prog", so it can be a program name with args.
5686 set dummy $ac_prog; ac_word=$2
5687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5688 $as_echo_n "checking for $ac_word... " >&6; }
5689 if ${ac_cv_path_TR+:} false; then :
5690   $as_echo_n "(cached) " >&6
5691 else
5692   case $TR in
5693   [\\/]* | ?:[\\/]*)
5694   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5695   ;;
5696   *)
5697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698 for as_dir in $PATH
5699 do
5700   IFS=$as_save_IFS
5701   test -z "$as_dir" && as_dir=.
5702     for ac_exec_ext in '' $ac_executable_extensions; do
5703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5704     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5706     break 2
5707   fi
5708 done
5709   done
5710 IFS=$as_save_IFS
5711 
5712   ;;
5713 esac
5714 fi
5715 TR=$ac_cv_path_TR
5716 if test -n "$TR"; then
5717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5718 $as_echo "$TR" >&6; }
5719 else
5720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5721 $as_echo "no" >&6; }
5722 fi
5723 
5724 
5725   test -n "$TR" && break
5726 done
5727 
5728 
5729   if test "x$TR" = x; then
5730     if test "xtr" = x; then
5731       PROG_NAME=tr
5732     else
5733       PROG_NAME=tr
5734     fi
5735     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5736 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5737     as_fn_error $? "Cannot continue" "$LINENO" 5
5738   fi
5739 
5740 
5741 
5742   for ac_prog in uname
5743 do
5744   # Extract the first word of "$ac_prog", so it can be a program name with args.
5745 set dummy $ac_prog; ac_word=$2
5746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5747 $as_echo_n "checking for $ac_word... " >&6; }
5748 if ${ac_cv_path_UNAME+:} false; then :
5749   $as_echo_n "(cached) " >&6
5750 else
5751   case $UNAME in
5752   [\\/]* | ?:[\\/]*)
5753   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5754   ;;
5755   *)
5756   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5757 for as_dir in $PATH
5758 do
5759   IFS=$as_save_IFS
5760   test -z "$as_dir" && as_dir=.
5761     for ac_exec_ext in '' $ac_executable_extensions; do
5762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5763     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5765     break 2
5766   fi
5767 done
5768   done
5769 IFS=$as_save_IFS
5770 
5771   ;;
5772 esac
5773 fi
5774 UNAME=$ac_cv_path_UNAME
5775 if test -n "$UNAME"; then
5776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5777 $as_echo "$UNAME" >&6; }
5778 else
5779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5780 $as_echo "no" >&6; }
5781 fi
5782 
5783 
5784   test -n "$UNAME" && break
5785 done
5786 
5787 
5788   if test "x$UNAME" = x; then
5789     if test "xuname" = x; then
5790       PROG_NAME=uname
5791     else
5792       PROG_NAME=uname
5793     fi
5794     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5795 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5796     as_fn_error $? "Cannot continue" "$LINENO" 5
5797   fi
5798 
5799 
5800 
5801   for ac_prog in uniq
5802 do
5803   # Extract the first word of "$ac_prog", so it can be a program name with args.
5804 set dummy $ac_prog; ac_word=$2
5805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806 $as_echo_n "checking for $ac_word... " >&6; }
5807 if ${ac_cv_path_UNIQ+:} false; then :
5808   $as_echo_n "(cached) " >&6
5809 else
5810   case $UNIQ in
5811   [\\/]* | ?:[\\/]*)
5812   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5813   ;;
5814   *)
5815   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5816 for as_dir in $PATH
5817 do
5818   IFS=$as_save_IFS
5819   test -z "$as_dir" && as_dir=.
5820     for ac_exec_ext in '' $ac_executable_extensions; do
5821   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5822     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5824     break 2
5825   fi
5826 done
5827   done
5828 IFS=$as_save_IFS
5829 
5830   ;;
5831 esac
5832 fi
5833 UNIQ=$ac_cv_path_UNIQ
5834 if test -n "$UNIQ"; then
5835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5836 $as_echo "$UNIQ" >&6; }
5837 else
5838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5839 $as_echo "no" >&6; }
5840 fi
5841 
5842 
5843   test -n "$UNIQ" && break
5844 done
5845 
5846 
5847   if test "x$UNIQ" = x; then
5848     if test "xuniq" = x; then
5849       PROG_NAME=uniq
5850     else
5851       PROG_NAME=uniq
5852     fi
5853     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5854 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5855     as_fn_error $? "Cannot continue" "$LINENO" 5
5856   fi
5857 
5858 
5859 
5860   for ac_prog in wc
5861 do
5862   # Extract the first word of "$ac_prog", so it can be a program name with args.
5863 set dummy $ac_prog; ac_word=$2
5864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5865 $as_echo_n "checking for $ac_word... " >&6; }
5866 if ${ac_cv_path_WC+:} false; then :
5867   $as_echo_n "(cached) " >&6
5868 else
5869   case $WC in
5870   [\\/]* | ?:[\\/]*)
5871   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5872   ;;
5873   *)
5874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5875 for as_dir in $PATH
5876 do
5877   IFS=$as_save_IFS
5878   test -z "$as_dir" && as_dir=.
5879     for ac_exec_ext in '' $ac_executable_extensions; do
5880   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5881     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5883     break 2
5884   fi
5885 done
5886   done
5887 IFS=$as_save_IFS
5888 
5889   ;;
5890 esac
5891 fi
5892 WC=$ac_cv_path_WC
5893 if test -n "$WC"; then
5894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5895 $as_echo "$WC" >&6; }
5896 else
5897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5898 $as_echo "no" >&6; }
5899 fi
5900 
5901 
5902   test -n "$WC" && break
5903 done
5904 
5905 
5906   if test "x$WC" = x; then
5907     if test "xwc" = x; then
5908       PROG_NAME=wc
5909     else
5910       PROG_NAME=wc
5911     fi
5912     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5913 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5914     as_fn_error $? "Cannot continue" "$LINENO" 5
5915   fi
5916 
5917 
5918 
5919   for ac_prog in which
5920 do
5921   # Extract the first word of "$ac_prog", so it can be a program name with args.
5922 set dummy $ac_prog; ac_word=$2
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5924 $as_echo_n "checking for $ac_word... " >&6; }
5925 if ${ac_cv_path_WHICH+:} false; then :
5926   $as_echo_n "(cached) " >&6
5927 else
5928   case $WHICH in
5929   [\\/]* | ?:[\\/]*)
5930   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5931   ;;
5932   *)
5933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5934 for as_dir in $PATH
5935 do
5936   IFS=$as_save_IFS
5937   test -z "$as_dir" && as_dir=.
5938     for ac_exec_ext in '' $ac_executable_extensions; do
5939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5940     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5942     break 2
5943   fi
5944 done
5945   done
5946 IFS=$as_save_IFS
5947 
5948   ;;
5949 esac
5950 fi
5951 WHICH=$ac_cv_path_WHICH
5952 if test -n "$WHICH"; then
5953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5954 $as_echo "$WHICH" >&6; }
5955 else
5956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957 $as_echo "no" >&6; }
5958 fi
5959 
5960 
5961   test -n "$WHICH" && break
5962 done
5963 
5964 
5965   if test "x$WHICH" = x; then
5966     if test "xwhich" = x; then
5967       PROG_NAME=which
5968     else
5969       PROG_NAME=which
5970     fi
5971     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5972 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5973     as_fn_error $? "Cannot continue" "$LINENO" 5
5974   fi
5975 
5976 
5977 
5978   for ac_prog in xargs
5979 do
5980   # Extract the first word of "$ac_prog", so it can be a program name with args.
5981 set dummy $ac_prog; ac_word=$2
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983 $as_echo_n "checking for $ac_word... " >&6; }
5984 if ${ac_cv_path_XARGS+:} false; then :
5985   $as_echo_n "(cached) " >&6
5986 else
5987   case $XARGS in
5988   [\\/]* | ?:[\\/]*)
5989   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5990   ;;
5991   *)
5992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993 for as_dir in $PATH
5994 do
5995   IFS=$as_save_IFS
5996   test -z "$as_dir" && as_dir=.
5997     for ac_exec_ext in '' $ac_executable_extensions; do
5998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5999     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
6000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001     break 2
6002   fi
6003 done
6004   done
6005 IFS=$as_save_IFS
6006 
6007   ;;
6008 esac
6009 fi
6010 XARGS=$ac_cv_path_XARGS
6011 if test -n "$XARGS"; then
6012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6013 $as_echo "$XARGS" >&6; }
6014 else
6015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016 $as_echo "no" >&6; }
6017 fi
6018 
6019 
6020   test -n "$XARGS" && break
6021 done
6022 
6023 
6024   if test "x$XARGS" = x; then
6025     if test "xxargs" = x; then
6026       PROG_NAME=xargs
6027     else
6028       PROG_NAME=xargs
6029     fi
6030     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6031 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6032     as_fn_error $? "Cannot continue" "$LINENO" 5
6033   fi
6034 
6035 
6036 
6037   # Then required tools that require some special treatment.
6038   for ac_prog in gawk mawk nawk awk
6039 do
6040   # Extract the first word of "$ac_prog", so it can be a program name with args.
6041 set dummy $ac_prog; ac_word=$2
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6043 $as_echo_n "checking for $ac_word... " >&6; }
6044 if ${ac_cv_prog_AWK+:} false; then :
6045   $as_echo_n "(cached) " >&6
6046 else
6047   if test -n "$AWK"; then
6048   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6049 else
6050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051 for as_dir in $PATH
6052 do
6053   IFS=$as_save_IFS
6054   test -z "$as_dir" && as_dir=.
6055     for ac_exec_ext in '' $ac_executable_extensions; do
6056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057     ac_cv_prog_AWK="$ac_prog"
6058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059     break 2
6060   fi
6061 done
6062   done
6063 IFS=$as_save_IFS
6064 
6065 fi
6066 fi
6067 AWK=$ac_cv_prog_AWK
6068 if test -n "$AWK"; then
6069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6070 $as_echo "$AWK" >&6; }
6071 else
6072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6073 $as_echo "no" >&6; }
6074 fi
6075 
6076 
6077   test -n "$AWK" && break
6078 done
6079 
6080 
6081   if test "x$AWK" = x; then
6082     if test "x" = x; then
6083       PROG_NAME=awk
6084     else
6085       PROG_NAME=
6086     fi
6087     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6088 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6089     as_fn_error $? "Cannot continue" "$LINENO" 5
6090   fi
6091 
6092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6093 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6094 if ${ac_cv_path_GREP+:} false; then :
6095   $as_echo_n "(cached) " >&6
6096 else
6097   if test -z "$GREP"; then
6098   ac_path_GREP_found=false
6099   # Loop through the user's path and test for each of PROGNAME-LIST
6100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6102 do
6103   IFS=$as_save_IFS
6104   test -z "$as_dir" && as_dir=.
6105     for ac_prog in grep ggrep; do
6106     for ac_exec_ext in '' $ac_executable_extensions; do
6107       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6108       as_fn_executable_p "$ac_path_GREP" || continue
6109 # Check for GNU ac_path_GREP and select it if it is found.
6110   # Check for GNU $ac_path_GREP
6111 case `"$ac_path_GREP" --version 2>&1` in
6112 *GNU*)
6113   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6114 *)
6115   ac_count=0
6116   $as_echo_n 0123456789 >"conftest.in"
6117   while :
6118   do
6119     cat "conftest.in" "conftest.in" >"conftest.tmp"
6120     mv "conftest.tmp" "conftest.in"
6121     cp "conftest.in" "conftest.nl"
6122     $as_echo 'GREP' >> "conftest.nl"
6123     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6124     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6125     as_fn_arith $ac_count + 1 && ac_count=$as_val
6126     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6127       # Best one so far, save it but keep looking for a better one
6128       ac_cv_path_GREP="$ac_path_GREP"
6129       ac_path_GREP_max=$ac_count
6130     fi
6131     # 10*(2^10) chars as input seems more than enough
6132     test $ac_count -gt 10 && break
6133   done
6134   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6135 esac
6136 
6137       $ac_path_GREP_found && break 3
6138     done
6139   done
6140   done
6141 IFS=$as_save_IFS
6142   if test -z "$ac_cv_path_GREP"; then
6143     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6144   fi
6145 else
6146   ac_cv_path_GREP=$GREP
6147 fi
6148 
6149 fi
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6151 $as_echo "$ac_cv_path_GREP" >&6; }
6152  GREP="$ac_cv_path_GREP"
6153 
6154 
6155 
6156   if test "x$GREP" = x; then
6157     if test "x" = x; then
6158       PROG_NAME=grep
6159     else
6160       PROG_NAME=
6161     fi
6162     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6163 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6164     as_fn_error $? "Cannot continue" "$LINENO" 5
6165   fi
6166 
6167   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6168 $as_echo_n "checking for egrep... " >&6; }
6169 if ${ac_cv_path_EGREP+:} false; then :
6170   $as_echo_n "(cached) " >&6
6171 else
6172   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6173    then ac_cv_path_EGREP="$GREP -E"
6174    else
6175      if test -z "$EGREP"; then
6176   ac_path_EGREP_found=false
6177   # Loop through the user's path and test for each of PROGNAME-LIST
6178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6179 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6180 do
6181   IFS=$as_save_IFS
6182   test -z "$as_dir" && as_dir=.
6183     for ac_prog in egrep; do
6184     for ac_exec_ext in '' $ac_executable_extensions; do
6185       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6186       as_fn_executable_p "$ac_path_EGREP" || continue
6187 # Check for GNU ac_path_EGREP and select it if it is found.
6188   # Check for GNU $ac_path_EGREP
6189 case `"$ac_path_EGREP" --version 2>&1` in
6190 *GNU*)
6191   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6192 *)
6193   ac_count=0
6194   $as_echo_n 0123456789 >"conftest.in"
6195   while :
6196   do
6197     cat "conftest.in" "conftest.in" >"conftest.tmp"
6198     mv "conftest.tmp" "conftest.in"
6199     cp "conftest.in" "conftest.nl"
6200     $as_echo 'EGREP' >> "conftest.nl"
6201     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6202     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6203     as_fn_arith $ac_count + 1 && ac_count=$as_val
6204     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6205       # Best one so far, save it but keep looking for a better one
6206       ac_cv_path_EGREP="$ac_path_EGREP"
6207       ac_path_EGREP_max=$ac_count
6208     fi
6209     # 10*(2^10) chars as input seems more than enough
6210     test $ac_count -gt 10 && break
6211   done
6212   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6213 esac
6214 
6215       $ac_path_EGREP_found && break 3
6216     done
6217   done
6218   done
6219 IFS=$as_save_IFS
6220   if test -z "$ac_cv_path_EGREP"; then
6221     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6222   fi
6223 else
6224   ac_cv_path_EGREP=$EGREP
6225 fi
6226 
6227    fi
6228 fi
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6230 $as_echo "$ac_cv_path_EGREP" >&6; }
6231  EGREP="$ac_cv_path_EGREP"
6232 
6233 
6234 
6235   if test "x$EGREP" = x; then
6236     if test "x" = x; then
6237       PROG_NAME=egrep
6238     else
6239       PROG_NAME=
6240     fi
6241     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6242 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6243     as_fn_error $? "Cannot continue" "$LINENO" 5
6244   fi
6245 
6246   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6247 $as_echo_n "checking for fgrep... " >&6; }
6248 if ${ac_cv_path_FGREP+:} false; then :
6249   $as_echo_n "(cached) " >&6
6250 else
6251   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6252    then ac_cv_path_FGREP="$GREP -F"
6253    else
6254      if test -z "$FGREP"; then
6255   ac_path_FGREP_found=false
6256   # Loop through the user's path and test for each of PROGNAME-LIST
6257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6258 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6259 do
6260   IFS=$as_save_IFS
6261   test -z "$as_dir" && as_dir=.
6262     for ac_prog in fgrep; do
6263     for ac_exec_ext in '' $ac_executable_extensions; do
6264       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6265       as_fn_executable_p "$ac_path_FGREP" || continue
6266 # Check for GNU ac_path_FGREP and select it if it is found.
6267   # Check for GNU $ac_path_FGREP
6268 case `"$ac_path_FGREP" --version 2>&1` in
6269 *GNU*)
6270   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6271 *)
6272   ac_count=0
6273   $as_echo_n 0123456789 >"conftest.in"
6274   while :
6275   do
6276     cat "conftest.in" "conftest.in" >"conftest.tmp"
6277     mv "conftest.tmp" "conftest.in"
6278     cp "conftest.in" "conftest.nl"
6279     $as_echo 'FGREP' >> "conftest.nl"
6280     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6281     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6282     as_fn_arith $ac_count + 1 && ac_count=$as_val
6283     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6284       # Best one so far, save it but keep looking for a better one
6285       ac_cv_path_FGREP="$ac_path_FGREP"
6286       ac_path_FGREP_max=$ac_count
6287     fi
6288     # 10*(2^10) chars as input seems more than enough
6289     test $ac_count -gt 10 && break
6290   done
6291   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6292 esac
6293 
6294       $ac_path_FGREP_found && break 3
6295     done
6296   done
6297   done
6298 IFS=$as_save_IFS
6299   if test -z "$ac_cv_path_FGREP"; then
6300     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6301   fi
6302 else
6303   ac_cv_path_FGREP=$FGREP
6304 fi
6305 
6306    fi
6307 fi
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6309 $as_echo "$ac_cv_path_FGREP" >&6; }
6310  FGREP="$ac_cv_path_FGREP"
6311 
6312 
6313 
6314   if test "x$FGREP" = x; then
6315     if test "x" = x; then
6316       PROG_NAME=fgrep
6317     else
6318       PROG_NAME=
6319     fi
6320     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6321 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6322     as_fn_error $? "Cannot continue" "$LINENO" 5
6323   fi
6324 
6325   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6326 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6327 if ${ac_cv_path_SED+:} false; then :
6328   $as_echo_n "(cached) " >&6
6329 else
6330             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6331      for ac_i in 1 2 3 4 5 6 7; do
6332        ac_script="$ac_script$as_nl$ac_script"
6333      done
6334      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6335      { ac_script=; unset ac_script;}
6336      if test -z "$SED"; then
6337   ac_path_SED_found=false
6338   # Loop through the user's path and test for each of PROGNAME-LIST
6339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6340 for as_dir in $PATH
6341 do
6342   IFS=$as_save_IFS
6343   test -z "$as_dir" && as_dir=.
6344     for ac_prog in sed gsed; do
6345     for ac_exec_ext in '' $ac_executable_extensions; do
6346       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6347       as_fn_executable_p "$ac_path_SED" || continue
6348 # Check for GNU ac_path_SED and select it if it is found.
6349   # Check for GNU $ac_path_SED
6350 case `"$ac_path_SED" --version 2>&1` in
6351 *GNU*)
6352   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6353 *)
6354   ac_count=0
6355   $as_echo_n 0123456789 >"conftest.in"
6356   while :
6357   do
6358     cat "conftest.in" "conftest.in" >"conftest.tmp"
6359     mv "conftest.tmp" "conftest.in"
6360     cp "conftest.in" "conftest.nl"
6361     $as_echo '' >> "conftest.nl"
6362     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6363     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6364     as_fn_arith $ac_count + 1 && ac_count=$as_val
6365     if test $ac_count -gt ${ac_path_SED_max-0}; then
6366       # Best one so far, save it but keep looking for a better one
6367       ac_cv_path_SED="$ac_path_SED"
6368       ac_path_SED_max=$ac_count
6369     fi
6370     # 10*(2^10) chars as input seems more than enough
6371     test $ac_count -gt 10 && break
6372   done
6373   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6374 esac
6375 
6376       $ac_path_SED_found && break 3
6377     done
6378   done
6379   done
6380 IFS=$as_save_IFS
6381   if test -z "$ac_cv_path_SED"; then
6382     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6383   fi
6384 else
6385   ac_cv_path_SED=$SED
6386 fi
6387 
6388 fi
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6390 $as_echo "$ac_cv_path_SED" >&6; }
6391  SED="$ac_cv_path_SED"
6392   rm -f conftest.sed
6393 
6394 
6395   if test "x$SED" = x; then
6396     if test "x" = x; then
6397       PROG_NAME=sed
6398     else
6399       PROG_NAME=
6400     fi
6401     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6402 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6403     as_fn_error $? "Cannot continue" "$LINENO" 5
6404   fi
6405 
6406 
6407   for ac_prog in nawk gawk awk
6408 do
6409   # Extract the first word of "$ac_prog", so it can be a program name with args.
6410 set dummy $ac_prog; ac_word=$2
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6412 $as_echo_n "checking for $ac_word... " >&6; }
6413 if ${ac_cv_path_NAWK+:} false; then :
6414   $as_echo_n "(cached) " >&6
6415 else
6416   case $NAWK in
6417   [\\/]* | ?:[\\/]*)
6418   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6419   ;;
6420   *)
6421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6422 for as_dir in $PATH
6423 do
6424   IFS=$as_save_IFS
6425   test -z "$as_dir" && as_dir=.
6426     for ac_exec_ext in '' $ac_executable_extensions; do
6427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6428     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6430     break 2
6431   fi
6432 done
6433   done
6434 IFS=$as_save_IFS
6435 
6436   ;;
6437 esac
6438 fi
6439 NAWK=$ac_cv_path_NAWK
6440 if test -n "$NAWK"; then
6441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6442 $as_echo "$NAWK" >&6; }
6443 else
6444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445 $as_echo "no" >&6; }
6446 fi
6447 
6448 
6449   test -n "$NAWK" && break
6450 done
6451 
6452 
6453   if test "x$NAWK" = x; then
6454     if test "x" = x; then
6455       PROG_NAME=nawk
6456     else
6457       PROG_NAME=
6458     fi
6459     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6460 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6461     as_fn_error $? "Cannot continue" "$LINENO" 5
6462   fi
6463 
6464 
6465   # Always force rm.
6466   RM="$RM -f"
6467 
6468   # pwd behaves differently on various platforms and some don't support the -L flag.
6469   # Always use the bash builtin pwd to get uniform behavior.
6470   THEPWDCMD=pwd
6471 
6472   # These are not required on all platforms
6473   # Extract the first word of "cygpath", so it can be a program name with args.
6474 set dummy cygpath; ac_word=$2
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6476 $as_echo_n "checking for $ac_word... " >&6; }
6477 if ${ac_cv_path_CYGPATH+:} false; then :
6478   $as_echo_n "(cached) " >&6
6479 else
6480   case $CYGPATH in
6481   [\\/]* | ?:[\\/]*)
6482   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6483   ;;
6484   *)
6485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486 for as_dir in $PATH
6487 do
6488   IFS=$as_save_IFS
6489   test -z "$as_dir" && as_dir=.
6490     for ac_exec_ext in '' $ac_executable_extensions; do
6491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6492     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494     break 2
6495   fi
6496 done
6497   done
6498 IFS=$as_save_IFS
6499 
6500   ;;
6501 esac
6502 fi
6503 CYGPATH=$ac_cv_path_CYGPATH
6504 if test -n "$CYGPATH"; then
6505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6506 $as_echo "$CYGPATH" >&6; }
6507 else
6508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509 $as_echo "no" >&6; }
6510 fi
6511 
6512 
6513   # Extract the first word of "readlink", so it can be a program name with args.
6514 set dummy readlink; ac_word=$2
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516 $as_echo_n "checking for $ac_word... " >&6; }
6517 if ${ac_cv_path_READLINK+:} false; then :
6518   $as_echo_n "(cached) " >&6
6519 else
6520   case $READLINK in
6521   [\\/]* | ?:[\\/]*)
6522   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6523   ;;
6524   *)
6525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526 for as_dir in $PATH
6527 do
6528   IFS=$as_save_IFS
6529   test -z "$as_dir" && as_dir=.
6530     for ac_exec_ext in '' $ac_executable_extensions; do
6531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534     break 2
6535   fi
6536 done
6537   done
6538 IFS=$as_save_IFS
6539 
6540   ;;
6541 esac
6542 fi
6543 READLINK=$ac_cv_path_READLINK
6544 if test -n "$READLINK"; then
6545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6546 $as_echo "$READLINK" >&6; }
6547 else
6548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549 $as_echo "no" >&6; }
6550 fi
6551 
6552 
6553   # Extract the first word of "df", so it can be a program name with args.
6554 set dummy df; ac_word=$2
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556 $as_echo_n "checking for $ac_word... " >&6; }
6557 if ${ac_cv_path_DF+:} false; then :
6558   $as_echo_n "(cached) " >&6
6559 else
6560   case $DF in
6561   [\\/]* | ?:[\\/]*)
6562   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6563   ;;
6564   *)
6565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566 for as_dir in $PATH
6567 do
6568   IFS=$as_save_IFS
6569   test -z "$as_dir" && as_dir=.
6570     for ac_exec_ext in '' $ac_executable_extensions; do
6571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6572     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574     break 2
6575   fi
6576 done
6577   done
6578 IFS=$as_save_IFS
6579 
6580   ;;
6581 esac
6582 fi
6583 DF=$ac_cv_path_DF
6584 if test -n "$DF"; then
6585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6586 $as_echo "$DF" >&6; }
6587 else
6588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589 $as_echo "no" >&6; }
6590 fi
6591 
6592 
6593   # Extract the first word of "SetFile", so it can be a program name with args.
6594 set dummy SetFile; ac_word=$2
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6596 $as_echo_n "checking for $ac_word... " >&6; }
6597 if ${ac_cv_path_SETFILE+:} false; then :
6598   $as_echo_n "(cached) " >&6
6599 else
6600   case $SETFILE in
6601   [\\/]* | ?:[\\/]*)
6602   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6603   ;;
6604   *)
6605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6606 for as_dir in $PATH
6607 do
6608   IFS=$as_save_IFS
6609   test -z "$as_dir" && as_dir=.
6610     for ac_exec_ext in '' $ac_executable_extensions; do
6611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6612     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6614     break 2
6615   fi
6616 done
6617   done
6618 IFS=$as_save_IFS
6619 
6620   ;;
6621 esac
6622 fi
6623 SETFILE=$ac_cv_path_SETFILE
6624 if test -n "$SETFILE"; then
6625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6626 $as_echo "$SETFILE" >&6; }
6627 else
6628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6629 $as_echo "no" >&6; }
6630 fi
6631 
6632 
6633 
6634 
6635 # Now we can determine OpenJDK build and target platforms. This is required to
6636 # have early on.
6637 # Make sure we can run config.sub.
6638 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6639   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6640 
6641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6642 $as_echo_n "checking build system type... " >&6; }
6643 if ${ac_cv_build+:} false; then :
6644   $as_echo_n "(cached) " >&6
6645 else
6646   ac_build_alias=$build_alias
6647 test "x$ac_build_alias" = x &&
6648   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6649 test "x$ac_build_alias" = x &&
6650   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6651 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6652   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6653 
6654 fi
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6656 $as_echo "$ac_cv_build" >&6; }
6657 case $ac_cv_build in
6658 *-*-*) ;;
6659 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6660 esac
6661 build=$ac_cv_build
6662 ac_save_IFS=$IFS; IFS='-'
6663 set x $ac_cv_build
6664 shift
6665 build_cpu=$1
6666 build_vendor=$2
6667 shift; shift
6668 # Remember, the first character of IFS is used to create $*,
6669 # except with old shells:
6670 build_os=$*
6671 IFS=$ac_save_IFS
6672 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6673 
6674 
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6676 $as_echo_n "checking host system type... " >&6; }
6677 if ${ac_cv_host+:} false; then :
6678   $as_echo_n "(cached) " >&6
6679 else
6680   if test "x$host_alias" = x; then
6681   ac_cv_host=$ac_cv_build
6682 else
6683   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6684     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6685 fi
6686 
6687 fi
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6689 $as_echo "$ac_cv_host" >&6; }
6690 case $ac_cv_host in
6691 *-*-*) ;;
6692 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6693 esac
6694 host=$ac_cv_host
6695 ac_save_IFS=$IFS; IFS='-'
6696 set x $ac_cv_host
6697 shift
6698 host_cpu=$1
6699 host_vendor=$2
6700 shift; shift
6701 # Remember, the first character of IFS is used to create $*,
6702 # except with old shells:
6703 host_os=$*
6704 IFS=$ac_save_IFS
6705 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6706 
6707 
6708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6709 $as_echo_n "checking target system type... " >&6; }
6710 if ${ac_cv_target+:} false; then :
6711   $as_echo_n "(cached) " >&6
6712 else
6713   if test "x$target_alias" = x; then
6714   ac_cv_target=$ac_cv_host
6715 else
6716   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6717     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6718 fi
6719 
6720 fi
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6722 $as_echo "$ac_cv_target" >&6; }
6723 case $ac_cv_target in
6724 *-*-*) ;;
6725 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6726 esac
6727 target=$ac_cv_target
6728 ac_save_IFS=$IFS; IFS='-'
6729 set x $ac_cv_target
6730 shift
6731 target_cpu=$1
6732 target_vendor=$2
6733 shift; shift
6734 # Remember, the first character of IFS is used to create $*,
6735 # except with old shells:
6736 target_os=$*
6737 IFS=$ac_save_IFS
6738 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6739 
6740 
6741 # The aliases save the names the user supplied, while $host etc.
6742 # will get canonicalized.
6743 test -n "$target_alias" &&
6744   test "$program_prefix$program_suffix$program_transform_name" = \
6745     NONENONEs,x,x, &&
6746   program_prefix=${target_alias}-
6747 
6748   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6749   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6750   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6751   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6752   # to use the configure naming style.
6753 
6754 
6755 
6756 
6757 
6758   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6759   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6760   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6761   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6762   OPENJDK_TARGET_AUTOCONF_NAME="$host"
6763   OPENJDK_BUILD_AUTOCONF_NAME="$build"
6764 
6765 
6766 
6767   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6768 
6769   case "$build_os" in
6770     *linux*)
6771       VAR_OS=linux
6772       VAR_OS_API=posix
6773       VAR_OS_ENV=linux
6774       ;;
6775     *solaris*)
6776       VAR_OS=solaris
6777       VAR_OS_API=posix
6778       VAR_OS_ENV=solaris
6779       ;;
6780     *darwin*)
6781       VAR_OS=macosx
6782       VAR_OS_API=posix
6783       VAR_OS_ENV=macosx
6784       ;;
6785     *bsd*)
6786       VAR_OS=bsd
6787       VAR_OS_API=posix
6788       VAR_OS_ENV=bsd
6789       ;;
6790     *cygwin*)
6791       VAR_OS=windows
6792       VAR_OS_API=winapi
6793       VAR_OS_ENV=windows.cygwin
6794       ;;
6795     *mingw*)
6796       VAR_OS=windows
6797       VAR_OS_API=winapi
6798       VAR_OS_ENV=windows.msys
6799       ;;
6800     *aix*)
6801       VAR_OS=aix
6802       VAR_OS_API=posix
6803       VAR_OS_ENV=aix
6804       ;;
6805     *)
6806       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6807       ;;
6808   esac
6809 
6810 
6811   # First argument is the cpu name from the trip/quad
6812   case "$build_cpu" in
6813     x86_64)
6814       VAR_CPU=x86_64
6815       VAR_CPU_ARCH=x86
6816       VAR_CPU_BITS=64
6817       VAR_CPU_ENDIAN=little
6818       ;;
6819     i?86)
6820       VAR_CPU=x86
6821       VAR_CPU_ARCH=x86
6822       VAR_CPU_BITS=32
6823       VAR_CPU_ENDIAN=little
6824       ;;
6825     arm*)
6826       VAR_CPU=arm
6827       VAR_CPU_ARCH=arm
6828       VAR_CPU_BITS=32
6829       VAR_CPU_ENDIAN=little
6830       ;;
6831     aarch64)
6832       VAR_CPU=aarch64
6833       VAR_CPU_ARCH=aarch64
6834       VAR_CPU_BITS=64
6835       VAR_CPU_ENDIAN=little
6836       ;;
6837     powerpc)
6838       VAR_CPU=ppc
6839       VAR_CPU_ARCH=ppc
6840       VAR_CPU_BITS=32
6841       VAR_CPU_ENDIAN=big
6842       ;;
6843     powerpc64)
6844       VAR_CPU=ppc64
6845       VAR_CPU_ARCH=ppc
6846       VAR_CPU_BITS=64
6847       VAR_CPU_ENDIAN=big
6848       ;;
6849     powerpc64le)
6850       VAR_CPU=ppc64
6851       VAR_CPU_ARCH=ppc
6852       VAR_CPU_BITS=64
6853       VAR_CPU_ENDIAN=little
6854       ;;
6855     s390)
6856       VAR_CPU=s390
6857       VAR_CPU_ARCH=s390
6858       VAR_CPU_BITS=32
6859       VAR_CPU_ENDIAN=big
6860       ;;
6861     s390x)
6862       VAR_CPU=s390x
6863       VAR_CPU_ARCH=s390
6864       VAR_CPU_BITS=64
6865       VAR_CPU_ENDIAN=big
6866       ;;
6867     sparc)
6868       VAR_CPU=sparc
6869       VAR_CPU_ARCH=sparc
6870       VAR_CPU_BITS=32
6871       VAR_CPU_ENDIAN=big
6872       ;;
6873     sparcv9)
6874       VAR_CPU=sparcv9
6875       VAR_CPU_ARCH=sparc
6876       VAR_CPU_BITS=64
6877       VAR_CPU_ENDIAN=big
6878       ;;
6879     *)
6880       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6881       ;;
6882   esac
6883 
6884   # ..and setup our own variables. (Do this explicitely to facilitate searching)
6885   OPENJDK_BUILD_OS="$VAR_OS"
6886   OPENJDK_BUILD_OS_API="$VAR_OS_API"
6887   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6888   OPENJDK_BUILD_CPU="$VAR_CPU"
6889   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6890   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6891   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6892 
6893 
6894 
6895 
6896 
6897 
6898 
6899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6900 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6902 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6903 
6904   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6905 
6906   case "$host_os" in
6907     *linux*)
6908       VAR_OS=linux
6909       VAR_OS_API=posix
6910       VAR_OS_ENV=linux
6911       ;;
6912     *solaris*)
6913       VAR_OS=solaris
6914       VAR_OS_API=posix
6915       VAR_OS_ENV=solaris
6916       ;;
6917     *darwin*)
6918       VAR_OS=macosx
6919       VAR_OS_API=posix
6920       VAR_OS_ENV=macosx
6921       ;;
6922     *bsd*)
6923       VAR_OS=bsd
6924       VAR_OS_API=posix
6925       VAR_OS_ENV=bsd
6926       ;;
6927     *cygwin*)
6928       VAR_OS=windows
6929       VAR_OS_API=winapi
6930       VAR_OS_ENV=windows.cygwin
6931       ;;
6932     *mingw*)
6933       VAR_OS=windows
6934       VAR_OS_API=winapi
6935       VAR_OS_ENV=windows.msys
6936       ;;
6937     *aix*)
6938       VAR_OS=aix
6939       VAR_OS_API=posix
6940       VAR_OS_ENV=aix
6941       ;;
6942     *)
6943       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6944       ;;
6945   esac
6946 
6947 
6948   # First argument is the cpu name from the trip/quad
6949   case "$host_cpu" in
6950     x86_64)
6951       VAR_CPU=x86_64
6952       VAR_CPU_ARCH=x86
6953       VAR_CPU_BITS=64
6954       VAR_CPU_ENDIAN=little
6955       ;;
6956     i?86)
6957       VAR_CPU=x86
6958       VAR_CPU_ARCH=x86
6959       VAR_CPU_BITS=32
6960       VAR_CPU_ENDIAN=little
6961       ;;
6962     arm*)
6963       VAR_CPU=arm
6964       VAR_CPU_ARCH=arm
6965       VAR_CPU_BITS=32
6966       VAR_CPU_ENDIAN=little
6967       ;;
6968     aarch64)
6969       VAR_CPU=aarch64
6970       VAR_CPU_ARCH=aarch64
6971       VAR_CPU_BITS=64
6972       VAR_CPU_ENDIAN=little
6973       ;;
6974     powerpc)
6975       VAR_CPU=ppc
6976       VAR_CPU_ARCH=ppc
6977       VAR_CPU_BITS=32
6978       VAR_CPU_ENDIAN=big
6979       ;;
6980     powerpc64)
6981       VAR_CPU=ppc64
6982       VAR_CPU_ARCH=ppc
6983       VAR_CPU_BITS=64
6984       VAR_CPU_ENDIAN=big
6985       ;;
6986     powerpc64le)
6987       VAR_CPU=ppc64
6988       VAR_CPU_ARCH=ppc
6989       VAR_CPU_BITS=64
6990       VAR_CPU_ENDIAN=little
6991       ;;
6992     s390)
6993       VAR_CPU=s390
6994       VAR_CPU_ARCH=s390
6995       VAR_CPU_BITS=32
6996       VAR_CPU_ENDIAN=big
6997       ;;
6998     s390x)
6999       VAR_CPU=s390x
7000       VAR_CPU_ARCH=s390
7001       VAR_CPU_BITS=64
7002       VAR_CPU_ENDIAN=big
7003       ;;
7004     sparc)
7005       VAR_CPU=sparc
7006       VAR_CPU_ARCH=sparc
7007       VAR_CPU_BITS=32
7008       VAR_CPU_ENDIAN=big
7009       ;;
7010     sparcv9)
7011       VAR_CPU=sparcv9
7012       VAR_CPU_ARCH=sparc
7013       VAR_CPU_BITS=64
7014       VAR_CPU_ENDIAN=big
7015       ;;
7016     *)
7017       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
7018       ;;
7019   esac
7020 
7021   # ... and setup our own variables. (Do this explicitely to facilitate searching)
7022   OPENJDK_TARGET_OS="$VAR_OS"
7023   OPENJDK_TARGET_OS_API="$VAR_OS_API"
7024   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
7025   OPENJDK_TARGET_CPU="$VAR_CPU"
7026   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
7027   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
7028   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
7029 
7030 
7031 
7032 
7033 
7034 
7035 
7036   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7037 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
7038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7039 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7040 
7041 
7042 
7043 # Check whether --with-target-bits was given.
7044 if test "${with_target_bits+set}" = set; then :
7045   withval=$with_target_bits;
7046 fi
7047 
7048 
7049   # We have three types of compiles:
7050   # native  == normal compilation, target system == build system
7051   # cross   == traditional cross compilation, target system != build system; special toolchain needed
7052   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7053   #
7054   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7055     # We're doing a proper cross-compilation
7056     COMPILE_TYPE="cross"
7057   else
7058     COMPILE_TYPE="native"
7059   fi
7060 
7061   if test "x$with_target_bits" != x; then
7062     if test "x$COMPILE_TYPE" = "xcross"; then
7063       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7064     fi
7065 
7066     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7067       # A reduced build is requested
7068       COMPILE_TYPE="reduced"
7069       OPENJDK_TARGET_CPU_BITS=32
7070       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7071         OPENJDK_TARGET_CPU=x86
7072       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7073         OPENJDK_TARGET_CPU=sparc
7074       else
7075         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7076       fi
7077     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7078       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
7079     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7080       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7081 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7082     else
7083       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7084     fi
7085   fi
7086 
7087 
7088   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7089 $as_echo_n "checking compilation type... " >&6; }
7090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7091 $as_echo "$COMPILE_TYPE" >&6; }
7092 
7093 
7094   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7095     REQUIRED_OS_NAME=SunOS
7096     REQUIRED_OS_VERSION=5.10
7097   fi
7098   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7099     REQUIRED_OS_NAME=Linux
7100     REQUIRED_OS_VERSION=2.6
7101   fi
7102   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7103     REQUIRED_OS_NAME=Windows
7104     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7105       REQUIRED_OS_VERSION=5.2
7106     else
7107       REQUIRED_OS_VERSION=5.1
7108     fi
7109   fi
7110   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7111     REQUIRED_OS_NAME=Darwin
7112     REQUIRED_OS_VERSION=11.2
7113   fi
7114 
7115 
7116 
7117 
7118 
7119   # Also store the legacy naming of the cpu.
7120   # Ie i586 and amd64 instead of x86 and x86_64
7121   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7122   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7123     OPENJDK_TARGET_CPU_LEGACY="i586"
7124   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7125     # On all platforms except MacOSX replace x86_64 with amd64.
7126     OPENJDK_TARGET_CPU_LEGACY="amd64"
7127   fi
7128 
7129 
7130   # And the second legacy naming of the cpu.
7131   # Ie i386 and amd64 instead of x86 and x86_64.
7132   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7133   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7134     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7135   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7136     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7137   fi
7138 
7139 
7140   # This is the name of the cpu (but using i386 and amd64 instead of
7141   # x86 and x86_64, respectively), preceeded by a /, to be used when
7142   # locating libraries. On macosx, it's empty, though.
7143   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7144   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7145     OPENJDK_TARGET_CPU_LIBDIR=""
7146   fi
7147 
7148 
7149   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7150   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7151   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7152   OPENJDK_TARGET_CPU_ISADIR=""
7153   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7154     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7155       OPENJDK_TARGET_CPU_ISADIR="/amd64"
7156     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7157       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7158     fi
7159   fi
7160 
7161 
7162   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7163   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7164   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7165     # On linux only, we replace x86 with i386.
7166     OPENJDK_TARGET_CPU_OSARCH="i386"
7167   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7168     # On all platforms except macosx, we replace x86_64 with amd64.
7169     OPENJDK_TARGET_CPU_OSARCH="amd64"
7170   fi
7171 
7172 
7173   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7174   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7175     OPENJDK_TARGET_CPU_JLI="i386"
7176   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7177     # On all platforms except macosx, we replace x86_64 with amd64.
7178     OPENJDK_TARGET_CPU_JLI="amd64"
7179   fi
7180   # Now setup the -D flags for building libjli.
7181   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7182   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7183     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7184       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7185     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7186       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7187     fi
7188   fi
7189 
7190 
7191   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7192   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7193     OPENJDK_TARGET_OS_API_DIR="solaris"
7194   fi
7195   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7196     OPENJDK_TARGET_OS_API_DIR="windows"
7197   fi
7198 
7199 
7200   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7201       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7202   else
7203       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7204   fi
7205 
7206 
7207   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7208     A_LP64="LP64:="
7209     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7210     # unpack200.exe
7211     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7212       ADD_LP64="-D_LP64=1"
7213     fi
7214   fi
7215   LP64=$A_LP64
7216 
7217 
7218   if test "x$COMPILE_TYPE" = "xcross"; then
7219     # FIXME: ... or should this include reduced builds..?
7220     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7221   else
7222     DEFINE_CROSS_COMPILE_ARCH=""
7223   fi
7224 
7225 
7226   # ZERO_ARCHDEF is used to enable architecture-specific code
7227   case "${OPENJDK_TARGET_CPU}" in
7228     ppc)     ZERO_ARCHDEF=PPC32 ;;
7229     ppc64)   ZERO_ARCHDEF=PPC64 ;;
7230     s390*)   ZERO_ARCHDEF=S390  ;;
7231     sparc*)  ZERO_ARCHDEF=SPARC ;;
7232     x86_64*) ZERO_ARCHDEF=AMD64 ;;
7233     x86)     ZERO_ARCHDEF=IA32  ;;
7234     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7235   esac
7236 
7237 
7238 
7239 
7240 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7241 
7242   # Locate the directory of this script.
7243   SCRIPT="$0"
7244   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7245 
7246   # Where is the source? It is located two levels above the configure script.
7247   CURDIR="$PWD"
7248   cd "$AUTOCONF_DIR/../.."
7249   SRC_ROOT="`$THEPWDCMD -L`"
7250 
7251   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7252     PATH_SEP=";"
7253 
7254   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7255   if test $SRC_ROOT_LENGTH -gt 100; then
7256     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7257   fi
7258 
7259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7260     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7261 $as_echo_n "checking cygwin release... " >&6; }
7262     CYGWIN_VERSION=`$UNAME -r`
7263     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7264 $as_echo "$CYGWIN_VERSION" >&6; }
7265     WINDOWS_ENV_VENDOR='cygwin'
7266     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7267 
7268     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
7269     if test "x$CYGWIN_VERSION_OLD" != x; then
7270       { $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
7271 $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;}
7272       as_fn_error $? "Cannot continue" "$LINENO" 5
7273     fi
7274     if test "x$CYGPATH" = x; then
7275       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7276     fi
7277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7278 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7279     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7280     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7281     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7282     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7283     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7284 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7285     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7286     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7287     if test "x$test_cygdrive_prefix" = x; then
7288       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7289     fi
7290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7291     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7292 $as_echo_n "checking msys release... " >&6; }
7293     MSYS_VERSION=`$UNAME -r`
7294     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7295 $as_echo "$MSYS_VERSION" >&6; }
7296 
7297     WINDOWS_ENV_VENDOR='msys'
7298     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7299 
7300     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7301 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7302     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7303     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7304 
7305   windows_path="$MSYS_ROOT_PATH"
7306   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7307     unix_path=`$CYGPATH -u "$windows_path"`
7308     MSYS_ROOT_PATH="$unix_path"
7309   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7310     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7311     MSYS_ROOT_PATH="$unix_path"
7312   fi
7313 
7314     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7315 $as_echo "$MSYS_ROOT_PATH" >&6; }
7316     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7317   else
7318     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7319   fi
7320 
7321   # Test if windows or unix (cygwin/msys) find is first in path.
7322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7323 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7324   FIND_BINARY_OUTPUT=`find --version 2>&1`
7325   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7326     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7327 $as_echo "unix style" >&6; }
7328   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7329     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7330 $as_echo "Windows" >&6; }
7331     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7332 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7333     { $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
7334 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7335     as_fn_error $? "Cannot continue" "$LINENO" 5
7336   else
7337     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7338 $as_echo "unknown" >&6; }
7339     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7340 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7341   fi
7342 
7343   else
7344     PATH_SEP=":"
7345   fi
7346 
7347 
7348 
7349   cd "$CURDIR"
7350 
7351 
7352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7353 
7354   # Input might be given as Windows format, start by converting to
7355   # unix format.
7356   path="$SRC_ROOT"
7357   new_path=`$CYGPATH -u "$path"`
7358 
7359   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7360   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7361   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7362   # "foo.exe" is OK but "foo" is an error.
7363   #
7364   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7365   # It is also a way to make sure we got the proper file name for the real test later on.
7366   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7367   if test "x$test_shortpath" = x; then
7368     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7369 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7370     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7371   fi
7372 
7373   # Call helper function which possibly converts this using DOS-style short mode.
7374   # If so, the updated path is stored in $new_path.
7375 
7376   input_path="$new_path"
7377   # Check if we need to convert this using DOS-style short mode. If the path
7378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7379   # take no chances and rewrite it.
7380   # Note: m4 eats our [], so we need to use [ and ] instead.
7381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7382   if test "x$has_forbidden_chars" != x; then
7383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7384     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7385     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7386     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7387       # Going to short mode and back again did indeed matter. Since short mode is
7388       # case insensitive, let's make it lowercase to improve readability.
7389       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7390       # Now convert it back to Unix-stile (cygpath)
7391       input_path=`$CYGPATH -u "$shortmode_path"`
7392       new_path="$input_path"
7393     fi
7394   fi
7395 
7396   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7397   if test "x$test_cygdrive_prefix" = x; then
7398     # As a simple fix, exclude /usr/bin since it's not a real path.
7399     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7400       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7401       # a path prefixed by /cygdrive for fixpath to work.
7402       new_path="$CYGWIN_ROOT_PATH$input_path"
7403     fi
7404   fi
7405 
7406 
7407   if test "x$path" != "x$new_path"; then
7408     SRC_ROOT="$new_path"
7409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7410 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7411   fi
7412 
7413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7414 
7415   path="$SRC_ROOT"
7416   has_colon=`$ECHO $path | $GREP ^.:`
7417   new_path="$path"
7418   if test "x$has_colon" = x; then
7419     # Not in mixed or Windows style, start by that.
7420     new_path=`cmd //c echo $path`
7421   fi
7422 
7423 
7424   input_path="$new_path"
7425   # Check if we need to convert this using DOS-style short mode. If the path
7426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7427   # take no chances and rewrite it.
7428   # Note: m4 eats our [], so we need to use [ and ] instead.
7429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7430   if test "x$has_forbidden_chars" != x; then
7431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7433   fi
7434 
7435 
7436   windows_path="$new_path"
7437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7438     unix_path=`$CYGPATH -u "$windows_path"`
7439     new_path="$unix_path"
7440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7442     new_path="$unix_path"
7443   fi
7444 
7445   if test "x$path" != "x$new_path"; then
7446     SRC_ROOT="$new_path"
7447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7448 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7449   fi
7450 
7451   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7452   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7453 
7454   else
7455     # We're on a posix platform. Hooray! :)
7456     path="$SRC_ROOT"
7457     has_space=`$ECHO "$path" | $GREP " "`
7458     if test "x$has_space" != x; then
7459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7460 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7461       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7462     fi
7463 
7464     # Use eval to expand a potential ~
7465     eval path="$path"
7466     if test ! -f "$path" && test ! -d "$path"; then
7467       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7468     fi
7469 
7470     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7471   fi
7472 
7473 
7474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7475 
7476   # Input might be given as Windows format, start by converting to
7477   # unix format.
7478   path="$CURDIR"
7479   new_path=`$CYGPATH -u "$path"`
7480 
7481   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7482   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7483   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7484   # "foo.exe" is OK but "foo" is an error.
7485   #
7486   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7487   # It is also a way to make sure we got the proper file name for the real test later on.
7488   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7489   if test "x$test_shortpath" = x; then
7490     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7491 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7492     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7493   fi
7494 
7495   # Call helper function which possibly converts this using DOS-style short mode.
7496   # If so, the updated path is stored in $new_path.
7497 
7498   input_path="$new_path"
7499   # Check if we need to convert this using DOS-style short mode. If the path
7500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7501   # take no chances and rewrite it.
7502   # Note: m4 eats our [], so we need to use [ and ] instead.
7503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7504   if test "x$has_forbidden_chars" != x; then
7505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7506     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7507     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7508     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7509       # Going to short mode and back again did indeed matter. Since short mode is
7510       # case insensitive, let's make it lowercase to improve readability.
7511       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7512       # Now convert it back to Unix-stile (cygpath)
7513       input_path=`$CYGPATH -u "$shortmode_path"`
7514       new_path="$input_path"
7515     fi
7516   fi
7517 
7518   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7519   if test "x$test_cygdrive_prefix" = x; then
7520     # As a simple fix, exclude /usr/bin since it's not a real path.
7521     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7522       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7523       # a path prefixed by /cygdrive for fixpath to work.
7524       new_path="$CYGWIN_ROOT_PATH$input_path"
7525     fi
7526   fi
7527 
7528 
7529   if test "x$path" != "x$new_path"; then
7530     CURDIR="$new_path"
7531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7532 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7533   fi
7534 
7535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7536 
7537   path="$CURDIR"
7538   has_colon=`$ECHO $path | $GREP ^.:`
7539   new_path="$path"
7540   if test "x$has_colon" = x; then
7541     # Not in mixed or Windows style, start by that.
7542     new_path=`cmd //c echo $path`
7543   fi
7544 
7545 
7546   input_path="$new_path"
7547   # Check if we need to convert this using DOS-style short mode. If the path
7548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7549   # take no chances and rewrite it.
7550   # Note: m4 eats our [], so we need to use [ and ] instead.
7551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7552   if test "x$has_forbidden_chars" != x; then
7553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7554     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7555   fi
7556 
7557 
7558   windows_path="$new_path"
7559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7560     unix_path=`$CYGPATH -u "$windows_path"`
7561     new_path="$unix_path"
7562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7564     new_path="$unix_path"
7565   fi
7566 
7567   if test "x$path" != "x$new_path"; then
7568     CURDIR="$new_path"
7569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7570 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7571   fi
7572 
7573   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7574   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7575 
7576   else
7577     # We're on a posix platform. Hooray! :)
7578     path="$CURDIR"
7579     has_space=`$ECHO "$path" | $GREP " "`
7580     if test "x$has_space" != x; then
7581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7582 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7583       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7584     fi
7585 
7586     # Use eval to expand a potential ~
7587     eval path="$path"
7588     if test ! -f "$path" && test ! -d "$path"; then
7589       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7590     fi
7591 
7592     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7593   fi
7594 
7595 
7596   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7597     # Add extra search paths on solaris for utilities like ar and as etc...
7598     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7599   fi
7600 
7601   # You can force the sys-root if the sys-root encoded into the cross compiler tools
7602   # is not correct.
7603 
7604 # Check whether --with-sys-root was given.
7605 if test "${with_sys_root+set}" = set; then :
7606   withval=$with_sys_root;
7607 fi
7608 
7609 
7610   if test "x$with_sys_root" != x; then
7611     SYS_ROOT=$with_sys_root
7612   else
7613     SYS_ROOT=/
7614   fi
7615 
7616 
7617 
7618 # Check whether --with-tools-dir was given.
7619 if test "${with_tools_dir+set}" = set; then :
7620   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7621 
7622 fi
7623 
7624 
7625   # Xcode version will be validated later
7626 
7627 # Check whether --with-xcode-path was given.
7628 if test "${with_xcode_path+set}" = set; then :
7629   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
7630 
7631 fi
7632 
7633 
7634 
7635 # Check whether --with-devkit was given.
7636 if test "${with_devkit+set}" = set; then :
7637   withval=$with_devkit;
7638         if test "x$with_sys_root" != x; then
7639           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7640         fi
7641 
7642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7643 
7644   # Input might be given as Windows format, start by converting to
7645   # unix format.
7646   path="$with_devkit"
7647   new_path=`$CYGPATH -u "$path"`
7648 
7649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7652   # "foo.exe" is OK but "foo" is an error.
7653   #
7654   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7655   # It is also a way to make sure we got the proper file name for the real test later on.
7656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7657   if test "x$test_shortpath" = x; then
7658     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7659 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7660     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7661   fi
7662 
7663   # Call helper function which possibly converts this using DOS-style short mode.
7664   # If so, the updated path is stored in $new_path.
7665 
7666   input_path="$new_path"
7667   # Check if we need to convert this using DOS-style short mode. If the path
7668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7669   # take no chances and rewrite it.
7670   # Note: m4 eats our [], so we need to use [ and ] instead.
7671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7672   if test "x$has_forbidden_chars" != x; then
7673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7674     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7675     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7676     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7677       # Going to short mode and back again did indeed matter. Since short mode is
7678       # case insensitive, let's make it lowercase to improve readability.
7679       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7680       # Now convert it back to Unix-stile (cygpath)
7681       input_path=`$CYGPATH -u "$shortmode_path"`
7682       new_path="$input_path"
7683     fi
7684   fi
7685 
7686   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7687   if test "x$test_cygdrive_prefix" = x; then
7688     # As a simple fix, exclude /usr/bin since it's not a real path.
7689     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7690       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7691       # a path prefixed by /cygdrive for fixpath to work.
7692       new_path="$CYGWIN_ROOT_PATH$input_path"
7693     fi
7694   fi
7695 
7696 
7697   if test "x$path" != "x$new_path"; then
7698     with_devkit="$new_path"
7699     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7700 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7701   fi
7702 
7703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7704 
7705   path="$with_devkit"
7706   has_colon=`$ECHO $path | $GREP ^.:`
7707   new_path="$path"
7708   if test "x$has_colon" = x; then
7709     # Not in mixed or Windows style, start by that.
7710     new_path=`cmd //c echo $path`
7711   fi
7712 
7713 
7714   input_path="$new_path"
7715   # Check if we need to convert this using DOS-style short mode. If the path
7716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7717   # take no chances and rewrite it.
7718   # Note: m4 eats our [], so we need to use [ and ] instead.
7719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7720   if test "x$has_forbidden_chars" != x; then
7721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7722     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7723   fi
7724 
7725 
7726   windows_path="$new_path"
7727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7728     unix_path=`$CYGPATH -u "$windows_path"`
7729     new_path="$unix_path"
7730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7732     new_path="$unix_path"
7733   fi
7734 
7735   if test "x$path" != "x$new_path"; then
7736     with_devkit="$new_path"
7737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7738 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7739   fi
7740 
7741   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7742   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7743 
7744   else
7745     # We're on a posix platform. Hooray! :)
7746     path="$with_devkit"
7747     has_space=`$ECHO "$path" | $GREP " "`
7748     if test "x$has_space" != x; then
7749       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7750 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7751       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7752     fi
7753 
7754     # Use eval to expand a potential ~
7755     eval path="$path"
7756     if test ! -f "$path" && test ! -d "$path"; then
7757       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7758     fi
7759 
7760     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7761   fi
7762 
7763 
7764   if test "x$TOOLS_DIR" = x; then
7765     TOOLS_DIR="$with_devkit/bin"
7766   else
7767     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7768   fi
7769 
7770         if test -d "$with_devkit/$host_alias/libc"; then
7771           SYS_ROOT=$with_devkit/$host_alias/libc
7772         elif test -d "$with_devkit/$host/sys-root"; then
7773           SYS_ROOT=$with_devkit/$host/sys-root
7774         fi
7775 
7776 fi
7777 
7778 
7779 
7780   # Setup default logging of stdout and stderr to build.log in the output root.
7781   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7782   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7783   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7784 
7785 
7786 
7787 
7788 
7789 # Check if it's a pure open build or if custom sources are to be used.
7790 
7791   # Check whether --enable-openjdk-only was given.
7792 if test "${enable_openjdk_only+set}" = set; then :
7793   enableval=$enable_openjdk_only;
7794 else
7795   enable_openjdk_only="no"
7796 fi
7797 
7798 
7799   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7800 $as_echo_n "checking for presence of closed sources... " >&6; }
7801   if test -d "$SRC_ROOT/jdk/src/closed"; then
7802     CLOSED_SOURCE_PRESENT=yes
7803   else
7804     CLOSED_SOURCE_PRESENT=no
7805   fi
7806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7807 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7808 
7809   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7810 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7811   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7813 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7814 
7815   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7816     OPENJDK=true
7817     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7818       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7819 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7820     fi
7821   else
7822     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7823       OPENJDK=true
7824     else
7825       OPENJDK=false
7826     fi
7827   fi
7828 
7829   if test "x$OPENJDK" = "xtrue"; then
7830     SET_OPENJDK="OPENJDK=true"
7831   fi
7832 
7833 
7834 
7835 
7836 # These are needed to be able to create a configuration name (and thus the output directory)
7837 
7838   ###############################################################################
7839   #
7840   # Check which variant of the JDK that we want to build.
7841   # Currently we have:
7842   #    normal:   standard edition
7843   # but the custom make system may add other variants
7844   #
7845   # Effectively the JDK variant gives a name to a specific set of
7846   # modules to compile into the JDK. In the future, these modules
7847   # might even be Jigsaw modules.
7848   #
7849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7850 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7851 
7852 # Check whether --with-jdk-variant was given.
7853 if test "${with_jdk_variant+set}" = set; then :
7854   withval=$with_jdk_variant;
7855 fi
7856 
7857 
7858   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7859     JDK_VARIANT="normal"
7860   else
7861     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7862   fi
7863 
7864 
7865 
7866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7867 $as_echo "$JDK_VARIANT" >&6; }
7868 
7869 
7870 ###############################################################################
7871 #
7872 # Check which interpreter of the JVM we want to build.
7873 # Currently we have:
7874 #    template: Template interpreter (the default)
7875 #    cpp     : C++ interpreter
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7877 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7878 
7879 # Check whether --with-jvm-interpreter was given.
7880 if test "${with_jvm_interpreter+set}" = set; then :
7881   withval=$with_jvm_interpreter;
7882 fi
7883 
7884 
7885 if test "x$with_jvm_interpreter" = x; then
7886      with_jvm_interpreter="template"
7887 fi
7888 
7889 JVM_INTERPRETER="$with_jvm_interpreter"
7890 
7891 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7892    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7893 fi
7894 
7895 
7896 
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7898 $as_echo "$with_jvm_interpreter" >&6; }
7899 
7900 
7901 
7902   ###############################################################################
7903   #
7904   # Check which variants of the JVM that we want to build.
7905   # Currently we have:
7906   #    server: normal interpreter and a tiered C1/C2 compiler
7907   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7908   #    minimal1: reduced form of client with optional VM services and features stripped out
7909   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7910   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7911   #    zero: no machine code interpreter, no compiler
7912   #    zeroshark: zero interpreter and shark/llvm compiler backend
7913 #    core: interpreter only, no compiler (only works on some platforms)
7914   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7915 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7916 
7917 # Check whether --with-jvm-variants was given.
7918 if test "${with_jvm_variants+set}" = set; then :
7919   withval=$with_jvm_variants;
7920 fi
7921 
7922 
7923   if test "x$with_jvm_variants" = x; then
7924     with_jvm_variants="server"
7925   fi
7926 
7927   JVM_VARIANTS=",$with_jvm_variants,"
7928   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,//'`
7929 
7930   if test "x$TEST_VARIANTS" != "x,"; then
7931      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7932   fi
7933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7934 $as_echo "$with_jvm_variants" >&6; }
7935 
7936   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7937   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7938   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7939   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7940   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7941   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7942   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7943 
7944   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7945     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7946       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7947     fi
7948   fi
7949   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7950     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7951       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7952     fi
7953   fi
7954   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7955     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7956       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7957     fi
7958   fi
7959 
7960   # Replace the commas with AND for use in the build directory name.
7961   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
7962   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/'`
7963   if test "x$COUNT_VARIANTS" != "x,1"; then
7964     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7965   else
7966     BUILDING_MULTIPLE_JVM_VARIANTS=no
7967   fi
7968 
7969 
7970 
7971 
7972 
7973 
7974 
7975 
7976 
7977 
7978   INCLUDE_SA=true
7979   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7980     INCLUDE_SA=false
7981   fi
7982   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7983     INCLUDE_SA=false
7984   fi
7985   if test "x$VAR_CPU" = xppc64 ; then
7986     INCLUDE_SA=false
7987   fi
7988   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
7989     INCLUDE_SA=false
7990   fi
7991 
7992 
7993   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7994     MACOSX_UNIVERSAL="false"
7995   fi
7996 
7997 
7998 
7999 
8000   ###############################################################################
8001   #
8002   # Set the debug level
8003   #    release: no debug information, all optimizations, no asserts.
8004   #    fastdebug: debug information (-g), all optimizations, all asserts
8005   #    slowdebug: debug information (-g), no optimizations, all asserts
8006   #
8007   DEBUG_LEVEL="release"
8008   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
8009 $as_echo_n "checking which debug level to use... " >&6; }
8010   # Check whether --enable-debug was given.
8011 if test "${enable_debug+set}" = set; then :
8012   enableval=$enable_debug;
8013         ENABLE_DEBUG="${enableval}"
8014         DEBUG_LEVEL="fastdebug"
8015 
8016 else
8017   ENABLE_DEBUG="no"
8018 fi
8019 
8020 
8021 
8022 # Check whether --with-debug-level was given.
8023 if test "${with_debug_level+set}" = set; then :
8024   withval=$with_debug_level;
8025         DEBUG_LEVEL="${withval}"
8026         if test "x$ENABLE_DEBUG" = xyes; then
8027           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
8028         fi
8029 
8030 fi
8031 
8032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8033 $as_echo "$DEBUG_LEVEL" >&6; }
8034 
8035   if test "x$DEBUG_LEVEL" != xrelease && \
8036       test "x$DEBUG_LEVEL" != xfastdebug && \
8037       test "x$DEBUG_LEVEL" != xslowdebug; then
8038     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8039   fi
8040 
8041 
8042   ###############################################################################
8043   #
8044   # Setup legacy vars/targets and new vars to deal with different debug levels.
8045   #
8046 
8047   case $DEBUG_LEVEL in
8048     release )
8049       VARIANT="OPT"
8050       FASTDEBUG="false"
8051       DEBUG_CLASSFILES="false"
8052       BUILD_VARIANT_RELEASE=""
8053       HOTSPOT_DEBUG_LEVEL="product"
8054       HOTSPOT_EXPORT="product"
8055       ;;
8056     fastdebug )
8057       VARIANT="DBG"
8058       FASTDEBUG="true"
8059       DEBUG_CLASSFILES="true"
8060       BUILD_VARIANT_RELEASE="-fastdebug"
8061       HOTSPOT_DEBUG_LEVEL="fastdebug"
8062       HOTSPOT_EXPORT="fastdebug"
8063       ;;
8064     slowdebug )
8065       VARIANT="DBG"
8066       FASTDEBUG="false"
8067       DEBUG_CLASSFILES="true"
8068       BUILD_VARIANT_RELEASE="-debug"
8069       HOTSPOT_DEBUG_LEVEL="jvmg"
8070       HOTSPOT_EXPORT="debug"
8071       ;;
8072   esac
8073 
8074   #####
8075   # Generate the legacy makefile targets for hotspot.
8076   # The hotspot api for selecting the build artifacts, really, needs to be improved.
8077   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8078   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8079   # But until then ...
8080   HOTSPOT_TARGET=""
8081 
8082   if test "x$JVM_VARIANT_SERVER" = xtrue; then
8083     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8084   fi
8085 
8086   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8087     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8088   fi
8089 
8090   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8091     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8092   fi
8093 
8094   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8095     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8096   fi
8097 
8098   if test "x$JVM_VARIANT_ZERO" = xtrue; then
8099     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8100   fi
8101 
8102   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8103     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8104   fi
8105 
8106   if test "x$JVM_VARIANT_CORE" = xtrue; then
8107     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8108   fi
8109 
8110   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8111 
8112   # On Macosx universal binaries are produced, but they only contain
8113   # 64 bit intel. This invalidates control of which jvms are built
8114   # from configure, but only server is valid anyway. Fix this
8115   # when hotspot makefiles are rewritten.
8116   if test "x$MACOSX_UNIVERSAL" = xtrue; then
8117     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8118   fi
8119 
8120   #####
8121 
8122 
8123 
8124 
8125 
8126 
8127 
8128 
8129 # With basic setup done, call the custom early hook.
8130 
8131 
8132 # To properly create a configuration name, we need to have the OpenJDK target
8133 # and options (variants and debug level) parsed.
8134 
8135 
8136 
8137 # Check whether --with-conf-name was given.
8138 if test "${with_conf_name+set}" = set; then :
8139   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8140 fi
8141 
8142 
8143   # Test from where we are running configure, in or outside of src root.
8144   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8145       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8146       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8147     # We are running configure from the src root.
8148     # Create a default ./build/target-variant-debuglevel output root.
8149     if test "x${CONF_NAME}" = x; then
8150       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8151     fi
8152     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8153     $MKDIR -p "$OUTPUT_ROOT"
8154     if test ! -d "$OUTPUT_ROOT"; then
8155       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8156     fi
8157   else
8158     # We are running configure from outside of the src dir.
8159     # Then use the current directory as output dir!
8160     # If configuration is situated in normal build directory, just use the build
8161     # directory name as configuration name, otherwise use the complete path.
8162     if test "x${CONF_NAME}" = x; then
8163       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8164     fi
8165     OUTPUT_ROOT="$CURDIR"
8166 
8167     # WARNING: This might be a bad thing to do. You need to be sure you want to
8168     # have a configuration in this directory. Do some sanity checks!
8169 
8170     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8171       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8172       # other files
8173       files_present=`$LS $OUTPUT_ROOT`
8174       # Configure has already touched config.log and confdefs.h in the current dir when this check
8175       # is performed.
8176       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8177       | $TR -d '\n'`
8178       if test "x$filtered_files" != x; then
8179         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8180 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8181         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8182 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8183         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8184 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8185         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8186 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8187         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8188 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8189         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8190 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8191         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8192 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8193         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8194       fi
8195     fi
8196   fi
8197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8198 $as_echo_n "checking what configuration name to use... " >&6; }
8199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8200 $as_echo "$CONF_NAME" >&6; }
8201 
8202 
8203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8204 
8205   # Input might be given as Windows format, start by converting to
8206   # unix format.
8207   path="$OUTPUT_ROOT"
8208   new_path=`$CYGPATH -u "$path"`
8209 
8210   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8211   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8212   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8213   # "foo.exe" is OK but "foo" is an error.
8214   #
8215   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8216   # It is also a way to make sure we got the proper file name for the real test later on.
8217   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8218   if test "x$test_shortpath" = x; then
8219     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8220 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8221     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8222   fi
8223 
8224   # Call helper function which possibly converts this using DOS-style short mode.
8225   # If so, the updated path is stored in $new_path.
8226 
8227   input_path="$new_path"
8228   # Check if we need to convert this using DOS-style short mode. If the path
8229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8230   # take no chances and rewrite it.
8231   # Note: m4 eats our [], so we need to use [ and ] instead.
8232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8233   if test "x$has_forbidden_chars" != x; then
8234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8238       # Going to short mode and back again did indeed matter. Since short mode is
8239       # case insensitive, let's make it lowercase to improve readability.
8240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8241       # Now convert it back to Unix-stile (cygpath)
8242       input_path=`$CYGPATH -u "$shortmode_path"`
8243       new_path="$input_path"
8244     fi
8245   fi
8246 
8247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8248   if test "x$test_cygdrive_prefix" = x; then
8249     # As a simple fix, exclude /usr/bin since it's not a real path.
8250     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8252       # a path prefixed by /cygdrive for fixpath to work.
8253       new_path="$CYGWIN_ROOT_PATH$input_path"
8254     fi
8255   fi
8256 
8257 
8258   if test "x$path" != "x$new_path"; then
8259     OUTPUT_ROOT="$new_path"
8260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8261 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8262   fi
8263 
8264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8265 
8266   path="$OUTPUT_ROOT"
8267   has_colon=`$ECHO $path | $GREP ^.:`
8268   new_path="$path"
8269   if test "x$has_colon" = x; then
8270     # Not in mixed or Windows style, start by that.
8271     new_path=`cmd //c echo $path`
8272   fi
8273 
8274 
8275   input_path="$new_path"
8276   # Check if we need to convert this using DOS-style short mode. If the path
8277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8278   # take no chances and rewrite it.
8279   # Note: m4 eats our [], so we need to use [ and ] instead.
8280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8281   if test "x$has_forbidden_chars" != x; then
8282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8283     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8284   fi
8285 
8286 
8287   windows_path="$new_path"
8288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8289     unix_path=`$CYGPATH -u "$windows_path"`
8290     new_path="$unix_path"
8291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8293     new_path="$unix_path"
8294   fi
8295 
8296   if test "x$path" != "x$new_path"; then
8297     OUTPUT_ROOT="$new_path"
8298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8299 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8300   fi
8301 
8302   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8303   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8304 
8305   else
8306     # We're on a posix platform. Hooray! :)
8307     path="$OUTPUT_ROOT"
8308     has_space=`$ECHO "$path" | $GREP " "`
8309     if test "x$has_space" != x; then
8310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8311 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8312       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8313     fi
8314 
8315     # Use eval to expand a potential ~
8316     eval path="$path"
8317     if test ! -f "$path" && test ! -d "$path"; then
8318       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8319     fi
8320 
8321     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8322   fi
8323 
8324 
8325   SPEC=$OUTPUT_ROOT/spec.gmk
8326 
8327   CONF_NAME=$CONF_NAME
8328 
8329   OUTPUT_ROOT=$OUTPUT_ROOT
8330 
8331 
8332   # Most of the probed defines are put into config.h
8333   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8334 
8335   # The spec.gmk file contains all variables for the make system.
8336   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8337 
8338   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8339   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8340 
8341   # The bootcycle-spec.gmk file contains support for boot cycle builds.
8342   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8343 
8344   # The compare.sh is used to compare the build output to other builds.
8345   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8346 
8347   # Spec.sh is currently used by compare-objects.sh
8348   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8349 
8350   # The generated Makefile knows where the spec.gmk is and where the source is.
8351   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8352   # which will look for generated configurations
8353   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8354 
8355 
8356   # Save the arguments given to us
8357   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8358 
8359 
8360 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8361 
8362   for ac_prog in apt-get yum port pkgutil pkgadd
8363 do
8364   # Extract the first word of "$ac_prog", so it can be a program name with args.
8365 set dummy $ac_prog; ac_word=$2
8366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8367 $as_echo_n "checking for $ac_word... " >&6; }
8368 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8369   $as_echo_n "(cached) " >&6
8370 else
8371   if test -n "$PKGHANDLER"; then
8372   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8373 else
8374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8375 for as_dir in $PATH
8376 do
8377   IFS=$as_save_IFS
8378   test -z "$as_dir" && as_dir=.
8379     for ac_exec_ext in '' $ac_executable_extensions; do
8380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8381     ac_cv_prog_PKGHANDLER="$ac_prog"
8382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8383     break 2
8384   fi
8385 done
8386   done
8387 IFS=$as_save_IFS
8388 
8389 fi
8390 fi
8391 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8392 if test -n "$PKGHANDLER"; then
8393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8394 $as_echo "$PKGHANDLER" >&6; }
8395 else
8396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8397 $as_echo "no" >&6; }
8398 fi
8399 
8400 
8401   test -n "$PKGHANDLER" && break
8402 done
8403 
8404 
8405 
8406 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8407 
8408 
8409   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8410   if test "x$MAKE" != x; then
8411     # User has supplied a make, test it.
8412     if test ! -f "$MAKE"; then
8413       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8414     fi
8415 
8416   MAKE_CANDIDATE=""$MAKE""
8417   DESCRIPTION="user supplied MAKE=$MAKE"
8418   if test "x$MAKE_CANDIDATE" != x; then
8419     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8420 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8421     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8422     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8423     if test "x$IS_GNU_MAKE" = x; then
8424       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8425 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8426     else
8427       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8428       if test "x$IS_MODERN_MAKE" = x; then
8429         { $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
8430 $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;}
8431       else
8432         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8433           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8434             MAKE_EXPECTED_ENV='cygwin'
8435           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8436             MAKE_EXPECTED_ENV='msys'
8437           else
8438             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8439           fi
8440           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8441           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8442         else
8443           # Not relevant for non-Windows
8444           IS_MAKE_CORRECT_ENV=true
8445         fi
8446         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8447           { $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
8448 $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;}
8449         else
8450           FOUND_MAKE=$MAKE_CANDIDATE
8451 
8452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8453 
8454   # First separate the path from the arguments. This will split at the first
8455   # space.
8456   complete="$FOUND_MAKE"
8457   path="${complete%% *}"
8458   tmp="$complete EOL"
8459   arguments="${tmp#* }"
8460 
8461   # Input might be given as Windows format, start by converting to
8462   # unix format.
8463   new_path=`$CYGPATH -u "$path"`
8464 
8465   # Now try to locate executable using which
8466   new_path=`$WHICH "$new_path" 2> /dev/null`
8467   # bat and cmd files are not always considered executable in cygwin causing which
8468   # to not find them
8469   if test "x$new_path" = x \
8470       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8471       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8472     new_path=`$CYGPATH -u "$path"`
8473   fi
8474   if test "x$new_path" = x; then
8475     # Oops. Which didn't find the executable.
8476     # The splitting of arguments from the executable at a space might have been incorrect,
8477     # since paths with space are more likely in Windows. Give it another try with the whole
8478     # argument.
8479     path="$complete"
8480     arguments="EOL"
8481     new_path=`$CYGPATH -u "$path"`
8482     new_path=`$WHICH "$new_path" 2> /dev/null`
8483     # bat and cmd files are not always considered executable in cygwin causing which
8484     # to not find them
8485     if test "x$new_path" = x \
8486         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8487         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8488       new_path=`$CYGPATH -u "$path"`
8489     fi
8490     if test "x$new_path" = x; then
8491       # It's still not found. Now this is an unrecoverable error.
8492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8493 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8494       has_space=`$ECHO "$complete" | $GREP " "`
8495       if test "x$has_space" != x; then
8496         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8497 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8498       fi
8499       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8500     fi
8501   fi
8502 
8503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8506   # "foo.exe" is OK but "foo" is an error.
8507   #
8508   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8509   # It is also a way to make sure we got the proper file name for the real test later on.
8510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8511   if test "x$test_shortpath" = x; then
8512     # Short path failed, file does not exist as specified.
8513     # Try adding .exe or .cmd
8514     if test -f "${new_path}.exe"; then
8515       input_to_shortpath="${new_path}.exe"
8516     elif test -f "${new_path}.cmd"; then
8517       input_to_shortpath="${new_path}.cmd"
8518     else
8519       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8520 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8521       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8522 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8523       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8524     fi
8525   else
8526     input_to_shortpath="$new_path"
8527   fi
8528 
8529   # Call helper function which possibly converts this using DOS-style short mode.
8530   # If so, the updated path is stored in $new_path.
8531   new_path="$input_to_shortpath"
8532 
8533   input_path="$input_to_shortpath"
8534   # Check if we need to convert this using DOS-style short mode. If the path
8535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8536   # take no chances and rewrite it.
8537   # Note: m4 eats our [], so we need to use [ and ] instead.
8538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8539   if test "x$has_forbidden_chars" != x; then
8540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8541     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8542     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8543     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8544       # Going to short mode and back again did indeed matter. Since short mode is
8545       # case insensitive, let's make it lowercase to improve readability.
8546       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8547       # Now convert it back to Unix-stile (cygpath)
8548       input_path=`$CYGPATH -u "$shortmode_path"`
8549       new_path="$input_path"
8550     fi
8551   fi
8552 
8553   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8554   if test "x$test_cygdrive_prefix" = x; then
8555     # As a simple fix, exclude /usr/bin since it's not a real path.
8556     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8557       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8558       # a path prefixed by /cygdrive for fixpath to work.
8559       new_path="$CYGWIN_ROOT_PATH$input_path"
8560     fi
8561   fi
8562 
8563   # remove trailing .exe if any
8564   new_path="${new_path/%.exe/}"
8565 
8566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8567 
8568   # First separate the path from the arguments. This will split at the first
8569   # space.
8570   complete="$FOUND_MAKE"
8571   path="${complete%% *}"
8572   tmp="$complete EOL"
8573   arguments="${tmp#* }"
8574 
8575   # Input might be given as Windows format, start by converting to
8576   # unix format.
8577   new_path="$path"
8578 
8579   windows_path="$new_path"
8580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8581     unix_path=`$CYGPATH -u "$windows_path"`
8582     new_path="$unix_path"
8583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8585     new_path="$unix_path"
8586   fi
8587 
8588 
8589   # Now try to locate executable using which
8590   new_path=`$WHICH "$new_path" 2> /dev/null`
8591 
8592   if test "x$new_path" = x; then
8593     # Oops. Which didn't find the executable.
8594     # The splitting of arguments from the executable at a space might have been incorrect,
8595     # since paths with space are more likely in Windows. Give it another try with the whole
8596     # argument.
8597     path="$complete"
8598     arguments="EOL"
8599     new_path="$path"
8600 
8601   windows_path="$new_path"
8602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8603     unix_path=`$CYGPATH -u "$windows_path"`
8604     new_path="$unix_path"
8605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8607     new_path="$unix_path"
8608   fi
8609 
8610 
8611     new_path=`$WHICH "$new_path" 2> /dev/null`
8612 
8613     if test "x$new_path" = x; then
8614       # It's still not found. Now this is an unrecoverable error.
8615       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8616 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8617       has_space=`$ECHO "$complete" | $GREP " "`
8618       if test "x$has_space" != x; then
8619         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8620 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8621       fi
8622       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8623     fi
8624   fi
8625 
8626   # Now new_path has a complete unix path to the binary
8627   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8628     # Keep paths in /bin as-is, but remove trailing .exe if any
8629     new_path="${new_path/%.exe/}"
8630     # Do not save /bin paths to all_fixpath_prefixes!
8631   else
8632     # Not in mixed or Windows style, start by that.
8633     new_path=`cmd //c echo $new_path`
8634 
8635   input_path="$new_path"
8636   # Check if we need to convert this using DOS-style short mode. If the path
8637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8638   # take no chances and rewrite it.
8639   # Note: m4 eats our [], so we need to use [ and ] instead.
8640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8641   if test "x$has_forbidden_chars" != x; then
8642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8643     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8644   fi
8645 
8646     # Output is in $new_path
8647 
8648   windows_path="$new_path"
8649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8650     unix_path=`$CYGPATH -u "$windows_path"`
8651     new_path="$unix_path"
8652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8654     new_path="$unix_path"
8655   fi
8656 
8657     # remove trailing .exe if any
8658     new_path="${new_path/%.exe/}"
8659 
8660     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8661     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8662   fi
8663 
8664   else
8665     # We're on a posix platform. Hooray! :)
8666     # First separate the path from the arguments. This will split at the first
8667     # space.
8668     complete="$FOUND_MAKE"
8669     path="${complete%% *}"
8670     tmp="$complete EOL"
8671     arguments="${tmp#* }"
8672 
8673     # Cannot rely on the command "which" here since it doesn't always work.
8674     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8675     if test -z "$is_absolute_path"; then
8676       # Path to executable is not absolute. Find it.
8677       IFS_save="$IFS"
8678       IFS=:
8679       for p in $PATH; do
8680         if test -f "$p/$path" && test -x "$p/$path"; then
8681           new_path="$p/$path"
8682           break
8683         fi
8684       done
8685       IFS="$IFS_save"
8686     else
8687       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8688 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8689       new_path="$path"
8690     fi
8691 
8692     if test "x$new_path" = x; then
8693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8694 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8695       has_space=`$ECHO "$complete" | $GREP " "`
8696       if test "x$has_space" != x; then
8697         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8698 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8699       fi
8700       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8701     fi
8702   fi
8703 
8704   # Now join together the path and the arguments once again
8705   if test "x$arguments" != xEOL; then
8706     new_complete="$new_path ${arguments% *}"
8707   else
8708     new_complete="$new_path"
8709   fi
8710 
8711   if test "x$complete" != "x$new_complete"; then
8712     FOUND_MAKE="$new_complete"
8713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8714 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8715   fi
8716 
8717         fi
8718       fi
8719     fi
8720   fi
8721 
8722     if test "x$FOUND_MAKE" = x; then
8723       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8724     fi
8725   else
8726     # Try our hardest to locate a correct version of GNU make
8727     for ac_prog in gmake
8728 do
8729   # Extract the first word of "$ac_prog", so it can be a program name with args.
8730 set dummy $ac_prog; ac_word=$2
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8732 $as_echo_n "checking for $ac_word... " >&6; }
8733 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8734   $as_echo_n "(cached) " >&6
8735 else
8736   case $CHECK_GMAKE in
8737   [\\/]* | ?:[\\/]*)
8738   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8739   ;;
8740   *)
8741   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8742 for as_dir in $PATH
8743 do
8744   IFS=$as_save_IFS
8745   test -z "$as_dir" && as_dir=.
8746     for ac_exec_ext in '' $ac_executable_extensions; do
8747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8748     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8750     break 2
8751   fi
8752 done
8753   done
8754 IFS=$as_save_IFS
8755 
8756   ;;
8757 esac
8758 fi
8759 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8760 if test -n "$CHECK_GMAKE"; then
8761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8762 $as_echo "$CHECK_GMAKE" >&6; }
8763 else
8764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8765 $as_echo "no" >&6; }
8766 fi
8767 
8768 
8769   test -n "$CHECK_GMAKE" && break
8770 done
8771 
8772 
8773   MAKE_CANDIDATE=""$CHECK_GMAKE""
8774   DESCRIPTION="gmake in PATH"
8775   if test "x$MAKE_CANDIDATE" != x; then
8776     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8777 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8778     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8779     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8780     if test "x$IS_GNU_MAKE" = x; then
8781       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8782 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8783     else
8784       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8785       if test "x$IS_MODERN_MAKE" = x; then
8786         { $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
8787 $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;}
8788       else
8789         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8790           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8791             MAKE_EXPECTED_ENV='cygwin'
8792           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8793             MAKE_EXPECTED_ENV='msys'
8794           else
8795             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8796           fi
8797           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8798           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8799         else
8800           # Not relevant for non-Windows
8801           IS_MAKE_CORRECT_ENV=true
8802         fi
8803         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8804           { $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
8805 $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;}
8806         else
8807           FOUND_MAKE=$MAKE_CANDIDATE
8808 
8809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8810 
8811   # First separate the path from the arguments. This will split at the first
8812   # space.
8813   complete="$FOUND_MAKE"
8814   path="${complete%% *}"
8815   tmp="$complete EOL"
8816   arguments="${tmp#* }"
8817 
8818   # Input might be given as Windows format, start by converting to
8819   # unix format.
8820   new_path=`$CYGPATH -u "$path"`
8821 
8822   # Now try to locate executable using which
8823   new_path=`$WHICH "$new_path" 2> /dev/null`
8824   # bat and cmd files are not always considered executable in cygwin causing which
8825   # to not find them
8826   if test "x$new_path" = x \
8827       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8828       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8829     new_path=`$CYGPATH -u "$path"`
8830   fi
8831   if test "x$new_path" = x; then
8832     # Oops. Which didn't find the executable.
8833     # The splitting of arguments from the executable at a space might have been incorrect,
8834     # since paths with space are more likely in Windows. Give it another try with the whole
8835     # argument.
8836     path="$complete"
8837     arguments="EOL"
8838     new_path=`$CYGPATH -u "$path"`
8839     new_path=`$WHICH "$new_path" 2> /dev/null`
8840     # bat and cmd files are not always considered executable in cygwin causing which
8841     # to not find them
8842     if test "x$new_path" = x \
8843         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8844         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8845       new_path=`$CYGPATH -u "$path"`
8846     fi
8847     if test "x$new_path" = x; then
8848       # It's still not found. Now this is an unrecoverable error.
8849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8850 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8851       has_space=`$ECHO "$complete" | $GREP " "`
8852       if test "x$has_space" != x; then
8853         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8854 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8855       fi
8856       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8857     fi
8858   fi
8859 
8860   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8861   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8862   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8863   # "foo.exe" is OK but "foo" is an error.
8864   #
8865   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8866   # It is also a way to make sure we got the proper file name for the real test later on.
8867   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8868   if test "x$test_shortpath" = x; then
8869     # Short path failed, file does not exist as specified.
8870     # Try adding .exe or .cmd
8871     if test -f "${new_path}.exe"; then
8872       input_to_shortpath="${new_path}.exe"
8873     elif test -f "${new_path}.cmd"; then
8874       input_to_shortpath="${new_path}.cmd"
8875     else
8876       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8877 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8878       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8879 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8880       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8881     fi
8882   else
8883     input_to_shortpath="$new_path"
8884   fi
8885 
8886   # Call helper function which possibly converts this using DOS-style short mode.
8887   # If so, the updated path is stored in $new_path.
8888   new_path="$input_to_shortpath"
8889 
8890   input_path="$input_to_shortpath"
8891   # Check if we need to convert this using DOS-style short mode. If the path
8892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8893   # take no chances and rewrite it.
8894   # Note: m4 eats our [], so we need to use [ and ] instead.
8895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8896   if test "x$has_forbidden_chars" != x; then
8897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8898     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8899     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8900     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8901       # Going to short mode and back again did indeed matter. Since short mode is
8902       # case insensitive, let's make it lowercase to improve readability.
8903       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8904       # Now convert it back to Unix-stile (cygpath)
8905       input_path=`$CYGPATH -u "$shortmode_path"`
8906       new_path="$input_path"
8907     fi
8908   fi
8909 
8910   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8911   if test "x$test_cygdrive_prefix" = x; then
8912     # As a simple fix, exclude /usr/bin since it's not a real path.
8913     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8914       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8915       # a path prefixed by /cygdrive for fixpath to work.
8916       new_path="$CYGWIN_ROOT_PATH$input_path"
8917     fi
8918   fi
8919 
8920   # remove trailing .exe if any
8921   new_path="${new_path/%.exe/}"
8922 
8923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8924 
8925   # First separate the path from the arguments. This will split at the first
8926   # space.
8927   complete="$FOUND_MAKE"
8928   path="${complete%% *}"
8929   tmp="$complete EOL"
8930   arguments="${tmp#* }"
8931 
8932   # Input might be given as Windows format, start by converting to
8933   # unix format.
8934   new_path="$path"
8935 
8936   windows_path="$new_path"
8937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8938     unix_path=`$CYGPATH -u "$windows_path"`
8939     new_path="$unix_path"
8940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8942     new_path="$unix_path"
8943   fi
8944 
8945 
8946   # Now try to locate executable using which
8947   new_path=`$WHICH "$new_path" 2> /dev/null`
8948 
8949   if test "x$new_path" = x; then
8950     # Oops. Which didn't find the executable.
8951     # The splitting of arguments from the executable at a space might have been incorrect,
8952     # since paths with space are more likely in Windows. Give it another try with the whole
8953     # argument.
8954     path="$complete"
8955     arguments="EOL"
8956     new_path="$path"
8957 
8958   windows_path="$new_path"
8959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8960     unix_path=`$CYGPATH -u "$windows_path"`
8961     new_path="$unix_path"
8962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8964     new_path="$unix_path"
8965   fi
8966 
8967 
8968     new_path=`$WHICH "$new_path" 2> /dev/null`
8969 
8970     if test "x$new_path" = x; then
8971       # It's still not found. Now this is an unrecoverable error.
8972       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8973 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8974       has_space=`$ECHO "$complete" | $GREP " "`
8975       if test "x$has_space" != x; then
8976         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8977 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8978       fi
8979       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8980     fi
8981   fi
8982 
8983   # Now new_path has a complete unix path to the binary
8984   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8985     # Keep paths in /bin as-is, but remove trailing .exe if any
8986     new_path="${new_path/%.exe/}"
8987     # Do not save /bin paths to all_fixpath_prefixes!
8988   else
8989     # Not in mixed or Windows style, start by that.
8990     new_path=`cmd //c echo $new_path`
8991 
8992   input_path="$new_path"
8993   # Check if we need to convert this using DOS-style short mode. If the path
8994   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8995   # take no chances and rewrite it.
8996   # Note: m4 eats our [], so we need to use [ and ] instead.
8997   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8998   if test "x$has_forbidden_chars" != x; then
8999     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9000     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9001   fi
9002 
9003     # Output is in $new_path
9004 
9005   windows_path="$new_path"
9006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9007     unix_path=`$CYGPATH -u "$windows_path"`
9008     new_path="$unix_path"
9009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9011     new_path="$unix_path"
9012   fi
9013 
9014     # remove trailing .exe if any
9015     new_path="${new_path/%.exe/}"
9016 
9017     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9018     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9019   fi
9020 
9021   else
9022     # We're on a posix platform. Hooray! :)
9023     # First separate the path from the arguments. This will split at the first
9024     # space.
9025     complete="$FOUND_MAKE"
9026     path="${complete%% *}"
9027     tmp="$complete EOL"
9028     arguments="${tmp#* }"
9029 
9030     # Cannot rely on the command "which" here since it doesn't always work.
9031     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9032     if test -z "$is_absolute_path"; then
9033       # Path to executable is not absolute. Find it.
9034       IFS_save="$IFS"
9035       IFS=:
9036       for p in $PATH; do
9037         if test -f "$p/$path" && test -x "$p/$path"; then
9038           new_path="$p/$path"
9039           break
9040         fi
9041       done
9042       IFS="$IFS_save"
9043     else
9044       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9045 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9046       new_path="$path"
9047     fi
9048 
9049     if test "x$new_path" = x; then
9050       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9051 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9052       has_space=`$ECHO "$complete" | $GREP " "`
9053       if test "x$has_space" != x; then
9054         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9055 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9056       fi
9057       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9058     fi
9059   fi
9060 
9061   # Now join together the path and the arguments once again
9062   if test "x$arguments" != xEOL; then
9063     new_complete="$new_path ${arguments% *}"
9064   else
9065     new_complete="$new_path"
9066   fi
9067 
9068   if test "x$complete" != "x$new_complete"; then
9069     FOUND_MAKE="$new_complete"
9070     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9071 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9072   fi
9073 
9074         fi
9075       fi
9076     fi
9077   fi
9078 
9079 
9080     if test "x$FOUND_MAKE" = x; then
9081       for ac_prog in make
9082 do
9083   # Extract the first word of "$ac_prog", so it can be a program name with args.
9084 set dummy $ac_prog; ac_word=$2
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9086 $as_echo_n "checking for $ac_word... " >&6; }
9087 if ${ac_cv_path_CHECK_MAKE+:} false; then :
9088   $as_echo_n "(cached) " >&6
9089 else
9090   case $CHECK_MAKE in
9091   [\\/]* | ?:[\\/]*)
9092   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9093   ;;
9094   *)
9095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9096 for as_dir in $PATH
9097 do
9098   IFS=$as_save_IFS
9099   test -z "$as_dir" && as_dir=.
9100     for ac_exec_ext in '' $ac_executable_extensions; do
9101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9102     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9104     break 2
9105   fi
9106 done
9107   done
9108 IFS=$as_save_IFS
9109 
9110   ;;
9111 esac
9112 fi
9113 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9114 if test -n "$CHECK_MAKE"; then
9115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9116 $as_echo "$CHECK_MAKE" >&6; }
9117 else
9118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119 $as_echo "no" >&6; }
9120 fi
9121 
9122 
9123   test -n "$CHECK_MAKE" && break
9124 done
9125 
9126 
9127   MAKE_CANDIDATE=""$CHECK_MAKE""
9128   DESCRIPTION="make in PATH"
9129   if test "x$MAKE_CANDIDATE" != x; then
9130     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9131 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9132     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9133     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9134     if test "x$IS_GNU_MAKE" = x; then
9135       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9136 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9137     else
9138       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9139       if test "x$IS_MODERN_MAKE" = x; then
9140         { $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
9141 $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;}
9142       else
9143         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9144           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9145             MAKE_EXPECTED_ENV='cygwin'
9146           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9147             MAKE_EXPECTED_ENV='msys'
9148           else
9149             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9150           fi
9151           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9152           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9153         else
9154           # Not relevant for non-Windows
9155           IS_MAKE_CORRECT_ENV=true
9156         fi
9157         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9158           { $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
9159 $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;}
9160         else
9161           FOUND_MAKE=$MAKE_CANDIDATE
9162 
9163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9164 
9165   # First separate the path from the arguments. This will split at the first
9166   # space.
9167   complete="$FOUND_MAKE"
9168   path="${complete%% *}"
9169   tmp="$complete EOL"
9170   arguments="${tmp#* }"
9171 
9172   # Input might be given as Windows format, start by converting to
9173   # unix format.
9174   new_path=`$CYGPATH -u "$path"`
9175 
9176   # Now try to locate executable using which
9177   new_path=`$WHICH "$new_path" 2> /dev/null`
9178   # bat and cmd files are not always considered executable in cygwin causing which
9179   # to not find them
9180   if test "x$new_path" = x \
9181       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9182       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9183     new_path=`$CYGPATH -u "$path"`
9184   fi
9185   if test "x$new_path" = x; then
9186     # Oops. Which didn't find the executable.
9187     # The splitting of arguments from the executable at a space might have been incorrect,
9188     # since paths with space are more likely in Windows. Give it another try with the whole
9189     # argument.
9190     path="$complete"
9191     arguments="EOL"
9192     new_path=`$CYGPATH -u "$path"`
9193     new_path=`$WHICH "$new_path" 2> /dev/null`
9194     # bat and cmd files are not always considered executable in cygwin causing which
9195     # to not find them
9196     if test "x$new_path" = x \
9197         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9198         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9199       new_path=`$CYGPATH -u "$path"`
9200     fi
9201     if test "x$new_path" = x; then
9202       # It's still not found. Now this is an unrecoverable error.
9203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9204 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9205       has_space=`$ECHO "$complete" | $GREP " "`
9206       if test "x$has_space" != x; then
9207         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9209       fi
9210       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9211     fi
9212   fi
9213 
9214   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9215   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9216   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9217   # "foo.exe" is OK but "foo" is an error.
9218   #
9219   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9220   # It is also a way to make sure we got the proper file name for the real test later on.
9221   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9222   if test "x$test_shortpath" = x; then
9223     # Short path failed, file does not exist as specified.
9224     # Try adding .exe or .cmd
9225     if test -f "${new_path}.exe"; then
9226       input_to_shortpath="${new_path}.exe"
9227     elif test -f "${new_path}.cmd"; then
9228       input_to_shortpath="${new_path}.cmd"
9229     else
9230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9231 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9232       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9233 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9234       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9235     fi
9236   else
9237     input_to_shortpath="$new_path"
9238   fi
9239 
9240   # Call helper function which possibly converts this using DOS-style short mode.
9241   # If so, the updated path is stored in $new_path.
9242   new_path="$input_to_shortpath"
9243 
9244   input_path="$input_to_shortpath"
9245   # Check if we need to convert this using DOS-style short mode. If the path
9246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9247   # take no chances and rewrite it.
9248   # Note: m4 eats our [], so we need to use [ and ] instead.
9249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9250   if test "x$has_forbidden_chars" != x; then
9251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9255       # Going to short mode and back again did indeed matter. Since short mode is
9256       # case insensitive, let's make it lowercase to improve readability.
9257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9258       # Now convert it back to Unix-stile (cygpath)
9259       input_path=`$CYGPATH -u "$shortmode_path"`
9260       new_path="$input_path"
9261     fi
9262   fi
9263 
9264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9265   if test "x$test_cygdrive_prefix" = x; then
9266     # As a simple fix, exclude /usr/bin since it's not a real path.
9267     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9269       # a path prefixed by /cygdrive for fixpath to work.
9270       new_path="$CYGWIN_ROOT_PATH$input_path"
9271     fi
9272   fi
9273 
9274   # remove trailing .exe if any
9275   new_path="${new_path/%.exe/}"
9276 
9277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9278 
9279   # First separate the path from the arguments. This will split at the first
9280   # space.
9281   complete="$FOUND_MAKE"
9282   path="${complete%% *}"
9283   tmp="$complete EOL"
9284   arguments="${tmp#* }"
9285 
9286   # Input might be given as Windows format, start by converting to
9287   # unix format.
9288   new_path="$path"
9289 
9290   windows_path="$new_path"
9291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9292     unix_path=`$CYGPATH -u "$windows_path"`
9293     new_path="$unix_path"
9294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9296     new_path="$unix_path"
9297   fi
9298 
9299 
9300   # Now try to locate executable using which
9301   new_path=`$WHICH "$new_path" 2> /dev/null`
9302 
9303   if test "x$new_path" = x; then
9304     # Oops. Which didn't find the executable.
9305     # The splitting of arguments from the executable at a space might have been incorrect,
9306     # since paths with space are more likely in Windows. Give it another try with the whole
9307     # argument.
9308     path="$complete"
9309     arguments="EOL"
9310     new_path="$path"
9311 
9312   windows_path="$new_path"
9313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9314     unix_path=`$CYGPATH -u "$windows_path"`
9315     new_path="$unix_path"
9316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9318     new_path="$unix_path"
9319   fi
9320 
9321 
9322     new_path=`$WHICH "$new_path" 2> /dev/null`
9323 
9324     if test "x$new_path" = x; then
9325       # It's still not found. Now this is an unrecoverable error.
9326       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9327 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9328       has_space=`$ECHO "$complete" | $GREP " "`
9329       if test "x$has_space" != x; then
9330         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9331 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9332       fi
9333       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9334     fi
9335   fi
9336 
9337   # Now new_path has a complete unix path to the binary
9338   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9339     # Keep paths in /bin as-is, but remove trailing .exe if any
9340     new_path="${new_path/%.exe/}"
9341     # Do not save /bin paths to all_fixpath_prefixes!
9342   else
9343     # Not in mixed or Windows style, start by that.
9344     new_path=`cmd //c echo $new_path`
9345 
9346   input_path="$new_path"
9347   # Check if we need to convert this using DOS-style short mode. If the path
9348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9349   # take no chances and rewrite it.
9350   # Note: m4 eats our [], so we need to use [ and ] instead.
9351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9352   if test "x$has_forbidden_chars" != x; then
9353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9354     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9355   fi
9356 
9357     # Output is in $new_path
9358 
9359   windows_path="$new_path"
9360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9361     unix_path=`$CYGPATH -u "$windows_path"`
9362     new_path="$unix_path"
9363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9365     new_path="$unix_path"
9366   fi
9367 
9368     # remove trailing .exe if any
9369     new_path="${new_path/%.exe/}"
9370 
9371     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9372     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9373   fi
9374 
9375   else
9376     # We're on a posix platform. Hooray! :)
9377     # First separate the path from the arguments. This will split at the first
9378     # space.
9379     complete="$FOUND_MAKE"
9380     path="${complete%% *}"
9381     tmp="$complete EOL"
9382     arguments="${tmp#* }"
9383 
9384     # Cannot rely on the command "which" here since it doesn't always work.
9385     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9386     if test -z "$is_absolute_path"; then
9387       # Path to executable is not absolute. Find it.
9388       IFS_save="$IFS"
9389       IFS=:
9390       for p in $PATH; do
9391         if test -f "$p/$path" && test -x "$p/$path"; then
9392           new_path="$p/$path"
9393           break
9394         fi
9395       done
9396       IFS="$IFS_save"
9397     else
9398       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9399 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9400       new_path="$path"
9401     fi
9402 
9403     if test "x$new_path" = x; then
9404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9405 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9406       has_space=`$ECHO "$complete" | $GREP " "`
9407       if test "x$has_space" != x; then
9408         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9409 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9410       fi
9411       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9412     fi
9413   fi
9414 
9415   # Now join together the path and the arguments once again
9416   if test "x$arguments" != xEOL; then
9417     new_complete="$new_path ${arguments% *}"
9418   else
9419     new_complete="$new_path"
9420   fi
9421 
9422   if test "x$complete" != "x$new_complete"; then
9423     FOUND_MAKE="$new_complete"
9424     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9425 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9426   fi
9427 
9428         fi
9429       fi
9430     fi
9431   fi
9432 
9433     fi
9434 
9435     if test "x$FOUND_MAKE" = x; then
9436       if test "x$TOOLS_DIR" != x; then
9437         # We have a tools-dir, check that as well before giving up.
9438         OLD_PATH=$PATH
9439         PATH=$TOOLS_DIR:$PATH
9440         for ac_prog in gmake
9441 do
9442   # Extract the first word of "$ac_prog", so it can be a program name with args.
9443 set dummy $ac_prog; ac_word=$2
9444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9445 $as_echo_n "checking for $ac_word... " >&6; }
9446 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9447   $as_echo_n "(cached) " >&6
9448 else
9449   case $CHECK_TOOLSDIR_GMAKE in
9450   [\\/]* | ?:[\\/]*)
9451   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9452   ;;
9453   *)
9454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9455 for as_dir in $PATH
9456 do
9457   IFS=$as_save_IFS
9458   test -z "$as_dir" && as_dir=.
9459     for ac_exec_ext in '' $ac_executable_extensions; do
9460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9461     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9463     break 2
9464   fi
9465 done
9466   done
9467 IFS=$as_save_IFS
9468 
9469   ;;
9470 esac
9471 fi
9472 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9473 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9475 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9476 else
9477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478 $as_echo "no" >&6; }
9479 fi
9480 
9481 
9482   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9483 done
9484 
9485 
9486   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9487   DESCRIPTION="gmake in tools-dir"
9488   if test "x$MAKE_CANDIDATE" != x; then
9489     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9490 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9491     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9492     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9493     if test "x$IS_GNU_MAKE" = x; then
9494       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9495 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9496     else
9497       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9498       if test "x$IS_MODERN_MAKE" = x; then
9499         { $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
9500 $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;}
9501       else
9502         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9503           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9504             MAKE_EXPECTED_ENV='cygwin'
9505           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9506             MAKE_EXPECTED_ENV='msys'
9507           else
9508             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9509           fi
9510           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9511           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9512         else
9513           # Not relevant for non-Windows
9514           IS_MAKE_CORRECT_ENV=true
9515         fi
9516         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9517           { $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
9518 $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;}
9519         else
9520           FOUND_MAKE=$MAKE_CANDIDATE
9521 
9522   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9523 
9524   # First separate the path from the arguments. This will split at the first
9525   # space.
9526   complete="$FOUND_MAKE"
9527   path="${complete%% *}"
9528   tmp="$complete EOL"
9529   arguments="${tmp#* }"
9530 
9531   # Input might be given as Windows format, start by converting to
9532   # unix format.
9533   new_path=`$CYGPATH -u "$path"`
9534 
9535   # Now try to locate executable using which
9536   new_path=`$WHICH "$new_path" 2> /dev/null`
9537   # bat and cmd files are not always considered executable in cygwin causing which
9538   # to not find them
9539   if test "x$new_path" = x \
9540       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9541       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9542     new_path=`$CYGPATH -u "$path"`
9543   fi
9544   if test "x$new_path" = x; then
9545     # Oops. Which didn't find the executable.
9546     # The splitting of arguments from the executable at a space might have been incorrect,
9547     # since paths with space are more likely in Windows. Give it another try with the whole
9548     # argument.
9549     path="$complete"
9550     arguments="EOL"
9551     new_path=`$CYGPATH -u "$path"`
9552     new_path=`$WHICH "$new_path" 2> /dev/null`
9553     # bat and cmd files are not always considered executable in cygwin causing which
9554     # to not find them
9555     if test "x$new_path" = x \
9556         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9557         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9558       new_path=`$CYGPATH -u "$path"`
9559     fi
9560     if test "x$new_path" = x; then
9561       # It's still not found. Now this is an unrecoverable error.
9562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9563 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9564       has_space=`$ECHO "$complete" | $GREP " "`
9565       if test "x$has_space" != x; then
9566         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9567 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9568       fi
9569       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9570     fi
9571   fi
9572 
9573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9576   # "foo.exe" is OK but "foo" is an error.
9577   #
9578   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9579   # It is also a way to make sure we got the proper file name for the real test later on.
9580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9581   if test "x$test_shortpath" = x; then
9582     # Short path failed, file does not exist as specified.
9583     # Try adding .exe or .cmd
9584     if test -f "${new_path}.exe"; then
9585       input_to_shortpath="${new_path}.exe"
9586     elif test -f "${new_path}.cmd"; then
9587       input_to_shortpath="${new_path}.cmd"
9588     else
9589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9590 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9591       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9592 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9593       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9594     fi
9595   else
9596     input_to_shortpath="$new_path"
9597   fi
9598 
9599   # Call helper function which possibly converts this using DOS-style short mode.
9600   # If so, the updated path is stored in $new_path.
9601   new_path="$input_to_shortpath"
9602 
9603   input_path="$input_to_shortpath"
9604   # Check if we need to convert this using DOS-style short mode. If the path
9605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9606   # take no chances and rewrite it.
9607   # Note: m4 eats our [], so we need to use [ and ] instead.
9608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9609   if test "x$has_forbidden_chars" != x; then
9610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9611     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9612     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9613     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9614       # Going to short mode and back again did indeed matter. Since short mode is
9615       # case insensitive, let's make it lowercase to improve readability.
9616       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9617       # Now convert it back to Unix-stile (cygpath)
9618       input_path=`$CYGPATH -u "$shortmode_path"`
9619       new_path="$input_path"
9620     fi
9621   fi
9622 
9623   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9624   if test "x$test_cygdrive_prefix" = x; then
9625     # As a simple fix, exclude /usr/bin since it's not a real path.
9626     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9627       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9628       # a path prefixed by /cygdrive for fixpath to work.
9629       new_path="$CYGWIN_ROOT_PATH$input_path"
9630     fi
9631   fi
9632 
9633   # remove trailing .exe if any
9634   new_path="${new_path/%.exe/}"
9635 
9636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9637 
9638   # First separate the path from the arguments. This will split at the first
9639   # space.
9640   complete="$FOUND_MAKE"
9641   path="${complete%% *}"
9642   tmp="$complete EOL"
9643   arguments="${tmp#* }"
9644 
9645   # Input might be given as Windows format, start by converting to
9646   # unix format.
9647   new_path="$path"
9648 
9649   windows_path="$new_path"
9650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9651     unix_path=`$CYGPATH -u "$windows_path"`
9652     new_path="$unix_path"
9653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9655     new_path="$unix_path"
9656   fi
9657 
9658 
9659   # Now try to locate executable using which
9660   new_path=`$WHICH "$new_path" 2> /dev/null`
9661 
9662   if test "x$new_path" = x; then
9663     # Oops. Which didn't find the executable.
9664     # The splitting of arguments from the executable at a space might have been incorrect,
9665     # since paths with space are more likely in Windows. Give it another try with the whole
9666     # argument.
9667     path="$complete"
9668     arguments="EOL"
9669     new_path="$path"
9670 
9671   windows_path="$new_path"
9672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9673     unix_path=`$CYGPATH -u "$windows_path"`
9674     new_path="$unix_path"
9675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9677     new_path="$unix_path"
9678   fi
9679 
9680 
9681     new_path=`$WHICH "$new_path" 2> /dev/null`
9682 
9683     if test "x$new_path" = x; then
9684       # It's still not found. Now this is an unrecoverable error.
9685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9686 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9687       has_space=`$ECHO "$complete" | $GREP " "`
9688       if test "x$has_space" != x; then
9689         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9690 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9691       fi
9692       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9693     fi
9694   fi
9695 
9696   # Now new_path has a complete unix path to the binary
9697   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9698     # Keep paths in /bin as-is, but remove trailing .exe if any
9699     new_path="${new_path/%.exe/}"
9700     # Do not save /bin paths to all_fixpath_prefixes!
9701   else
9702     # Not in mixed or Windows style, start by that.
9703     new_path=`cmd //c echo $new_path`
9704 
9705   input_path="$new_path"
9706   # Check if we need to convert this using DOS-style short mode. If the path
9707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9708   # take no chances and rewrite it.
9709   # Note: m4 eats our [], so we need to use [ and ] instead.
9710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9711   if test "x$has_forbidden_chars" != x; then
9712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9713     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9714   fi
9715 
9716     # Output is in $new_path
9717 
9718   windows_path="$new_path"
9719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9720     unix_path=`$CYGPATH -u "$windows_path"`
9721     new_path="$unix_path"
9722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9724     new_path="$unix_path"
9725   fi
9726 
9727     # remove trailing .exe if any
9728     new_path="${new_path/%.exe/}"
9729 
9730     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9731     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9732   fi
9733 
9734   else
9735     # We're on a posix platform. Hooray! :)
9736     # First separate the path from the arguments. This will split at the first
9737     # space.
9738     complete="$FOUND_MAKE"
9739     path="${complete%% *}"
9740     tmp="$complete EOL"
9741     arguments="${tmp#* }"
9742 
9743     # Cannot rely on the command "which" here since it doesn't always work.
9744     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9745     if test -z "$is_absolute_path"; then
9746       # Path to executable is not absolute. Find it.
9747       IFS_save="$IFS"
9748       IFS=:
9749       for p in $PATH; do
9750         if test -f "$p/$path" && test -x "$p/$path"; then
9751           new_path="$p/$path"
9752           break
9753         fi
9754       done
9755       IFS="$IFS_save"
9756     else
9757       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9758 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9759       new_path="$path"
9760     fi
9761 
9762     if test "x$new_path" = x; then
9763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9764 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9765       has_space=`$ECHO "$complete" | $GREP " "`
9766       if test "x$has_space" != x; then
9767         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9768 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9769       fi
9770       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9771     fi
9772   fi
9773 
9774   # Now join together the path and the arguments once again
9775   if test "x$arguments" != xEOL; then
9776     new_complete="$new_path ${arguments% *}"
9777   else
9778     new_complete="$new_path"
9779   fi
9780 
9781   if test "x$complete" != "x$new_complete"; then
9782     FOUND_MAKE="$new_complete"
9783     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9784 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9785   fi
9786 
9787         fi
9788       fi
9789     fi
9790   fi
9791 
9792         if test "x$FOUND_MAKE" = x; then
9793           for ac_prog in make
9794 do
9795   # Extract the first word of "$ac_prog", so it can be a program name with args.
9796 set dummy $ac_prog; ac_word=$2
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9798 $as_echo_n "checking for $ac_word... " >&6; }
9799 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9800   $as_echo_n "(cached) " >&6
9801 else
9802   case $CHECK_TOOLSDIR_MAKE in
9803   [\\/]* | ?:[\\/]*)
9804   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9805   ;;
9806   *)
9807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9808 for as_dir in $PATH
9809 do
9810   IFS=$as_save_IFS
9811   test -z "$as_dir" && as_dir=.
9812     for ac_exec_ext in '' $ac_executable_extensions; do
9813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9814     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9816     break 2
9817   fi
9818 done
9819   done
9820 IFS=$as_save_IFS
9821 
9822   ;;
9823 esac
9824 fi
9825 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9826 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9828 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9829 else
9830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9831 $as_echo "no" >&6; }
9832 fi
9833 
9834 
9835   test -n "$CHECK_TOOLSDIR_MAKE" && break
9836 done
9837 
9838 
9839   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9840   DESCRIPTION="make in tools-dir"
9841   if test "x$MAKE_CANDIDATE" != x; then
9842     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9843 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9844     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9845     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9846     if test "x$IS_GNU_MAKE" = x; then
9847       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9848 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9849     else
9850       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9851       if test "x$IS_MODERN_MAKE" = x; then
9852         { $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
9853 $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;}
9854       else
9855         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9856           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9857             MAKE_EXPECTED_ENV='cygwin'
9858           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9859             MAKE_EXPECTED_ENV='msys'
9860           else
9861             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9862           fi
9863           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9864           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9865         else
9866           # Not relevant for non-Windows
9867           IS_MAKE_CORRECT_ENV=true
9868         fi
9869         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9870           { $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
9871 $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;}
9872         else
9873           FOUND_MAKE=$MAKE_CANDIDATE
9874 
9875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9876 
9877   # First separate the path from the arguments. This will split at the first
9878   # space.
9879   complete="$FOUND_MAKE"
9880   path="${complete%% *}"
9881   tmp="$complete EOL"
9882   arguments="${tmp#* }"
9883 
9884   # Input might be given as Windows format, start by converting to
9885   # unix format.
9886   new_path=`$CYGPATH -u "$path"`
9887 
9888   # Now try to locate executable using which
9889   new_path=`$WHICH "$new_path" 2> /dev/null`
9890   # bat and cmd files are not always considered executable in cygwin causing which
9891   # to not find them
9892   if test "x$new_path" = x \
9893       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9894       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9895     new_path=`$CYGPATH -u "$path"`
9896   fi
9897   if test "x$new_path" = x; then
9898     # Oops. Which didn't find the executable.
9899     # The splitting of arguments from the executable at a space might have been incorrect,
9900     # since paths with space are more likely in Windows. Give it another try with the whole
9901     # argument.
9902     path="$complete"
9903     arguments="EOL"
9904     new_path=`$CYGPATH -u "$path"`
9905     new_path=`$WHICH "$new_path" 2> /dev/null`
9906     # bat and cmd files are not always considered executable in cygwin causing which
9907     # to not find them
9908     if test "x$new_path" = x \
9909         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9910         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9911       new_path=`$CYGPATH -u "$path"`
9912     fi
9913     if test "x$new_path" = x; then
9914       # It's still not found. Now this is an unrecoverable error.
9915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9916 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9917       has_space=`$ECHO "$complete" | $GREP " "`
9918       if test "x$has_space" != x; then
9919         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9920 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9921       fi
9922       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9923     fi
9924   fi
9925 
9926   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9927   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9928   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9929   # "foo.exe" is OK but "foo" is an error.
9930   #
9931   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9932   # It is also a way to make sure we got the proper file name for the real test later on.
9933   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9934   if test "x$test_shortpath" = x; then
9935     # Short path failed, file does not exist as specified.
9936     # Try adding .exe or .cmd
9937     if test -f "${new_path}.exe"; then
9938       input_to_shortpath="${new_path}.exe"
9939     elif test -f "${new_path}.cmd"; then
9940       input_to_shortpath="${new_path}.cmd"
9941     else
9942       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9943 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9944       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9945 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9946       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9947     fi
9948   else
9949     input_to_shortpath="$new_path"
9950   fi
9951 
9952   # Call helper function which possibly converts this using DOS-style short mode.
9953   # If so, the updated path is stored in $new_path.
9954   new_path="$input_to_shortpath"
9955 
9956   input_path="$input_to_shortpath"
9957   # Check if we need to convert this using DOS-style short mode. If the path
9958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9959   # take no chances and rewrite it.
9960   # Note: m4 eats our [], so we need to use [ and ] instead.
9961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9962   if test "x$has_forbidden_chars" != x; then
9963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9967       # Going to short mode and back again did indeed matter. Since short mode is
9968       # case insensitive, let's make it lowercase to improve readability.
9969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9970       # Now convert it back to Unix-stile (cygpath)
9971       input_path=`$CYGPATH -u "$shortmode_path"`
9972       new_path="$input_path"
9973     fi
9974   fi
9975 
9976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9977   if test "x$test_cygdrive_prefix" = x; then
9978     # As a simple fix, exclude /usr/bin since it's not a real path.
9979     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9981       # a path prefixed by /cygdrive for fixpath to work.
9982       new_path="$CYGWIN_ROOT_PATH$input_path"
9983     fi
9984   fi
9985 
9986   # remove trailing .exe if any
9987   new_path="${new_path/%.exe/}"
9988 
9989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9990 
9991   # First separate the path from the arguments. This will split at the first
9992   # space.
9993   complete="$FOUND_MAKE"
9994   path="${complete%% *}"
9995   tmp="$complete EOL"
9996   arguments="${tmp#* }"
9997 
9998   # Input might be given as Windows format, start by converting to
9999   # unix format.
10000   new_path="$path"
10001 
10002   windows_path="$new_path"
10003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10004     unix_path=`$CYGPATH -u "$windows_path"`
10005     new_path="$unix_path"
10006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10008     new_path="$unix_path"
10009   fi
10010 
10011 
10012   # Now try to locate executable using which
10013   new_path=`$WHICH "$new_path" 2> /dev/null`
10014 
10015   if test "x$new_path" = x; then
10016     # Oops. Which didn't find the executable.
10017     # The splitting of arguments from the executable at a space might have been incorrect,
10018     # since paths with space are more likely in Windows. Give it another try with the whole
10019     # argument.
10020     path="$complete"
10021     arguments="EOL"
10022     new_path="$path"
10023 
10024   windows_path="$new_path"
10025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10026     unix_path=`$CYGPATH -u "$windows_path"`
10027     new_path="$unix_path"
10028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10030     new_path="$unix_path"
10031   fi
10032 
10033 
10034     new_path=`$WHICH "$new_path" 2> /dev/null`
10035 
10036     if test "x$new_path" = x; then
10037       # It's still not found. Now this is an unrecoverable error.
10038       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10039 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10040       has_space=`$ECHO "$complete" | $GREP " "`
10041       if test "x$has_space" != x; then
10042         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10043 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10044       fi
10045       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10046     fi
10047   fi
10048 
10049   # Now new_path has a complete unix path to the binary
10050   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10051     # Keep paths in /bin as-is, but remove trailing .exe if any
10052     new_path="${new_path/%.exe/}"
10053     # Do not save /bin paths to all_fixpath_prefixes!
10054   else
10055     # Not in mixed or Windows style, start by that.
10056     new_path=`cmd //c echo $new_path`
10057 
10058   input_path="$new_path"
10059   # Check if we need to convert this using DOS-style short mode. If the path
10060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10061   # take no chances and rewrite it.
10062   # Note: m4 eats our [], so we need to use [ and ] instead.
10063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10064   if test "x$has_forbidden_chars" != x; then
10065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10066     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10067   fi
10068 
10069     # Output is in $new_path
10070 
10071   windows_path="$new_path"
10072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10073     unix_path=`$CYGPATH -u "$windows_path"`
10074     new_path="$unix_path"
10075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10076     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10077     new_path="$unix_path"
10078   fi
10079 
10080     # remove trailing .exe if any
10081     new_path="${new_path/%.exe/}"
10082 
10083     # Save the first 10 bytes of this path to the storage, so fixpath can work.
10084     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10085   fi
10086 
10087   else
10088     # We're on a posix platform. Hooray! :)
10089     # First separate the path from the arguments. This will split at the first
10090     # space.
10091     complete="$FOUND_MAKE"
10092     path="${complete%% *}"
10093     tmp="$complete EOL"
10094     arguments="${tmp#* }"
10095 
10096     # Cannot rely on the command "which" here since it doesn't always work.
10097     is_absolute_path=`$ECHO "$path" | $GREP ^/`
10098     if test -z "$is_absolute_path"; then
10099       # Path to executable is not absolute. Find it.
10100       IFS_save="$IFS"
10101       IFS=:
10102       for p in $PATH; do
10103         if test -f "$p/$path" && test -x "$p/$path"; then
10104           new_path="$p/$path"
10105           break
10106         fi
10107       done
10108       IFS="$IFS_save"
10109     else
10110       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10111 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10112       new_path="$path"
10113     fi
10114 
10115     if test "x$new_path" = x; then
10116       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10117 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10118       has_space=`$ECHO "$complete" | $GREP " "`
10119       if test "x$has_space" != x; then
10120         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10121 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10122       fi
10123       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10124     fi
10125   fi
10126 
10127   # Now join together the path and the arguments once again
10128   if test "x$arguments" != xEOL; then
10129     new_complete="$new_path ${arguments% *}"
10130   else
10131     new_complete="$new_path"
10132   fi
10133 
10134   if test "x$complete" != "x$new_complete"; then
10135     FOUND_MAKE="$new_complete"
10136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10137 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10138   fi
10139 
10140         fi
10141       fi
10142     fi
10143   fi
10144 
10145         fi
10146         PATH=$OLD_PATH
10147       fi
10148     fi
10149 
10150     if test "x$FOUND_MAKE" = x; then
10151       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
10152     fi
10153   fi
10154 
10155   MAKE=$FOUND_MAKE
10156 
10157   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10158 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10159 
10160 
10161 
10162   # Test if find supports -delete
10163   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10164 $as_echo_n "checking if find supports -delete... " >&6; }
10165   FIND_DELETE="-delete"
10166 
10167   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10168 
10169   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10170 
10171   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10172   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10173     # No, it does not.
10174     rm $DELETEDIR/TestIfFindSupportsDelete
10175     FIND_DELETE="-exec rm \{\} \+"
10176     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177 $as_echo "no" >&6; }
10178   else
10179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10180 $as_echo "yes" >&6; }
10181   fi
10182   rmdir $DELETEDIR
10183 
10184 
10185 
10186   # These tools might not be installed by default,
10187   # need hint on how to install them.
10188 
10189   for ac_prog in unzip
10190 do
10191   # Extract the first word of "$ac_prog", so it can be a program name with args.
10192 set dummy $ac_prog; ac_word=$2
10193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10194 $as_echo_n "checking for $ac_word... " >&6; }
10195 if ${ac_cv_path_UNZIP+:} false; then :
10196   $as_echo_n "(cached) " >&6
10197 else
10198   case $UNZIP in
10199   [\\/]* | ?:[\\/]*)
10200   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10201   ;;
10202   *)
10203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10204 for as_dir in $PATH
10205 do
10206   IFS=$as_save_IFS
10207   test -z "$as_dir" && as_dir=.
10208     for ac_exec_ext in '' $ac_executable_extensions; do
10209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10210     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10212     break 2
10213   fi
10214 done
10215   done
10216 IFS=$as_save_IFS
10217 
10218   ;;
10219 esac
10220 fi
10221 UNZIP=$ac_cv_path_UNZIP
10222 if test -n "$UNZIP"; then
10223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10224 $as_echo "$UNZIP" >&6; }
10225 else
10226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10227 $as_echo "no" >&6; }
10228 fi
10229 
10230 
10231   test -n "$UNZIP" && break
10232 done
10233 
10234 
10235   if test "x$UNZIP" = x; then
10236     if test "xunzip" = x; then
10237       PROG_NAME=unzip
10238     else
10239       PROG_NAME=unzip
10240     fi
10241     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10242 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10243     as_fn_error $? "Cannot continue" "$LINENO" 5
10244   fi
10245 
10246 
10247 
10248   for ac_prog in zip
10249 do
10250   # Extract the first word of "$ac_prog", so it can be a program name with args.
10251 set dummy $ac_prog; ac_word=$2
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10253 $as_echo_n "checking for $ac_word... " >&6; }
10254 if ${ac_cv_path_ZIP+:} false; then :
10255   $as_echo_n "(cached) " >&6
10256 else
10257   case $ZIP in
10258   [\\/]* | ?:[\\/]*)
10259   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10260   ;;
10261   *)
10262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10263 for as_dir in $PATH
10264 do
10265   IFS=$as_save_IFS
10266   test -z "$as_dir" && as_dir=.
10267     for ac_exec_ext in '' $ac_executable_extensions; do
10268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10269     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10271     break 2
10272   fi
10273 done
10274   done
10275 IFS=$as_save_IFS
10276 
10277   ;;
10278 esac
10279 fi
10280 ZIP=$ac_cv_path_ZIP
10281 if test -n "$ZIP"; then
10282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10283 $as_echo "$ZIP" >&6; }
10284 else
10285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10286 $as_echo "no" >&6; }
10287 fi
10288 
10289 
10290   test -n "$ZIP" && break
10291 done
10292 
10293 
10294   if test "x$ZIP" = x; then
10295     if test "xzip" = x; then
10296       PROG_NAME=zip
10297     else
10298       PROG_NAME=zip
10299     fi
10300     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10301 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10302     as_fn_error $? "Cannot continue" "$LINENO" 5
10303   fi
10304 
10305 
10306 
10307   # Non-required basic tools
10308 
10309   # Extract the first word of "ldd", so it can be a program name with args.
10310 set dummy ldd; ac_word=$2
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10312 $as_echo_n "checking for $ac_word... " >&6; }
10313 if ${ac_cv_path_LDD+:} false; then :
10314   $as_echo_n "(cached) " >&6
10315 else
10316   case $LDD in
10317   [\\/]* | ?:[\\/]*)
10318   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10319   ;;
10320   *)
10321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10322 for as_dir in $PATH
10323 do
10324   IFS=$as_save_IFS
10325   test -z "$as_dir" && as_dir=.
10326     for ac_exec_ext in '' $ac_executable_extensions; do
10327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10328     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10330     break 2
10331   fi
10332 done
10333   done
10334 IFS=$as_save_IFS
10335 
10336   ;;
10337 esac
10338 fi
10339 LDD=$ac_cv_path_LDD
10340 if test -n "$LDD"; then
10341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10342 $as_echo "$LDD" >&6; }
10343 else
10344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10345 $as_echo "no" >&6; }
10346 fi
10347 
10348 
10349   if test "x$LDD" = "x"; then
10350     # List shared lib dependencies is used for
10351     # debug output and checking for forbidden dependencies.
10352     # We can build without it.
10353     LDD="true"
10354   fi
10355   for ac_prog in readelf greadelf
10356 do
10357   # Extract the first word of "$ac_prog", so it can be a program name with args.
10358 set dummy $ac_prog; ac_word=$2
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360 $as_echo_n "checking for $ac_word... " >&6; }
10361 if ${ac_cv_path_READELF+:} false; then :
10362   $as_echo_n "(cached) " >&6
10363 else
10364   case $READELF in
10365   [\\/]* | ?:[\\/]*)
10366   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10367   ;;
10368   *)
10369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10370 for as_dir in $PATH
10371 do
10372   IFS=$as_save_IFS
10373   test -z "$as_dir" && as_dir=.
10374     for ac_exec_ext in '' $ac_executable_extensions; do
10375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10376     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10378     break 2
10379   fi
10380 done
10381   done
10382 IFS=$as_save_IFS
10383 
10384   ;;
10385 esac
10386 fi
10387 READELF=$ac_cv_path_READELF
10388 if test -n "$READELF"; then
10389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10390 $as_echo "$READELF" >&6; }
10391 else
10392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393 $as_echo "no" >&6; }
10394 fi
10395 
10396 
10397   test -n "$READELF" && break
10398 done
10399 
10400   # Extract the first word of "hg", so it can be a program name with args.
10401 set dummy hg; ac_word=$2
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10403 $as_echo_n "checking for $ac_word... " >&6; }
10404 if ${ac_cv_path_HG+:} false; then :
10405   $as_echo_n "(cached) " >&6
10406 else
10407   case $HG in
10408   [\\/]* | ?:[\\/]*)
10409   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10410   ;;
10411   *)
10412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10413 for as_dir in $PATH
10414 do
10415   IFS=$as_save_IFS
10416   test -z "$as_dir" && as_dir=.
10417     for ac_exec_ext in '' $ac_executable_extensions; do
10418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10419     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10421     break 2
10422   fi
10423 done
10424   done
10425 IFS=$as_save_IFS
10426 
10427   ;;
10428 esac
10429 fi
10430 HG=$ac_cv_path_HG
10431 if test -n "$HG"; then
10432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10433 $as_echo "$HG" >&6; }
10434 else
10435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10436 $as_echo "no" >&6; }
10437 fi
10438 
10439 
10440   # Extract the first word of "stat", so it can be a program name with args.
10441 set dummy stat; ac_word=$2
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10443 $as_echo_n "checking for $ac_word... " >&6; }
10444 if ${ac_cv_path_STAT+:} false; then :
10445   $as_echo_n "(cached) " >&6
10446 else
10447   case $STAT in
10448   [\\/]* | ?:[\\/]*)
10449   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10450   ;;
10451   *)
10452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10453 for as_dir in $PATH
10454 do
10455   IFS=$as_save_IFS
10456   test -z "$as_dir" && as_dir=.
10457     for ac_exec_ext in '' $ac_executable_extensions; do
10458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10459     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10461     break 2
10462   fi
10463 done
10464   done
10465 IFS=$as_save_IFS
10466 
10467   ;;
10468 esac
10469 fi
10470 STAT=$ac_cv_path_STAT
10471 if test -n "$STAT"; then
10472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10473 $as_echo "$STAT" >&6; }
10474 else
10475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476 $as_echo "no" >&6; }
10477 fi
10478 
10479 
10480   # Extract the first word of "time", so it can be a program name with args.
10481 set dummy time; ac_word=$2
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483 $as_echo_n "checking for $ac_word... " >&6; }
10484 if ${ac_cv_path_TIME+:} false; then :
10485   $as_echo_n "(cached) " >&6
10486 else
10487   case $TIME in
10488   [\\/]* | ?:[\\/]*)
10489   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10490   ;;
10491   *)
10492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493 for as_dir in $PATH
10494 do
10495   IFS=$as_save_IFS
10496   test -z "$as_dir" && as_dir=.
10497     for ac_exec_ext in '' $ac_executable_extensions; do
10498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10499     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501     break 2
10502   fi
10503 done
10504   done
10505 IFS=$as_save_IFS
10506 
10507   ;;
10508 esac
10509 fi
10510 TIME=$ac_cv_path_TIME
10511 if test -n "$TIME"; then
10512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10513 $as_echo "$TIME" >&6; }
10514 else
10515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516 $as_echo "no" >&6; }
10517 fi
10518 
10519 
10520   # Check if it's GNU time
10521   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10522   if test "x$IS_GNU_TIME" != x; then
10523     IS_GNU_TIME=yes
10524   else
10525     IS_GNU_TIME=no
10526   fi
10527 
10528 
10529   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10530 
10531   for ac_prog in comm
10532 do
10533   # Extract the first word of "$ac_prog", so it can be a program name with args.
10534 set dummy $ac_prog; ac_word=$2
10535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10536 $as_echo_n "checking for $ac_word... " >&6; }
10537 if ${ac_cv_path_COMM+:} false; then :
10538   $as_echo_n "(cached) " >&6
10539 else
10540   case $COMM in
10541   [\\/]* | ?:[\\/]*)
10542   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10543   ;;
10544   *)
10545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10546 for as_dir in $PATH
10547 do
10548   IFS=$as_save_IFS
10549   test -z "$as_dir" && as_dir=.
10550     for ac_exec_ext in '' $ac_executable_extensions; do
10551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10552     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10554     break 2
10555   fi
10556 done
10557   done
10558 IFS=$as_save_IFS
10559 
10560   ;;
10561 esac
10562 fi
10563 COMM=$ac_cv_path_COMM
10564 if test -n "$COMM"; then
10565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10566 $as_echo "$COMM" >&6; }
10567 else
10568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10569 $as_echo "no" >&6; }
10570 fi
10571 
10572 
10573   test -n "$COMM" && break
10574 done
10575 
10576 
10577   if test "x$COMM" = x; then
10578     if test "xcomm" = x; then
10579       PROG_NAME=comm
10580     else
10581       PROG_NAME=comm
10582     fi
10583     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10584 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10585     as_fn_error $? "Cannot continue" "$LINENO" 5
10586   fi
10587 
10588 
10589   fi
10590 
10591   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10592 
10593   for ac_prog in dsymutil
10594 do
10595   # Extract the first word of "$ac_prog", so it can be a program name with args.
10596 set dummy $ac_prog; ac_word=$2
10597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10598 $as_echo_n "checking for $ac_word... " >&6; }
10599 if ${ac_cv_path_DSYMUTIL+:} false; then :
10600   $as_echo_n "(cached) " >&6
10601 else
10602   case $DSYMUTIL in
10603   [\\/]* | ?:[\\/]*)
10604   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10605   ;;
10606   *)
10607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10608 for as_dir in $PATH
10609 do
10610   IFS=$as_save_IFS
10611   test -z "$as_dir" && as_dir=.
10612     for ac_exec_ext in '' $ac_executable_extensions; do
10613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10614     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10616     break 2
10617   fi
10618 done
10619   done
10620 IFS=$as_save_IFS
10621 
10622   ;;
10623 esac
10624 fi
10625 DSYMUTIL=$ac_cv_path_DSYMUTIL
10626 if test -n "$DSYMUTIL"; then
10627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10628 $as_echo "$DSYMUTIL" >&6; }
10629 else
10630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631 $as_echo "no" >&6; }
10632 fi
10633 
10634 
10635   test -n "$DSYMUTIL" && break
10636 done
10637 
10638 
10639   if test "x$DSYMUTIL" = x; then
10640     if test "xdsymutil" = x; then
10641       PROG_NAME=dsymutil
10642     else
10643       PROG_NAME=dsymutil
10644     fi
10645     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10646 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10647     as_fn_error $? "Cannot continue" "$LINENO" 5
10648   fi
10649 
10650 
10651 
10652   for ac_prog in xattr
10653 do
10654   # Extract the first word of "$ac_prog", so it can be a program name with args.
10655 set dummy $ac_prog; ac_word=$2
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10657 $as_echo_n "checking for $ac_word... " >&6; }
10658 if ${ac_cv_path_XATTR+:} false; then :
10659   $as_echo_n "(cached) " >&6
10660 else
10661   case $XATTR in
10662   [\\/]* | ?:[\\/]*)
10663   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10664   ;;
10665   *)
10666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10667 for as_dir in $PATH
10668 do
10669   IFS=$as_save_IFS
10670   test -z "$as_dir" && as_dir=.
10671     for ac_exec_ext in '' $ac_executable_extensions; do
10672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10673     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10675     break 2
10676   fi
10677 done
10678   done
10679 IFS=$as_save_IFS
10680 
10681   ;;
10682 esac
10683 fi
10684 XATTR=$ac_cv_path_XATTR
10685 if test -n "$XATTR"; then
10686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10687 $as_echo "$XATTR" >&6; }
10688 else
10689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10690 $as_echo "no" >&6; }
10691 fi
10692 
10693 
10694   test -n "$XATTR" && break
10695 done
10696 
10697 
10698   if test "x$XATTR" = x; then
10699     if test "xxattr" = x; then
10700       PROG_NAME=xattr
10701     else
10702       PROG_NAME=xattr
10703     fi
10704     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10705 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10706     as_fn_error $? "Cannot continue" "$LINENO" 5
10707   fi
10708 
10709 
10710     # Extract the first word of "codesign", so it can be a program name with args.
10711 set dummy codesign; ac_word=$2
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10713 $as_echo_n "checking for $ac_word... " >&6; }
10714 if ${ac_cv_path_CODESIGN+:} false; then :
10715   $as_echo_n "(cached) " >&6
10716 else
10717   case $CODESIGN in
10718   [\\/]* | ?:[\\/]*)
10719   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10720   ;;
10721   *)
10722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10723 for as_dir in $PATH
10724 do
10725   IFS=$as_save_IFS
10726   test -z "$as_dir" && as_dir=.
10727     for ac_exec_ext in '' $ac_executable_extensions; do
10728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10729     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10731     break 2
10732   fi
10733 done
10734   done
10735 IFS=$as_save_IFS
10736 
10737   ;;
10738 esac
10739 fi
10740 CODESIGN=$ac_cv_path_CODESIGN
10741 if test -n "$CODESIGN"; then
10742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10743 $as_echo "$CODESIGN" >&6; }
10744 else
10745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10746 $as_echo "no" >&6; }
10747 fi
10748 
10749 
10750     if test "x$CODESIGN" != "x"; then
10751       # Verify that the openjdk_codesign certificate is present
10752       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10753 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10754       rm -f codesign-testfile
10755       touch codesign-testfile
10756       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10757       rm -f codesign-testfile
10758       if test "x$CODESIGN" = x; then
10759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10760 $as_echo "no" >&6; }
10761       else
10762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10763 $as_echo "yes" >&6; }
10764       fi
10765     fi
10766   fi
10767 
10768 
10769 # Check if pkg-config is available.
10770 
10771 
10772 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10773         if test -n "$ac_tool_prefix"; then
10774   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10775 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10777 $as_echo_n "checking for $ac_word... " >&6; }
10778 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10779   $as_echo_n "(cached) " >&6
10780 else
10781   case $PKG_CONFIG in
10782   [\\/]* | ?:[\\/]*)
10783   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10784   ;;
10785   *)
10786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10787 for as_dir in $PATH
10788 do
10789   IFS=$as_save_IFS
10790   test -z "$as_dir" && as_dir=.
10791     for ac_exec_ext in '' $ac_executable_extensions; do
10792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10793     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10795     break 2
10796   fi
10797 done
10798   done
10799 IFS=$as_save_IFS
10800 
10801   ;;
10802 esac
10803 fi
10804 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10805 if test -n "$PKG_CONFIG"; then
10806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10807 $as_echo "$PKG_CONFIG" >&6; }
10808 else
10809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10810 $as_echo "no" >&6; }
10811 fi
10812 
10813 
10814 fi
10815 if test -z "$ac_cv_path_PKG_CONFIG"; then
10816   ac_pt_PKG_CONFIG=$PKG_CONFIG
10817   # Extract the first word of "pkg-config", so it can be a program name with args.
10818 set dummy pkg-config; ac_word=$2
10819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820 $as_echo_n "checking for $ac_word... " >&6; }
10821 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10822   $as_echo_n "(cached) " >&6
10823 else
10824   case $ac_pt_PKG_CONFIG in
10825   [\\/]* | ?:[\\/]*)
10826   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10827   ;;
10828   *)
10829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830 for as_dir in $PATH
10831 do
10832   IFS=$as_save_IFS
10833   test -z "$as_dir" && as_dir=.
10834     for ac_exec_ext in '' $ac_executable_extensions; do
10835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838     break 2
10839   fi
10840 done
10841   done
10842 IFS=$as_save_IFS
10843 
10844   ;;
10845 esac
10846 fi
10847 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10848 if test -n "$ac_pt_PKG_CONFIG"; then
10849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10850 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10851 else
10852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853 $as_echo "no" >&6; }
10854 fi
10855 
10856   if test "x$ac_pt_PKG_CONFIG" = x; then
10857     PKG_CONFIG=""
10858   else
10859     case $cross_compiling:$ac_tool_warned in
10860 yes:)
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10862 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10863 ac_tool_warned=yes ;;
10864 esac
10865     PKG_CONFIG=$ac_pt_PKG_CONFIG
10866   fi
10867 else
10868   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10869 fi
10870 
10871 fi
10872 if test -n "$PKG_CONFIG"; then
10873         _pkg_min_version=0.9.0
10874         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10875 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10876         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10877                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10878 $as_echo "yes" >&6; }
10879         else
10880                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10881 $as_echo "no" >&6; }
10882                 PKG_CONFIG=""
10883         fi
10884 
10885 fi
10886 
10887 # After basic tools have been setup, we can check build os specific details.
10888 
10889   ###############################################################################
10890 
10891   # Note that this is the build platform OS version!
10892 
10893   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10894   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10895   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10896   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10897 
10898 
10899 
10900 
10901 
10902 # Setup builddeps, for automatic downloading of tools we need.
10903 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10904 # boot-jdk setup, but we need to have basic tools setup first.
10905 
10906 
10907 # Check whether --with-builddeps-conf was given.
10908 if test "${with_builddeps_conf+set}" = set; then :
10909   withval=$with_builddeps_conf;
10910 fi
10911 
10912 
10913 
10914 # Check whether --with-builddeps-server was given.
10915 if test "${with_builddeps_server+set}" = set; then :
10916   withval=$with_builddeps_server;
10917 fi
10918 
10919 
10920 
10921 # Check whether --with-builddeps-dir was given.
10922 if test "${with_builddeps_dir+set}" = set; then :
10923   withval=$with_builddeps_dir;
10924 else
10925   with_builddeps_dir=/localhome/builddeps
10926 fi
10927 
10928 
10929 
10930 # Check whether --with-builddeps-group was given.
10931 if test "${with_builddeps_group+set}" = set; then :
10932   withval=$with_builddeps_group;
10933 fi
10934 
10935 
10936 
10937 
10938   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10939     if test "x$with_builddeps_conf" != x; then
10940       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10941 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10942       builddepsfile=$with_builddeps_conf
10943       if test -s $builddepsfile; then
10944         . $builddepsfile
10945         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10946 $as_echo "loaded!" >&6; }
10947       else
10948         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10949       fi
10950     else
10951       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10952 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10953       builddepsfile=`mktemp`
10954       touch $builddepsfile
10955       # Put all found confs into a single file.
10956       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10957       # Source the file to acquire the variables
10958       if test -s $builddepsfile; then
10959         . $builddepsfile
10960         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10961 $as_echo "found at least one!" >&6; }
10962       else
10963         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10964       fi
10965     fi
10966     # Create build and target names that use _ instead of "-" and ".".
10967     # This is necessary to use them in variable names.
10968     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10969     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10970     # Extract rewrite information for build and target
10971     eval rewritten_build=\${REWRITE_${build_var}}
10972     if test "x$rewritten_build" = x; then
10973       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10974       echo Build stays the same $rewritten_build
10975     else
10976       echo Rewriting build for builddeps into $rewritten_build
10977     fi
10978     eval rewritten_target=\${REWRITE_${target_var}}
10979     if test "x$rewritten_target" = x; then
10980       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10981       echo Target stays the same $rewritten_target
10982     else
10983       echo Rewriting target for builddeps into $rewritten_target
10984     fi
10985     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10986     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10987   fi
10988   for ac_prog in 7z unzip
10989 do
10990   # Extract the first word of "$ac_prog", so it can be a program name with args.
10991 set dummy $ac_prog; ac_word=$2
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10993 $as_echo_n "checking for $ac_word... " >&6; }
10994 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10995   $as_echo_n "(cached) " >&6
10996 else
10997   if test -n "$BDEPS_UNZIP"; then
10998   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10999 else
11000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11001 for as_dir in $PATH
11002 do
11003   IFS=$as_save_IFS
11004   test -z "$as_dir" && as_dir=.
11005     for ac_exec_ext in '' $ac_executable_extensions; do
11006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11007     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
11008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11009     break 2
11010   fi
11011 done
11012   done
11013 IFS=$as_save_IFS
11014 
11015 fi
11016 fi
11017 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11018 if test -n "$BDEPS_UNZIP"; then
11019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11020 $as_echo "$BDEPS_UNZIP" >&6; }
11021 else
11022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023 $as_echo "no" >&6; }
11024 fi
11025 
11026 
11027   test -n "$BDEPS_UNZIP" && break
11028 done
11029 
11030   if test "x$BDEPS_UNZIP" = x7z; then
11031     BDEPS_UNZIP="7z x"
11032   fi
11033 
11034   for ac_prog in wget lftp ftp
11035 do
11036   # Extract the first word of "$ac_prog", so it can be a program name with args.
11037 set dummy $ac_prog; ac_word=$2
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11039 $as_echo_n "checking for $ac_word... " >&6; }
11040 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11041   $as_echo_n "(cached) " >&6
11042 else
11043   if test -n "$BDEPS_FTP"; then
11044   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11045 else
11046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11047 for as_dir in $PATH
11048 do
11049   IFS=$as_save_IFS
11050   test -z "$as_dir" && as_dir=.
11051     for ac_exec_ext in '' $ac_executable_extensions; do
11052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11053     ac_cv_prog_BDEPS_FTP="$ac_prog"
11054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11055     break 2
11056   fi
11057 done
11058   done
11059 IFS=$as_save_IFS
11060 
11061 fi
11062 fi
11063 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11064 if test -n "$BDEPS_FTP"; then
11065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11066 $as_echo "$BDEPS_FTP" >&6; }
11067 else
11068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11069 $as_echo "no" >&6; }
11070 fi
11071 
11072 
11073   test -n "$BDEPS_FTP" && break
11074 done
11075 
11076 
11077 
11078 ###############################################################################
11079 #
11080 # Determine OpenJDK variants, options and version numbers.
11081 #
11082 ###############################################################################
11083 
11084 # We need build & target for this.
11085 
11086 
11087   ###############################################################################
11088   #
11089   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11090   # We always build headless support.
11091   #
11092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11093 $as_echo_n "checking headful support... " >&6; }
11094   # Check whether --enable-headful was given.
11095 if test "${enable_headful+set}" = set; then :
11096   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11097 else
11098   SUPPORT_HEADFUL=yes
11099 fi
11100 
11101 
11102   SUPPORT_HEADLESS=yes
11103   BUILD_HEADLESS="BUILD_HEADLESS:=true"
11104 
11105   if test "x$SUPPORT_HEADFUL" = xyes; then
11106     # We are building both headful and headless.
11107     headful_msg="include support for both headful and headless"
11108   fi
11109 
11110   if test "x$SUPPORT_HEADFUL" = xno; then
11111     # Thus we are building headless only.
11112     BUILD_HEADLESS="BUILD_HEADLESS:=true"
11113     headful_msg="headless only"
11114   fi
11115 
11116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11117 $as_echo "$headful_msg" >&6; }
11118 
11119 
11120 
11121 
11122 
11123   # Control wether Hotspot runs Queens test after build.
11124   # Check whether --enable-hotspot-test-in-build was given.
11125 if test "${enable_hotspot_test_in_build+set}" = set; then :
11126   enableval=$enable_hotspot_test_in_build;
11127 else
11128   enable_hotspot_test_in_build=no
11129 fi
11130 
11131   if test "x$enable_hotspot_test_in_build" = "xyes"; then
11132     TEST_IN_BUILD=true
11133   else
11134     TEST_IN_BUILD=false
11135   fi
11136 
11137 
11138   ###############################################################################
11139   #
11140   # Choose cacerts source file
11141   #
11142 
11143 # Check whether --with-cacerts-file was given.
11144 if test "${with_cacerts_file+set}" = set; then :
11145   withval=$with_cacerts_file;
11146 fi
11147 
11148   if test "x$with_cacerts_file" != x; then
11149     CACERTS_FILE=$with_cacerts_file
11150   else
11151     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11152   fi
11153 
11154 
11155   ###############################################################################
11156   #
11157   # Enable or disable unlimited crypto
11158   #
11159   # Check whether --enable-unlimited-crypto was given.
11160 if test "${enable_unlimited_crypto+set}" = set; then :
11161   enableval=$enable_unlimited_crypto;
11162 else
11163   enable_unlimited_crypto=no
11164 fi
11165 
11166   if test "x$enable_unlimited_crypto" = "xyes"; then
11167     UNLIMITED_CRYPTO=true
11168   else
11169     UNLIMITED_CRYPTO=false
11170   fi
11171 
11172 
11173   ###############################################################################
11174   #
11175   # Enable or disable the elliptic curve crypto implementation
11176   #
11177 
11178 
11179   ###############################################################################
11180   #
11181   # Compress jars
11182   #
11183   COMPRESS_JARS=false
11184 
11185 
11186 
11187 
11188   # Source the version numbers
11189   . $AUTOCONF_DIR/version-numbers
11190 
11191   # Get the settings from parameters
11192 
11193 # Check whether --with-milestone was given.
11194 if test "${with_milestone+set}" = set; then :
11195   withval=$with_milestone;
11196 fi
11197 
11198   if test "x$with_milestone" = xyes; then
11199     as_fn_error $? "Milestone must have a value" "$LINENO" 5
11200   elif test "x$with_milestone" != x; then
11201     MILESTONE="$with_milestone"
11202   fi
11203   if test "x$MILESTONE" = x; then
11204     MILESTONE=internal
11205   fi
11206 
11207 
11208 # Check whether --with-update-version was given.
11209 if test "${with_update_version+set}" = set; then :
11210   withval=$with_update_version;
11211 fi
11212 
11213   if test "x$with_update_version" = xyes; then
11214     as_fn_error $? "Update version must have a value" "$LINENO" 5
11215   elif test "x$with_update_version" != x; then
11216     JDK_UPDATE_VERSION="$with_update_version"
11217     # On macosx 10.7, it's not possible to set --with-update-version=0X due
11218     # to a bug in expr (which reduces it to just X). To work around this, we
11219     # always add a 0 to one digit update versions.
11220     if test "${#JDK_UPDATE_VERSION}" = "1"; then
11221       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11222     fi
11223   fi
11224 
11225 
11226 # Check whether --with-user-release-suffix was given.
11227 if test "${with_user_release_suffix+set}" = set; then :
11228   withval=$with_user_release_suffix;
11229 fi
11230 
11231   if test "x$with_user_release_suffix" = xyes; then
11232     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11233   elif test "x$with_user_release_suffix" != x; then
11234     USER_RELEASE_SUFFIX="$with_user_release_suffix"
11235   fi
11236 
11237 
11238 # Check whether --with-build-number was given.
11239 if test "${with_build_number+set}" = set; then :
11240   withval=$with_build_number;
11241 fi
11242 
11243   if test "x$with_build_number" = xyes; then
11244     as_fn_error $? "Build number must have a value" "$LINENO" 5
11245   elif test "x$with_build_number" != x; then
11246     JDK_BUILD_NUMBER="$with_build_number"
11247   fi
11248   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11249   if test "x$JDK_BUILD_NUMBER" = x; then
11250     JDK_BUILD_NUMBER=b00
11251     if test "x$USER_RELEASE_SUFFIX" = x; then
11252       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11253       # Avoid [:alnum:] since it depends on the locale.
11254       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11255       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11256     fi
11257   fi
11258 
11259   # Now set the JDK version, milestone, build number etc.
11260 
11261 
11262 
11263 
11264 
11265 
11266 
11267 
11268 
11269 
11270 
11271 
11272 
11273 
11274 
11275 
11276 # Check whether --with-copyright-year was given.
11277 if test "${with_copyright_year+set}" = set; then :
11278   withval=$with_copyright_year;
11279 fi
11280 
11281   if test "x$with_copyright_year" = xyes; then
11282     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
11283   elif test "x$with_copyright_year" != x; then
11284     COPYRIGHT_YEAR="$with_copyright_year"
11285   else
11286     COPYRIGHT_YEAR=`date +'%Y'`
11287   fi
11288 
11289 
11290   if test "x$JDK_UPDATE_VERSION" != x; then
11291     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11292   else
11293     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11294   fi
11295 
11296 
11297   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11298 
11299 
11300 
11301 ###############################################################################
11302 #
11303 # Setup BootJDK, used to bootstrap the build.
11304 #
11305 ###############################################################################
11306 
11307 
11308   BOOT_JDK_FOUND=no
11309 
11310 # Check whether --with-boot-jdk was given.
11311 if test "${with_boot_jdk+set}" = set; then :
11312   withval=$with_boot_jdk;
11313 fi
11314 
11315 
11316   # We look for the Boot JDK through various means, going from more certain to
11317   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11318   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11319   # must check if this is indeed valid; otherwise we'll continue looking.
11320 
11321   # Test: Is bootjdk explicitely set by command line arguments?
11322 
11323   if test "x$BOOT_JDK_FOUND" = xno; then
11324     # Now execute the test
11325 
11326   if test "x$with_boot_jdk" != x; then
11327     BOOT_JDK=$with_boot_jdk
11328     BOOT_JDK_FOUND=maybe
11329     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11330 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11331   fi
11332 
11333 
11334     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11335     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11336       # Do we have a bin/java?
11337       if test ! -x "$BOOT_JDK/bin/java"; then
11338         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11339 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11340         BOOT_JDK_FOUND=no
11341       else
11342         # Do we have a bin/javac?
11343         if test ! -x "$BOOT_JDK/bin/javac"; then
11344           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11345 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11346           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11347 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11348           BOOT_JDK_FOUND=no
11349         else
11350           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11351           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11352             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11354             BOOT_JDK_FOUND=no
11355           else
11356             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11357             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11358 
11359             # Extra M4 quote needed to protect [] in grep expression.
11360             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11361             if test "x$FOUND_VERSION_78" = x; then
11362               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11363 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11364               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11365 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11366               BOOT_JDK_FOUND=no
11367             else
11368               # We're done! :-)
11369               BOOT_JDK_FOUND=yes
11370 
11371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11372 
11373   # Input might be given as Windows format, start by converting to
11374   # unix format.
11375   path="$BOOT_JDK"
11376   new_path=`$CYGPATH -u "$path"`
11377 
11378   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11379   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11380   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11381   # "foo.exe" is OK but "foo" is an error.
11382   #
11383   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11384   # It is also a way to make sure we got the proper file name for the real test later on.
11385   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11386   if test "x$test_shortpath" = x; then
11387     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11388 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11389     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11390   fi
11391 
11392   # Call helper function which possibly converts this using DOS-style short mode.
11393   # If so, the updated path is stored in $new_path.
11394 
11395   input_path="$new_path"
11396   # Check if we need to convert this using DOS-style short mode. If the path
11397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11398   # take no chances and rewrite it.
11399   # Note: m4 eats our [], so we need to use [ and ] instead.
11400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11401   if test "x$has_forbidden_chars" != x; then
11402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11403     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11404     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11405     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11406       # Going to short mode and back again did indeed matter. Since short mode is
11407       # case insensitive, let's make it lowercase to improve readability.
11408       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11409       # Now convert it back to Unix-stile (cygpath)
11410       input_path=`$CYGPATH -u "$shortmode_path"`
11411       new_path="$input_path"
11412     fi
11413   fi
11414 
11415   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11416   if test "x$test_cygdrive_prefix" = x; then
11417     # As a simple fix, exclude /usr/bin since it's not a real path.
11418     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11419       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11420       # a path prefixed by /cygdrive for fixpath to work.
11421       new_path="$CYGWIN_ROOT_PATH$input_path"
11422     fi
11423   fi
11424 
11425 
11426   if test "x$path" != "x$new_path"; then
11427     BOOT_JDK="$new_path"
11428     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11429 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11430   fi
11431 
11432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11433 
11434   path="$BOOT_JDK"
11435   has_colon=`$ECHO $path | $GREP ^.:`
11436   new_path="$path"
11437   if test "x$has_colon" = x; then
11438     # Not in mixed or Windows style, start by that.
11439     new_path=`cmd //c echo $path`
11440   fi
11441 
11442 
11443   input_path="$new_path"
11444   # Check if we need to convert this using DOS-style short mode. If the path
11445   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11446   # take no chances and rewrite it.
11447   # Note: m4 eats our [], so we need to use [ and ] instead.
11448   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11449   if test "x$has_forbidden_chars" != x; then
11450     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11451     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11452   fi
11453 
11454 
11455   windows_path="$new_path"
11456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11457     unix_path=`$CYGPATH -u "$windows_path"`
11458     new_path="$unix_path"
11459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11460     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11461     new_path="$unix_path"
11462   fi
11463 
11464   if test "x$path" != "x$new_path"; then
11465     BOOT_JDK="$new_path"
11466     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11467 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11468   fi
11469 
11470   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11471   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11472 
11473   else
11474     # We're on a posix platform. Hooray! :)
11475     path="$BOOT_JDK"
11476     has_space=`$ECHO "$path" | $GREP " "`
11477     if test "x$has_space" != x; then
11478       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11479 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11480       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11481     fi
11482 
11483     # Use eval to expand a potential ~
11484     eval path="$path"
11485     if test ! -f "$path" && test ! -d "$path"; then
11486       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11487     fi
11488 
11489     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11490   fi
11491 
11492               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11493 $as_echo_n "checking for Boot JDK... " >&6; }
11494               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11495 $as_echo "$BOOT_JDK" >&6; }
11496               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11497 $as_echo_n "checking Boot JDK version... " >&6; }
11498               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11499               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11500 $as_echo "$BOOT_JDK_VERSION" >&6; }
11501             fi # end check jdk version
11502           fi # end check rt.jar
11503         fi # end check javac
11504       fi # end check java
11505     fi # end check boot jdk found
11506   fi
11507 
11508   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11509     # Having specified an argument which is incorrect will produce an instant failure;
11510     # we should not go on looking
11511     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11512   fi
11513 
11514   # Test: Is bootjdk available from builddeps?
11515 
11516   if test "x$BOOT_JDK_FOUND" = xno; then
11517     # Now execute the test
11518 
11519 
11520 
11521   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11522     # Source the builddeps file again, to make sure it uses the latest variables!
11523     . $builddepsfile
11524     # Look for a target and build machine specific resource!
11525     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11526     if test "x$resource" = x; then
11527       # Ok, lets instead look for a target specific resource
11528       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11529     fi
11530     if test "x$resource" = x; then
11531       # Ok, lets instead look for a build specific resource
11532       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11533     fi
11534     if test "x$resource" = x; then
11535       # Ok, lets instead look for a generic resource
11536       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11537       resource=${builddep_bootjdk}
11538     fi
11539     if test "x$resource" != x; then
11540       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11541 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11542       # If the resource in the builddeps.conf file is an existing directory,
11543       # for example /java/linux/cups
11544       if test -d ${resource}; then
11545         depdir=${resource}
11546       else
11547 
11548   # bootjdk is for example mymodule
11549   # $resource is for example libs/general/libmymod_1_2_3.zip
11550   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11551   # $with_builddeps_dir is for example /localhome/builddeps
11552   # depdir is the name of the variable into which we store the depdir, eg MYMOD
11553   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11554   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11555   filename=`basename $resource`
11556   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11557   filebase=${filename%%.*}
11558   extension=${filename#*.}
11559   installdir=$with_builddeps_dir/$filebase
11560   if test ! -f $installdir/$filename.unpacked; then
11561     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11562 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11563     if test ! -d $installdir; then
11564       mkdir -p $installdir
11565     fi
11566     if test ! -d $installdir; then
11567       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11568     fi
11569     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11570     touch $tmpfile
11571     if test ! -f $tmpfile; then
11572       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11573     fi
11574 
11575   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11576   # $tmpfile is the local file name for the downloaded file.
11577   VALID_TOOL=no
11578   if test "x$BDEPS_FTP" = xwget; then
11579     VALID_TOOL=yes
11580     wget -O $tmpfile $with_builddeps_server/$resource
11581   fi
11582   if test "x$BDEPS_FTP" = xlftp; then
11583     VALID_TOOL=yes
11584     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11585   fi
11586   if test "x$BDEPS_FTP" = xftp; then
11587     VALID_TOOL=yes
11588     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11589     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11590     FTPUSERPWD=${FTPSERVER%%@*}
11591     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11592       FTPUSER=${userpwd%%:*}
11593       FTPPWD=${userpwd#*@}
11594       FTPSERVER=${FTPSERVER#*@}
11595     else
11596       FTPUSER=ftp
11597       FTPPWD=ftp
11598     fi
11599     # the "pass" command does not work on some
11600     # ftp clients (read ftp.exe) but if it works,
11601     # passive mode is better!
11602     ( \
11603         echo "user $FTPUSER $FTPPWD"        ; \
11604         echo "pass"                         ; \
11605         echo "bin"                          ; \
11606         echo "get $FTPPATH $tmpfile"              ; \
11607     ) | ftp -in $FTPSERVER
11608   fi
11609   if test "x$VALID_TOOL" != xyes; then
11610     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11611   fi
11612 
11613     mv $tmpfile $installdir/$filename
11614     if test ! -s $installdir/$filename; then
11615       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11616     fi
11617     case "$extension" in
11618       zip)  echo "Unzipping $installdir/$filename..."
11619         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11620         ;;
11621       tar.gz) echo "Untaring $installdir/$filename..."
11622         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11623         ;;
11624       tgz) echo "Untaring $installdir/$filename..."
11625         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11626         ;;
11627       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11628         ;;
11629     esac
11630   fi
11631   if test -f $installdir/$filename.unpacked; then
11632     depdir=$installdir
11633   fi
11634 
11635       fi
11636       # Source the builddeps file again, because in the previous command, the depdir
11637       # was updated to point at the current build dependency install directory.
11638       . $builddepsfile
11639       # Now extract variables from the builddeps.conf files.
11640       theroot=${builddep_bootjdk_ROOT}
11641       thecflags=${builddep_bootjdk_CFLAGS}
11642       thelibs=${builddep_bootjdk_LIBS}
11643       if test "x$depdir" = x; then
11644         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11645       fi
11646       BOOT_JDK=$depdir
11647       if test "x$theroot" != x; then
11648         BOOT_JDK="$theroot"
11649       fi
11650       if test "x$thecflags" != x; then
11651         BOOT_JDK_CFLAGS="$thecflags"
11652       fi
11653       if test "x$thelibs" != x; then
11654         BOOT_JDK_LIBS="$thelibs"
11655       fi
11656       BOOT_JDK_FOUND=maybe
11657       else BOOT_JDK_FOUND=no
11658 
11659     fi
11660     else BOOT_JDK_FOUND=no
11661 
11662   fi
11663 
11664 
11665 
11666     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11667     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11668       # Do we have a bin/java?
11669       if test ! -x "$BOOT_JDK/bin/java"; then
11670         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11671 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11672         BOOT_JDK_FOUND=no
11673       else
11674         # Do we have a bin/javac?
11675         if test ! -x "$BOOT_JDK/bin/javac"; then
11676           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11677 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11678           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11679 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11680           BOOT_JDK_FOUND=no
11681         else
11682           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11683           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11684             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11685 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11686             BOOT_JDK_FOUND=no
11687           else
11688             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11689             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11690 
11691             # Extra M4 quote needed to protect [] in grep expression.
11692             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11693             if test "x$FOUND_VERSION_78" = x; then
11694               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11695 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11696               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11697 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11698               BOOT_JDK_FOUND=no
11699             else
11700               # We're done! :-)
11701               BOOT_JDK_FOUND=yes
11702 
11703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11704 
11705   # Input might be given as Windows format, start by converting to
11706   # unix format.
11707   path="$BOOT_JDK"
11708   new_path=`$CYGPATH -u "$path"`
11709 
11710   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11711   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11712   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11713   # "foo.exe" is OK but "foo" is an error.
11714   #
11715   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11716   # It is also a way to make sure we got the proper file name for the real test later on.
11717   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11718   if test "x$test_shortpath" = x; then
11719     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11720 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11721     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11722   fi
11723 
11724   # Call helper function which possibly converts this using DOS-style short mode.
11725   # If so, the updated path is stored in $new_path.
11726 
11727   input_path="$new_path"
11728   # Check if we need to convert this using DOS-style short mode. If the path
11729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11730   # take no chances and rewrite it.
11731   # Note: m4 eats our [], so we need to use [ and ] instead.
11732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11733   if test "x$has_forbidden_chars" != x; then
11734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11735     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11736     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11737     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11738       # Going to short mode and back again did indeed matter. Since short mode is
11739       # case insensitive, let's make it lowercase to improve readability.
11740       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11741       # Now convert it back to Unix-stile (cygpath)
11742       input_path=`$CYGPATH -u "$shortmode_path"`
11743       new_path="$input_path"
11744     fi
11745   fi
11746 
11747   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11748   if test "x$test_cygdrive_prefix" = x; then
11749     # As a simple fix, exclude /usr/bin since it's not a real path.
11750     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11751       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11752       # a path prefixed by /cygdrive for fixpath to work.
11753       new_path="$CYGWIN_ROOT_PATH$input_path"
11754     fi
11755   fi
11756 
11757 
11758   if test "x$path" != "x$new_path"; then
11759     BOOT_JDK="$new_path"
11760     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11761 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11762   fi
11763 
11764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11765 
11766   path="$BOOT_JDK"
11767   has_colon=`$ECHO $path | $GREP ^.:`
11768   new_path="$path"
11769   if test "x$has_colon" = x; then
11770     # Not in mixed or Windows style, start by that.
11771     new_path=`cmd //c echo $path`
11772   fi
11773 
11774 
11775   input_path="$new_path"
11776   # Check if we need to convert this using DOS-style short mode. If the path
11777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11778   # take no chances and rewrite it.
11779   # Note: m4 eats our [], so we need to use [ and ] instead.
11780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11781   if test "x$has_forbidden_chars" != x; then
11782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11783     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11784   fi
11785 
11786 
11787   windows_path="$new_path"
11788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11789     unix_path=`$CYGPATH -u "$windows_path"`
11790     new_path="$unix_path"
11791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11793     new_path="$unix_path"
11794   fi
11795 
11796   if test "x$path" != "x$new_path"; then
11797     BOOT_JDK="$new_path"
11798     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11799 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11800   fi
11801 
11802   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11803   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11804 
11805   else
11806     # We're on a posix platform. Hooray! :)
11807     path="$BOOT_JDK"
11808     has_space=`$ECHO "$path" | $GREP " "`
11809     if test "x$has_space" != x; then
11810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11811 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11812       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11813     fi
11814 
11815     # Use eval to expand a potential ~
11816     eval path="$path"
11817     if test ! -f "$path" && test ! -d "$path"; then
11818       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11819     fi
11820 
11821     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11822   fi
11823 
11824               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11825 $as_echo_n "checking for Boot JDK... " >&6; }
11826               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11827 $as_echo "$BOOT_JDK" >&6; }
11828               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11829 $as_echo_n "checking Boot JDK version... " >&6; }
11830               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11831               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11832 $as_echo "$BOOT_JDK_VERSION" >&6; }
11833             fi # end check jdk version
11834           fi # end check rt.jar
11835         fi # end check javac
11836       fi # end check java
11837     fi # end check boot jdk found
11838   fi
11839 
11840 
11841   # Test: Is $JAVA_HOME set?
11842 
11843   if test "x$BOOT_JDK_FOUND" = xno; then
11844     # Now execute the test
11845 
11846   if test "x$JAVA_HOME" != x; then
11847     JAVA_HOME_PROCESSED="$JAVA_HOME"
11848 
11849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11850 
11851   # Input might be given as Windows format, start by converting to
11852   # unix format.
11853   path="$JAVA_HOME_PROCESSED"
11854   new_path=`$CYGPATH -u "$path"`
11855 
11856   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11857   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11858   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11859   # "foo.exe" is OK but "foo" is an error.
11860   #
11861   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11862   # It is also a way to make sure we got the proper file name for the real test later on.
11863   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11864   if test "x$test_shortpath" = x; then
11865     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11866 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11867     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11868   fi
11869 
11870   # Call helper function which possibly converts this using DOS-style short mode.
11871   # If so, the updated path is stored in $new_path.
11872 
11873   input_path="$new_path"
11874   # Check if we need to convert this using DOS-style short mode. If the path
11875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11876   # take no chances and rewrite it.
11877   # Note: m4 eats our [], so we need to use [ and ] instead.
11878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11879   if test "x$has_forbidden_chars" != x; then
11880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11881     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11882     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11883     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11884       # Going to short mode and back again did indeed matter. Since short mode is
11885       # case insensitive, let's make it lowercase to improve readability.
11886       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11887       # Now convert it back to Unix-stile (cygpath)
11888       input_path=`$CYGPATH -u "$shortmode_path"`
11889       new_path="$input_path"
11890     fi
11891   fi
11892 
11893   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11894   if test "x$test_cygdrive_prefix" = x; then
11895     # As a simple fix, exclude /usr/bin since it's not a real path.
11896     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11897       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11898       # a path prefixed by /cygdrive for fixpath to work.
11899       new_path="$CYGWIN_ROOT_PATH$input_path"
11900     fi
11901   fi
11902 
11903 
11904   if test "x$path" != "x$new_path"; then
11905     JAVA_HOME_PROCESSED="$new_path"
11906     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11907 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11908   fi
11909 
11910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11911 
11912   path="$JAVA_HOME_PROCESSED"
11913   has_colon=`$ECHO $path | $GREP ^.:`
11914   new_path="$path"
11915   if test "x$has_colon" = x; then
11916     # Not in mixed or Windows style, start by that.
11917     new_path=`cmd //c echo $path`
11918   fi
11919 
11920 
11921   input_path="$new_path"
11922   # Check if we need to convert this using DOS-style short mode. If the path
11923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11924   # take no chances and rewrite it.
11925   # Note: m4 eats our [], so we need to use [ and ] instead.
11926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11927   if test "x$has_forbidden_chars" != x; then
11928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11929     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11930   fi
11931 
11932 
11933   windows_path="$new_path"
11934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11935     unix_path=`$CYGPATH -u "$windows_path"`
11936     new_path="$unix_path"
11937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11939     new_path="$unix_path"
11940   fi
11941 
11942   if test "x$path" != "x$new_path"; then
11943     JAVA_HOME_PROCESSED="$new_path"
11944     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11945 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11946   fi
11947 
11948   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11949   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11950 
11951   else
11952     # We're on a posix platform. Hooray! :)
11953     path="$JAVA_HOME_PROCESSED"
11954     has_space=`$ECHO "$path" | $GREP " "`
11955     if test "x$has_space" != x; then
11956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11957 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11958       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11959     fi
11960 
11961     # Use eval to expand a potential ~
11962     eval path="$path"
11963     if test ! -f "$path" && test ! -d "$path"; then
11964       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11965     fi
11966 
11967     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11968   fi
11969 
11970     if test ! -d "$JAVA_HOME_PROCESSED"; then
11971       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11972 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11973     else
11974       # Aha, the user has set a JAVA_HOME
11975       # let us use that as the Boot JDK.
11976       BOOT_JDK="$JAVA_HOME_PROCESSED"
11977       BOOT_JDK_FOUND=maybe
11978       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11979 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11980     fi
11981   fi
11982 
11983 
11984     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11985     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11986       # Do we have a bin/java?
11987       if test ! -x "$BOOT_JDK/bin/java"; then
11988         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11990         BOOT_JDK_FOUND=no
11991       else
11992         # Do we have a bin/javac?
11993         if test ! -x "$BOOT_JDK/bin/javac"; then
11994           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11995 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11996           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11997 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11998           BOOT_JDK_FOUND=no
11999         else
12000           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12001           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12002             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12004             BOOT_JDK_FOUND=no
12005           else
12006             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12007             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12008 
12009             # Extra M4 quote needed to protect [] in grep expression.
12010             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12011             if test "x$FOUND_VERSION_78" = x; then
12012               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12013 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12014               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12015 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12016               BOOT_JDK_FOUND=no
12017             else
12018               # We're done! :-)
12019               BOOT_JDK_FOUND=yes
12020 
12021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12022 
12023   # Input might be given as Windows format, start by converting to
12024   # unix format.
12025   path="$BOOT_JDK"
12026   new_path=`$CYGPATH -u "$path"`
12027 
12028   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12029   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12030   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12031   # "foo.exe" is OK but "foo" is an error.
12032   #
12033   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12034   # It is also a way to make sure we got the proper file name for the real test later on.
12035   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12036   if test "x$test_shortpath" = x; then
12037     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12038 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12039     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12040   fi
12041 
12042   # Call helper function which possibly converts this using DOS-style short mode.
12043   # If so, the updated path is stored in $new_path.
12044 
12045   input_path="$new_path"
12046   # Check if we need to convert this using DOS-style short mode. If the path
12047   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12048   # take no chances and rewrite it.
12049   # Note: m4 eats our [], so we need to use [ and ] instead.
12050   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12051   if test "x$has_forbidden_chars" != x; then
12052     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12053     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12054     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12055     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12056       # Going to short mode and back again did indeed matter. Since short mode is
12057       # case insensitive, let's make it lowercase to improve readability.
12058       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12059       # Now convert it back to Unix-stile (cygpath)
12060       input_path=`$CYGPATH -u "$shortmode_path"`
12061       new_path="$input_path"
12062     fi
12063   fi
12064 
12065   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12066   if test "x$test_cygdrive_prefix" = x; then
12067     # As a simple fix, exclude /usr/bin since it's not a real path.
12068     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12069       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12070       # a path prefixed by /cygdrive for fixpath to work.
12071       new_path="$CYGWIN_ROOT_PATH$input_path"
12072     fi
12073   fi
12074 
12075 
12076   if test "x$path" != "x$new_path"; then
12077     BOOT_JDK="$new_path"
12078     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12079 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12080   fi
12081 
12082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12083 
12084   path="$BOOT_JDK"
12085   has_colon=`$ECHO $path | $GREP ^.:`
12086   new_path="$path"
12087   if test "x$has_colon" = x; then
12088     # Not in mixed or Windows style, start by that.
12089     new_path=`cmd //c echo $path`
12090   fi
12091 
12092 
12093   input_path="$new_path"
12094   # Check if we need to convert this using DOS-style short mode. If the path
12095   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12096   # take no chances and rewrite it.
12097   # Note: m4 eats our [], so we need to use [ and ] instead.
12098   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12099   if test "x$has_forbidden_chars" != x; then
12100     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12101     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12102   fi
12103 
12104 
12105   windows_path="$new_path"
12106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12107     unix_path=`$CYGPATH -u "$windows_path"`
12108     new_path="$unix_path"
12109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12111     new_path="$unix_path"
12112   fi
12113 
12114   if test "x$path" != "x$new_path"; then
12115     BOOT_JDK="$new_path"
12116     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12117 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12118   fi
12119 
12120   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12121   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12122 
12123   else
12124     # We're on a posix platform. Hooray! :)
12125     path="$BOOT_JDK"
12126     has_space=`$ECHO "$path" | $GREP " "`
12127     if test "x$has_space" != x; then
12128       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12130       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12131     fi
12132 
12133     # Use eval to expand a potential ~
12134     eval path="$path"
12135     if test ! -f "$path" && test ! -d "$path"; then
12136       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12137     fi
12138 
12139     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12140   fi
12141 
12142               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12143 $as_echo_n "checking for Boot JDK... " >&6; }
12144               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12145 $as_echo "$BOOT_JDK" >&6; }
12146               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12147 $as_echo_n "checking Boot JDK version... " >&6; }
12148               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12149               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12150 $as_echo "$BOOT_JDK_VERSION" >&6; }
12151             fi # end check jdk version
12152           fi # end check rt.jar
12153         fi # end check javac
12154       fi # end check java
12155     fi # end check boot jdk found
12156   fi
12157 
12158 
12159   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12160 
12161   if test "x$BOOT_JDK_FOUND" = xno; then
12162     # Now execute the test
12163 
12164   if test -x /usr/libexec/java_home; then
12165     BOOT_JDK=`/usr/libexec/java_home`
12166     BOOT_JDK_FOUND=maybe
12167     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12168 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12169   fi
12170 
12171 
12172     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12173     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12174       # Do we have a bin/java?
12175       if test ! -x "$BOOT_JDK/bin/java"; then
12176         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12177 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12178         BOOT_JDK_FOUND=no
12179       else
12180         # Do we have a bin/javac?
12181         if test ! -x "$BOOT_JDK/bin/javac"; then
12182           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12183 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12184           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12185 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12186           BOOT_JDK_FOUND=no
12187         else
12188           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12189           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12190             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12192             BOOT_JDK_FOUND=no
12193           else
12194             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12195             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12196 
12197             # Extra M4 quote needed to protect [] in grep expression.
12198             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12199             if test "x$FOUND_VERSION_78" = x; then
12200               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12201 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12202               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12203 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12204               BOOT_JDK_FOUND=no
12205             else
12206               # We're done! :-)
12207               BOOT_JDK_FOUND=yes
12208 
12209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12210 
12211   # Input might be given as Windows format, start by converting to
12212   # unix format.
12213   path="$BOOT_JDK"
12214   new_path=`$CYGPATH -u "$path"`
12215 
12216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12219   # "foo.exe" is OK but "foo" is an error.
12220   #
12221   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12222   # It is also a way to make sure we got the proper file name for the real test later on.
12223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12224   if test "x$test_shortpath" = x; then
12225     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12226 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12227     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12228   fi
12229 
12230   # Call helper function which possibly converts this using DOS-style short mode.
12231   # If so, the updated path is stored in $new_path.
12232 
12233   input_path="$new_path"
12234   # Check if we need to convert this using DOS-style short mode. If the path
12235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12236   # take no chances and rewrite it.
12237   # Note: m4 eats our [], so we need to use [ and ] instead.
12238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12239   if test "x$has_forbidden_chars" != x; then
12240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12241     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12242     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12243     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12244       # Going to short mode and back again did indeed matter. Since short mode is
12245       # case insensitive, let's make it lowercase to improve readability.
12246       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12247       # Now convert it back to Unix-stile (cygpath)
12248       input_path=`$CYGPATH -u "$shortmode_path"`
12249       new_path="$input_path"
12250     fi
12251   fi
12252 
12253   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12254   if test "x$test_cygdrive_prefix" = x; then
12255     # As a simple fix, exclude /usr/bin since it's not a real path.
12256     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12257       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12258       # a path prefixed by /cygdrive for fixpath to work.
12259       new_path="$CYGWIN_ROOT_PATH$input_path"
12260     fi
12261   fi
12262 
12263 
12264   if test "x$path" != "x$new_path"; then
12265     BOOT_JDK="$new_path"
12266     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12267 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12268   fi
12269 
12270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12271 
12272   path="$BOOT_JDK"
12273   has_colon=`$ECHO $path | $GREP ^.:`
12274   new_path="$path"
12275   if test "x$has_colon" = x; then
12276     # Not in mixed or Windows style, start by that.
12277     new_path=`cmd //c echo $path`
12278   fi
12279 
12280 
12281   input_path="$new_path"
12282   # Check if we need to convert this using DOS-style short mode. If the path
12283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12284   # take no chances and rewrite it.
12285   # Note: m4 eats our [], so we need to use [ and ] instead.
12286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12287   if test "x$has_forbidden_chars" != x; then
12288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12289     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12290   fi
12291 
12292 
12293   windows_path="$new_path"
12294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12295     unix_path=`$CYGPATH -u "$windows_path"`
12296     new_path="$unix_path"
12297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12299     new_path="$unix_path"
12300   fi
12301 
12302   if test "x$path" != "x$new_path"; then
12303     BOOT_JDK="$new_path"
12304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12305 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12306   fi
12307 
12308   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12309   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12310 
12311   else
12312     # We're on a posix platform. Hooray! :)
12313     path="$BOOT_JDK"
12314     has_space=`$ECHO "$path" | $GREP " "`
12315     if test "x$has_space" != x; then
12316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12317 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12318       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12319     fi
12320 
12321     # Use eval to expand a potential ~
12322     eval path="$path"
12323     if test ! -f "$path" && test ! -d "$path"; then
12324       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12325     fi
12326 
12327     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12328   fi
12329 
12330               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12331 $as_echo_n "checking for Boot JDK... " >&6; }
12332               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12333 $as_echo "$BOOT_JDK" >&6; }
12334               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12335 $as_echo_n "checking Boot JDK version... " >&6; }
12336               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12337               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12338 $as_echo "$BOOT_JDK_VERSION" >&6; }
12339             fi # end check jdk version
12340           fi # end check rt.jar
12341         fi # end check javac
12342       fi # end check java
12343     fi # end check boot jdk found
12344   fi
12345 
12346 
12347   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12348 
12349   if test "x$BOOT_JDK_FOUND" = xno; then
12350     # Now execute the test
12351 
12352   # Extract the first word of "javac", so it can be a program name with args.
12353 set dummy javac; ac_word=$2
12354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12355 $as_echo_n "checking for $ac_word... " >&6; }
12356 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12357   $as_echo_n "(cached) " >&6
12358 else
12359   case $JAVAC_CHECK in
12360   [\\/]* | ?:[\\/]*)
12361   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12362   ;;
12363   *)
12364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12365 for as_dir in $PATH
12366 do
12367   IFS=$as_save_IFS
12368   test -z "$as_dir" && as_dir=.
12369     for ac_exec_ext in '' $ac_executable_extensions; do
12370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12371     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12373     break 2
12374   fi
12375 done
12376   done
12377 IFS=$as_save_IFS
12378 
12379   ;;
12380 esac
12381 fi
12382 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12383 if test -n "$JAVAC_CHECK"; then
12384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12385 $as_echo "$JAVAC_CHECK" >&6; }
12386 else
12387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12388 $as_echo "no" >&6; }
12389 fi
12390 
12391 
12392   # Extract the first word of "java", so it can be a program name with args.
12393 set dummy java; ac_word=$2
12394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12395 $as_echo_n "checking for $ac_word... " >&6; }
12396 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12397   $as_echo_n "(cached) " >&6
12398 else
12399   case $JAVA_CHECK in
12400   [\\/]* | ?:[\\/]*)
12401   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12402   ;;
12403   *)
12404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12405 for as_dir in $PATH
12406 do
12407   IFS=$as_save_IFS
12408   test -z "$as_dir" && as_dir=.
12409     for ac_exec_ext in '' $ac_executable_extensions; do
12410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12411     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12413     break 2
12414   fi
12415 done
12416   done
12417 IFS=$as_save_IFS
12418 
12419   ;;
12420 esac
12421 fi
12422 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12423 if test -n "$JAVA_CHECK"; then
12424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12425 $as_echo "$JAVA_CHECK" >&6; }
12426 else
12427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12428 $as_echo "no" >&6; }
12429 fi
12430 
12431 
12432   BINARY="$JAVAC_CHECK"
12433   if test "x$JAVAC_CHECK" = x; then
12434     BINARY="$JAVA_CHECK"
12435   fi
12436   if test "x$BINARY" != x; then
12437     # So there is a java(c) binary, it might be part of a JDK.
12438     # Lets find the JDK/JRE directory by following symbolic links.
12439     # Linux/GNU systems often have links from /usr/bin/java to
12440     # /etc/alternatives/java to the real JDK binary.
12441 
12442   if test "x$OPENJDK_BUILD_OS" != xwindows; then
12443     # Follow a chain of symbolic links. Use readlink
12444     # where it exists, else fall back to horribly
12445     # complicated shell code.
12446     if test "x$READLINK_TESTED" != yes; then
12447       # On MacOSX there is a readlink tool with a different
12448       # purpose than the GNU readlink tool. Check the found readlink.
12449       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12450       if test "x$ISGNU" = x; then
12451         # A readlink that we do not know how to use.
12452         # Are there other non-GNU readlinks out there?
12453         READLINK_TESTED=yes
12454         READLINK=
12455       fi
12456     fi
12457 
12458     if test "x$READLINK" != x; then
12459       BINARY=`$READLINK -f $BINARY`
12460     else
12461       # Save the current directory for restoring afterwards
12462       STARTDIR=$PWD
12463       COUNTER=0
12464       sym_link_dir=`$DIRNAME $BINARY`
12465       sym_link_file=`$BASENAME $BINARY`
12466       cd $sym_link_dir
12467       # Use -P flag to resolve symlinks in directories.
12468       cd `$THEPWDCMD -P`
12469       sym_link_dir=`$THEPWDCMD -P`
12470       # Resolve file symlinks
12471       while test $COUNTER -lt 20; do
12472         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12473         if test "x$ISLINK" == x; then
12474           # This is not a symbolic link! We are done!
12475           break
12476         fi
12477         # Again resolve directory symlinks since the target of the just found
12478         # link could be in a different directory
12479         cd `$DIRNAME $ISLINK`
12480         sym_link_dir=`$THEPWDCMD -P`
12481         sym_link_file=`$BASENAME $ISLINK`
12482         let COUNTER=COUNTER+1
12483       done
12484       cd $STARTDIR
12485       BINARY=$sym_link_dir/$sym_link_file
12486     fi
12487   fi
12488 
12489     BOOT_JDK=`dirname "$BINARY"`
12490     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12491     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12492       # Looks like we found ourselves an JDK
12493       BOOT_JDK_FOUND=maybe
12494       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12495 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12496     fi
12497   fi
12498 
12499 
12500     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12501     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12502       # Do we have a bin/java?
12503       if test ! -x "$BOOT_JDK/bin/java"; then
12504         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12505 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12506         BOOT_JDK_FOUND=no
12507       else
12508         # Do we have a bin/javac?
12509         if test ! -x "$BOOT_JDK/bin/javac"; then
12510           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12511 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12512           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12513 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12514           BOOT_JDK_FOUND=no
12515         else
12516           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12517           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12518             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12519 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12520             BOOT_JDK_FOUND=no
12521           else
12522             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12523             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12524 
12525             # Extra M4 quote needed to protect [] in grep expression.
12526             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12527             if test "x$FOUND_VERSION_78" = x; then
12528               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12529 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12530               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12531 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12532               BOOT_JDK_FOUND=no
12533             else
12534               # We're done! :-)
12535               BOOT_JDK_FOUND=yes
12536 
12537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12538 
12539   # Input might be given as Windows format, start by converting to
12540   # unix format.
12541   path="$BOOT_JDK"
12542   new_path=`$CYGPATH -u "$path"`
12543 
12544   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12545   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12546   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12547   # "foo.exe" is OK but "foo" is an error.
12548   #
12549   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12550   # It is also a way to make sure we got the proper file name for the real test later on.
12551   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12552   if test "x$test_shortpath" = x; then
12553     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12554 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12555     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12556   fi
12557 
12558   # Call helper function which possibly converts this using DOS-style short mode.
12559   # If so, the updated path is stored in $new_path.
12560 
12561   input_path="$new_path"
12562   # Check if we need to convert this using DOS-style short mode. If the path
12563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12564   # take no chances and rewrite it.
12565   # Note: m4 eats our [], so we need to use [ and ] instead.
12566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12567   if test "x$has_forbidden_chars" != x; then
12568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12569     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12570     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12571     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12572       # Going to short mode and back again did indeed matter. Since short mode is
12573       # case insensitive, let's make it lowercase to improve readability.
12574       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12575       # Now convert it back to Unix-stile (cygpath)
12576       input_path=`$CYGPATH -u "$shortmode_path"`
12577       new_path="$input_path"
12578     fi
12579   fi
12580 
12581   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12582   if test "x$test_cygdrive_prefix" = x; then
12583     # As a simple fix, exclude /usr/bin since it's not a real path.
12584     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12585       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12586       # a path prefixed by /cygdrive for fixpath to work.
12587       new_path="$CYGWIN_ROOT_PATH$input_path"
12588     fi
12589   fi
12590 
12591 
12592   if test "x$path" != "x$new_path"; then
12593     BOOT_JDK="$new_path"
12594     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12595 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12596   fi
12597 
12598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12599 
12600   path="$BOOT_JDK"
12601   has_colon=`$ECHO $path | $GREP ^.:`
12602   new_path="$path"
12603   if test "x$has_colon" = x; then
12604     # Not in mixed or Windows style, start by that.
12605     new_path=`cmd //c echo $path`
12606   fi
12607 
12608 
12609   input_path="$new_path"
12610   # Check if we need to convert this using DOS-style short mode. If the path
12611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12612   # take no chances and rewrite it.
12613   # Note: m4 eats our [], so we need to use [ and ] instead.
12614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12615   if test "x$has_forbidden_chars" != x; then
12616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12617     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12618   fi
12619 
12620 
12621   windows_path="$new_path"
12622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12623     unix_path=`$CYGPATH -u "$windows_path"`
12624     new_path="$unix_path"
12625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12626     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12627     new_path="$unix_path"
12628   fi
12629 
12630   if test "x$path" != "x$new_path"; then
12631     BOOT_JDK="$new_path"
12632     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12633 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12634   fi
12635 
12636   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12637   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12638 
12639   else
12640     # We're on a posix platform. Hooray! :)
12641     path="$BOOT_JDK"
12642     has_space=`$ECHO "$path" | $GREP " "`
12643     if test "x$has_space" != x; then
12644       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12645 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12646       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12647     fi
12648 
12649     # Use eval to expand a potential ~
12650     eval path="$path"
12651     if test ! -f "$path" && test ! -d "$path"; then
12652       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12653     fi
12654 
12655     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12656   fi
12657 
12658               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12659 $as_echo_n "checking for Boot JDK... " >&6; }
12660               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12661 $as_echo "$BOOT_JDK" >&6; }
12662               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12663 $as_echo_n "checking Boot JDK version... " >&6; }
12664               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12665               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12666 $as_echo "$BOOT_JDK_VERSION" >&6; }
12667             fi # end check jdk version
12668           fi # end check rt.jar
12669         fi # end check javac
12670       fi # end check java
12671     fi # end check boot jdk found
12672   fi
12673 
12674 
12675   # Test: Is there a JDK installed in default, well-known locations?
12676 
12677   if test "x$BOOT_JDK_FOUND" = xno; then
12678     # Now execute the test
12679 
12680   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12681 
12682   if test "x$BOOT_JDK_FOUND" = xno; then
12683     # Now execute the test
12684 
12685   if test "x$ProgramW6432" != x; then
12686     VIRTUAL_DIR="$ProgramW6432/Java"
12687 
12688   windows_path="$VIRTUAL_DIR"
12689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12690     unix_path=`$CYGPATH -u "$windows_path"`
12691     VIRTUAL_DIR="$unix_path"
12692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12693     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12694     VIRTUAL_DIR="$unix_path"
12695   fi
12696 
12697 
12698   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12699   BOOT_JDK_SUFFIX=""
12700   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12701   if test "x$ALL_JDKS_FOUND" != x; then
12702     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12703 
12704   if test "x$BOOT_JDK_FOUND" = xno; then
12705     # Now execute the test
12706 
12707         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12708         if test -d "$BOOT_JDK"; then
12709           BOOT_JDK_FOUND=maybe
12710           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12711 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12712         fi
12713 
12714 
12715     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12716     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12717       # Do we have a bin/java?
12718       if test ! -x "$BOOT_JDK/bin/java"; then
12719         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12720 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12721         BOOT_JDK_FOUND=no
12722       else
12723         # Do we have a bin/javac?
12724         if test ! -x "$BOOT_JDK/bin/javac"; then
12725           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12727           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12728 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12729           BOOT_JDK_FOUND=no
12730         else
12731           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12732           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12733             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12734 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12735             BOOT_JDK_FOUND=no
12736           else
12737             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12738             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12739 
12740             # Extra M4 quote needed to protect [] in grep expression.
12741             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12742             if test "x$FOUND_VERSION_78" = x; then
12743               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12744 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12745               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12746 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12747               BOOT_JDK_FOUND=no
12748             else
12749               # We're done! :-)
12750               BOOT_JDK_FOUND=yes
12751 
12752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12753 
12754   # Input might be given as Windows format, start by converting to
12755   # unix format.
12756   path="$BOOT_JDK"
12757   new_path=`$CYGPATH -u "$path"`
12758 
12759   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12760   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12761   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12762   # "foo.exe" is OK but "foo" is an error.
12763   #
12764   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12765   # It is also a way to make sure we got the proper file name for the real test later on.
12766   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12767   if test "x$test_shortpath" = x; then
12768     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12769 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12770     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12771   fi
12772 
12773   # Call helper function which possibly converts this using DOS-style short mode.
12774   # If so, the updated path is stored in $new_path.
12775 
12776   input_path="$new_path"
12777   # Check if we need to convert this using DOS-style short mode. If the path
12778   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12779   # take no chances and rewrite it.
12780   # Note: m4 eats our [], so we need to use [ and ] instead.
12781   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12782   if test "x$has_forbidden_chars" != x; then
12783     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12784     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12785     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12786     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12787       # Going to short mode and back again did indeed matter. Since short mode is
12788       # case insensitive, let's make it lowercase to improve readability.
12789       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12790       # Now convert it back to Unix-stile (cygpath)
12791       input_path=`$CYGPATH -u "$shortmode_path"`
12792       new_path="$input_path"
12793     fi
12794   fi
12795 
12796   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12797   if test "x$test_cygdrive_prefix" = x; then
12798     # As a simple fix, exclude /usr/bin since it's not a real path.
12799     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12800       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12801       # a path prefixed by /cygdrive for fixpath to work.
12802       new_path="$CYGWIN_ROOT_PATH$input_path"
12803     fi
12804   fi
12805 
12806 
12807   if test "x$path" != "x$new_path"; then
12808     BOOT_JDK="$new_path"
12809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12810 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12811   fi
12812 
12813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12814 
12815   path="$BOOT_JDK"
12816   has_colon=`$ECHO $path | $GREP ^.:`
12817   new_path="$path"
12818   if test "x$has_colon" = x; then
12819     # Not in mixed or Windows style, start by that.
12820     new_path=`cmd //c echo $path`
12821   fi
12822 
12823 
12824   input_path="$new_path"
12825   # Check if we need to convert this using DOS-style short mode. If the path
12826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12827   # take no chances and rewrite it.
12828   # Note: m4 eats our [], so we need to use [ and ] instead.
12829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12830   if test "x$has_forbidden_chars" != x; then
12831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12832     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12833   fi
12834 
12835 
12836   windows_path="$new_path"
12837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12838     unix_path=`$CYGPATH -u "$windows_path"`
12839     new_path="$unix_path"
12840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12842     new_path="$unix_path"
12843   fi
12844 
12845   if test "x$path" != "x$new_path"; then
12846     BOOT_JDK="$new_path"
12847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12848 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12849   fi
12850 
12851   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12852   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12853 
12854   else
12855     # We're on a posix platform. Hooray! :)
12856     path="$BOOT_JDK"
12857     has_space=`$ECHO "$path" | $GREP " "`
12858     if test "x$has_space" != x; then
12859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12860 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12861       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12862     fi
12863 
12864     # Use eval to expand a potential ~
12865     eval path="$path"
12866     if test ! -f "$path" && test ! -d "$path"; then
12867       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12868     fi
12869 
12870     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12871   fi
12872 
12873               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12874 $as_echo_n "checking for Boot JDK... " >&6; }
12875               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12876 $as_echo "$BOOT_JDK" >&6; }
12877               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12878 $as_echo_n "checking Boot JDK version... " >&6; }
12879               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12880               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12881 $as_echo "$BOOT_JDK_VERSION" >&6; }
12882             fi # end check jdk version
12883           fi # end check rt.jar
12884         fi # end check javac
12885       fi # end check java
12886     fi # end check boot jdk found
12887   fi
12888 
12889     done
12890   fi
12891 
12892   fi
12893 
12894 
12895     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12896     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12897       # Do we have a bin/java?
12898       if test ! -x "$BOOT_JDK/bin/java"; then
12899         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12900 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12901         BOOT_JDK_FOUND=no
12902       else
12903         # Do we have a bin/javac?
12904         if test ! -x "$BOOT_JDK/bin/javac"; then
12905           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12906 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12907           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12908 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12909           BOOT_JDK_FOUND=no
12910         else
12911           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12912           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12913             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12914 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12915             BOOT_JDK_FOUND=no
12916           else
12917             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12918             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12919 
12920             # Extra M4 quote needed to protect [] in grep expression.
12921             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12922             if test "x$FOUND_VERSION_78" = x; then
12923               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12924 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12925               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12926 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12927               BOOT_JDK_FOUND=no
12928             else
12929               # We're done! :-)
12930               BOOT_JDK_FOUND=yes
12931 
12932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12933 
12934   # Input might be given as Windows format, start by converting to
12935   # unix format.
12936   path="$BOOT_JDK"
12937   new_path=`$CYGPATH -u "$path"`
12938 
12939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12942   # "foo.exe" is OK but "foo" is an error.
12943   #
12944   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12945   # It is also a way to make sure we got the proper file name for the real test later on.
12946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12947   if test "x$test_shortpath" = x; then
12948     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12949 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12950     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12951   fi
12952 
12953   # Call helper function which possibly converts this using DOS-style short mode.
12954   # If so, the updated path is stored in $new_path.
12955 
12956   input_path="$new_path"
12957   # Check if we need to convert this using DOS-style short mode. If the path
12958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12959   # take no chances and rewrite it.
12960   # Note: m4 eats our [], so we need to use [ and ] instead.
12961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12962   if test "x$has_forbidden_chars" != x; then
12963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12967       # Going to short mode and back again did indeed matter. Since short mode is
12968       # case insensitive, let's make it lowercase to improve readability.
12969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12970       # Now convert it back to Unix-stile (cygpath)
12971       input_path=`$CYGPATH -u "$shortmode_path"`
12972       new_path="$input_path"
12973     fi
12974   fi
12975 
12976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12977   if test "x$test_cygdrive_prefix" = x; then
12978     # As a simple fix, exclude /usr/bin since it's not a real path.
12979     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12981       # a path prefixed by /cygdrive for fixpath to work.
12982       new_path="$CYGWIN_ROOT_PATH$input_path"
12983     fi
12984   fi
12985 
12986 
12987   if test "x$path" != "x$new_path"; then
12988     BOOT_JDK="$new_path"
12989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12990 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12991   fi
12992 
12993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12994 
12995   path="$BOOT_JDK"
12996   has_colon=`$ECHO $path | $GREP ^.:`
12997   new_path="$path"
12998   if test "x$has_colon" = x; then
12999     # Not in mixed or Windows style, start by that.
13000     new_path=`cmd //c echo $path`
13001   fi
13002 
13003 
13004   input_path="$new_path"
13005   # Check if we need to convert this using DOS-style short mode. If the path
13006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13007   # take no chances and rewrite it.
13008   # Note: m4 eats our [], so we need to use [ and ] instead.
13009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13010   if test "x$has_forbidden_chars" != x; then
13011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13013   fi
13014 
13015 
13016   windows_path="$new_path"
13017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13018     unix_path=`$CYGPATH -u "$windows_path"`
13019     new_path="$unix_path"
13020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13022     new_path="$unix_path"
13023   fi
13024 
13025   if test "x$path" != "x$new_path"; then
13026     BOOT_JDK="$new_path"
13027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13028 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13029   fi
13030 
13031   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13032   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13033 
13034   else
13035     # We're on a posix platform. Hooray! :)
13036     path="$BOOT_JDK"
13037     has_space=`$ECHO "$path" | $GREP " "`
13038     if test "x$has_space" != x; then
13039       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13040 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13041       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13042     fi
13043 
13044     # Use eval to expand a potential ~
13045     eval path="$path"
13046     if test ! -f "$path" && test ! -d "$path"; then
13047       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13048     fi
13049 
13050     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13051   fi
13052 
13053               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13054 $as_echo_n "checking for Boot JDK... " >&6; }
13055               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13056 $as_echo "$BOOT_JDK" >&6; }
13057               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13058 $as_echo_n "checking Boot JDK version... " >&6; }
13059               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13060               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13061 $as_echo "$BOOT_JDK_VERSION" >&6; }
13062             fi # end check jdk version
13063           fi # end check rt.jar
13064         fi # end check javac
13065       fi # end check java
13066     fi # end check boot jdk found
13067   fi
13068 
13069 
13070   if test "x$BOOT_JDK_FOUND" = xno; then
13071     # Now execute the test
13072 
13073   if test "x$PROGRAMW6432" != x; then
13074     VIRTUAL_DIR="$PROGRAMW6432/Java"
13075 
13076   windows_path="$VIRTUAL_DIR"
13077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13078     unix_path=`$CYGPATH -u "$windows_path"`
13079     VIRTUAL_DIR="$unix_path"
13080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13082     VIRTUAL_DIR="$unix_path"
13083   fi
13084 
13085 
13086   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13087   BOOT_JDK_SUFFIX=""
13088   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13089   if test "x$ALL_JDKS_FOUND" != x; then
13090     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13091 
13092   if test "x$BOOT_JDK_FOUND" = xno; then
13093     # Now execute the test
13094 
13095         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13096         if test -d "$BOOT_JDK"; then
13097           BOOT_JDK_FOUND=maybe
13098           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13099 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13100         fi
13101 
13102 
13103     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13104     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13105       # Do we have a bin/java?
13106       if test ! -x "$BOOT_JDK/bin/java"; then
13107         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13108 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13109         BOOT_JDK_FOUND=no
13110       else
13111         # Do we have a bin/javac?
13112         if test ! -x "$BOOT_JDK/bin/javac"; then
13113           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13114 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13115           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13116 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13117           BOOT_JDK_FOUND=no
13118         else
13119           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13120           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13121             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13122 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13123             BOOT_JDK_FOUND=no
13124           else
13125             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13126             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13127 
13128             # Extra M4 quote needed to protect [] in grep expression.
13129             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13130             if test "x$FOUND_VERSION_78" = x; then
13131               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13132 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13133               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13134 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13135               BOOT_JDK_FOUND=no
13136             else
13137               # We're done! :-)
13138               BOOT_JDK_FOUND=yes
13139 
13140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13141 
13142   # Input might be given as Windows format, start by converting to
13143   # unix format.
13144   path="$BOOT_JDK"
13145   new_path=`$CYGPATH -u "$path"`
13146 
13147   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13148   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13149   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13150   # "foo.exe" is OK but "foo" is an error.
13151   #
13152   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13153   # It is also a way to make sure we got the proper file name for the real test later on.
13154   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13155   if test "x$test_shortpath" = x; then
13156     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13157 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13158     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13159   fi
13160 
13161   # Call helper function which possibly converts this using DOS-style short mode.
13162   # If so, the updated path is stored in $new_path.
13163 
13164   input_path="$new_path"
13165   # Check if we need to convert this using DOS-style short mode. If the path
13166   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13167   # take no chances and rewrite it.
13168   # Note: m4 eats our [], so we need to use [ and ] instead.
13169   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13170   if test "x$has_forbidden_chars" != x; then
13171     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13172     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13173     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13174     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13175       # Going to short mode and back again did indeed matter. Since short mode is
13176       # case insensitive, let's make it lowercase to improve readability.
13177       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13178       # Now convert it back to Unix-stile (cygpath)
13179       input_path=`$CYGPATH -u "$shortmode_path"`
13180       new_path="$input_path"
13181     fi
13182   fi
13183 
13184   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13185   if test "x$test_cygdrive_prefix" = x; then
13186     # As a simple fix, exclude /usr/bin since it's not a real path.
13187     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13188       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13189       # a path prefixed by /cygdrive for fixpath to work.
13190       new_path="$CYGWIN_ROOT_PATH$input_path"
13191     fi
13192   fi
13193 
13194 
13195   if test "x$path" != "x$new_path"; then
13196     BOOT_JDK="$new_path"
13197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13198 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13199   fi
13200 
13201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13202 
13203   path="$BOOT_JDK"
13204   has_colon=`$ECHO $path | $GREP ^.:`
13205   new_path="$path"
13206   if test "x$has_colon" = x; then
13207     # Not in mixed or Windows style, start by that.
13208     new_path=`cmd //c echo $path`
13209   fi
13210 
13211 
13212   input_path="$new_path"
13213   # Check if we need to convert this using DOS-style short mode. If the path
13214   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13215   # take no chances and rewrite it.
13216   # Note: m4 eats our [], so we need to use [ and ] instead.
13217   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13218   if test "x$has_forbidden_chars" != x; then
13219     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13220     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13221   fi
13222 
13223 
13224   windows_path="$new_path"
13225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13226     unix_path=`$CYGPATH -u "$windows_path"`
13227     new_path="$unix_path"
13228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13230     new_path="$unix_path"
13231   fi
13232 
13233   if test "x$path" != "x$new_path"; then
13234     BOOT_JDK="$new_path"
13235     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13236 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13237   fi
13238 
13239   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13240   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13241 
13242   else
13243     # We're on a posix platform. Hooray! :)
13244     path="$BOOT_JDK"
13245     has_space=`$ECHO "$path" | $GREP " "`
13246     if test "x$has_space" != x; then
13247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13248 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13249       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13250     fi
13251 
13252     # Use eval to expand a potential ~
13253     eval path="$path"
13254     if test ! -f "$path" && test ! -d "$path"; then
13255       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13256     fi
13257 
13258     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13259   fi
13260 
13261               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13262 $as_echo_n "checking for Boot JDK... " >&6; }
13263               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13264 $as_echo "$BOOT_JDK" >&6; }
13265               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13266 $as_echo_n "checking Boot JDK version... " >&6; }
13267               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13268               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13269 $as_echo "$BOOT_JDK_VERSION" >&6; }
13270             fi # end check jdk version
13271           fi # end check rt.jar
13272         fi # end check javac
13273       fi # end check java
13274     fi # end check boot jdk found
13275   fi
13276 
13277     done
13278   fi
13279 
13280   fi
13281 
13282 
13283     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13284     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13285       # Do we have a bin/java?
13286       if test ! -x "$BOOT_JDK/bin/java"; then
13287         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13288 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13289         BOOT_JDK_FOUND=no
13290       else
13291         # Do we have a bin/javac?
13292         if test ! -x "$BOOT_JDK/bin/javac"; then
13293           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13294 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13295           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13296 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13297           BOOT_JDK_FOUND=no
13298         else
13299           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13300           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13301             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13302 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13303             BOOT_JDK_FOUND=no
13304           else
13305             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13306             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13307 
13308             # Extra M4 quote needed to protect [] in grep expression.
13309             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13310             if test "x$FOUND_VERSION_78" = x; then
13311               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13312 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13313               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13314 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13315               BOOT_JDK_FOUND=no
13316             else
13317               # We're done! :-)
13318               BOOT_JDK_FOUND=yes
13319 
13320   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13321 
13322   # Input might be given as Windows format, start by converting to
13323   # unix format.
13324   path="$BOOT_JDK"
13325   new_path=`$CYGPATH -u "$path"`
13326 
13327   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13328   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13329   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13330   # "foo.exe" is OK but "foo" is an error.
13331   #
13332   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13333   # It is also a way to make sure we got the proper file name for the real test later on.
13334   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13335   if test "x$test_shortpath" = x; then
13336     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13337 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13338     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13339   fi
13340 
13341   # Call helper function which possibly converts this using DOS-style short mode.
13342   # If so, the updated path is stored in $new_path.
13343 
13344   input_path="$new_path"
13345   # Check if we need to convert this using DOS-style short mode. If the path
13346   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13347   # take no chances and rewrite it.
13348   # Note: m4 eats our [], so we need to use [ and ] instead.
13349   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13350   if test "x$has_forbidden_chars" != x; then
13351     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13352     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13353     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13354     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13355       # Going to short mode and back again did indeed matter. Since short mode is
13356       # case insensitive, let's make it lowercase to improve readability.
13357       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13358       # Now convert it back to Unix-stile (cygpath)
13359       input_path=`$CYGPATH -u "$shortmode_path"`
13360       new_path="$input_path"
13361     fi
13362   fi
13363 
13364   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13365   if test "x$test_cygdrive_prefix" = x; then
13366     # As a simple fix, exclude /usr/bin since it's not a real path.
13367     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13368       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13369       # a path prefixed by /cygdrive for fixpath to work.
13370       new_path="$CYGWIN_ROOT_PATH$input_path"
13371     fi
13372   fi
13373 
13374 
13375   if test "x$path" != "x$new_path"; then
13376     BOOT_JDK="$new_path"
13377     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13378 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13379   fi
13380 
13381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13382 
13383   path="$BOOT_JDK"
13384   has_colon=`$ECHO $path | $GREP ^.:`
13385   new_path="$path"
13386   if test "x$has_colon" = x; then
13387     # Not in mixed or Windows style, start by that.
13388     new_path=`cmd //c echo $path`
13389   fi
13390 
13391 
13392   input_path="$new_path"
13393   # Check if we need to convert this using DOS-style short mode. If the path
13394   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13395   # take no chances and rewrite it.
13396   # Note: m4 eats our [], so we need to use [ and ] instead.
13397   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13398   if test "x$has_forbidden_chars" != x; then
13399     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13400     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13401   fi
13402 
13403 
13404   windows_path="$new_path"
13405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13406     unix_path=`$CYGPATH -u "$windows_path"`
13407     new_path="$unix_path"
13408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13410     new_path="$unix_path"
13411   fi
13412 
13413   if test "x$path" != "x$new_path"; then
13414     BOOT_JDK="$new_path"
13415     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13416 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13417   fi
13418 
13419   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13420   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13421 
13422   else
13423     # We're on a posix platform. Hooray! :)
13424     path="$BOOT_JDK"
13425     has_space=`$ECHO "$path" | $GREP " "`
13426     if test "x$has_space" != x; then
13427       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13428 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13429       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13430     fi
13431 
13432     # Use eval to expand a potential ~
13433     eval path="$path"
13434     if test ! -f "$path" && test ! -d "$path"; then
13435       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13436     fi
13437 
13438     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13439   fi
13440 
13441               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13442 $as_echo_n "checking for Boot JDK... " >&6; }
13443               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13444 $as_echo "$BOOT_JDK" >&6; }
13445               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13446 $as_echo_n "checking Boot JDK version... " >&6; }
13447               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13448               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13449 $as_echo "$BOOT_JDK_VERSION" >&6; }
13450             fi # end check jdk version
13451           fi # end check rt.jar
13452         fi # end check javac
13453       fi # end check java
13454     fi # end check boot jdk found
13455   fi
13456 
13457 
13458   if test "x$BOOT_JDK_FOUND" = xno; then
13459     # Now execute the test
13460 
13461   if test "x$PROGRAMFILES" != x; then
13462     VIRTUAL_DIR="$PROGRAMFILES/Java"
13463 
13464   windows_path="$VIRTUAL_DIR"
13465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13466     unix_path=`$CYGPATH -u "$windows_path"`
13467     VIRTUAL_DIR="$unix_path"
13468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13470     VIRTUAL_DIR="$unix_path"
13471   fi
13472 
13473 
13474   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13475   BOOT_JDK_SUFFIX=""
13476   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13477   if test "x$ALL_JDKS_FOUND" != x; then
13478     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13479 
13480   if test "x$BOOT_JDK_FOUND" = xno; then
13481     # Now execute the test
13482 
13483         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13484         if test -d "$BOOT_JDK"; then
13485           BOOT_JDK_FOUND=maybe
13486           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13487 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13488         fi
13489 
13490 
13491     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13492     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13493       # Do we have a bin/java?
13494       if test ! -x "$BOOT_JDK/bin/java"; then
13495         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13496 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13497         BOOT_JDK_FOUND=no
13498       else
13499         # Do we have a bin/javac?
13500         if test ! -x "$BOOT_JDK/bin/javac"; then
13501           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13502 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13503           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13504 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13505           BOOT_JDK_FOUND=no
13506         else
13507           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13508           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13509             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13510 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13511             BOOT_JDK_FOUND=no
13512           else
13513             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13514             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13515 
13516             # Extra M4 quote needed to protect [] in grep expression.
13517             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13518             if test "x$FOUND_VERSION_78" = x; then
13519               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13520 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13521               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13522 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13523               BOOT_JDK_FOUND=no
13524             else
13525               # We're done! :-)
13526               BOOT_JDK_FOUND=yes
13527 
13528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13529 
13530   # Input might be given as Windows format, start by converting to
13531   # unix format.
13532   path="$BOOT_JDK"
13533   new_path=`$CYGPATH -u "$path"`
13534 
13535   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13536   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13537   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13538   # "foo.exe" is OK but "foo" is an error.
13539   #
13540   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13541   # It is also a way to make sure we got the proper file name for the real test later on.
13542   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13543   if test "x$test_shortpath" = x; then
13544     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13545 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13546     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13547   fi
13548 
13549   # Call helper function which possibly converts this using DOS-style short mode.
13550   # If so, the updated path is stored in $new_path.
13551 
13552   input_path="$new_path"
13553   # Check if we need to convert this using DOS-style short mode. If the path
13554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13555   # take no chances and rewrite it.
13556   # Note: m4 eats our [], so we need to use [ and ] instead.
13557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13558   if test "x$has_forbidden_chars" != x; then
13559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13560     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13561     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13562     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13563       # Going to short mode and back again did indeed matter. Since short mode is
13564       # case insensitive, let's make it lowercase to improve readability.
13565       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13566       # Now convert it back to Unix-stile (cygpath)
13567       input_path=`$CYGPATH -u "$shortmode_path"`
13568       new_path="$input_path"
13569     fi
13570   fi
13571 
13572   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13573   if test "x$test_cygdrive_prefix" = x; then
13574     # As a simple fix, exclude /usr/bin since it's not a real path.
13575     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13576       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13577       # a path prefixed by /cygdrive for fixpath to work.
13578       new_path="$CYGWIN_ROOT_PATH$input_path"
13579     fi
13580   fi
13581 
13582 
13583   if test "x$path" != "x$new_path"; then
13584     BOOT_JDK="$new_path"
13585     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13586 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13587   fi
13588 
13589   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13590 
13591   path="$BOOT_JDK"
13592   has_colon=`$ECHO $path | $GREP ^.:`
13593   new_path="$path"
13594   if test "x$has_colon" = x; then
13595     # Not in mixed or Windows style, start by that.
13596     new_path=`cmd //c echo $path`
13597   fi
13598 
13599 
13600   input_path="$new_path"
13601   # Check if we need to convert this using DOS-style short mode. If the path
13602   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13603   # take no chances and rewrite it.
13604   # Note: m4 eats our [], so we need to use [ and ] instead.
13605   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13606   if test "x$has_forbidden_chars" != x; then
13607     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13608     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13609   fi
13610 
13611 
13612   windows_path="$new_path"
13613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13614     unix_path=`$CYGPATH -u "$windows_path"`
13615     new_path="$unix_path"
13616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13618     new_path="$unix_path"
13619   fi
13620 
13621   if test "x$path" != "x$new_path"; then
13622     BOOT_JDK="$new_path"
13623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13624 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13625   fi
13626 
13627   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13628   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13629 
13630   else
13631     # We're on a posix platform. Hooray! :)
13632     path="$BOOT_JDK"
13633     has_space=`$ECHO "$path" | $GREP " "`
13634     if test "x$has_space" != x; then
13635       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13636 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13637       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13638     fi
13639 
13640     # Use eval to expand a potential ~
13641     eval path="$path"
13642     if test ! -f "$path" && test ! -d "$path"; then
13643       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13644     fi
13645 
13646     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13647   fi
13648 
13649               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13650 $as_echo_n "checking for Boot JDK... " >&6; }
13651               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13652 $as_echo "$BOOT_JDK" >&6; }
13653               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13654 $as_echo_n "checking Boot JDK version... " >&6; }
13655               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13656               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13657 $as_echo "$BOOT_JDK_VERSION" >&6; }
13658             fi # end check jdk version
13659           fi # end check rt.jar
13660         fi # end check javac
13661       fi # end check java
13662     fi # end check boot jdk found
13663   fi
13664 
13665     done
13666   fi
13667 
13668   fi
13669 
13670 
13671     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13672     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13673       # Do we have a bin/java?
13674       if test ! -x "$BOOT_JDK/bin/java"; then
13675         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13676 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13677         BOOT_JDK_FOUND=no
13678       else
13679         # Do we have a bin/javac?
13680         if test ! -x "$BOOT_JDK/bin/javac"; then
13681           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13682 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13683           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13684 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13685           BOOT_JDK_FOUND=no
13686         else
13687           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13688           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13689             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13690 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13691             BOOT_JDK_FOUND=no
13692           else
13693             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13694             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13695 
13696             # Extra M4 quote needed to protect [] in grep expression.
13697             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13698             if test "x$FOUND_VERSION_78" = x; then
13699               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13700 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13701               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13702 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13703               BOOT_JDK_FOUND=no
13704             else
13705               # We're done! :-)
13706               BOOT_JDK_FOUND=yes
13707 
13708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13709 
13710   # Input might be given as Windows format, start by converting to
13711   # unix format.
13712   path="$BOOT_JDK"
13713   new_path=`$CYGPATH -u "$path"`
13714 
13715   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13716   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13717   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13718   # "foo.exe" is OK but "foo" is an error.
13719   #
13720   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13721   # It is also a way to make sure we got the proper file name for the real test later on.
13722   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13723   if test "x$test_shortpath" = x; then
13724     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13725 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13726     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13727   fi
13728 
13729   # Call helper function which possibly converts this using DOS-style short mode.
13730   # If so, the updated path is stored in $new_path.
13731 
13732   input_path="$new_path"
13733   # Check if we need to convert this using DOS-style short mode. If the path
13734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13735   # take no chances and rewrite it.
13736   # Note: m4 eats our [], so we need to use [ and ] instead.
13737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13738   if test "x$has_forbidden_chars" != x; then
13739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13740     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13741     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13742     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13743       # Going to short mode and back again did indeed matter. Since short mode is
13744       # case insensitive, let's make it lowercase to improve readability.
13745       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13746       # Now convert it back to Unix-stile (cygpath)
13747       input_path=`$CYGPATH -u "$shortmode_path"`
13748       new_path="$input_path"
13749     fi
13750   fi
13751 
13752   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13753   if test "x$test_cygdrive_prefix" = x; then
13754     # As a simple fix, exclude /usr/bin since it's not a real path.
13755     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13756       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13757       # a path prefixed by /cygdrive for fixpath to work.
13758       new_path="$CYGWIN_ROOT_PATH$input_path"
13759     fi
13760   fi
13761 
13762 
13763   if test "x$path" != "x$new_path"; then
13764     BOOT_JDK="$new_path"
13765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13766 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13767   fi
13768 
13769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13770 
13771   path="$BOOT_JDK"
13772   has_colon=`$ECHO $path | $GREP ^.:`
13773   new_path="$path"
13774   if test "x$has_colon" = x; then
13775     # Not in mixed or Windows style, start by that.
13776     new_path=`cmd //c echo $path`
13777   fi
13778 
13779 
13780   input_path="$new_path"
13781   # Check if we need to convert this using DOS-style short mode. If the path
13782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13783   # take no chances and rewrite it.
13784   # Note: m4 eats our [], so we need to use [ and ] instead.
13785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13786   if test "x$has_forbidden_chars" != x; then
13787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13788     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13789   fi
13790 
13791 
13792   windows_path="$new_path"
13793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13794     unix_path=`$CYGPATH -u "$windows_path"`
13795     new_path="$unix_path"
13796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13798     new_path="$unix_path"
13799   fi
13800 
13801   if test "x$path" != "x$new_path"; then
13802     BOOT_JDK="$new_path"
13803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13804 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13805   fi
13806 
13807   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13808   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13809 
13810   else
13811     # We're on a posix platform. Hooray! :)
13812     path="$BOOT_JDK"
13813     has_space=`$ECHO "$path" | $GREP " "`
13814     if test "x$has_space" != x; then
13815       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13816 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13817       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13818     fi
13819 
13820     # Use eval to expand a potential ~
13821     eval path="$path"
13822     if test ! -f "$path" && test ! -d "$path"; then
13823       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13824     fi
13825 
13826     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13827   fi
13828 
13829               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13830 $as_echo_n "checking for Boot JDK... " >&6; }
13831               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13832 $as_echo "$BOOT_JDK" >&6; }
13833               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13834 $as_echo_n "checking Boot JDK version... " >&6; }
13835               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13836               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13837 $as_echo "$BOOT_JDK_VERSION" >&6; }
13838             fi # end check jdk version
13839           fi # end check rt.jar
13840         fi # end check javac
13841       fi # end check java
13842     fi # end check boot jdk found
13843   fi
13844 
13845 
13846   if test "x$BOOT_JDK_FOUND" = xno; then
13847     # Now execute the test
13848 
13849   if test "x$ProgramFiles" != x; then
13850     VIRTUAL_DIR="$ProgramFiles/Java"
13851 
13852   windows_path="$VIRTUAL_DIR"
13853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13854     unix_path=`$CYGPATH -u "$windows_path"`
13855     VIRTUAL_DIR="$unix_path"
13856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13858     VIRTUAL_DIR="$unix_path"
13859   fi
13860 
13861 
13862   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13863   BOOT_JDK_SUFFIX=""
13864   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13865   if test "x$ALL_JDKS_FOUND" != x; then
13866     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13867 
13868   if test "x$BOOT_JDK_FOUND" = xno; then
13869     # Now execute the test
13870 
13871         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13872         if test -d "$BOOT_JDK"; then
13873           BOOT_JDK_FOUND=maybe
13874           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13875 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13876         fi
13877 
13878 
13879     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13880     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13881       # Do we have a bin/java?
13882       if test ! -x "$BOOT_JDK/bin/java"; then
13883         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13884 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13885         BOOT_JDK_FOUND=no
13886       else
13887         # Do we have a bin/javac?
13888         if test ! -x "$BOOT_JDK/bin/javac"; then
13889           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13890 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13891           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13892 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13893           BOOT_JDK_FOUND=no
13894         else
13895           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13896           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13897             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13898 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13899             BOOT_JDK_FOUND=no
13900           else
13901             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13902             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13903 
13904             # Extra M4 quote needed to protect [] in grep expression.
13905             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13906             if test "x$FOUND_VERSION_78" = x; then
13907               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13908 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13909               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13910 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13911               BOOT_JDK_FOUND=no
13912             else
13913               # We're done! :-)
13914               BOOT_JDK_FOUND=yes
13915 
13916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13917 
13918   # Input might be given as Windows format, start by converting to
13919   # unix format.
13920   path="$BOOT_JDK"
13921   new_path=`$CYGPATH -u "$path"`
13922 
13923   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13924   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13925   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13926   # "foo.exe" is OK but "foo" is an error.
13927   #
13928   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13929   # It is also a way to make sure we got the proper file name for the real test later on.
13930   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13931   if test "x$test_shortpath" = x; then
13932     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13933 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13934     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13935   fi
13936 
13937   # Call helper function which possibly converts this using DOS-style short mode.
13938   # If so, the updated path is stored in $new_path.
13939 
13940   input_path="$new_path"
13941   # Check if we need to convert this using DOS-style short mode. If the path
13942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13943   # take no chances and rewrite it.
13944   # Note: m4 eats our [], so we need to use [ and ] instead.
13945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13946   if test "x$has_forbidden_chars" != x; then
13947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13948     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13949     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13950     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13951       # Going to short mode and back again did indeed matter. Since short mode is
13952       # case insensitive, let's make it lowercase to improve readability.
13953       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13954       # Now convert it back to Unix-stile (cygpath)
13955       input_path=`$CYGPATH -u "$shortmode_path"`
13956       new_path="$input_path"
13957     fi
13958   fi
13959 
13960   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13961   if test "x$test_cygdrive_prefix" = x; then
13962     # As a simple fix, exclude /usr/bin since it's not a real path.
13963     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13964       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13965       # a path prefixed by /cygdrive for fixpath to work.
13966       new_path="$CYGWIN_ROOT_PATH$input_path"
13967     fi
13968   fi
13969 
13970 
13971   if test "x$path" != "x$new_path"; then
13972     BOOT_JDK="$new_path"
13973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13974 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13975   fi
13976 
13977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13978 
13979   path="$BOOT_JDK"
13980   has_colon=`$ECHO $path | $GREP ^.:`
13981   new_path="$path"
13982   if test "x$has_colon" = x; then
13983     # Not in mixed or Windows style, start by that.
13984     new_path=`cmd //c echo $path`
13985   fi
13986 
13987 
13988   input_path="$new_path"
13989   # Check if we need to convert this using DOS-style short mode. If the path
13990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13991   # take no chances and rewrite it.
13992   # Note: m4 eats our [], so we need to use [ and ] instead.
13993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13994   if test "x$has_forbidden_chars" != x; then
13995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13997   fi
13998 
13999 
14000   windows_path="$new_path"
14001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14002     unix_path=`$CYGPATH -u "$windows_path"`
14003     new_path="$unix_path"
14004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14006     new_path="$unix_path"
14007   fi
14008 
14009   if test "x$path" != "x$new_path"; then
14010     BOOT_JDK="$new_path"
14011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14012 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14013   fi
14014 
14015   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14016   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14017 
14018   else
14019     # We're on a posix platform. Hooray! :)
14020     path="$BOOT_JDK"
14021     has_space=`$ECHO "$path" | $GREP " "`
14022     if test "x$has_space" != x; then
14023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14024 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14025       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14026     fi
14027 
14028     # Use eval to expand a potential ~
14029     eval path="$path"
14030     if test ! -f "$path" && test ! -d "$path"; then
14031       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14032     fi
14033 
14034     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14035   fi
14036 
14037               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14038 $as_echo_n "checking for Boot JDK... " >&6; }
14039               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14040 $as_echo "$BOOT_JDK" >&6; }
14041               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14042 $as_echo_n "checking Boot JDK version... " >&6; }
14043               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14044               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14045 $as_echo "$BOOT_JDK_VERSION" >&6; }
14046             fi # end check jdk version
14047           fi # end check rt.jar
14048         fi # end check javac
14049       fi # end check java
14050     fi # end check boot jdk found
14051   fi
14052 
14053     done
14054   fi
14055 
14056   fi
14057 
14058 
14059     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14060     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14061       # Do we have a bin/java?
14062       if test ! -x "$BOOT_JDK/bin/java"; then
14063         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14064 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14065         BOOT_JDK_FOUND=no
14066       else
14067         # Do we have a bin/javac?
14068         if test ! -x "$BOOT_JDK/bin/javac"; then
14069           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14070 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14071           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14072 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14073           BOOT_JDK_FOUND=no
14074         else
14075           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14076           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14077             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14079             BOOT_JDK_FOUND=no
14080           else
14081             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14082             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14083 
14084             # Extra M4 quote needed to protect [] in grep expression.
14085             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14086             if test "x$FOUND_VERSION_78" = x; then
14087               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14088 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14089               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14090 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14091               BOOT_JDK_FOUND=no
14092             else
14093               # We're done! :-)
14094               BOOT_JDK_FOUND=yes
14095 
14096   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14097 
14098   # Input might be given as Windows format, start by converting to
14099   # unix format.
14100   path="$BOOT_JDK"
14101   new_path=`$CYGPATH -u "$path"`
14102 
14103   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14104   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14105   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14106   # "foo.exe" is OK but "foo" is an error.
14107   #
14108   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14109   # It is also a way to make sure we got the proper file name for the real test later on.
14110   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14111   if test "x$test_shortpath" = x; then
14112     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14113 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14114     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14115   fi
14116 
14117   # Call helper function which possibly converts this using DOS-style short mode.
14118   # If so, the updated path is stored in $new_path.
14119 
14120   input_path="$new_path"
14121   # Check if we need to convert this using DOS-style short mode. If the path
14122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14123   # take no chances and rewrite it.
14124   # Note: m4 eats our [], so we need to use [ and ] instead.
14125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14126   if test "x$has_forbidden_chars" != x; then
14127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14128     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14129     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14130     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14131       # Going to short mode and back again did indeed matter. Since short mode is
14132       # case insensitive, let's make it lowercase to improve readability.
14133       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14134       # Now convert it back to Unix-stile (cygpath)
14135       input_path=`$CYGPATH -u "$shortmode_path"`
14136       new_path="$input_path"
14137     fi
14138   fi
14139 
14140   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14141   if test "x$test_cygdrive_prefix" = x; then
14142     # As a simple fix, exclude /usr/bin since it's not a real path.
14143     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14144       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14145       # a path prefixed by /cygdrive for fixpath to work.
14146       new_path="$CYGWIN_ROOT_PATH$input_path"
14147     fi
14148   fi
14149 
14150 
14151   if test "x$path" != "x$new_path"; then
14152     BOOT_JDK="$new_path"
14153     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14154 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14155   fi
14156 
14157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14158 
14159   path="$BOOT_JDK"
14160   has_colon=`$ECHO $path | $GREP ^.:`
14161   new_path="$path"
14162   if test "x$has_colon" = x; then
14163     # Not in mixed or Windows style, start by that.
14164     new_path=`cmd //c echo $path`
14165   fi
14166 
14167 
14168   input_path="$new_path"
14169   # Check if we need to convert this using DOS-style short mode. If the path
14170   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14171   # take no chances and rewrite it.
14172   # Note: m4 eats our [], so we need to use [ and ] instead.
14173   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14174   if test "x$has_forbidden_chars" != x; then
14175     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14176     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14177   fi
14178 
14179 
14180   windows_path="$new_path"
14181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14182     unix_path=`$CYGPATH -u "$windows_path"`
14183     new_path="$unix_path"
14184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14186     new_path="$unix_path"
14187   fi
14188 
14189   if test "x$path" != "x$new_path"; then
14190     BOOT_JDK="$new_path"
14191     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14192 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14193   fi
14194 
14195   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14196   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14197 
14198   else
14199     # We're on a posix platform. Hooray! :)
14200     path="$BOOT_JDK"
14201     has_space=`$ECHO "$path" | $GREP " "`
14202     if test "x$has_space" != x; then
14203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14204 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14205       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14206     fi
14207 
14208     # Use eval to expand a potential ~
14209     eval path="$path"
14210     if test ! -f "$path" && test ! -d "$path"; then
14211       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14212     fi
14213 
14214     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14215   fi
14216 
14217               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14218 $as_echo_n "checking for Boot JDK... " >&6; }
14219               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14220 $as_echo "$BOOT_JDK" >&6; }
14221               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14222 $as_echo_n "checking Boot JDK version... " >&6; }
14223               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14224               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14225 $as_echo "$BOOT_JDK_VERSION" >&6; }
14226             fi # end check jdk version
14227           fi # end check rt.jar
14228         fi # end check javac
14229       fi # end check java
14230     fi # end check boot jdk found
14231   fi
14232 
14233 
14234   if test "x$BOOT_JDK_FOUND" = xno; then
14235     # Now execute the test
14236 
14237   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14238   BOOT_JDK_SUFFIX=""
14239   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14240   if test "x$ALL_JDKS_FOUND" != x; then
14241     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14242 
14243   if test "x$BOOT_JDK_FOUND" = xno; then
14244     # Now execute the test
14245 
14246         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14247         if test -d "$BOOT_JDK"; then
14248           BOOT_JDK_FOUND=maybe
14249           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14250 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14251         fi
14252 
14253 
14254     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14255     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14256       # Do we have a bin/java?
14257       if test ! -x "$BOOT_JDK/bin/java"; then
14258         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14259 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14260         BOOT_JDK_FOUND=no
14261       else
14262         # Do we have a bin/javac?
14263         if test ! -x "$BOOT_JDK/bin/javac"; then
14264           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14266           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14267 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14268           BOOT_JDK_FOUND=no
14269         else
14270           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14271           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14272             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14273 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14274             BOOT_JDK_FOUND=no
14275           else
14276             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14277             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14278 
14279             # Extra M4 quote needed to protect [] in grep expression.
14280             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14281             if test "x$FOUND_VERSION_78" = x; then
14282               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14283 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14284               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14285 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14286               BOOT_JDK_FOUND=no
14287             else
14288               # We're done! :-)
14289               BOOT_JDK_FOUND=yes
14290 
14291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14292 
14293   # Input might be given as Windows format, start by converting to
14294   # unix format.
14295   path="$BOOT_JDK"
14296   new_path=`$CYGPATH -u "$path"`
14297 
14298   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14299   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14300   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14301   # "foo.exe" is OK but "foo" is an error.
14302   #
14303   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14304   # It is also a way to make sure we got the proper file name for the real test later on.
14305   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14306   if test "x$test_shortpath" = x; then
14307     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14308 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14309     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14310   fi
14311 
14312   # Call helper function which possibly converts this using DOS-style short mode.
14313   # If so, the updated path is stored in $new_path.
14314 
14315   input_path="$new_path"
14316   # Check if we need to convert this using DOS-style short mode. If the path
14317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14318   # take no chances and rewrite it.
14319   # Note: m4 eats our [], so we need to use [ and ] instead.
14320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14321   if test "x$has_forbidden_chars" != x; then
14322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14323     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14324     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14325     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14326       # Going to short mode and back again did indeed matter. Since short mode is
14327       # case insensitive, let's make it lowercase to improve readability.
14328       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14329       # Now convert it back to Unix-stile (cygpath)
14330       input_path=`$CYGPATH -u "$shortmode_path"`
14331       new_path="$input_path"
14332     fi
14333   fi
14334 
14335   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14336   if test "x$test_cygdrive_prefix" = x; then
14337     # As a simple fix, exclude /usr/bin since it's not a real path.
14338     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14339       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14340       # a path prefixed by /cygdrive for fixpath to work.
14341       new_path="$CYGWIN_ROOT_PATH$input_path"
14342     fi
14343   fi
14344 
14345 
14346   if test "x$path" != "x$new_path"; then
14347     BOOT_JDK="$new_path"
14348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14349 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14350   fi
14351 
14352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14353 
14354   path="$BOOT_JDK"
14355   has_colon=`$ECHO $path | $GREP ^.:`
14356   new_path="$path"
14357   if test "x$has_colon" = x; then
14358     # Not in mixed or Windows style, start by that.
14359     new_path=`cmd //c echo $path`
14360   fi
14361 
14362 
14363   input_path="$new_path"
14364   # Check if we need to convert this using DOS-style short mode. If the path
14365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14366   # take no chances and rewrite it.
14367   # Note: m4 eats our [], so we need to use [ and ] instead.
14368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14369   if test "x$has_forbidden_chars" != x; then
14370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14372   fi
14373 
14374 
14375   windows_path="$new_path"
14376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14377     unix_path=`$CYGPATH -u "$windows_path"`
14378     new_path="$unix_path"
14379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14381     new_path="$unix_path"
14382   fi
14383 
14384   if test "x$path" != "x$new_path"; then
14385     BOOT_JDK="$new_path"
14386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14387 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14388   fi
14389 
14390   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14391   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14392 
14393   else
14394     # We're on a posix platform. Hooray! :)
14395     path="$BOOT_JDK"
14396     has_space=`$ECHO "$path" | $GREP " "`
14397     if test "x$has_space" != x; then
14398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14399 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14400       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14401     fi
14402 
14403     # Use eval to expand a potential ~
14404     eval path="$path"
14405     if test ! -f "$path" && test ! -d "$path"; then
14406       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14407     fi
14408 
14409     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14410   fi
14411 
14412               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14413 $as_echo_n "checking for Boot JDK... " >&6; }
14414               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14415 $as_echo "$BOOT_JDK" >&6; }
14416               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14417 $as_echo_n "checking Boot JDK version... " >&6; }
14418               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14419               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14420 $as_echo "$BOOT_JDK_VERSION" >&6; }
14421             fi # end check jdk version
14422           fi # end check rt.jar
14423         fi # end check javac
14424       fi # end check java
14425     fi # end check boot jdk found
14426   fi
14427 
14428     done
14429   fi
14430 
14431 
14432     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14433     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14434       # Do we have a bin/java?
14435       if test ! -x "$BOOT_JDK/bin/java"; then
14436         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14437 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14438         BOOT_JDK_FOUND=no
14439       else
14440         # Do we have a bin/javac?
14441         if test ! -x "$BOOT_JDK/bin/javac"; then
14442           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14443 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14444           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14445 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14446           BOOT_JDK_FOUND=no
14447         else
14448           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14449           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14450             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14451 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14452             BOOT_JDK_FOUND=no
14453           else
14454             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14455             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14456 
14457             # Extra M4 quote needed to protect [] in grep expression.
14458             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14459             if test "x$FOUND_VERSION_78" = x; then
14460               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14461 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14462               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14463 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14464               BOOT_JDK_FOUND=no
14465             else
14466               # We're done! :-)
14467               BOOT_JDK_FOUND=yes
14468 
14469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14470 
14471   # Input might be given as Windows format, start by converting to
14472   # unix format.
14473   path="$BOOT_JDK"
14474   new_path=`$CYGPATH -u "$path"`
14475 
14476   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14477   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14478   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14479   # "foo.exe" is OK but "foo" is an error.
14480   #
14481   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14482   # It is also a way to make sure we got the proper file name for the real test later on.
14483   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14484   if test "x$test_shortpath" = x; then
14485     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14486 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14487     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14488   fi
14489 
14490   # Call helper function which possibly converts this using DOS-style short mode.
14491   # If so, the updated path is stored in $new_path.
14492 
14493   input_path="$new_path"
14494   # Check if we need to convert this using DOS-style short mode. If the path
14495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14496   # take no chances and rewrite it.
14497   # Note: m4 eats our [], so we need to use [ and ] instead.
14498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14499   if test "x$has_forbidden_chars" != x; then
14500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14501     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14502     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14503     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14504       # Going to short mode and back again did indeed matter. Since short mode is
14505       # case insensitive, let's make it lowercase to improve readability.
14506       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14507       # Now convert it back to Unix-stile (cygpath)
14508       input_path=`$CYGPATH -u "$shortmode_path"`
14509       new_path="$input_path"
14510     fi
14511   fi
14512 
14513   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14514   if test "x$test_cygdrive_prefix" = x; then
14515     # As a simple fix, exclude /usr/bin since it's not a real path.
14516     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14517       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14518       # a path prefixed by /cygdrive for fixpath to work.
14519       new_path="$CYGWIN_ROOT_PATH$input_path"
14520     fi
14521   fi
14522 
14523 
14524   if test "x$path" != "x$new_path"; then
14525     BOOT_JDK="$new_path"
14526     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14527 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14528   fi
14529 
14530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14531 
14532   path="$BOOT_JDK"
14533   has_colon=`$ECHO $path | $GREP ^.:`
14534   new_path="$path"
14535   if test "x$has_colon" = x; then
14536     # Not in mixed or Windows style, start by that.
14537     new_path=`cmd //c echo $path`
14538   fi
14539 
14540 
14541   input_path="$new_path"
14542   # Check if we need to convert this using DOS-style short mode. If the path
14543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14544   # take no chances and rewrite it.
14545   # Note: m4 eats our [], so we need to use [ and ] instead.
14546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14547   if test "x$has_forbidden_chars" != x; then
14548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14549     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14550   fi
14551 
14552 
14553   windows_path="$new_path"
14554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14555     unix_path=`$CYGPATH -u "$windows_path"`
14556     new_path="$unix_path"
14557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14558     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14559     new_path="$unix_path"
14560   fi
14561 
14562   if test "x$path" != "x$new_path"; then
14563     BOOT_JDK="$new_path"
14564     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14565 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14566   fi
14567 
14568   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14569   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14570 
14571   else
14572     # We're on a posix platform. Hooray! :)
14573     path="$BOOT_JDK"
14574     has_space=`$ECHO "$path" | $GREP " "`
14575     if test "x$has_space" != x; then
14576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14577 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14578       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14579     fi
14580 
14581     # Use eval to expand a potential ~
14582     eval path="$path"
14583     if test ! -f "$path" && test ! -d "$path"; then
14584       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14585     fi
14586 
14587     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14588   fi
14589 
14590               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14591 $as_echo_n "checking for Boot JDK... " >&6; }
14592               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14593 $as_echo "$BOOT_JDK" >&6; }
14594               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14595 $as_echo_n "checking Boot JDK version... " >&6; }
14596               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14597               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14598 $as_echo "$BOOT_JDK_VERSION" >&6; }
14599             fi # end check jdk version
14600           fi # end check rt.jar
14601         fi # end check javac
14602       fi # end check java
14603     fi # end check boot jdk found
14604   fi
14605 
14606   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14607 
14608   if test "x$BOOT_JDK_FOUND" = xno; then
14609     # Now execute the test
14610 
14611   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14612   BOOT_JDK_SUFFIX="/Contents/Home"
14613   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14614   if test "x$ALL_JDKS_FOUND" != x; then
14615     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14616 
14617   if test "x$BOOT_JDK_FOUND" = xno; then
14618     # Now execute the test
14619 
14620         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14621         if test -d "$BOOT_JDK"; then
14622           BOOT_JDK_FOUND=maybe
14623           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14624 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14625         fi
14626 
14627 
14628     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14629     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14630       # Do we have a bin/java?
14631       if test ! -x "$BOOT_JDK/bin/java"; then
14632         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14633 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14634         BOOT_JDK_FOUND=no
14635       else
14636         # Do we have a bin/javac?
14637         if test ! -x "$BOOT_JDK/bin/javac"; then
14638           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14639 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14640           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14641 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14642           BOOT_JDK_FOUND=no
14643         else
14644           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14645           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14646             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14647 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14648             BOOT_JDK_FOUND=no
14649           else
14650             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14651             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14652 
14653             # Extra M4 quote needed to protect [] in grep expression.
14654             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14655             if test "x$FOUND_VERSION_78" = x; then
14656               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14657 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14658               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14659 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14660               BOOT_JDK_FOUND=no
14661             else
14662               # We're done! :-)
14663               BOOT_JDK_FOUND=yes
14664 
14665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14666 
14667   # Input might be given as Windows format, start by converting to
14668   # unix format.
14669   path="$BOOT_JDK"
14670   new_path=`$CYGPATH -u "$path"`
14671 
14672   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14673   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14674   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14675   # "foo.exe" is OK but "foo" is an error.
14676   #
14677   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14678   # It is also a way to make sure we got the proper file name for the real test later on.
14679   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14680   if test "x$test_shortpath" = x; then
14681     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14682 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14683     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14684   fi
14685 
14686   # Call helper function which possibly converts this using DOS-style short mode.
14687   # If so, the updated path is stored in $new_path.
14688 
14689   input_path="$new_path"
14690   # Check if we need to convert this using DOS-style short mode. If the path
14691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14692   # take no chances and rewrite it.
14693   # Note: m4 eats our [], so we need to use [ and ] instead.
14694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14695   if test "x$has_forbidden_chars" != x; then
14696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14697     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14698     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14699     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14700       # Going to short mode and back again did indeed matter. Since short mode is
14701       # case insensitive, let's make it lowercase to improve readability.
14702       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14703       # Now convert it back to Unix-stile (cygpath)
14704       input_path=`$CYGPATH -u "$shortmode_path"`
14705       new_path="$input_path"
14706     fi
14707   fi
14708 
14709   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14710   if test "x$test_cygdrive_prefix" = x; then
14711     # As a simple fix, exclude /usr/bin since it's not a real path.
14712     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14713       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14714       # a path prefixed by /cygdrive for fixpath to work.
14715       new_path="$CYGWIN_ROOT_PATH$input_path"
14716     fi
14717   fi
14718 
14719 
14720   if test "x$path" != "x$new_path"; then
14721     BOOT_JDK="$new_path"
14722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14723 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14724   fi
14725 
14726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14727 
14728   path="$BOOT_JDK"
14729   has_colon=`$ECHO $path | $GREP ^.:`
14730   new_path="$path"
14731   if test "x$has_colon" = x; then
14732     # Not in mixed or Windows style, start by that.
14733     new_path=`cmd //c echo $path`
14734   fi
14735 
14736 
14737   input_path="$new_path"
14738   # Check if we need to convert this using DOS-style short mode. If the path
14739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14740   # take no chances and rewrite it.
14741   # Note: m4 eats our [], so we need to use [ and ] instead.
14742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14743   if test "x$has_forbidden_chars" != x; then
14744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14745     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14746   fi
14747 
14748 
14749   windows_path="$new_path"
14750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14751     unix_path=`$CYGPATH -u "$windows_path"`
14752     new_path="$unix_path"
14753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14754     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14755     new_path="$unix_path"
14756   fi
14757 
14758   if test "x$path" != "x$new_path"; then
14759     BOOT_JDK="$new_path"
14760     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14761 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14762   fi
14763 
14764   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14765   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14766 
14767   else
14768     # We're on a posix platform. Hooray! :)
14769     path="$BOOT_JDK"
14770     has_space=`$ECHO "$path" | $GREP " "`
14771     if test "x$has_space" != x; then
14772       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14773 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14774       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14775     fi
14776 
14777     # Use eval to expand a potential ~
14778     eval path="$path"
14779     if test ! -f "$path" && test ! -d "$path"; then
14780       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14781     fi
14782 
14783     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14784   fi
14785 
14786               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14787 $as_echo_n "checking for Boot JDK... " >&6; }
14788               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14789 $as_echo "$BOOT_JDK" >&6; }
14790               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14791 $as_echo_n "checking Boot JDK version... " >&6; }
14792               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14793               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14794 $as_echo "$BOOT_JDK_VERSION" >&6; }
14795             fi # end check jdk version
14796           fi # end check rt.jar
14797         fi # end check javac
14798       fi # end check java
14799     fi # end check boot jdk found
14800   fi
14801 
14802     done
14803   fi
14804 
14805 
14806     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14807     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14808       # Do we have a bin/java?
14809       if test ! -x "$BOOT_JDK/bin/java"; then
14810         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14811 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14812         BOOT_JDK_FOUND=no
14813       else
14814         # Do we have a bin/javac?
14815         if test ! -x "$BOOT_JDK/bin/javac"; then
14816           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14817 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14818           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14819 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14820           BOOT_JDK_FOUND=no
14821         else
14822           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14823           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14824             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14825 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14826             BOOT_JDK_FOUND=no
14827           else
14828             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14829             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14830 
14831             # Extra M4 quote needed to protect [] in grep expression.
14832             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14833             if test "x$FOUND_VERSION_78" = x; then
14834               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14835 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14836               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14837 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14838               BOOT_JDK_FOUND=no
14839             else
14840               # We're done! :-)
14841               BOOT_JDK_FOUND=yes
14842 
14843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14844 
14845   # Input might be given as Windows format, start by converting to
14846   # unix format.
14847   path="$BOOT_JDK"
14848   new_path=`$CYGPATH -u "$path"`
14849 
14850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14853   # "foo.exe" is OK but "foo" is an error.
14854   #
14855   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14856   # It is also a way to make sure we got the proper file name for the real test later on.
14857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14858   if test "x$test_shortpath" = x; then
14859     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14860 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14861     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14862   fi
14863 
14864   # Call helper function which possibly converts this using DOS-style short mode.
14865   # If so, the updated path is stored in $new_path.
14866 
14867   input_path="$new_path"
14868   # Check if we need to convert this using DOS-style short mode. If the path
14869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14870   # take no chances and rewrite it.
14871   # Note: m4 eats our [], so we need to use [ and ] instead.
14872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14873   if test "x$has_forbidden_chars" != x; then
14874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14878       # Going to short mode and back again did indeed matter. Since short mode is
14879       # case insensitive, let's make it lowercase to improve readability.
14880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14881       # Now convert it back to Unix-stile (cygpath)
14882       input_path=`$CYGPATH -u "$shortmode_path"`
14883       new_path="$input_path"
14884     fi
14885   fi
14886 
14887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14888   if test "x$test_cygdrive_prefix" = x; then
14889     # As a simple fix, exclude /usr/bin since it's not a real path.
14890     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14892       # a path prefixed by /cygdrive for fixpath to work.
14893       new_path="$CYGWIN_ROOT_PATH$input_path"
14894     fi
14895   fi
14896 
14897 
14898   if test "x$path" != "x$new_path"; then
14899     BOOT_JDK="$new_path"
14900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14901 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14902   fi
14903 
14904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14905 
14906   path="$BOOT_JDK"
14907   has_colon=`$ECHO $path | $GREP ^.:`
14908   new_path="$path"
14909   if test "x$has_colon" = x; then
14910     # Not in mixed or Windows style, start by that.
14911     new_path=`cmd //c echo $path`
14912   fi
14913 
14914 
14915   input_path="$new_path"
14916   # Check if we need to convert this using DOS-style short mode. If the path
14917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14918   # take no chances and rewrite it.
14919   # Note: m4 eats our [], so we need to use [ and ] instead.
14920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14921   if test "x$has_forbidden_chars" != x; then
14922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14924   fi
14925 
14926 
14927   windows_path="$new_path"
14928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14929     unix_path=`$CYGPATH -u "$windows_path"`
14930     new_path="$unix_path"
14931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14933     new_path="$unix_path"
14934   fi
14935 
14936   if test "x$path" != "x$new_path"; then
14937     BOOT_JDK="$new_path"
14938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14939 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14940   fi
14941 
14942   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14943   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14944 
14945   else
14946     # We're on a posix platform. Hooray! :)
14947     path="$BOOT_JDK"
14948     has_space=`$ECHO "$path" | $GREP " "`
14949     if test "x$has_space" != x; then
14950       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14951 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14952       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14953     fi
14954 
14955     # Use eval to expand a potential ~
14956     eval path="$path"
14957     if test ! -f "$path" && test ! -d "$path"; then
14958       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14959     fi
14960 
14961     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14962   fi
14963 
14964               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14965 $as_echo_n "checking for Boot JDK... " >&6; }
14966               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14967 $as_echo "$BOOT_JDK" >&6; }
14968               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14969 $as_echo_n "checking Boot JDK version... " >&6; }
14970               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14971               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14972 $as_echo "$BOOT_JDK_VERSION" >&6; }
14973             fi # end check jdk version
14974           fi # end check rt.jar
14975         fi # end check javac
14976       fi # end check java
14977     fi # end check boot jdk found
14978   fi
14979 
14980 
14981   if test "x$BOOT_JDK_FOUND" = xno; then
14982     # Now execute the test
14983 
14984   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14985   BOOT_JDK_SUFFIX="/Contents/Home"
14986   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14987   if test "x$ALL_JDKS_FOUND" != x; then
14988     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14989 
14990   if test "x$BOOT_JDK_FOUND" = xno; then
14991     # Now execute the test
14992 
14993         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14994         if test -d "$BOOT_JDK"; then
14995           BOOT_JDK_FOUND=maybe
14996           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14997 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14998         fi
14999 
15000 
15001     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15002     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15003       # Do we have a bin/java?
15004       if test ! -x "$BOOT_JDK/bin/java"; then
15005         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15006 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15007         BOOT_JDK_FOUND=no
15008       else
15009         # Do we have a bin/javac?
15010         if test ! -x "$BOOT_JDK/bin/javac"; then
15011           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15013           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15014 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15015           BOOT_JDK_FOUND=no
15016         else
15017           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15018           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15019             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15020 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15021             BOOT_JDK_FOUND=no
15022           else
15023             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15024             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15025 
15026             # Extra M4 quote needed to protect [] in grep expression.
15027             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15028             if test "x$FOUND_VERSION_78" = x; then
15029               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15031               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15032 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15033               BOOT_JDK_FOUND=no
15034             else
15035               # We're done! :-)
15036               BOOT_JDK_FOUND=yes
15037 
15038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15039 
15040   # Input might be given as Windows format, start by converting to
15041   # unix format.
15042   path="$BOOT_JDK"
15043   new_path=`$CYGPATH -u "$path"`
15044 
15045   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15046   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15047   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15048   # "foo.exe" is OK but "foo" is an error.
15049   #
15050   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15051   # It is also a way to make sure we got the proper file name for the real test later on.
15052   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15053   if test "x$test_shortpath" = x; then
15054     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15055 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15056     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15057   fi
15058 
15059   # Call helper function which possibly converts this using DOS-style short mode.
15060   # If so, the updated path is stored in $new_path.
15061 
15062   input_path="$new_path"
15063   # Check if we need to convert this using DOS-style short mode. If the path
15064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15065   # take no chances and rewrite it.
15066   # Note: m4 eats our [], so we need to use [ and ] instead.
15067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15068   if test "x$has_forbidden_chars" != x; then
15069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15070     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15071     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15072     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15073       # Going to short mode and back again did indeed matter. Since short mode is
15074       # case insensitive, let's make it lowercase to improve readability.
15075       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15076       # Now convert it back to Unix-stile (cygpath)
15077       input_path=`$CYGPATH -u "$shortmode_path"`
15078       new_path="$input_path"
15079     fi
15080   fi
15081 
15082   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15083   if test "x$test_cygdrive_prefix" = x; then
15084     # As a simple fix, exclude /usr/bin since it's not a real path.
15085     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15086       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15087       # a path prefixed by /cygdrive for fixpath to work.
15088       new_path="$CYGWIN_ROOT_PATH$input_path"
15089     fi
15090   fi
15091 
15092 
15093   if test "x$path" != "x$new_path"; then
15094     BOOT_JDK="$new_path"
15095     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15096 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15097   fi
15098 
15099   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15100 
15101   path="$BOOT_JDK"
15102   has_colon=`$ECHO $path | $GREP ^.:`
15103   new_path="$path"
15104   if test "x$has_colon" = x; then
15105     # Not in mixed or Windows style, start by that.
15106     new_path=`cmd //c echo $path`
15107   fi
15108 
15109 
15110   input_path="$new_path"
15111   # Check if we need to convert this using DOS-style short mode. If the path
15112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15113   # take no chances and rewrite it.
15114   # Note: m4 eats our [], so we need to use [ and ] instead.
15115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15116   if test "x$has_forbidden_chars" != x; then
15117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15118     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15119   fi
15120 
15121 
15122   windows_path="$new_path"
15123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15124     unix_path=`$CYGPATH -u "$windows_path"`
15125     new_path="$unix_path"
15126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15128     new_path="$unix_path"
15129   fi
15130 
15131   if test "x$path" != "x$new_path"; then
15132     BOOT_JDK="$new_path"
15133     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15134 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15135   fi
15136 
15137   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15138   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15139 
15140   else
15141     # We're on a posix platform. Hooray! :)
15142     path="$BOOT_JDK"
15143     has_space=`$ECHO "$path" | $GREP " "`
15144     if test "x$has_space" != x; then
15145       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15146 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15147       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15148     fi
15149 
15150     # Use eval to expand a potential ~
15151     eval path="$path"
15152     if test ! -f "$path" && test ! -d "$path"; then
15153       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15154     fi
15155 
15156     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15157   fi
15158 
15159               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15160 $as_echo_n "checking for Boot JDK... " >&6; }
15161               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15162 $as_echo "$BOOT_JDK" >&6; }
15163               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15164 $as_echo_n "checking Boot JDK version... " >&6; }
15165               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15166               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15167 $as_echo "$BOOT_JDK_VERSION" >&6; }
15168             fi # end check jdk version
15169           fi # end check rt.jar
15170         fi # end check javac
15171       fi # end check java
15172     fi # end check boot jdk found
15173   fi
15174 
15175     done
15176   fi
15177 
15178 
15179     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15180     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15181       # Do we have a bin/java?
15182       if test ! -x "$BOOT_JDK/bin/java"; then
15183         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15185         BOOT_JDK_FOUND=no
15186       else
15187         # Do we have a bin/javac?
15188         if test ! -x "$BOOT_JDK/bin/javac"; then
15189           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15191           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15192 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15193           BOOT_JDK_FOUND=no
15194         else
15195           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15196           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15197             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15198 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15199             BOOT_JDK_FOUND=no
15200           else
15201             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15202             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15203 
15204             # Extra M4 quote needed to protect [] in grep expression.
15205             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15206             if test "x$FOUND_VERSION_78" = x; then
15207               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15208 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15209               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15210 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15211               BOOT_JDK_FOUND=no
15212             else
15213               # We're done! :-)
15214               BOOT_JDK_FOUND=yes
15215 
15216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15217 
15218   # Input might be given as Windows format, start by converting to
15219   # unix format.
15220   path="$BOOT_JDK"
15221   new_path=`$CYGPATH -u "$path"`
15222 
15223   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15224   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15225   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15226   # "foo.exe" is OK but "foo" is an error.
15227   #
15228   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15229   # It is also a way to make sure we got the proper file name for the real test later on.
15230   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15231   if test "x$test_shortpath" = x; then
15232     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15233 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15234     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15235   fi
15236 
15237   # Call helper function which possibly converts this using DOS-style short mode.
15238   # If so, the updated path is stored in $new_path.
15239 
15240   input_path="$new_path"
15241   # Check if we need to convert this using DOS-style short mode. If the path
15242   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15243   # take no chances and rewrite it.
15244   # Note: m4 eats our [], so we need to use [ and ] instead.
15245   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15246   if test "x$has_forbidden_chars" != x; then
15247     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15248     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15249     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15250     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15251       # Going to short mode and back again did indeed matter. Since short mode is
15252       # case insensitive, let's make it lowercase to improve readability.
15253       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15254       # Now convert it back to Unix-stile (cygpath)
15255       input_path=`$CYGPATH -u "$shortmode_path"`
15256       new_path="$input_path"
15257     fi
15258   fi
15259 
15260   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15261   if test "x$test_cygdrive_prefix" = x; then
15262     # As a simple fix, exclude /usr/bin since it's not a real path.
15263     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15264       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15265       # a path prefixed by /cygdrive for fixpath to work.
15266       new_path="$CYGWIN_ROOT_PATH$input_path"
15267     fi
15268   fi
15269 
15270 
15271   if test "x$path" != "x$new_path"; then
15272     BOOT_JDK="$new_path"
15273     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15274 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15275   fi
15276 
15277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15278 
15279   path="$BOOT_JDK"
15280   has_colon=`$ECHO $path | $GREP ^.:`
15281   new_path="$path"
15282   if test "x$has_colon" = x; then
15283     # Not in mixed or Windows style, start by that.
15284     new_path=`cmd //c echo $path`
15285   fi
15286 
15287 
15288   input_path="$new_path"
15289   # Check if we need to convert this using DOS-style short mode. If the path
15290   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15291   # take no chances and rewrite it.
15292   # Note: m4 eats our [], so we need to use [ and ] instead.
15293   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15294   if test "x$has_forbidden_chars" != x; then
15295     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15296     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15297   fi
15298 
15299 
15300   windows_path="$new_path"
15301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15302     unix_path=`$CYGPATH -u "$windows_path"`
15303     new_path="$unix_path"
15304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15305     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15306     new_path="$unix_path"
15307   fi
15308 
15309   if test "x$path" != "x$new_path"; then
15310     BOOT_JDK="$new_path"
15311     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15312 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15313   fi
15314 
15315   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15316   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15317 
15318   else
15319     # We're on a posix platform. Hooray! :)
15320     path="$BOOT_JDK"
15321     has_space=`$ECHO "$path" | $GREP " "`
15322     if test "x$has_space" != x; then
15323       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15324 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15325       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15326     fi
15327 
15328     # Use eval to expand a potential ~
15329     eval path="$path"
15330     if test ! -f "$path" && test ! -d "$path"; then
15331       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15332     fi
15333 
15334     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15335   fi
15336 
15337               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15338 $as_echo_n "checking for Boot JDK... " >&6; }
15339               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15340 $as_echo "$BOOT_JDK" >&6; }
15341               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15342 $as_echo_n "checking Boot JDK version... " >&6; }
15343               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15344               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15345 $as_echo "$BOOT_JDK_VERSION" >&6; }
15346             fi # end check jdk version
15347           fi # end check rt.jar
15348         fi # end check javac
15349       fi # end check java
15350     fi # end check boot jdk found
15351   fi
15352 
15353   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15354 
15355   if test "x$BOOT_JDK_FOUND" = xno; then
15356     # Now execute the test
15357 
15358   BOOT_JDK_PREFIX="/usr/lib/jvm"
15359   BOOT_JDK_SUFFIX=""
15360   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15361   if test "x$ALL_JDKS_FOUND" != x; then
15362     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15363 
15364   if test "x$BOOT_JDK_FOUND" = xno; then
15365     # Now execute the test
15366 
15367         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15368         if test -d "$BOOT_JDK"; then
15369           BOOT_JDK_FOUND=maybe
15370           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15371 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15372         fi
15373 
15374 
15375     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15376     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15377       # Do we have a bin/java?
15378       if test ! -x "$BOOT_JDK/bin/java"; then
15379         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15381         BOOT_JDK_FOUND=no
15382       else
15383         # Do we have a bin/javac?
15384         if test ! -x "$BOOT_JDK/bin/javac"; then
15385           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15386 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15387           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15388 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15389           BOOT_JDK_FOUND=no
15390         else
15391           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15392           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15393             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15394 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15395             BOOT_JDK_FOUND=no
15396           else
15397             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15398             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15399 
15400             # Extra M4 quote needed to protect [] in grep expression.
15401             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15402             if test "x$FOUND_VERSION_78" = x; then
15403               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15404 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15405               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15406 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15407               BOOT_JDK_FOUND=no
15408             else
15409               # We're done! :-)
15410               BOOT_JDK_FOUND=yes
15411 
15412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15413 
15414   # Input might be given as Windows format, start by converting to
15415   # unix format.
15416   path="$BOOT_JDK"
15417   new_path=`$CYGPATH -u "$path"`
15418 
15419   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15420   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15421   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15422   # "foo.exe" is OK but "foo" is an error.
15423   #
15424   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15425   # It is also a way to make sure we got the proper file name for the real test later on.
15426   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15427   if test "x$test_shortpath" = x; then
15428     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15429 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15430     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15431   fi
15432 
15433   # Call helper function which possibly converts this using DOS-style short mode.
15434   # If so, the updated path is stored in $new_path.
15435 
15436   input_path="$new_path"
15437   # Check if we need to convert this using DOS-style short mode. If the path
15438   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15439   # take no chances and rewrite it.
15440   # Note: m4 eats our [], so we need to use [ and ] instead.
15441   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15442   if test "x$has_forbidden_chars" != x; then
15443     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15444     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15445     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15446     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15447       # Going to short mode and back again did indeed matter. Since short mode is
15448       # case insensitive, let's make it lowercase to improve readability.
15449       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15450       # Now convert it back to Unix-stile (cygpath)
15451       input_path=`$CYGPATH -u "$shortmode_path"`
15452       new_path="$input_path"
15453     fi
15454   fi
15455 
15456   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15457   if test "x$test_cygdrive_prefix" = x; then
15458     # As a simple fix, exclude /usr/bin since it's not a real path.
15459     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15460       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15461       # a path prefixed by /cygdrive for fixpath to work.
15462       new_path="$CYGWIN_ROOT_PATH$input_path"
15463     fi
15464   fi
15465 
15466 
15467   if test "x$path" != "x$new_path"; then
15468     BOOT_JDK="$new_path"
15469     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15470 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15471   fi
15472 
15473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15474 
15475   path="$BOOT_JDK"
15476   has_colon=`$ECHO $path | $GREP ^.:`
15477   new_path="$path"
15478   if test "x$has_colon" = x; then
15479     # Not in mixed or Windows style, start by that.
15480     new_path=`cmd //c echo $path`
15481   fi
15482 
15483 
15484   input_path="$new_path"
15485   # Check if we need to convert this using DOS-style short mode. If the path
15486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15487   # take no chances and rewrite it.
15488   # Note: m4 eats our [], so we need to use [ and ] instead.
15489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15490   if test "x$has_forbidden_chars" != x; then
15491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15492     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15493   fi
15494 
15495 
15496   windows_path="$new_path"
15497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15498     unix_path=`$CYGPATH -u "$windows_path"`
15499     new_path="$unix_path"
15500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15502     new_path="$unix_path"
15503   fi
15504 
15505   if test "x$path" != "x$new_path"; then
15506     BOOT_JDK="$new_path"
15507     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15508 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15509   fi
15510 
15511   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15512   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15513 
15514   else
15515     # We're on a posix platform. Hooray! :)
15516     path="$BOOT_JDK"
15517     has_space=`$ECHO "$path" | $GREP " "`
15518     if test "x$has_space" != x; then
15519       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15520 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15521       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15522     fi
15523 
15524     # Use eval to expand a potential ~
15525     eval path="$path"
15526     if test ! -f "$path" && test ! -d "$path"; then
15527       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15528     fi
15529 
15530     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15531   fi
15532 
15533               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15534 $as_echo_n "checking for Boot JDK... " >&6; }
15535               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15536 $as_echo "$BOOT_JDK" >&6; }
15537               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15538 $as_echo_n "checking Boot JDK version... " >&6; }
15539               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15540               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15541 $as_echo "$BOOT_JDK_VERSION" >&6; }
15542             fi # end check jdk version
15543           fi # end check rt.jar
15544         fi # end check javac
15545       fi # end check java
15546     fi # end check boot jdk found
15547   fi
15548 
15549     done
15550   fi
15551 
15552 
15553     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15554     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15555       # Do we have a bin/java?
15556       if test ! -x "$BOOT_JDK/bin/java"; then
15557         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15558 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15559         BOOT_JDK_FOUND=no
15560       else
15561         # Do we have a bin/javac?
15562         if test ! -x "$BOOT_JDK/bin/javac"; then
15563           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15564 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15565           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15566 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15567           BOOT_JDK_FOUND=no
15568         else
15569           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15570           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15571             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15572 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15573             BOOT_JDK_FOUND=no
15574           else
15575             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15576             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15577 
15578             # Extra M4 quote needed to protect [] in grep expression.
15579             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15580             if test "x$FOUND_VERSION_78" = x; then
15581               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15582 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15583               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15584 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15585               BOOT_JDK_FOUND=no
15586             else
15587               # We're done! :-)
15588               BOOT_JDK_FOUND=yes
15589 
15590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15591 
15592   # Input might be given as Windows format, start by converting to
15593   # unix format.
15594   path="$BOOT_JDK"
15595   new_path=`$CYGPATH -u "$path"`
15596 
15597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15600   # "foo.exe" is OK but "foo" is an error.
15601   #
15602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15603   # It is also a way to make sure we got the proper file name for the real test later on.
15604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15605   if test "x$test_shortpath" = x; then
15606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15607 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15608     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15609   fi
15610 
15611   # Call helper function which possibly converts this using DOS-style short mode.
15612   # If so, the updated path is stored in $new_path.
15613 
15614   input_path="$new_path"
15615   # Check if we need to convert this using DOS-style short mode. If the path
15616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15617   # take no chances and rewrite it.
15618   # Note: m4 eats our [], so we need to use [ and ] instead.
15619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15620   if test "x$has_forbidden_chars" != x; then
15621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15625       # Going to short mode and back again did indeed matter. Since short mode is
15626       # case insensitive, let's make it lowercase to improve readability.
15627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15628       # Now convert it back to Unix-stile (cygpath)
15629       input_path=`$CYGPATH -u "$shortmode_path"`
15630       new_path="$input_path"
15631     fi
15632   fi
15633 
15634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15635   if test "x$test_cygdrive_prefix" = x; then
15636     # As a simple fix, exclude /usr/bin since it's not a real path.
15637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15639       # a path prefixed by /cygdrive for fixpath to work.
15640       new_path="$CYGWIN_ROOT_PATH$input_path"
15641     fi
15642   fi
15643 
15644 
15645   if test "x$path" != "x$new_path"; then
15646     BOOT_JDK="$new_path"
15647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15648 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15649   fi
15650 
15651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15652 
15653   path="$BOOT_JDK"
15654   has_colon=`$ECHO $path | $GREP ^.:`
15655   new_path="$path"
15656   if test "x$has_colon" = x; then
15657     # Not in mixed or Windows style, start by that.
15658     new_path=`cmd //c echo $path`
15659   fi
15660 
15661 
15662   input_path="$new_path"
15663   # Check if we need to convert this using DOS-style short mode. If the path
15664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15665   # take no chances and rewrite it.
15666   # Note: m4 eats our [], so we need to use [ and ] instead.
15667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15668   if test "x$has_forbidden_chars" != x; then
15669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15671   fi
15672 
15673 
15674   windows_path="$new_path"
15675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15676     unix_path=`$CYGPATH -u "$windows_path"`
15677     new_path="$unix_path"
15678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15680     new_path="$unix_path"
15681   fi
15682 
15683   if test "x$path" != "x$new_path"; then
15684     BOOT_JDK="$new_path"
15685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15686 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15687   fi
15688 
15689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15691 
15692   else
15693     # We're on a posix platform. Hooray! :)
15694     path="$BOOT_JDK"
15695     has_space=`$ECHO "$path" | $GREP " "`
15696     if test "x$has_space" != x; then
15697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15699       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15700     fi
15701 
15702     # Use eval to expand a potential ~
15703     eval path="$path"
15704     if test ! -f "$path" && test ! -d "$path"; then
15705       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15706     fi
15707 
15708     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15709   fi
15710 
15711               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15712 $as_echo_n "checking for Boot JDK... " >&6; }
15713               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15714 $as_echo "$BOOT_JDK" >&6; }
15715               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15716 $as_echo_n "checking Boot JDK version... " >&6; }
15717               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15718               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15719 $as_echo "$BOOT_JDK_VERSION" >&6; }
15720             fi # end check jdk version
15721           fi # end check rt.jar
15722         fi # end check javac
15723       fi # end check java
15724     fi # end check boot jdk found
15725   fi
15726 
15727   fi
15728 
15729 
15730     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15731     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15732       # Do we have a bin/java?
15733       if test ! -x "$BOOT_JDK/bin/java"; then
15734         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15735 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15736         BOOT_JDK_FOUND=no
15737       else
15738         # Do we have a bin/javac?
15739         if test ! -x "$BOOT_JDK/bin/javac"; then
15740           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15741 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15742           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15743 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15744           BOOT_JDK_FOUND=no
15745         else
15746           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15747           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15748             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15749 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15750             BOOT_JDK_FOUND=no
15751           else
15752             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15753             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15754 
15755             # Extra M4 quote needed to protect [] in grep expression.
15756             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15757             if test "x$FOUND_VERSION_78" = x; then
15758               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15759 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15760               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15761 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15762               BOOT_JDK_FOUND=no
15763             else
15764               # We're done! :-)
15765               BOOT_JDK_FOUND=yes
15766 
15767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15768 
15769   # Input might be given as Windows format, start by converting to
15770   # unix format.
15771   path="$BOOT_JDK"
15772   new_path=`$CYGPATH -u "$path"`
15773 
15774   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15775   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15776   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15777   # "foo.exe" is OK but "foo" is an error.
15778   #
15779   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15780   # It is also a way to make sure we got the proper file name for the real test later on.
15781   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15782   if test "x$test_shortpath" = x; then
15783     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15784 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15785     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15786   fi
15787 
15788   # Call helper function which possibly converts this using DOS-style short mode.
15789   # If so, the updated path is stored in $new_path.
15790 
15791   input_path="$new_path"
15792   # Check if we need to convert this using DOS-style short mode. If the path
15793   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15794   # take no chances and rewrite it.
15795   # Note: m4 eats our [], so we need to use [ and ] instead.
15796   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15797   if test "x$has_forbidden_chars" != x; then
15798     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15799     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15800     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15801     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15802       # Going to short mode and back again did indeed matter. Since short mode is
15803       # case insensitive, let's make it lowercase to improve readability.
15804       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15805       # Now convert it back to Unix-stile (cygpath)
15806       input_path=`$CYGPATH -u "$shortmode_path"`
15807       new_path="$input_path"
15808     fi
15809   fi
15810 
15811   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15812   if test "x$test_cygdrive_prefix" = x; then
15813     # As a simple fix, exclude /usr/bin since it's not a real path.
15814     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15815       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15816       # a path prefixed by /cygdrive for fixpath to work.
15817       new_path="$CYGWIN_ROOT_PATH$input_path"
15818     fi
15819   fi
15820 
15821 
15822   if test "x$path" != "x$new_path"; then
15823     BOOT_JDK="$new_path"
15824     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15825 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15826   fi
15827 
15828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15829 
15830   path="$BOOT_JDK"
15831   has_colon=`$ECHO $path | $GREP ^.:`
15832   new_path="$path"
15833   if test "x$has_colon" = x; then
15834     # Not in mixed or Windows style, start by that.
15835     new_path=`cmd //c echo $path`
15836   fi
15837 
15838 
15839   input_path="$new_path"
15840   # Check if we need to convert this using DOS-style short mode. If the path
15841   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15842   # take no chances and rewrite it.
15843   # Note: m4 eats our [], so we need to use [ and ] instead.
15844   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15845   if test "x$has_forbidden_chars" != x; then
15846     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15847     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15848   fi
15849 
15850 
15851   windows_path="$new_path"
15852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15853     unix_path=`$CYGPATH -u "$windows_path"`
15854     new_path="$unix_path"
15855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15857     new_path="$unix_path"
15858   fi
15859 
15860   if test "x$path" != "x$new_path"; then
15861     BOOT_JDK="$new_path"
15862     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15863 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15864   fi
15865 
15866   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15867   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15868 
15869   else
15870     # We're on a posix platform. Hooray! :)
15871     path="$BOOT_JDK"
15872     has_space=`$ECHO "$path" | $GREP " "`
15873     if test "x$has_space" != x; then
15874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15875 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15876       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15877     fi
15878 
15879     # Use eval to expand a potential ~
15880     eval path="$path"
15881     if test ! -f "$path" && test ! -d "$path"; then
15882       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15883     fi
15884 
15885     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15886   fi
15887 
15888               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15889 $as_echo_n "checking for Boot JDK... " >&6; }
15890               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15891 $as_echo "$BOOT_JDK" >&6; }
15892               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15893 $as_echo_n "checking Boot JDK version... " >&6; }
15894               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15895               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15896 $as_echo "$BOOT_JDK_VERSION" >&6; }
15897             fi # end check jdk version
15898           fi # end check rt.jar
15899         fi # end check javac
15900       fi # end check java
15901     fi # end check boot jdk found
15902   fi
15903 
15904 
15905   # If we haven't found anything yet, we've truly lost. Give up.
15906   if test "x$BOOT_JDK_FOUND" = xno; then
15907 
15908   # Print a helpful message on how to acquire the necessary build dependency.
15909   # openjdk is the help tag: freetype, cups, pulse, alsa etc
15910   MISSING_DEPENDENCY=openjdk
15911 
15912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15913     cygwin_help $MISSING_DEPENDENCY
15914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15915     msys_help $MISSING_DEPENDENCY
15916   else
15917     PKGHANDLER_COMMAND=
15918 
15919     case $PKGHANDLER in
15920       apt-get)
15921         apt_help     $MISSING_DEPENDENCY ;;
15922       yum)
15923         yum_help     $MISSING_DEPENDENCY ;;
15924       port)
15925         port_help    $MISSING_DEPENDENCY ;;
15926       pkgutil)
15927         pkgutil_help $MISSING_DEPENDENCY ;;
15928       pkgadd)
15929         pkgadd_help  $MISSING_DEPENDENCY ;;
15930     esac
15931 
15932     if test "x$PKGHANDLER_COMMAND" != x; then
15933       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15934     fi
15935   fi
15936 
15937     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15938 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15939     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15940 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15941     as_fn_error $? "Cannot continue" "$LINENO" 5
15942   fi
15943 
15944   # Setup proper paths for what we found
15945   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15946   if test ! -f "$BOOT_RTJAR"; then
15947     # On MacOSX it is called classes.jar
15948     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15949     if test -f "$BOOT_RTJAR"; then
15950       # Remove the ..
15951       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15952     fi
15953   fi
15954   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15955   BOOT_JDK="$BOOT_JDK"
15956 
15957 
15958 
15959 
15960   # Setup tools from the Boot JDK.
15961 
15962   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15963 $as_echo_n "checking for java in Boot JDK... " >&6; }
15964   JAVA=$BOOT_JDK/bin/java
15965   if test ! -x $JAVA; then
15966     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15967 $as_echo "not found" >&6; }
15968     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15969 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15970     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15971   fi
15972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15973 $as_echo "ok" >&6; }
15974 
15975 
15976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15977 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15978   JAVAC=$BOOT_JDK/bin/javac
15979   if test ! -x $JAVAC; then
15980     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15981 $as_echo "not found" >&6; }
15982     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15983 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15984     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15985   fi
15986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15987 $as_echo "ok" >&6; }
15988 
15989 
15990   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15991 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15992   JAVAH=$BOOT_JDK/bin/javah
15993   if test ! -x $JAVAH; then
15994     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15995 $as_echo "not found" >&6; }
15996     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15997 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15998     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15999   fi
16000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16001 $as_echo "ok" >&6; }
16002 
16003 
16004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
16005 $as_echo_n "checking for javap in Boot JDK... " >&6; }
16006   JAVAP=$BOOT_JDK/bin/javap
16007   if test ! -x $JAVAP; then
16008     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16009 $as_echo "not found" >&6; }
16010     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16011 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16012     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
16013   fi
16014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16015 $as_echo "ok" >&6; }
16016 
16017 
16018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16019 $as_echo_n "checking for jar in Boot JDK... " >&6; }
16020   JAR=$BOOT_JDK/bin/jar
16021   if test ! -x $JAR; then
16022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16023 $as_echo "not found" >&6; }
16024     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16025 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16026     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16027   fi
16028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16029 $as_echo "ok" >&6; }
16030 
16031 
16032   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16033 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16034   RMIC=$BOOT_JDK/bin/rmic
16035   if test ! -x $RMIC; then
16036     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16037 $as_echo "not found" >&6; }
16038     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16039 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16040     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16041   fi
16042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16043 $as_echo "ok" >&6; }
16044 
16045 
16046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16047 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16048   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16049   if test ! -x $NATIVE2ASCII; then
16050     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16051 $as_echo "not found" >&6; }
16052     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16053 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16054     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16055   fi
16056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16057 $as_echo "ok" >&6; }
16058 
16059 
16060   # Finally, set some other options...
16061 
16062   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16063   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16064 
16065 
16066 
16067 
16068   ##############################################################################
16069   #
16070   # Specify options for anything that is run with the Boot JDK.
16071   #
16072 
16073 # Check whether --with-boot-jdk-jvmargs was given.
16074 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16075   withval=$with_boot_jdk_jvmargs;
16076 fi
16077 
16078 
16079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
16080 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
16081 
16082   # Disable special log output when a debug build is used as Boot JDK...
16083 
16084   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16085   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16086   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16087   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16088   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16089   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16090     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16091     JVM_ARG_OK=true
16092   else
16093     $ECHO "Arg failed:" >&5
16094     $ECHO "$OUTPUT" >&5
16095     JVM_ARG_OK=false
16096   fi
16097 
16098 
16099   # Apply user provided options.
16100 
16101   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
16102   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
16103   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
16104   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16105   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16106   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16107     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
16108     JVM_ARG_OK=true
16109   else
16110     $ECHO "Arg failed:" >&5
16111     $ECHO "$OUTPUT" >&5
16112     JVM_ARG_OK=false
16113   fi
16114 
16115 
16116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
16117 $as_echo "$boot_jdk_jvmargs" >&6; }
16118 
16119   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
16120   JAVA_FLAGS=$boot_jdk_jvmargs
16121 
16122 
16123 
16124   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
16125 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
16126 
16127   # Starting amount of heap memory.
16128 
16129   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16130   $ECHO "Command: $JAVA -Xms64M -version" >&5
16131   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16132   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16133   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16134   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16135     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
16136     JVM_ARG_OK=true
16137   else
16138     $ECHO "Arg failed:" >&5
16139     $ECHO "$OUTPUT" >&5
16140     JVM_ARG_OK=false
16141   fi
16142 
16143 
16144   # Maximum amount of heap memory.
16145   # Maximum stack size.
16146   if test "x$BUILD_NUM_BITS" = x32; then
16147     JVM_MAX_HEAP=1100M
16148     STACK_SIZE=768
16149   else
16150     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
16151     # pointers are used. Apparently, we need to increase the heap and stack
16152     # space for the jvm. More specifically, when running javac to build huge
16153     # jdk batch
16154     JVM_MAX_HEAP=1600M
16155     STACK_SIZE=1536
16156   fi
16157 
16158   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
16159   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
16160   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
16161   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16162   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16163   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16164     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
16165     JVM_ARG_OK=true
16166   else
16167     $ECHO "Arg failed:" >&5
16168     $ECHO "$OUTPUT" >&5
16169     JVM_ARG_OK=false
16170   fi
16171 
16172 
16173   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16174   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16175   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16176   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16177   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16178   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16179     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
16180     JVM_ARG_OK=true
16181   else
16182     $ECHO "Arg failed:" >&5
16183     $ECHO "$OUTPUT" >&5
16184     JVM_ARG_OK=false
16185   fi
16186 
16187 
16188   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16189   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16190   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16191   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16192   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16193   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16194     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
16195     JVM_ARG_OK=true
16196   else
16197     $ECHO "Arg failed:" >&5
16198     $ECHO "$OUTPUT" >&5
16199     JVM_ARG_OK=false
16200   fi
16201 
16202 
16203   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16204   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16205   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16206   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16207   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16208   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16209     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
16210     JVM_ARG_OK=true
16211   else
16212     $ECHO "Arg failed:" >&5
16213     $ECHO "$OUTPUT" >&5
16214     JVM_ARG_OK=false
16215   fi
16216 
16217 
16218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
16219 $as_echo "$boot_jdk_jvmargs_big" >&6; }
16220 
16221   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
16222 
16223 
16224 
16225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
16226 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
16227 
16228   # Use serial gc for small short lived tools if possible
16229 
16230   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
16231   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
16232   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
16233   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16234   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16235   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16236     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
16237     JVM_ARG_OK=true
16238   else
16239     $ECHO "Arg failed:" >&5
16240     $ECHO "$OUTPUT" >&5
16241     JVM_ARG_OK=false
16242   fi
16243 
16244 
16245   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
16246   $ECHO "Command: $JAVA -Xms32M -version" >&5
16247   OUTPUT=`$JAVA -Xms32M -version 2>&1`
16248   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16249   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16250   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16251     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
16252     JVM_ARG_OK=true
16253   else
16254     $ECHO "Arg failed:" >&5
16255     $ECHO "$OUTPUT" >&5
16256     JVM_ARG_OK=false
16257   fi
16258 
16259 
16260   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
16261   $ECHO "Command: $JAVA -Xmx512M -version" >&5
16262   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
16263   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16264   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16265   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16266     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
16267     JVM_ARG_OK=true
16268   else
16269     $ECHO "Arg failed:" >&5
16270     $ECHO "$OUTPUT" >&5
16271     JVM_ARG_OK=false
16272   fi
16273 
16274 
16275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
16276 $as_echo "$boot_jdk_jvmargs_small" >&6; }
16277 
16278   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
16279 
16280 
16281 
16282 ###############################################################################
16283 #
16284 # Configure the sources to use. We can add or override individual directories.
16285 #
16286 ###############################################################################
16287 
16288 
16289   # Where are the sources. Any of these can be overridden
16290   # using --with-override-corba and the likes.
16291   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16292   CORBA_TOPDIR="$SRC_ROOT/corba"
16293   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16294   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16295   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16296   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16297   JDK_TOPDIR="$SRC_ROOT/jdk"
16298 
16299 
16300 
16301 
16302 
16303 
16304 
16305 
16306 
16307 
16308   ###############################################################################
16309   #
16310   # Pickup additional source for a component from outside of the source root
16311   # or override source for a component.
16312   #
16313 
16314 # Check whether --with-add-source-root was given.
16315 if test "${with_add_source_root+set}" = set; then :
16316   withval=$with_add_source_root;
16317 fi
16318 
16319 
16320 
16321 # Check whether --with-override-source-root was given.
16322 if test "${with_override_source_root+set}" = set; then :
16323   withval=$with_override_source_root;
16324 fi
16325 
16326 
16327 
16328 # Check whether --with-adds-and-overrides was given.
16329 if test "${with_adds_and_overrides+set}" = set; then :
16330   withval=$with_adds_and_overrides;
16331 fi
16332 
16333 
16334   if test "x$with_adds_and_overrides" != x; then
16335     with_add_source_root="$with_adds_and_overrides/adds"
16336     with_override_source_root="$with_adds_and_overrides/overrides"
16337   fi
16338 
16339   if test "x$with_add_source_root" != x; then
16340     if ! test -d $with_add_source_root; then
16341       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16342     fi
16343     CURDIR="$PWD"
16344     cd "$with_add_source_root"
16345     ADD_SRC_ROOT="`pwd`"
16346     cd "$CURDIR"
16347     # Verify that the addon source root does not have any root makefiles.
16348     # If it does, then it is usually an error, prevent this.
16349     if test -f $with_add_source_root/langtools/make/Makefile; then
16350       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
16351     fi
16352     if test -f $with_add_source_root/corba/make/Makefile; then
16353       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
16354     fi
16355     if test -f $with_add_source_root/jaxp/make/Makefile; then
16356       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
16357     fi
16358     if test -f $with_add_source_root/jaxws/make/Makefile; then
16359       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
16360     fi
16361     if test -f $with_add_source_root/hotspot/make/Makefile; then
16362       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
16363     fi
16364     if test -f $with_add_source_root/nashorn/make/Makefile; then
16365       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
16366     fi
16367     if test -f $with_add_source_root/jdk/make/Makefile; then
16368       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
16369     fi
16370   fi
16371 
16372 
16373   if test "x$with_override_source_root" != x; then
16374     if ! test -d $with_override_source_root; then
16375       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16376     fi
16377     CURDIR="$PWD"
16378     cd "$with_override_source_root"
16379     OVERRIDE_SRC_ROOT="`pwd`"
16380     cd "$CURDIR"
16381     if test -f $with_override_source_root/langtools/make/Makefile; then
16382       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
16383     fi
16384     if test -f $with_override_source_root/corba/make/Makefile; then
16385       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
16386     fi
16387     if test -f $with_override_source_root/jaxp/make/Makefile; then
16388       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
16389     fi
16390     if test -f $with_override_source_root/jaxws/make/Makefile; then
16391       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
16392     fi
16393     if test -f $with_override_source_root/hotspot/make/Makefile; then
16394       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
16395     fi
16396     if test -f $with_override_source_root/nashorn/make/Makefile; then
16397       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
16398     fi
16399     if test -f $with_override_source_root/jdk/make/Makefile; then
16400       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
16401     fi
16402   fi
16403 
16404 
16405   ###############################################################################
16406   #
16407   # Override a repo completely, this is used for example when you have 3 small
16408   # development sandboxes of the langtools sources and want to avoid having 3 full
16409   # OpenJDK sources checked out on disk.
16410   #
16411   # Assuming that the 3 langtools sandboxes are located here:
16412   # /home/fredrik/sandbox1/langtools
16413   # /home/fredrik/sandbox2/langtools
16414   # /home/fredrik/sandbox3/langtools
16415   #
16416   # From the source root you create build subdirs manually:
16417   #     mkdir -p build1 build2 build3
16418   # in each build directory run:
16419   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16420   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16421   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16422   #
16423 
16424 
16425 # Check whether --with-override-langtools was given.
16426 if test "${with_override_langtools+set}" = set; then :
16427   withval=$with_override_langtools;
16428 fi
16429 
16430 
16431 
16432 # Check whether --with-override-corba was given.
16433 if test "${with_override_corba+set}" = set; then :
16434   withval=$with_override_corba;
16435 fi
16436 
16437 
16438 
16439 # Check whether --with-override-jaxp was given.
16440 if test "${with_override_jaxp+set}" = set; then :
16441   withval=$with_override_jaxp;
16442 fi
16443 
16444 
16445 
16446 # Check whether --with-override-jaxws was given.
16447 if test "${with_override_jaxws+set}" = set; then :
16448   withval=$with_override_jaxws;
16449 fi
16450 
16451 
16452 
16453 # Check whether --with-override-hotspot was given.
16454 if test "${with_override_hotspot+set}" = set; then :
16455   withval=$with_override_hotspot;
16456 fi
16457 
16458 
16459 
16460 # Check whether --with-override-nashorn was given.
16461 if test "${with_override_nashorn+set}" = set; then :
16462   withval=$with_override_nashorn;
16463 fi
16464 
16465 
16466 
16467 # Check whether --with-override-jdk was given.
16468 if test "${with_override_jdk+set}" = set; then :
16469   withval=$with_override_jdk;
16470 fi
16471 
16472 
16473   if test "x$with_override_langtools" != x; then
16474     CURDIR="$PWD"
16475     cd "$with_override_langtools"
16476     LANGTOOLS_TOPDIR="`pwd`"
16477     cd "$CURDIR"
16478     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16479       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16480     fi
16481     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16482 $as_echo_n "checking if langtools should be overridden... " >&6; }
16483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16484 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16485   fi
16486   if test "x$with_override_corba" != x; then
16487     CURDIR="$PWD"
16488     cd "$with_override_corba"
16489     CORBA_TOPDIR="`pwd`"
16490     cd "$CURDIR"
16491     if ! test -f $CORBA_TOPDIR/make/Makefile; then
16492       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16493     fi
16494     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16495 $as_echo_n "checking if corba should be overridden... " >&6; }
16496     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16497 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16498   fi
16499   if test "x$with_override_jaxp" != x; then
16500     CURDIR="$PWD"
16501     cd "$with_override_jaxp"
16502     JAXP_TOPDIR="`pwd`"
16503     cd "$CURDIR"
16504     if ! test -f $JAXP_TOPDIR/make/Makefile; then
16505       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16506     fi
16507     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16508 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16509     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16510 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16511   fi
16512   if test "x$with_override_jaxws" != x; then
16513     CURDIR="$PWD"
16514     cd "$with_override_jaxws"
16515     JAXWS_TOPDIR="`pwd`"
16516     cd "$CURDIR"
16517     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16518       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16519     fi
16520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16521 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16522     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16523 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16524   fi
16525   if test "x$with_override_hotspot" != x; then
16526     CURDIR="$PWD"
16527     cd "$with_override_hotspot"
16528     HOTSPOT_TOPDIR="`pwd`"
16529     cd "$CURDIR"
16530     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16531       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16532     fi
16533     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16534 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16535     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16536 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16537   fi
16538   if test "x$with_override_nashorn" != x; then
16539     CURDIR="$PWD"
16540     cd "$with_override_nashorn"
16541     NASHORN_TOPDIR="`pwd`"
16542     cd "$CURDIR"
16543     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16544       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16545     fi
16546     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16547 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16548     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16549 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16550   fi
16551   if test "x$with_override_jdk" != x; then
16552     CURDIR="$PWD"
16553     cd "$with_override_jdk"
16554     JDK_TOPDIR="`pwd`"
16555     cd "$CURDIR"
16556     if ! test -f $JDK_TOPDIR/make/Makefile; then
16557       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16558     fi
16559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16560 $as_echo_n "checking if JDK should be overridden... " >&6; }
16561     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16562 $as_echo "yes with $JDK_TOPDIR" >&6; }
16563   fi
16564 
16565 
16566   BUILD_OUTPUT="$OUTPUT_ROOT"
16567 
16568 
16569   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16570   BUILD_HOTSPOT=true
16571 
16572 
16573 
16574 # Check whether --with-import-hotspot was given.
16575 if test "${with_import_hotspot+set}" = set; then :
16576   withval=$with_import_hotspot;
16577 fi
16578 
16579   if test "x$with_import_hotspot" != x; then
16580     CURDIR="$PWD"
16581     cd "$with_import_hotspot"
16582     HOTSPOT_DIST="`pwd`"
16583     cd "$CURDIR"
16584     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16585       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16586     fi
16587     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16588 $as_echo_n "checking if hotspot should be imported... " >&6; }
16589     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16590 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16591     BUILD_HOTSPOT=false
16592   fi
16593 
16594   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16595 
16596 
16597 ###############################################################################
16598 #
16599 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16600 # cross-compilation aware.
16601 #
16602 ###############################################################################
16603 
16604 
16605   ###############################################################################
16606   #
16607   # Configure the development tool paths and potential sysroot.
16608   #
16609   ac_ext=cpp
16610 ac_cpp='$CXXCPP $CPPFLAGS'
16611 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16612 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16613 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16614 
16615 
16616   # The option used to specify the target .o,.a or .so file.
16617   # When compiling, how to specify the to be created object file.
16618   CC_OUT_OPTION='-o$(SPACE)'
16619   # When linking, how to specify the to be created executable.
16620   EXE_OUT_OPTION='-o$(SPACE)'
16621   # When linking, how to specify the to be created dynamically linkable library.
16622   LD_OUT_OPTION='-o$(SPACE)'
16623   # When archiving, how to specify the to be create static archive for object files.
16624   AR_OUT_OPTION='rcs$(SPACE)'
16625 
16626 
16627 
16628 
16629 
16630 # Locate the actual tools
16631 
16632 
16633 # Check whether --with-jtreg was given.
16634 if test "${with_jtreg+set}" = set; then :
16635   withval=$with_jtreg;
16636 else
16637   with_jtreg=no
16638 fi
16639 
16640 
16641   if test "x$with_jtreg" = xno; then
16642     # jtreg disabled
16643     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16644 $as_echo_n "checking for jtreg... " >&6; }
16645     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16646 $as_echo "no" >&6; }
16647   else
16648     if test "x$with_jtreg" != xyes; then
16649       # with path specified.
16650       JT_HOME="$with_jtreg"
16651     fi
16652 
16653     if test "x$JT_HOME" != x; then
16654       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16655 $as_echo_n "checking for jtreg... " >&6; }
16656 
16657       # use JT_HOME enviroment var.
16658 
16659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16660 
16661   # Input might be given as Windows format, start by converting to
16662   # unix format.
16663   path="$JT_HOME"
16664   new_path=`$CYGPATH -u "$path"`
16665 
16666   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16667   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16668   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16669   # "foo.exe" is OK but "foo" is an error.
16670   #
16671   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16672   # It is also a way to make sure we got the proper file name for the real test later on.
16673   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16674   if test "x$test_shortpath" = x; then
16675     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16676 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16677     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16678   fi
16679 
16680   # Call helper function which possibly converts this using DOS-style short mode.
16681   # If so, the updated path is stored in $new_path.
16682 
16683   input_path="$new_path"
16684   # Check if we need to convert this using DOS-style short mode. If the path
16685   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16686   # take no chances and rewrite it.
16687   # Note: m4 eats our [], so we need to use [ and ] instead.
16688   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16689   if test "x$has_forbidden_chars" != x; then
16690     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16691     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16692     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16693     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16694       # Going to short mode and back again did indeed matter. Since short mode is
16695       # case insensitive, let's make it lowercase to improve readability.
16696       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16697       # Now convert it back to Unix-stile (cygpath)
16698       input_path=`$CYGPATH -u "$shortmode_path"`
16699       new_path="$input_path"
16700     fi
16701   fi
16702 
16703   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16704   if test "x$test_cygdrive_prefix" = x; then
16705     # As a simple fix, exclude /usr/bin since it's not a real path.
16706     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16707       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16708       # a path prefixed by /cygdrive for fixpath to work.
16709       new_path="$CYGWIN_ROOT_PATH$input_path"
16710     fi
16711   fi
16712 
16713 
16714   if test "x$path" != "x$new_path"; then
16715     JT_HOME="$new_path"
16716     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16717 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16718   fi
16719 
16720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16721 
16722   path="$JT_HOME"
16723   has_colon=`$ECHO $path | $GREP ^.:`
16724   new_path="$path"
16725   if test "x$has_colon" = x; then
16726     # Not in mixed or Windows style, start by that.
16727     new_path=`cmd //c echo $path`
16728   fi
16729 
16730 
16731   input_path="$new_path"
16732   # Check if we need to convert this using DOS-style short mode. If the path
16733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16734   # take no chances and rewrite it.
16735   # Note: m4 eats our [], so we need to use [ and ] instead.
16736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16737   if test "x$has_forbidden_chars" != x; then
16738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16739     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16740   fi
16741 
16742 
16743   windows_path="$new_path"
16744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16745     unix_path=`$CYGPATH -u "$windows_path"`
16746     new_path="$unix_path"
16747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16749     new_path="$unix_path"
16750   fi
16751 
16752   if test "x$path" != "x$new_path"; then
16753     JT_HOME="$new_path"
16754     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16755 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16756   fi
16757 
16758   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16759   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16760 
16761   else
16762     # We're on a posix platform. Hooray! :)
16763     path="$JT_HOME"
16764     has_space=`$ECHO "$path" | $GREP " "`
16765     if test "x$has_space" != x; then
16766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16767 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16768       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16769     fi
16770 
16771     # Use eval to expand a potential ~
16772     eval path="$path"
16773     if test ! -f "$path" && test ! -d "$path"; then
16774       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16775     fi
16776 
16777     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16778   fi
16779 
16780 
16781       # jtreg win32 script works for everybody
16782       JTREGEXE="$JT_HOME/bin/jtreg"
16783 
16784       if test ! -f "$JTREGEXE"; then
16785         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16786       fi
16787 
16788       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16789 $as_echo "$JTREGEXE" >&6; }
16790     else
16791       # try to find jtreg on path
16792 
16793   for ac_prog in jtreg
16794 do
16795   # Extract the first word of "$ac_prog", so it can be a program name with args.
16796 set dummy $ac_prog; ac_word=$2
16797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16798 $as_echo_n "checking for $ac_word... " >&6; }
16799 if ${ac_cv_path_JTREGEXE+:} false; then :
16800   $as_echo_n "(cached) " >&6
16801 else
16802   case $JTREGEXE in
16803   [\\/]* | ?:[\\/]*)
16804   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16805   ;;
16806   *)
16807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16808 for as_dir in $PATH
16809 do
16810   IFS=$as_save_IFS
16811   test -z "$as_dir" && as_dir=.
16812     for ac_exec_ext in '' $ac_executable_extensions; do
16813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16814     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16816     break 2
16817   fi
16818 done
16819   done
16820 IFS=$as_save_IFS
16821 
16822   ;;
16823 esac
16824 fi
16825 JTREGEXE=$ac_cv_path_JTREGEXE
16826 if test -n "$JTREGEXE"; then
16827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16828 $as_echo "$JTREGEXE" >&6; }
16829 else
16830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16831 $as_echo "no" >&6; }
16832 fi
16833 
16834 
16835   test -n "$JTREGEXE" && break
16836 done
16837 
16838 
16839   if test "x$JTREGEXE" = x; then
16840     if test "xjtreg" = x; then
16841       PROG_NAME=jtregexe
16842     else
16843       PROG_NAME=jtreg
16844     fi
16845     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16846 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16847     as_fn_error $? "Cannot continue" "$LINENO" 5
16848   fi
16849 
16850 
16851       JT_HOME="`$DIRNAME $JTREGEXE`"
16852     fi
16853   fi
16854 
16855 
16856 
16857 
16858 
16859   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16860 
16861   # Store path to cygwin link.exe to help excluding it when searching for
16862   # VS linker. This must be done before changing the PATH when looking for VS.
16863   # Extract the first word of "link", so it can be a program name with args.
16864 set dummy link; ac_word=$2
16865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16866 $as_echo_n "checking for $ac_word... " >&6; }
16867 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16868   $as_echo_n "(cached) " >&6
16869 else
16870   case $CYGWIN_LINK in
16871   [\\/]* | ?:[\\/]*)
16872   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16873   ;;
16874   *)
16875   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16876 for as_dir in $PATH
16877 do
16878   IFS=$as_save_IFS
16879   test -z "$as_dir" && as_dir=.
16880     for ac_exec_ext in '' $ac_executable_extensions; do
16881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16882     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16884     break 2
16885   fi
16886 done
16887   done
16888 IFS=$as_save_IFS
16889 
16890   ;;
16891 esac
16892 fi
16893 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16894 if test -n "$CYGWIN_LINK"; then
16895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16896 $as_echo "$CYGWIN_LINK" >&6; }
16897 else
16898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16899 $as_echo "no" >&6; }
16900 fi
16901 
16902 
16903   if test "x$CYGWIN_LINK" != x; then
16904     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16905 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16906     "$CYGWIN_LINK" --version > /dev/null
16907     if test $? -eq 0 ; then
16908       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16909 $as_echo "yes" >&6; }
16910     else
16911       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16912 $as_echo "no" >&6; }
16913       # This might be the VS linker. Don't exclude it later on.
16914       CYGWIN_LINK=""
16915     fi
16916   fi
16917 
16918   # First-hand choice is to locate and run the vsvars bat file.
16919 
16920   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16921     VCVARSFILE="vc/bin/vcvars32.bat"
16922   else
16923     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16924   fi
16925 
16926   VS_ENV_CMD=""
16927   VS_ENV_ARGS=""
16928   if test "x$with_toolsdir" != x; then
16929 
16930   if test "x$VS_ENV_CMD" = x; then
16931     VS100BASE="$with_toolsdir/../.."
16932     METHOD="--with-tools-dir"
16933 
16934   windows_path="$VS100BASE"
16935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16936     unix_path=`$CYGPATH -u "$windows_path"`
16937     VS100BASE="$unix_path"
16938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16940     VS100BASE="$unix_path"
16941   fi
16942 
16943     if test -d "$VS100BASE"; then
16944       if test -f "$VS100BASE/$VCVARSFILE"; then
16945         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16946 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16947         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16948       else
16949         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16950 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16951         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16952 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16953       fi
16954     fi
16955   fi
16956 
16957   fi
16958 
16959   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16960     # Having specified an argument which is incorrect will produce an instant failure;
16961     # we should not go on looking
16962     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16963 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16964     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16965 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16966     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16967   fi
16968 
16969   if test "x$VS100COMNTOOLS" != x; then
16970 
16971   if test "x$VS_ENV_CMD" = x; then
16972     VS100BASE="$VS100COMNTOOLS/../.."
16973     METHOD="VS100COMNTOOLS variable"
16974 
16975   windows_path="$VS100BASE"
16976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16977     unix_path=`$CYGPATH -u "$windows_path"`
16978     VS100BASE="$unix_path"
16979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16981     VS100BASE="$unix_path"
16982   fi
16983 
16984     if test -d "$VS100BASE"; then
16985       if test -f "$VS100BASE/$VCVARSFILE"; then
16986         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16987 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16988         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16989       else
16990         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16991 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16992         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16993 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16994       fi
16995     fi
16996   fi
16997 
16998   fi
16999   if test "x$PROGRAMFILES" != x; then
17000 
17001   if test "x$VS_ENV_CMD" = x; then
17002     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
17003     METHOD="well-known name"
17004 
17005   windows_path="$VS100BASE"
17006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17007     unix_path=`$CYGPATH -u "$windows_path"`
17008     VS100BASE="$unix_path"
17009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17011     VS100BASE="$unix_path"
17012   fi
17013 
17014     if test -d "$VS100BASE"; then
17015       if test -f "$VS100BASE/$VCVARSFILE"; then
17016         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17017 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17018         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17019       else
17020         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17021 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17022         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17023 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17024       fi
17025     fi
17026   fi
17027 
17028   fi
17029 
17030   if test "x$VS_ENV_CMD" = x; then
17031     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
17032     METHOD="well-known name"
17033 
17034   windows_path="$VS100BASE"
17035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17036     unix_path=`$CYGPATH -u "$windows_path"`
17037     VS100BASE="$unix_path"
17038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17040     VS100BASE="$unix_path"
17041   fi
17042 
17043     if test -d "$VS100BASE"; then
17044       if test -f "$VS100BASE/$VCVARSFILE"; then
17045         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17046 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17047         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17048       else
17049         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17050 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17051         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17052 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17053       fi
17054     fi
17055   fi
17056 
17057 
17058   if test "x$VS_ENV_CMD" = x; then
17059     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
17060     METHOD="well-known name"
17061 
17062   windows_path="$VS100BASE"
17063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064     unix_path=`$CYGPATH -u "$windows_path"`
17065     VS100BASE="$unix_path"
17066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17068     VS100BASE="$unix_path"
17069   fi
17070 
17071     if test -d "$VS100BASE"; then
17072       if test -f "$VS100BASE/$VCVARSFILE"; then
17073         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17074 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17075         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17076       else
17077         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17078 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17079         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17080 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17081       fi
17082     fi
17083   fi
17084 
17085 
17086   if test "x$ProgramW6432" != x; then
17087 
17088   if test "x$VS_ENV_CMD" = x; then
17089     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17090     METHOD="well-known name"
17091 
17092   windows_path="$WIN_SDK_BASE"
17093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17094     unix_path=`$CYGPATH -u "$windows_path"`
17095     WIN_SDK_BASE="$unix_path"
17096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17097     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17098     WIN_SDK_BASE="$unix_path"
17099   fi
17100 
17101     if test -d "$WIN_SDK_BASE"; then
17102       # There have been cases of partial or broken SDK installations. A missing
17103       # lib dir is not going to work.
17104       if test ! -d "$WIN_SDK_BASE/../lib"; then
17105         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17106 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17107         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17108 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17109       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17110         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17111 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17112         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17113         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17114           VS_ENV_ARGS="/x86"
17115         else
17116           VS_ENV_ARGS="/x64"
17117         fi
17118       else
17119         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17120 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17121         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17122 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17123       fi
17124     fi
17125   fi
17126 
17127   fi
17128   if test "x$PROGRAMW6432" != x; then
17129 
17130   if test "x$VS_ENV_CMD" = x; then
17131     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17132     METHOD="well-known name"
17133 
17134   windows_path="$WIN_SDK_BASE"
17135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17136     unix_path=`$CYGPATH -u "$windows_path"`
17137     WIN_SDK_BASE="$unix_path"
17138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17140     WIN_SDK_BASE="$unix_path"
17141   fi
17142 
17143     if test -d "$WIN_SDK_BASE"; then
17144       # There have been cases of partial or broken SDK installations. A missing
17145       # lib dir is not going to work.
17146       if test ! -d "$WIN_SDK_BASE/../lib"; then
17147         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17148 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17149         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17150 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17151       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17152         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17153 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17154         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17155         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17156           VS_ENV_ARGS="/x86"
17157         else
17158           VS_ENV_ARGS="/x64"
17159         fi
17160       else
17161         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17162 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17163         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17164 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17165       fi
17166     fi
17167   fi
17168 
17169   fi
17170   if test "x$PROGRAMFILES" != x; then
17171 
17172   if test "x$VS_ENV_CMD" = x; then
17173     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17174     METHOD="well-known name"
17175 
17176   windows_path="$WIN_SDK_BASE"
17177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17178     unix_path=`$CYGPATH -u "$windows_path"`
17179     WIN_SDK_BASE="$unix_path"
17180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17181     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17182     WIN_SDK_BASE="$unix_path"
17183   fi
17184 
17185     if test -d "$WIN_SDK_BASE"; then
17186       # There have been cases of partial or broken SDK installations. A missing
17187       # lib dir is not going to work.
17188       if test ! -d "$WIN_SDK_BASE/../lib"; then
17189         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17190 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17191         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17192 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17193       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17194         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17195 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17196         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17197         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17198           VS_ENV_ARGS="/x86"
17199         else
17200           VS_ENV_ARGS="/x64"
17201         fi
17202       else
17203         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17204 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17205         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17206 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17207       fi
17208     fi
17209   fi
17210 
17211   fi
17212 
17213   if test "x$VS_ENV_CMD" = x; then
17214     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17215     METHOD="well-known name"
17216 
17217   windows_path="$WIN_SDK_BASE"
17218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17219     unix_path=`$CYGPATH -u "$windows_path"`
17220     WIN_SDK_BASE="$unix_path"
17221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17223     WIN_SDK_BASE="$unix_path"
17224   fi
17225 
17226     if test -d "$WIN_SDK_BASE"; then
17227       # There have been cases of partial or broken SDK installations. A missing
17228       # lib dir is not going to work.
17229       if test ! -d "$WIN_SDK_BASE/../lib"; then
17230         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17231 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17232         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17233 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17234       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17235         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17236 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17237         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17238         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17239           VS_ENV_ARGS="/x86"
17240         else
17241           VS_ENV_ARGS="/x64"
17242         fi
17243       else
17244         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17245 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17246         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17247 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17248       fi
17249     fi
17250   fi
17251 
17252 
17253   if test "x$VS_ENV_CMD" = x; then
17254     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17255     METHOD="well-known name"
17256 
17257   windows_path="$WIN_SDK_BASE"
17258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17259     unix_path=`$CYGPATH -u "$windows_path"`
17260     WIN_SDK_BASE="$unix_path"
17261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17263     WIN_SDK_BASE="$unix_path"
17264   fi
17265 
17266     if test -d "$WIN_SDK_BASE"; then
17267       # There have been cases of partial or broken SDK installations. A missing
17268       # lib dir is not going to work.
17269       if test ! -d "$WIN_SDK_BASE/../lib"; then
17270         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17271 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17272         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17273 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17274       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17275         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17276 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17277         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17278         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17279           VS_ENV_ARGS="/x86"
17280         else
17281           VS_ENV_ARGS="/x64"
17282         fi
17283       else
17284         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17285 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17286         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17287 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17288       fi
17289     fi
17290   fi
17291 
17292 
17293   if test "x$VS_ENV_CMD" != x; then
17294     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17295 
17296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17297 
17298   # First separate the path from the arguments. This will split at the first
17299   # space.
17300   complete="$VS_ENV_CMD"
17301   path="${complete%% *}"
17302   tmp="$complete EOL"
17303   arguments="${tmp#* }"
17304 
17305   # Input might be given as Windows format, start by converting to
17306   # unix format.
17307   new_path=`$CYGPATH -u "$path"`
17308 
17309   # Now try to locate executable using which
17310   new_path=`$WHICH "$new_path" 2> /dev/null`
17311   # bat and cmd files are not always considered executable in cygwin causing which
17312   # to not find them
17313   if test "x$new_path" = x \
17314       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17315       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17316     new_path=`$CYGPATH -u "$path"`
17317   fi
17318   if test "x$new_path" = x; then
17319     # Oops. Which didn't find the executable.
17320     # The splitting of arguments from the executable at a space might have been incorrect,
17321     # since paths with space are more likely in Windows. Give it another try with the whole
17322     # argument.
17323     path="$complete"
17324     arguments="EOL"
17325     new_path=`$CYGPATH -u "$path"`
17326     new_path=`$WHICH "$new_path" 2> /dev/null`
17327     # bat and cmd files are not always considered executable in cygwin causing which
17328     # to not find them
17329     if test "x$new_path" = x \
17330         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17331         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17332       new_path=`$CYGPATH -u "$path"`
17333     fi
17334     if test "x$new_path" = x; then
17335       # It's still not found. Now this is an unrecoverable error.
17336       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17337 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17338       has_space=`$ECHO "$complete" | $GREP " "`
17339       if test "x$has_space" != x; then
17340         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17341 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17342       fi
17343       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17344     fi
17345   fi
17346 
17347   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17348   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17349   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17350   # "foo.exe" is OK but "foo" is an error.
17351   #
17352   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17353   # It is also a way to make sure we got the proper file name for the real test later on.
17354   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17355   if test "x$test_shortpath" = x; then
17356     # Short path failed, file does not exist as specified.
17357     # Try adding .exe or .cmd
17358     if test -f "${new_path}.exe"; then
17359       input_to_shortpath="${new_path}.exe"
17360     elif test -f "${new_path}.cmd"; then
17361       input_to_shortpath="${new_path}.cmd"
17362     else
17363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17364 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17365       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17366 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17367       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17368     fi
17369   else
17370     input_to_shortpath="$new_path"
17371   fi
17372 
17373   # Call helper function which possibly converts this using DOS-style short mode.
17374   # If so, the updated path is stored in $new_path.
17375   new_path="$input_to_shortpath"
17376 
17377   input_path="$input_to_shortpath"
17378   # Check if we need to convert this using DOS-style short mode. If the path
17379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17380   # take no chances and rewrite it.
17381   # Note: m4 eats our [], so we need to use [ and ] instead.
17382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17383   if test "x$has_forbidden_chars" != x; then
17384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17385     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17386     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17387     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17388       # Going to short mode and back again did indeed matter. Since short mode is
17389       # case insensitive, let's make it lowercase to improve readability.
17390       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17391       # Now convert it back to Unix-stile (cygpath)
17392       input_path=`$CYGPATH -u "$shortmode_path"`
17393       new_path="$input_path"
17394     fi
17395   fi
17396 
17397   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17398   if test "x$test_cygdrive_prefix" = x; then
17399     # As a simple fix, exclude /usr/bin since it's not a real path.
17400     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17401       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17402       # a path prefixed by /cygdrive for fixpath to work.
17403       new_path="$CYGWIN_ROOT_PATH$input_path"
17404     fi
17405   fi
17406 
17407   # remove trailing .exe if any
17408   new_path="${new_path/%.exe/}"
17409 
17410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17411 
17412   # First separate the path from the arguments. This will split at the first
17413   # space.
17414   complete="$VS_ENV_CMD"
17415   path="${complete%% *}"
17416   tmp="$complete EOL"
17417   arguments="${tmp#* }"
17418 
17419   # Input might be given as Windows format, start by converting to
17420   # unix format.
17421   new_path="$path"
17422 
17423   windows_path="$new_path"
17424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17425     unix_path=`$CYGPATH -u "$windows_path"`
17426     new_path="$unix_path"
17427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17429     new_path="$unix_path"
17430   fi
17431 
17432 
17433   # Now try to locate executable using which
17434   new_path=`$WHICH "$new_path" 2> /dev/null`
17435 
17436   if test "x$new_path" = x; then
17437     # Oops. Which didn't find the executable.
17438     # The splitting of arguments from the executable at a space might have been incorrect,
17439     # since paths with space are more likely in Windows. Give it another try with the whole
17440     # argument.
17441     path="$complete"
17442     arguments="EOL"
17443     new_path="$path"
17444 
17445   windows_path="$new_path"
17446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17447     unix_path=`$CYGPATH -u "$windows_path"`
17448     new_path="$unix_path"
17449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17451     new_path="$unix_path"
17452   fi
17453 
17454 
17455     new_path=`$WHICH "$new_path" 2> /dev/null`
17456 
17457     if test "x$new_path" = x; then
17458       # It's still not found. Now this is an unrecoverable error.
17459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17460 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17461       has_space=`$ECHO "$complete" | $GREP " "`
17462       if test "x$has_space" != x; then
17463         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17464 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17465       fi
17466       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17467     fi
17468   fi
17469 
17470   # Now new_path has a complete unix path to the binary
17471   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17472     # Keep paths in /bin as-is, but remove trailing .exe if any
17473     new_path="${new_path/%.exe/}"
17474     # Do not save /bin paths to all_fixpath_prefixes!
17475   else
17476     # Not in mixed or Windows style, start by that.
17477     new_path=`cmd //c echo $new_path`
17478 
17479   input_path="$new_path"
17480   # Check if we need to convert this using DOS-style short mode. If the path
17481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17482   # take no chances and rewrite it.
17483   # Note: m4 eats our [], so we need to use [ and ] instead.
17484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17485   if test "x$has_forbidden_chars" != x; then
17486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17487     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17488   fi
17489 
17490     # Output is in $new_path
17491 
17492   windows_path="$new_path"
17493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17494     unix_path=`$CYGPATH -u "$windows_path"`
17495     new_path="$unix_path"
17496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17498     new_path="$unix_path"
17499   fi
17500 
17501     # remove trailing .exe if any
17502     new_path="${new_path/%.exe/}"
17503 
17504     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17505     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17506   fi
17507 
17508   else
17509     # We're on a posix platform. Hooray! :)
17510     # First separate the path from the arguments. This will split at the first
17511     # space.
17512     complete="$VS_ENV_CMD"
17513     path="${complete%% *}"
17514     tmp="$complete EOL"
17515     arguments="${tmp#* }"
17516 
17517     # Cannot rely on the command "which" here since it doesn't always work.
17518     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17519     if test -z "$is_absolute_path"; then
17520       # Path to executable is not absolute. Find it.
17521       IFS_save="$IFS"
17522       IFS=:
17523       for p in $PATH; do
17524         if test -f "$p/$path" && test -x "$p/$path"; then
17525           new_path="$p/$path"
17526           break
17527         fi
17528       done
17529       IFS="$IFS_save"
17530     else
17531       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17532 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17533       new_path="$path"
17534     fi
17535 
17536     if test "x$new_path" = x; then
17537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17538 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17539       has_space=`$ECHO "$complete" | $GREP " "`
17540       if test "x$has_space" != x; then
17541         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17542 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17543       fi
17544       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17545     fi
17546   fi
17547 
17548   # Now join together the path and the arguments once again
17549   if test "x$arguments" != xEOL; then
17550     new_complete="$new_path ${arguments% *}"
17551   else
17552     new_complete="$new_path"
17553   fi
17554 
17555   if test "x$complete" != "x$new_complete"; then
17556     VS_ENV_CMD="$new_complete"
17557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17558 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17559   fi
17560 
17561 
17562     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17563     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17564 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17565     cd $OUTPUT_ROOT
17566     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17567     # to autoconf standards.
17568 
17569     #----
17570 
17571     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17572     # but calculate the difference in Cygwin environment before/after running it and then
17573     # apply the diff.
17574 
17575     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17576       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17577       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17578       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17579     else
17580       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17581       _dosbash=`cmd //c echo \`which bash\``
17582     fi
17583 
17584     # generate the set of exported vars before/after the vs10 setup
17585     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17586     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17587     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17588     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17589 
17590     # Now execute the newly created bat file.
17591     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17592     cmd /c localdevenvtmp.bat | cat
17593 
17594     # apply the diff (less some non-vs10 vars named by "!")
17595     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17596     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17597     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17598 
17599     # cleanup
17600     $RM localdevenvtmp*
17601     #----
17602     cd $CURDIR
17603     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17604       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17605 $as_echo "no" >&6; }
17606       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17607 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17608       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17609 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17610       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17611 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17612       as_fn_error $? "Cannot continue" "$LINENO" 5
17613     fi
17614 
17615     # Now set all paths and other env variables. This will allow the rest of
17616     # the configure script to find and run the compiler in the proper way.
17617     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17618 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17619     . $OUTPUT_ROOT/localdevenv.sh
17620   else
17621     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17622     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17623 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17624   fi
17625 
17626   # At this point, we should have corrent variables in the environment, or we can't continue.
17627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17628 $as_echo_n "checking for Visual Studio variables... " >&6; }
17629 
17630   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17631     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17632       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17633 $as_echo "present but broken" >&6; }
17634       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17635     else
17636       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17637 $as_echo "ok" >&6; }
17638       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17639       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17640       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17641       # Remove any paths containing # (typically F#) as that messes up make
17642       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17643       VS_PATH="$PATH"
17644 
17645 
17646 
17647     fi
17648   else
17649     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17650 $as_echo "not found" >&6; }
17651 
17652     if test "x$VS_ENV_CMD" = x; then
17653       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17654 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17655       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17656 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17657     else
17658       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17659 $as_echo "$as_me: Running the extraction script failed." >&6;}
17660     fi
17661     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17662 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17663     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17664 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17665     as_fn_error $? "Cannot continue" "$LINENO" 5
17666   fi
17667 
17668 
17669 
17670 # Check whether --with-msvcr-dll was given.
17671 if test "${with_msvcr_dll+set}" = set; then :
17672   withval=$with_msvcr_dll;
17673 fi
17674 
17675 
17676   if test "x$with_msvcr_dll" != x; then
17677     # If given explicitely by user, do not probe. If not present, fail directly.
17678 
17679   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17680   METHOD="--with-msvcr-dll"
17681   if test -e "$POSSIBLE_MSVCR_DLL"; then
17682     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17683 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17684 
17685     # Need to check if the found msvcr is correct architecture
17686     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17687 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17688     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17689     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17690       CORRECT_MSVCR_ARCH=386
17691     else
17692       CORRECT_MSVCR_ARCH=x86-64
17693     fi
17694     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17695       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17696 $as_echo "ok" >&6; }
17697       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17698       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17699 $as_echo_n "checking for msvcr100.dll... " >&6; }
17700       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17701 $as_echo "$MSVCR_DLL" >&6; }
17702     else
17703       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17704 $as_echo "incorrect, ignoring" >&6; }
17705       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17706 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17707     fi
17708   fi
17709 
17710     if test "x$MSVCR_DLL" = x; then
17711       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17712     fi
17713   fi
17714 
17715   if test "x$MSVCR_DLL" = x; then
17716     # Probe: Using well-known location from Visual Studio 10.0
17717     if test "x$VCINSTALLDIR" != x; then
17718       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17719 
17720   windows_path="$CYGWIN_VC_INSTALL_DIR"
17721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17722     unix_path=`$CYGPATH -u "$windows_path"`
17723     CYGWIN_VC_INSTALL_DIR="$unix_path"
17724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17726     CYGWIN_VC_INSTALL_DIR="$unix_path"
17727   fi
17728 
17729       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17730         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17731       else
17732         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17733       fi
17734 
17735   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17736   METHOD="well-known location in VCINSTALLDIR"
17737   if test -e "$POSSIBLE_MSVCR_DLL"; then
17738     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17739 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17740 
17741     # Need to check if the found msvcr is correct architecture
17742     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17743 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17744     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17745     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17746       CORRECT_MSVCR_ARCH=386
17747     else
17748       CORRECT_MSVCR_ARCH=x86-64
17749     fi
17750     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17751       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17752 $as_echo "ok" >&6; }
17753       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17754       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17755 $as_echo_n "checking for msvcr100.dll... " >&6; }
17756       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17757 $as_echo "$MSVCR_DLL" >&6; }
17758     else
17759       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17760 $as_echo "incorrect, ignoring" >&6; }
17761       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17762 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17763     fi
17764   fi
17765 
17766     fi
17767   fi
17768 
17769   if test "x$MSVCR_DLL" = x; then
17770     # Probe: Check in the Boot JDK directory.
17771     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17772 
17773   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17774   METHOD="well-known location in Boot JDK"
17775   if test -e "$POSSIBLE_MSVCR_DLL"; then
17776     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17777 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17778 
17779     # Need to check if the found msvcr is correct architecture
17780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17781 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17782     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17783     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17784       CORRECT_MSVCR_ARCH=386
17785     else
17786       CORRECT_MSVCR_ARCH=x86-64
17787     fi
17788     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17789       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17790 $as_echo "ok" >&6; }
17791       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17792       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17793 $as_echo_n "checking for msvcr100.dll... " >&6; }
17794       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17795 $as_echo "$MSVCR_DLL" >&6; }
17796     else
17797       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17798 $as_echo "incorrect, ignoring" >&6; }
17799       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17800 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17801     fi
17802   fi
17803 
17804   fi
17805 
17806   if test "x$MSVCR_DLL" = x; then
17807     # Probe: Look in the Windows system32 directory
17808     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17809 
17810   windows_path="$CYGWIN_SYSTEMROOT"
17811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17812     unix_path=`$CYGPATH -u "$windows_path"`
17813     CYGWIN_SYSTEMROOT="$unix_path"
17814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17815     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17816     CYGWIN_SYSTEMROOT="$unix_path"
17817   fi
17818 
17819     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17820 
17821   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17822   METHOD="well-known location in SYSTEMROOT"
17823   if test -e "$POSSIBLE_MSVCR_DLL"; then
17824     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17825 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17826 
17827     # Need to check if the found msvcr is correct architecture
17828     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17829 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17830     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17831     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17832       CORRECT_MSVCR_ARCH=386
17833     else
17834       CORRECT_MSVCR_ARCH=x86-64
17835     fi
17836     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17838 $as_echo "ok" >&6; }
17839       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17840       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17841 $as_echo_n "checking for msvcr100.dll... " >&6; }
17842       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17843 $as_echo "$MSVCR_DLL" >&6; }
17844     else
17845       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17846 $as_echo "incorrect, ignoring" >&6; }
17847       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17848 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17849     fi
17850   fi
17851 
17852   fi
17853 
17854   if test "x$MSVCR_DLL" = x; then
17855     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17856     if test "x$VS100COMNTOOLS" != x; then
17857       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17858 
17859   windows_path="$CYGWIN_VS_TOOLS_DIR"
17860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17861     unix_path=`$CYGPATH -u "$windows_path"`
17862     CYGWIN_VS_TOOLS_DIR="$unix_path"
17863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17865     CYGWIN_VS_TOOLS_DIR="$unix_path"
17866   fi
17867 
17868       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17869         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17870       else
17871         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17872       fi
17873 
17874   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17875   METHOD="search of VS100COMNTOOLS"
17876   if test -e "$POSSIBLE_MSVCR_DLL"; then
17877     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17878 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17879 
17880     # Need to check if the found msvcr is correct architecture
17881     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17882 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17883     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17884     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17885       CORRECT_MSVCR_ARCH=386
17886     else
17887       CORRECT_MSVCR_ARCH=x86-64
17888     fi
17889     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17890       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17891 $as_echo "ok" >&6; }
17892       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17893       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17894 $as_echo_n "checking for msvcr100.dll... " >&6; }
17895       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17896 $as_echo "$MSVCR_DLL" >&6; }
17897     else
17898       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17899 $as_echo "incorrect, ignoring" >&6; }
17900       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17901 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17902     fi
17903   fi
17904 
17905     fi
17906   fi
17907 
17908   if test "x$MSVCR_DLL" = x; then
17909     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17910     # (This was the original behaviour; kept since it might turn up something)
17911     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17912       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17913         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17914       else
17915         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17916         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17917           # We're grasping at straws now...
17918           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17919         fi
17920       fi
17921 
17922 
17923   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17924   METHOD="search of VCINSTALLDIR"
17925   if test -e "$POSSIBLE_MSVCR_DLL"; then
17926     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17927 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17928 
17929     # Need to check if the found msvcr is correct architecture
17930     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17931 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17932     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17933     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17934       CORRECT_MSVCR_ARCH=386
17935     else
17936       CORRECT_MSVCR_ARCH=x86-64
17937     fi
17938     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17939       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17940 $as_echo "ok" >&6; }
17941       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17942       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17943 $as_echo_n "checking for msvcr100.dll... " >&6; }
17944       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17945 $as_echo "$MSVCR_DLL" >&6; }
17946     else
17947       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17948 $as_echo "incorrect, ignoring" >&6; }
17949       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17950 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17951     fi
17952   fi
17953 
17954     fi
17955   fi
17956 
17957   if test "x$MSVCR_DLL" = x; then
17958     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17959 $as_echo_n "checking for msvcr100.dll... " >&6; }
17960     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17961 $as_echo "no" >&6; }
17962     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17963   fi
17964 
17965 
17966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17967 
17968   # Input might be given as Windows format, start by converting to
17969   # unix format.
17970   path="$MSVCR_DLL"
17971   new_path=`$CYGPATH -u "$path"`
17972 
17973   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17974   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17975   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17976   # "foo.exe" is OK but "foo" is an error.
17977   #
17978   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17979   # It is also a way to make sure we got the proper file name for the real test later on.
17980   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17981   if test "x$test_shortpath" = x; then
17982     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17983 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17984     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17985   fi
17986 
17987   # Call helper function which possibly converts this using DOS-style short mode.
17988   # If so, the updated path is stored in $new_path.
17989 
17990   input_path="$new_path"
17991   # Check if we need to convert this using DOS-style short mode. If the path
17992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17993   # take no chances and rewrite it.
17994   # Note: m4 eats our [], so we need to use [ and ] instead.
17995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17996   if test "x$has_forbidden_chars" != x; then
17997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18001       # Going to short mode and back again did indeed matter. Since short mode is
18002       # case insensitive, let's make it lowercase to improve readability.
18003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18004       # Now convert it back to Unix-stile (cygpath)
18005       input_path=`$CYGPATH -u "$shortmode_path"`
18006       new_path="$input_path"
18007     fi
18008   fi
18009 
18010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18011   if test "x$test_cygdrive_prefix" = x; then
18012     # As a simple fix, exclude /usr/bin since it's not a real path.
18013     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18015       # a path prefixed by /cygdrive for fixpath to work.
18016       new_path="$CYGWIN_ROOT_PATH$input_path"
18017     fi
18018   fi
18019 
18020 
18021   if test "x$path" != "x$new_path"; then
18022     MSVCR_DLL="$new_path"
18023     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18024 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18025   fi
18026 
18027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18028 
18029   path="$MSVCR_DLL"
18030   has_colon=`$ECHO $path | $GREP ^.:`
18031   new_path="$path"
18032   if test "x$has_colon" = x; then
18033     # Not in mixed or Windows style, start by that.
18034     new_path=`cmd //c echo $path`
18035   fi
18036 
18037 
18038   input_path="$new_path"
18039   # Check if we need to convert this using DOS-style short mode. If the path
18040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18041   # take no chances and rewrite it.
18042   # Note: m4 eats our [], so we need to use [ and ] instead.
18043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18044   if test "x$has_forbidden_chars" != x; then
18045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18046     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18047   fi
18048 
18049 
18050   windows_path="$new_path"
18051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18052     unix_path=`$CYGPATH -u "$windows_path"`
18053     new_path="$unix_path"
18054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18055     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18056     new_path="$unix_path"
18057   fi
18058 
18059   if test "x$path" != "x$new_path"; then
18060     MSVCR_DLL="$new_path"
18061     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18062 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18063   fi
18064 
18065   # Save the first 10 bytes of this path to the storage, so fixpath can work.
18066   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18067 
18068   else
18069     # We're on a posix platform. Hooray! :)
18070     path="$MSVCR_DLL"
18071     has_space=`$ECHO "$path" | $GREP " "`
18072     if test "x$has_space" != x; then
18073       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18074 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18075       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18076     fi
18077 
18078     # Use eval to expand a potential ~
18079     eval path="$path"
18080     if test ! -f "$path" && test ! -d "$path"; then
18081       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18082     fi
18083 
18084     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18085   fi
18086 
18087 
18088 
18089 
18090 # Check whether --with-dxsdk was given.
18091 if test "${with_dxsdk+set}" = set; then :
18092   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18093 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18094 fi
18095 
18096 
18097 
18098 
18099 # Check whether --with-dxsdk-lib was given.
18100 if test "${with_dxsdk_lib+set}" = set; then :
18101   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18102 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18103 fi
18104 
18105 
18106 
18107 
18108 # Check whether --with-dxsdk-include was given.
18109 if test "${with_dxsdk_include+set}" = set; then :
18110   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18111 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18112 fi
18113 
18114 
18115   fi
18116 
18117 
18118 
18119   # If --build AND --host is set, then the configure script will find any
18120   # cross compilation tools in the PATH. Cross compilation tools
18121   # follows the cross compilation standard where they are prefixed with ${host}.
18122   # For example the binary i686-sun-solaris2.10-gcc
18123   # will cross compile for i686-sun-solaris2.10
18124   # If neither of build and host is not set, then build=host and the
18125   # default compiler found in the path will be used.
18126   # Setting only --host, does not seem to be really supported.
18127   # Please set both --build and --host if you want to cross compile.
18128 
18129   if test "x$COMPILE_TYPE" = "xcross"; then
18130     # Now we to find a C/C++ compiler that can build executables for the build
18131     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18132     # once. Also, we need to do this before adding a tools dir to the path,
18133     # otherwise we might pick up cross-compilers which don't use standard naming.
18134     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18135     # to wait until they are properly discovered.
18136     for ac_prog in cl cc gcc
18137 do
18138   # Extract the first word of "$ac_prog", so it can be a program name with args.
18139 set dummy $ac_prog; ac_word=$2
18140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18141 $as_echo_n "checking for $ac_word... " >&6; }
18142 if ${ac_cv_path_BUILD_CC+:} false; then :
18143   $as_echo_n "(cached) " >&6
18144 else
18145   case $BUILD_CC in
18146   [\\/]* | ?:[\\/]*)
18147   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18148   ;;
18149   *)
18150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18151 for as_dir in $PATH
18152 do
18153   IFS=$as_save_IFS
18154   test -z "$as_dir" && as_dir=.
18155     for ac_exec_ext in '' $ac_executable_extensions; do
18156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18157     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18159     break 2
18160   fi
18161 done
18162   done
18163 IFS=$as_save_IFS
18164 
18165   ;;
18166 esac
18167 fi
18168 BUILD_CC=$ac_cv_path_BUILD_CC
18169 if test -n "$BUILD_CC"; then
18170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18171 $as_echo "$BUILD_CC" >&6; }
18172 else
18173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18174 $as_echo "no" >&6; }
18175 fi
18176 
18177 
18178   test -n "$BUILD_CC" && break
18179 done
18180 
18181 
18182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18183 
18184   # First separate the path from the arguments. This will split at the first
18185   # space.
18186   complete="$BUILD_CC"
18187   path="${complete%% *}"
18188   tmp="$complete EOL"
18189   arguments="${tmp#* }"
18190 
18191   # Input might be given as Windows format, start by converting to
18192   # unix format.
18193   new_path=`$CYGPATH -u "$path"`
18194 
18195   # Now try to locate executable using which
18196   new_path=`$WHICH "$new_path" 2> /dev/null`
18197   # bat and cmd files are not always considered executable in cygwin causing which
18198   # to not find them
18199   if test "x$new_path" = x \
18200       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18201       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18202     new_path=`$CYGPATH -u "$path"`
18203   fi
18204   if test "x$new_path" = x; then
18205     # Oops. Which didn't find the executable.
18206     # The splitting of arguments from the executable at a space might have been incorrect,
18207     # since paths with space are more likely in Windows. Give it another try with the whole
18208     # argument.
18209     path="$complete"
18210     arguments="EOL"
18211     new_path=`$CYGPATH -u "$path"`
18212     new_path=`$WHICH "$new_path" 2> /dev/null`
18213     # bat and cmd files are not always considered executable in cygwin causing which
18214     # to not find them
18215     if test "x$new_path" = x \
18216         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18217         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18218       new_path=`$CYGPATH -u "$path"`
18219     fi
18220     if test "x$new_path" = x; then
18221       # It's still not found. Now this is an unrecoverable error.
18222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18223 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18224       has_space=`$ECHO "$complete" | $GREP " "`
18225       if test "x$has_space" != x; then
18226         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18227 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18228       fi
18229       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18230     fi
18231   fi
18232 
18233   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18234   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18235   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18236   # "foo.exe" is OK but "foo" is an error.
18237   #
18238   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18239   # It is also a way to make sure we got the proper file name for the real test later on.
18240   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18241   if test "x$test_shortpath" = x; then
18242     # Short path failed, file does not exist as specified.
18243     # Try adding .exe or .cmd
18244     if test -f "${new_path}.exe"; then
18245       input_to_shortpath="${new_path}.exe"
18246     elif test -f "${new_path}.cmd"; then
18247       input_to_shortpath="${new_path}.cmd"
18248     else
18249       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18250 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18251       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18252 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18253       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18254     fi
18255   else
18256     input_to_shortpath="$new_path"
18257   fi
18258 
18259   # Call helper function which possibly converts this using DOS-style short mode.
18260   # If so, the updated path is stored in $new_path.
18261   new_path="$input_to_shortpath"
18262 
18263   input_path="$input_to_shortpath"
18264   # Check if we need to convert this using DOS-style short mode. If the path
18265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18266   # take no chances and rewrite it.
18267   # Note: m4 eats our [], so we need to use [ and ] instead.
18268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18269   if test "x$has_forbidden_chars" != x; then
18270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18271     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18272     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18273     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18274       # Going to short mode and back again did indeed matter. Since short mode is
18275       # case insensitive, let's make it lowercase to improve readability.
18276       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18277       # Now convert it back to Unix-stile (cygpath)
18278       input_path=`$CYGPATH -u "$shortmode_path"`
18279       new_path="$input_path"
18280     fi
18281   fi
18282 
18283   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18284   if test "x$test_cygdrive_prefix" = x; then
18285     # As a simple fix, exclude /usr/bin since it's not a real path.
18286     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18287       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18288       # a path prefixed by /cygdrive for fixpath to work.
18289       new_path="$CYGWIN_ROOT_PATH$input_path"
18290     fi
18291   fi
18292 
18293   # remove trailing .exe if any
18294   new_path="${new_path/%.exe/}"
18295 
18296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18297 
18298   # First separate the path from the arguments. This will split at the first
18299   # space.
18300   complete="$BUILD_CC"
18301   path="${complete%% *}"
18302   tmp="$complete EOL"
18303   arguments="${tmp#* }"
18304 
18305   # Input might be given as Windows format, start by converting to
18306   # unix format.
18307   new_path="$path"
18308 
18309   windows_path="$new_path"
18310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18311     unix_path=`$CYGPATH -u "$windows_path"`
18312     new_path="$unix_path"
18313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18315     new_path="$unix_path"
18316   fi
18317 
18318 
18319   # Now try to locate executable using which
18320   new_path=`$WHICH "$new_path" 2> /dev/null`
18321 
18322   if test "x$new_path" = x; then
18323     # Oops. Which didn't find the executable.
18324     # The splitting of arguments from the executable at a space might have been incorrect,
18325     # since paths with space are more likely in Windows. Give it another try with the whole
18326     # argument.
18327     path="$complete"
18328     arguments="EOL"
18329     new_path="$path"
18330 
18331   windows_path="$new_path"
18332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18333     unix_path=`$CYGPATH -u "$windows_path"`
18334     new_path="$unix_path"
18335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18337     new_path="$unix_path"
18338   fi
18339 
18340 
18341     new_path=`$WHICH "$new_path" 2> /dev/null`
18342 
18343     if test "x$new_path" = x; then
18344       # It's still not found. Now this is an unrecoverable error.
18345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18346 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18347       has_space=`$ECHO "$complete" | $GREP " "`
18348       if test "x$has_space" != x; then
18349         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18350 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18351       fi
18352       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18353     fi
18354   fi
18355 
18356   # Now new_path has a complete unix path to the binary
18357   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18358     # Keep paths in /bin as-is, but remove trailing .exe if any
18359     new_path="${new_path/%.exe/}"
18360     # Do not save /bin paths to all_fixpath_prefixes!
18361   else
18362     # Not in mixed or Windows style, start by that.
18363     new_path=`cmd //c echo $new_path`
18364 
18365   input_path="$new_path"
18366   # Check if we need to convert this using DOS-style short mode. If the path
18367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18368   # take no chances and rewrite it.
18369   # Note: m4 eats our [], so we need to use [ and ] instead.
18370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18371   if test "x$has_forbidden_chars" != x; then
18372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18373     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18374   fi
18375 
18376     # Output is in $new_path
18377 
18378   windows_path="$new_path"
18379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380     unix_path=`$CYGPATH -u "$windows_path"`
18381     new_path="$unix_path"
18382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18384     new_path="$unix_path"
18385   fi
18386 
18387     # remove trailing .exe if any
18388     new_path="${new_path/%.exe/}"
18389 
18390     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18391     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18392   fi
18393 
18394   else
18395     # We're on a posix platform. Hooray! :)
18396     # First separate the path from the arguments. This will split at the first
18397     # space.
18398     complete="$BUILD_CC"
18399     path="${complete%% *}"
18400     tmp="$complete EOL"
18401     arguments="${tmp#* }"
18402 
18403     # Cannot rely on the command "which" here since it doesn't always work.
18404     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18405     if test -z "$is_absolute_path"; then
18406       # Path to executable is not absolute. Find it.
18407       IFS_save="$IFS"
18408       IFS=:
18409       for p in $PATH; do
18410         if test -f "$p/$path" && test -x "$p/$path"; then
18411           new_path="$p/$path"
18412           break
18413         fi
18414       done
18415       IFS="$IFS_save"
18416     else
18417       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18418 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18419       new_path="$path"
18420     fi
18421 
18422     if test "x$new_path" = x; then
18423       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18424 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18425       has_space=`$ECHO "$complete" | $GREP " "`
18426       if test "x$has_space" != x; then
18427         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18428 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18429       fi
18430       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18431     fi
18432   fi
18433 
18434   # Now join together the path and the arguments once again
18435   if test "x$arguments" != xEOL; then
18436     new_complete="$new_path ${arguments% *}"
18437   else
18438     new_complete="$new_path"
18439   fi
18440 
18441   if test "x$complete" != "x$new_complete"; then
18442     BUILD_CC="$new_complete"
18443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18444 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18445   fi
18446 
18447     for ac_prog in cl CC g++
18448 do
18449   # Extract the first word of "$ac_prog", so it can be a program name with args.
18450 set dummy $ac_prog; ac_word=$2
18451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18452 $as_echo_n "checking for $ac_word... " >&6; }
18453 if ${ac_cv_path_BUILD_CXX+:} false; then :
18454   $as_echo_n "(cached) " >&6
18455 else
18456   case $BUILD_CXX in
18457   [\\/]* | ?:[\\/]*)
18458   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18459   ;;
18460   *)
18461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18462 for as_dir in $PATH
18463 do
18464   IFS=$as_save_IFS
18465   test -z "$as_dir" && as_dir=.
18466     for ac_exec_ext in '' $ac_executable_extensions; do
18467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18468     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18470     break 2
18471   fi
18472 done
18473   done
18474 IFS=$as_save_IFS
18475 
18476   ;;
18477 esac
18478 fi
18479 BUILD_CXX=$ac_cv_path_BUILD_CXX
18480 if test -n "$BUILD_CXX"; then
18481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18482 $as_echo "$BUILD_CXX" >&6; }
18483 else
18484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18485 $as_echo "no" >&6; }
18486 fi
18487 
18488 
18489   test -n "$BUILD_CXX" && break
18490 done
18491 
18492 
18493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18494 
18495   # First separate the path from the arguments. This will split at the first
18496   # space.
18497   complete="$BUILD_CXX"
18498   path="${complete%% *}"
18499   tmp="$complete EOL"
18500   arguments="${tmp#* }"
18501 
18502   # Input might be given as Windows format, start by converting to
18503   # unix format.
18504   new_path=`$CYGPATH -u "$path"`
18505 
18506   # Now try to locate executable using which
18507   new_path=`$WHICH "$new_path" 2> /dev/null`
18508   # bat and cmd files are not always considered executable in cygwin causing which
18509   # to not find them
18510   if test "x$new_path" = x \
18511       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18512       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18513     new_path=`$CYGPATH -u "$path"`
18514   fi
18515   if test "x$new_path" = x; then
18516     # Oops. Which didn't find the executable.
18517     # The splitting of arguments from the executable at a space might have been incorrect,
18518     # since paths with space are more likely in Windows. Give it another try with the whole
18519     # argument.
18520     path="$complete"
18521     arguments="EOL"
18522     new_path=`$CYGPATH -u "$path"`
18523     new_path=`$WHICH "$new_path" 2> /dev/null`
18524     # bat and cmd files are not always considered executable in cygwin causing which
18525     # to not find them
18526     if test "x$new_path" = x \
18527         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18528         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18529       new_path=`$CYGPATH -u "$path"`
18530     fi
18531     if test "x$new_path" = x; then
18532       # It's still not found. Now this is an unrecoverable error.
18533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18534 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18535       has_space=`$ECHO "$complete" | $GREP " "`
18536       if test "x$has_space" != x; then
18537         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18538 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18539       fi
18540       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18541     fi
18542   fi
18543 
18544   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18545   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18546   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18547   # "foo.exe" is OK but "foo" is an error.
18548   #
18549   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18550   # It is also a way to make sure we got the proper file name for the real test later on.
18551   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18552   if test "x$test_shortpath" = x; then
18553     # Short path failed, file does not exist as specified.
18554     # Try adding .exe or .cmd
18555     if test -f "${new_path}.exe"; then
18556       input_to_shortpath="${new_path}.exe"
18557     elif test -f "${new_path}.cmd"; then
18558       input_to_shortpath="${new_path}.cmd"
18559     else
18560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18561 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18562       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18563 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18564       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18565     fi
18566   else
18567     input_to_shortpath="$new_path"
18568   fi
18569 
18570   # Call helper function which possibly converts this using DOS-style short mode.
18571   # If so, the updated path is stored in $new_path.
18572   new_path="$input_to_shortpath"
18573 
18574   input_path="$input_to_shortpath"
18575   # Check if we need to convert this using DOS-style short mode. If the path
18576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18577   # take no chances and rewrite it.
18578   # Note: m4 eats our [], so we need to use [ and ] instead.
18579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18580   if test "x$has_forbidden_chars" != x; then
18581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18585       # Going to short mode and back again did indeed matter. Since short mode is
18586       # case insensitive, let's make it lowercase to improve readability.
18587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18588       # Now convert it back to Unix-stile (cygpath)
18589       input_path=`$CYGPATH -u "$shortmode_path"`
18590       new_path="$input_path"
18591     fi
18592   fi
18593 
18594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18595   if test "x$test_cygdrive_prefix" = x; then
18596     # As a simple fix, exclude /usr/bin since it's not a real path.
18597     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18599       # a path prefixed by /cygdrive for fixpath to work.
18600       new_path="$CYGWIN_ROOT_PATH$input_path"
18601     fi
18602   fi
18603 
18604   # remove trailing .exe if any
18605   new_path="${new_path/%.exe/}"
18606 
18607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18608 
18609   # First separate the path from the arguments. This will split at the first
18610   # space.
18611   complete="$BUILD_CXX"
18612   path="${complete%% *}"
18613   tmp="$complete EOL"
18614   arguments="${tmp#* }"
18615 
18616   # Input might be given as Windows format, start by converting to
18617   # unix format.
18618   new_path="$path"
18619 
18620   windows_path="$new_path"
18621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18622     unix_path=`$CYGPATH -u "$windows_path"`
18623     new_path="$unix_path"
18624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18626     new_path="$unix_path"
18627   fi
18628 
18629 
18630   # Now try to locate executable using which
18631   new_path=`$WHICH "$new_path" 2> /dev/null`
18632 
18633   if test "x$new_path" = x; then
18634     # Oops. Which didn't find the executable.
18635     # The splitting of arguments from the executable at a space might have been incorrect,
18636     # since paths with space are more likely in Windows. Give it another try with the whole
18637     # argument.
18638     path="$complete"
18639     arguments="EOL"
18640     new_path="$path"
18641 
18642   windows_path="$new_path"
18643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18644     unix_path=`$CYGPATH -u "$windows_path"`
18645     new_path="$unix_path"
18646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18648     new_path="$unix_path"
18649   fi
18650 
18651 
18652     new_path=`$WHICH "$new_path" 2> /dev/null`
18653 
18654     if test "x$new_path" = x; then
18655       # It's still not found. Now this is an unrecoverable error.
18656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18657 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18658       has_space=`$ECHO "$complete" | $GREP " "`
18659       if test "x$has_space" != x; then
18660         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18661 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18662       fi
18663       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18664     fi
18665   fi
18666 
18667   # Now new_path has a complete unix path to the binary
18668   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18669     # Keep paths in /bin as-is, but remove trailing .exe if any
18670     new_path="${new_path/%.exe/}"
18671     # Do not save /bin paths to all_fixpath_prefixes!
18672   else
18673     # Not in mixed or Windows style, start by that.
18674     new_path=`cmd //c echo $new_path`
18675 
18676   input_path="$new_path"
18677   # Check if we need to convert this using DOS-style short mode. If the path
18678   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18679   # take no chances and rewrite it.
18680   # Note: m4 eats our [], so we need to use [ and ] instead.
18681   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18682   if test "x$has_forbidden_chars" != x; then
18683     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18684     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18685   fi
18686 
18687     # Output is in $new_path
18688 
18689   windows_path="$new_path"
18690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18691     unix_path=`$CYGPATH -u "$windows_path"`
18692     new_path="$unix_path"
18693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18695     new_path="$unix_path"
18696   fi
18697 
18698     # remove trailing .exe if any
18699     new_path="${new_path/%.exe/}"
18700 
18701     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18702     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18703   fi
18704 
18705   else
18706     # We're on a posix platform. Hooray! :)
18707     # First separate the path from the arguments. This will split at the first
18708     # space.
18709     complete="$BUILD_CXX"
18710     path="${complete%% *}"
18711     tmp="$complete EOL"
18712     arguments="${tmp#* }"
18713 
18714     # Cannot rely on the command "which" here since it doesn't always work.
18715     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18716     if test -z "$is_absolute_path"; then
18717       # Path to executable is not absolute. Find it.
18718       IFS_save="$IFS"
18719       IFS=:
18720       for p in $PATH; do
18721         if test -f "$p/$path" && test -x "$p/$path"; then
18722           new_path="$p/$path"
18723           break
18724         fi
18725       done
18726       IFS="$IFS_save"
18727     else
18728       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18729 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18730       new_path="$path"
18731     fi
18732 
18733     if test "x$new_path" = x; then
18734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18735 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18736       has_space=`$ECHO "$complete" | $GREP " "`
18737       if test "x$has_space" != x; then
18738         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18739 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18740       fi
18741       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18742     fi
18743   fi
18744 
18745   # Now join together the path and the arguments once again
18746   if test "x$arguments" != xEOL; then
18747     new_complete="$new_path ${arguments% *}"
18748   else
18749     new_complete="$new_path"
18750   fi
18751 
18752   if test "x$complete" != "x$new_complete"; then
18753     BUILD_CXX="$new_complete"
18754     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18755 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18756   fi
18757 
18758     # Extract the first word of "ld", so it can be a program name with args.
18759 set dummy ld; ac_word=$2
18760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18761 $as_echo_n "checking for $ac_word... " >&6; }
18762 if ${ac_cv_path_BUILD_LD+:} false; then :
18763   $as_echo_n "(cached) " >&6
18764 else
18765   case $BUILD_LD in
18766   [\\/]* | ?:[\\/]*)
18767   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18768   ;;
18769   *)
18770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18771 for as_dir in $PATH
18772 do
18773   IFS=$as_save_IFS
18774   test -z "$as_dir" && as_dir=.
18775     for ac_exec_ext in '' $ac_executable_extensions; do
18776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18777     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18779     break 2
18780   fi
18781 done
18782   done
18783 IFS=$as_save_IFS
18784 
18785   ;;
18786 esac
18787 fi
18788 BUILD_LD=$ac_cv_path_BUILD_LD
18789 if test -n "$BUILD_LD"; then
18790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18791 $as_echo "$BUILD_LD" >&6; }
18792 else
18793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18794 $as_echo "no" >&6; }
18795 fi
18796 
18797 
18798 
18799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18800 
18801   # First separate the path from the arguments. This will split at the first
18802   # space.
18803   complete="$BUILD_LD"
18804   path="${complete%% *}"
18805   tmp="$complete EOL"
18806   arguments="${tmp#* }"
18807 
18808   # Input might be given as Windows format, start by converting to
18809   # unix format.
18810   new_path=`$CYGPATH -u "$path"`
18811 
18812   # Now try to locate executable using which
18813   new_path=`$WHICH "$new_path" 2> /dev/null`
18814   # bat and cmd files are not always considered executable in cygwin causing which
18815   # to not find them
18816   if test "x$new_path" = x \
18817       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18818       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18819     new_path=`$CYGPATH -u "$path"`
18820   fi
18821   if test "x$new_path" = x; then
18822     # Oops. Which didn't find the executable.
18823     # The splitting of arguments from the executable at a space might have been incorrect,
18824     # since paths with space are more likely in Windows. Give it another try with the whole
18825     # argument.
18826     path="$complete"
18827     arguments="EOL"
18828     new_path=`$CYGPATH -u "$path"`
18829     new_path=`$WHICH "$new_path" 2> /dev/null`
18830     # bat and cmd files are not always considered executable in cygwin causing which
18831     # to not find them
18832     if test "x$new_path" = x \
18833         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18834         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18835       new_path=`$CYGPATH -u "$path"`
18836     fi
18837     if test "x$new_path" = x; then
18838       # It's still not found. Now this is an unrecoverable error.
18839       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18840 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18841       has_space=`$ECHO "$complete" | $GREP " "`
18842       if test "x$has_space" != x; then
18843         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18844 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18845       fi
18846       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18847     fi
18848   fi
18849 
18850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18853   # "foo.exe" is OK but "foo" is an error.
18854   #
18855   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18856   # It is also a way to make sure we got the proper file name for the real test later on.
18857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18858   if test "x$test_shortpath" = x; then
18859     # Short path failed, file does not exist as specified.
18860     # Try adding .exe or .cmd
18861     if test -f "${new_path}.exe"; then
18862       input_to_shortpath="${new_path}.exe"
18863     elif test -f "${new_path}.cmd"; then
18864       input_to_shortpath="${new_path}.cmd"
18865     else
18866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18867 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18868       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18869 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18870       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18871     fi
18872   else
18873     input_to_shortpath="$new_path"
18874   fi
18875 
18876   # Call helper function which possibly converts this using DOS-style short mode.
18877   # If so, the updated path is stored in $new_path.
18878   new_path="$input_to_shortpath"
18879 
18880   input_path="$input_to_shortpath"
18881   # Check if we need to convert this using DOS-style short mode. If the path
18882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18883   # take no chances and rewrite it.
18884   # Note: m4 eats our [], so we need to use [ and ] instead.
18885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18886   if test "x$has_forbidden_chars" != x; then
18887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18888     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18889     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18890     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18891       # Going to short mode and back again did indeed matter. Since short mode is
18892       # case insensitive, let's make it lowercase to improve readability.
18893       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18894       # Now convert it back to Unix-stile (cygpath)
18895       input_path=`$CYGPATH -u "$shortmode_path"`
18896       new_path="$input_path"
18897     fi
18898   fi
18899 
18900   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18901   if test "x$test_cygdrive_prefix" = x; then
18902     # As a simple fix, exclude /usr/bin since it's not a real path.
18903     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18904       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18905       # a path prefixed by /cygdrive for fixpath to work.
18906       new_path="$CYGWIN_ROOT_PATH$input_path"
18907     fi
18908   fi
18909 
18910   # remove trailing .exe if any
18911   new_path="${new_path/%.exe/}"
18912 
18913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18914 
18915   # First separate the path from the arguments. This will split at the first
18916   # space.
18917   complete="$BUILD_LD"
18918   path="${complete%% *}"
18919   tmp="$complete EOL"
18920   arguments="${tmp#* }"
18921 
18922   # Input might be given as Windows format, start by converting to
18923   # unix format.
18924   new_path="$path"
18925 
18926   windows_path="$new_path"
18927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18928     unix_path=`$CYGPATH -u "$windows_path"`
18929     new_path="$unix_path"
18930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18932     new_path="$unix_path"
18933   fi
18934 
18935 
18936   # Now try to locate executable using which
18937   new_path=`$WHICH "$new_path" 2> /dev/null`
18938 
18939   if test "x$new_path" = x; then
18940     # Oops. Which didn't find the executable.
18941     # The splitting of arguments from the executable at a space might have been incorrect,
18942     # since paths with space are more likely in Windows. Give it another try with the whole
18943     # argument.
18944     path="$complete"
18945     arguments="EOL"
18946     new_path="$path"
18947 
18948   windows_path="$new_path"
18949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18950     unix_path=`$CYGPATH -u "$windows_path"`
18951     new_path="$unix_path"
18952   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18953     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18954     new_path="$unix_path"
18955   fi
18956 
18957 
18958     new_path=`$WHICH "$new_path" 2> /dev/null`
18959 
18960     if test "x$new_path" = x; then
18961       # It's still not found. Now this is an unrecoverable error.
18962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18963 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18964       has_space=`$ECHO "$complete" | $GREP " "`
18965       if test "x$has_space" != x; then
18966         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18967 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18968       fi
18969       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18970     fi
18971   fi
18972 
18973   # Now new_path has a complete unix path to the binary
18974   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18975     # Keep paths in /bin as-is, but remove trailing .exe if any
18976     new_path="${new_path/%.exe/}"
18977     # Do not save /bin paths to all_fixpath_prefixes!
18978   else
18979     # Not in mixed or Windows style, start by that.
18980     new_path=`cmd //c echo $new_path`
18981 
18982   input_path="$new_path"
18983   # Check if we need to convert this using DOS-style short mode. If the path
18984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18985   # take no chances and rewrite it.
18986   # Note: m4 eats our [], so we need to use [ and ] instead.
18987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18988   if test "x$has_forbidden_chars" != x; then
18989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18991   fi
18992 
18993     # Output is in $new_path
18994 
18995   windows_path="$new_path"
18996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18997     unix_path=`$CYGPATH -u "$windows_path"`
18998     new_path="$unix_path"
18999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19001     new_path="$unix_path"
19002   fi
19003 
19004     # remove trailing .exe if any
19005     new_path="${new_path/%.exe/}"
19006 
19007     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19008     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19009   fi
19010 
19011   else
19012     # We're on a posix platform. Hooray! :)
19013     # First separate the path from the arguments. This will split at the first
19014     # space.
19015     complete="$BUILD_LD"
19016     path="${complete%% *}"
19017     tmp="$complete EOL"
19018     arguments="${tmp#* }"
19019 
19020     # Cannot rely on the command "which" here since it doesn't always work.
19021     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19022     if test -z "$is_absolute_path"; then
19023       # Path to executable is not absolute. Find it.
19024       IFS_save="$IFS"
19025       IFS=:
19026       for p in $PATH; do
19027         if test -f "$p/$path" && test -x "$p/$path"; then
19028           new_path="$p/$path"
19029           break
19030         fi
19031       done
19032       IFS="$IFS_save"
19033     else
19034       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19035 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19036       new_path="$path"
19037     fi
19038 
19039     if test "x$new_path" = x; then
19040       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19041 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19042       has_space=`$ECHO "$complete" | $GREP " "`
19043       if test "x$has_space" != x; then
19044         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19045 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19046       fi
19047       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19048     fi
19049   fi
19050 
19051   # Now join together the path and the arguments once again
19052   if test "x$arguments" != xEOL; then
19053     new_complete="$new_path ${arguments% *}"
19054   else
19055     new_complete="$new_path"
19056   fi
19057 
19058   if test "x$complete" != "x$new_complete"; then
19059     BUILD_LD="$new_complete"
19060     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19061 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19062   fi
19063 
19064   fi
19065 
19066 
19067 
19068 
19069   # If a devkit is found on the builddeps server, then prepend its path to the
19070   # PATH variable. If there are cross compilers available in the devkit, these
19071   # will be found by AC_PROG_CC et al.
19072   DEVKIT=
19073 
19074 
19075   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19076     # Source the builddeps file again, to make sure it uses the latest variables!
19077     . $builddepsfile
19078     # Look for a target and build machine specific resource!
19079     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19080     if test "x$resource" = x; then
19081       # Ok, lets instead look for a target specific resource
19082       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19083     fi
19084     if test "x$resource" = x; then
19085       # Ok, lets instead look for a build specific resource
19086       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19087     fi
19088     if test "x$resource" = x; then
19089       # Ok, lets instead look for a generic resource
19090       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19091       resource=${builddep_devkit}
19092     fi
19093     if test "x$resource" != x; then
19094       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19095 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19096       # If the resource in the builddeps.conf file is an existing directory,
19097       # for example /java/linux/cups
19098       if test -d ${resource}; then
19099         depdir=${resource}
19100       else
19101 
19102   # devkit is for example mymodule
19103   # $resource is for example libs/general/libmymod_1_2_3.zip
19104   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19105   # $with_builddeps_dir is for example /localhome/builddeps
19106   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19107   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19108   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19109   filename=`basename $resource`
19110   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19111   filebase=${filename%%.*}
19112   extension=${filename#*.}
19113   installdir=$with_builddeps_dir/$filebase
19114   if test ! -f $installdir/$filename.unpacked; then
19115     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19116 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19117     if test ! -d $installdir; then
19118       mkdir -p $installdir
19119     fi
19120     if test ! -d $installdir; then
19121       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19122     fi
19123     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19124     touch $tmpfile
19125     if test ! -f $tmpfile; then
19126       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19127     fi
19128 
19129   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19130   # $tmpfile is the local file name for the downloaded file.
19131   VALID_TOOL=no
19132   if test "x$BDEPS_FTP" = xwget; then
19133     VALID_TOOL=yes
19134     wget -O $tmpfile $with_builddeps_server/$resource
19135   fi
19136   if test "x$BDEPS_FTP" = xlftp; then
19137     VALID_TOOL=yes
19138     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19139   fi
19140   if test "x$BDEPS_FTP" = xftp; then
19141     VALID_TOOL=yes
19142     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19143     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19144     FTPUSERPWD=${FTPSERVER%%@*}
19145     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19146       FTPUSER=${userpwd%%:*}
19147       FTPPWD=${userpwd#*@}
19148       FTPSERVER=${FTPSERVER#*@}
19149     else
19150       FTPUSER=ftp
19151       FTPPWD=ftp
19152     fi
19153     # the "pass" command does not work on some
19154     # ftp clients (read ftp.exe) but if it works,
19155     # passive mode is better!
19156     ( \
19157         echo "user $FTPUSER $FTPPWD"        ; \
19158         echo "pass"                         ; \
19159         echo "bin"                          ; \
19160         echo "get $FTPPATH $tmpfile"              ; \
19161     ) | ftp -in $FTPSERVER
19162   fi
19163   if test "x$VALID_TOOL" != xyes; then
19164     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19165   fi
19166 
19167     mv $tmpfile $installdir/$filename
19168     if test ! -s $installdir/$filename; then
19169       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19170     fi
19171     case "$extension" in
19172       zip)  echo "Unzipping $installdir/$filename..."
19173         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19174         ;;
19175       tar.gz) echo "Untaring $installdir/$filename..."
19176         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19177         ;;
19178       tgz) echo "Untaring $installdir/$filename..."
19179         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19180         ;;
19181       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19182         ;;
19183     esac
19184   fi
19185   if test -f $installdir/$filename.unpacked; then
19186     depdir=$installdir
19187   fi
19188 
19189       fi
19190       # Source the builddeps file again, because in the previous command, the depdir
19191       # was updated to point at the current build dependency install directory.
19192       . $builddepsfile
19193       # Now extract variables from the builddeps.conf files.
19194       theroot=${builddep_devkit_ROOT}
19195       thecflags=${builddep_devkit_CFLAGS}
19196       thelibs=${builddep_devkit_LIBS}
19197       if test "x$depdir" = x; then
19198         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19199       fi
19200       DEVKIT=$depdir
19201       if test "x$theroot" != x; then
19202         DEVKIT="$theroot"
19203       fi
19204       if test "x$thecflags" != x; then
19205         DEVKIT_CFLAGS="$thecflags"
19206       fi
19207       if test "x$thelibs" != x; then
19208         DEVKIT_LIBS="$thelibs"
19209       fi
19210 
19211         # Found devkit
19212         PATH="$DEVKIT/bin:$PATH"
19213         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19214         if test "x$x_includes" = "xNONE"; then
19215           x_includes="$SYS_ROOT/usr/include/X11"
19216         fi
19217         if test "x$x_libraries" = "xNONE"; then
19218           x_libraries="$SYS_ROOT/usr/lib"
19219         fi
19220 
19221 
19222     fi
19223 
19224   fi
19225 
19226 
19227   # Store the CFLAGS etal passed to the configure script.
19228   ORG_CFLAGS="$CFLAGS"
19229   ORG_CXXFLAGS="$CXXFLAGS"
19230   ORG_OBJCFLAGS="$OBJCFLAGS"
19231 
19232   # autoconf magic only relies on PATH, so update it if tools dir is specified
19233   OLD_PATH="$PATH"
19234   if test "x$TOOLS_DIR" != x; then
19235     PATH=$TOOLS_DIR:$PATH
19236   fi
19237 
19238   # Before we locate the compilers, we need to sanitize the Xcode build environment
19239   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19240     # determine path to Xcode developer directory
19241     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
19242     SET_DEVELOPER_DIR=
19243 
19244     if test -n "$XCODE_PATH"; then
19245       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
19246     fi
19247 
19248     # DEVELOPER_DIR could also be provided directly
19249     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
19250 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
19251     if test -n "$DEVELOPER_DIR"; then
19252       if test ! -d "$DEVELOPER_DIR"; then
19253         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
19254       fi
19255       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
19256         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
19257       fi
19258       # make it visible to all the tools immediately
19259       export DEVELOPER_DIR
19260       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
19261       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
19262 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
19263     else
19264       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19265 $as_echo "no" >&6; }
19266     fi
19267 
19268 
19269     # Extract the first word of "xcodebuild", so it can be a program name with args.
19270 set dummy xcodebuild; ac_word=$2
19271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19272 $as_echo_n "checking for $ac_word... " >&6; }
19273 if ${ac_cv_path_XCODEBUILD+:} false; then :
19274   $as_echo_n "(cached) " >&6
19275 else
19276   case $XCODEBUILD in
19277   [\\/]* | ?:[\\/]*)
19278   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
19279   ;;
19280   *)
19281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19282 for as_dir in $PATH
19283 do
19284   IFS=$as_save_IFS
19285   test -z "$as_dir" && as_dir=.
19286     for ac_exec_ext in '' $ac_executable_extensions; do
19287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19288     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
19289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19290     break 2
19291   fi
19292 done
19293   done
19294 IFS=$as_save_IFS
19295 
19296   ;;
19297 esac
19298 fi
19299 XCODEBUILD=$ac_cv_path_XCODEBUILD
19300 if test -n "$XCODEBUILD"; then
19301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
19302 $as_echo "$XCODEBUILD" >&6; }
19303 else
19304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19305 $as_echo "no" >&6; }
19306 fi
19307 
19308 
19309     if test -z "$XCODEBUILD"; then
19310       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
19311     fi
19312 
19313     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
19314     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
19315     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
19316     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
19317       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
19318     fi
19319 
19320     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
19321     # clang and clang++, which will break the build. So handle that here if we need to.
19322     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
19323       # use xcrun to find the real gcc and add it's directory to PATH
19324       # then autoconf magic will find it
19325       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
19326 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
19327       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
19328       PATH="$XCODE_BIN_PATH":$PATH
19329     fi
19330 
19331     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
19332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
19333 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
19334     # allow SDKNAME to be set to override the default SDK selection
19335     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
19336     if test -n "$SDKPATH"; then
19337       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
19338 $as_echo "$SDKPATH" >&6; }
19339     else
19340       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
19341 $as_echo "(none, will use system headers and frameworks)" >&6; }
19342     fi
19343 
19344 
19345     # Perform a basic sanity test
19346     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
19347       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
19348     fi
19349 
19350     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
19351     if test -n "$SDKPATH"; then
19352       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
19353       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19354       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19355       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19356     fi
19357 
19358     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
19359     # setting this here means it doesn't have to be peppered throughout the forest
19360     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19361     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19362     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19363   fi
19364 
19365   ### Locate C compiler (CC)
19366 
19367   # On windows, only cl.exe is supported.
19368   # On Solaris, cc is preferred to gcc.
19369   # Elsewhere, gcc is preferred to cc.
19370 
19371   if test "x$CC" != x; then
19372     COMPILER_CHECK_LIST="$CC"
19373   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19374     COMPILER_CHECK_LIST="cl"
19375   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19376     COMPILER_CHECK_LIST="cc gcc"
19377   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19378     # Do not probe for cc on AIX.
19379     COMPILER_CHECK_LIST="xlc_r"
19380   else
19381     COMPILER_CHECK_LIST="gcc cc"
19382   fi
19383 
19384 
19385   COMPILER_NAME=C
19386 
19387   CC=
19388   # If TOOLS_DIR is set, check for all compiler names in there first
19389   # before checking the rest of the PATH.
19390   if test -n "$TOOLS_DIR"; then
19391     PATH_save="$PATH"
19392     PATH="$TOOLS_DIR"
19393     for ac_prog in $COMPILER_CHECK_LIST
19394 do
19395   # Extract the first word of "$ac_prog", so it can be a program name with args.
19396 set dummy $ac_prog; ac_word=$2
19397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19398 $as_echo_n "checking for $ac_word... " >&6; }
19399 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19400   $as_echo_n "(cached) " >&6
19401 else
19402   case $TOOLS_DIR_CC in
19403   [\\/]* | ?:[\\/]*)
19404   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19405   ;;
19406   *)
19407   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19408 for as_dir in $PATH
19409 do
19410   IFS=$as_save_IFS
19411   test -z "$as_dir" && as_dir=.
19412     for ac_exec_ext in '' $ac_executable_extensions; do
19413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19414     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19416     break 2
19417   fi
19418 done
19419   done
19420 IFS=$as_save_IFS
19421 
19422   ;;
19423 esac
19424 fi
19425 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19426 if test -n "$TOOLS_DIR_CC"; then
19427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19428 $as_echo "$TOOLS_DIR_CC" >&6; }
19429 else
19430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19431 $as_echo "no" >&6; }
19432 fi
19433 
19434 
19435   test -n "$TOOLS_DIR_CC" && break
19436 done
19437 
19438     CC=$TOOLS_DIR_CC
19439     PATH="$PATH_save"
19440   fi
19441 
19442   # AC_PATH_PROGS can't be run multiple times with the same variable,
19443   # so create a new name for this run.
19444   if test "x$CC" = x; then
19445     for ac_prog in $COMPILER_CHECK_LIST
19446 do
19447   # Extract the first word of "$ac_prog", so it can be a program name with args.
19448 set dummy $ac_prog; ac_word=$2
19449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19450 $as_echo_n "checking for $ac_word... " >&6; }
19451 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19452   $as_echo_n "(cached) " >&6
19453 else
19454   case $POTENTIAL_CC in
19455   [\\/]* | ?:[\\/]*)
19456   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19457   ;;
19458   *)
19459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19460 for as_dir in $PATH
19461 do
19462   IFS=$as_save_IFS
19463   test -z "$as_dir" && as_dir=.
19464     for ac_exec_ext in '' $ac_executable_extensions; do
19465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19466     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19468     break 2
19469   fi
19470 done
19471   done
19472 IFS=$as_save_IFS
19473 
19474   ;;
19475 esac
19476 fi
19477 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19478 if test -n "$POTENTIAL_CC"; then
19479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19480 $as_echo "$POTENTIAL_CC" >&6; }
19481 else
19482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19483 $as_echo "no" >&6; }
19484 fi
19485 
19486 
19487   test -n "$POTENTIAL_CC" && break
19488 done
19489 
19490     CC=$POTENTIAL_CC
19491   fi
19492 
19493   if test "x$CC" = x; then
19494 
19495   # Print a helpful message on how to acquire the necessary build dependency.
19496   # devkit is the help tag: freetype, cups, pulse, alsa etc
19497   MISSING_DEPENDENCY=devkit
19498 
19499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19500     cygwin_help $MISSING_DEPENDENCY
19501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19502     msys_help $MISSING_DEPENDENCY
19503   else
19504     PKGHANDLER_COMMAND=
19505 
19506     case $PKGHANDLER in
19507       apt-get)
19508         apt_help     $MISSING_DEPENDENCY ;;
19509       yum)
19510         yum_help     $MISSING_DEPENDENCY ;;
19511       port)
19512         port_help    $MISSING_DEPENDENCY ;;
19513       pkgutil)
19514         pkgutil_help $MISSING_DEPENDENCY ;;
19515       pkgadd)
19516         pkgadd_help  $MISSING_DEPENDENCY ;;
19517     esac
19518 
19519     if test "x$PKGHANDLER_COMMAND" != x; then
19520       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19521     fi
19522   fi
19523 
19524     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19525   fi
19526 
19527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19528 
19529   # First separate the path from the arguments. This will split at the first
19530   # space.
19531   complete="$CC"
19532   path="${complete%% *}"
19533   tmp="$complete EOL"
19534   arguments="${tmp#* }"
19535 
19536   # Input might be given as Windows format, start by converting to
19537   # unix format.
19538   new_path=`$CYGPATH -u "$path"`
19539 
19540   # Now try to locate executable using which
19541   new_path=`$WHICH "$new_path" 2> /dev/null`
19542   # bat and cmd files are not always considered executable in cygwin causing which
19543   # to not find them
19544   if test "x$new_path" = x \
19545       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19546       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19547     new_path=`$CYGPATH -u "$path"`
19548   fi
19549   if test "x$new_path" = x; then
19550     # Oops. Which didn't find the executable.
19551     # The splitting of arguments from the executable at a space might have been incorrect,
19552     # since paths with space are more likely in Windows. Give it another try with the whole
19553     # argument.
19554     path="$complete"
19555     arguments="EOL"
19556     new_path=`$CYGPATH -u "$path"`
19557     new_path=`$WHICH "$new_path" 2> /dev/null`
19558     # bat and cmd files are not always considered executable in cygwin causing which
19559     # to not find them
19560     if test "x$new_path" = x \
19561         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19562         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19563       new_path=`$CYGPATH -u "$path"`
19564     fi
19565     if test "x$new_path" = x; then
19566       # It's still not found. Now this is an unrecoverable error.
19567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19568 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19569       has_space=`$ECHO "$complete" | $GREP " "`
19570       if test "x$has_space" != x; then
19571         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19572 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19573       fi
19574       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19575     fi
19576   fi
19577 
19578   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19579   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19580   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19581   # "foo.exe" is OK but "foo" is an error.
19582   #
19583   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19584   # It is also a way to make sure we got the proper file name for the real test later on.
19585   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19586   if test "x$test_shortpath" = x; then
19587     # Short path failed, file does not exist as specified.
19588     # Try adding .exe or .cmd
19589     if test -f "${new_path}.exe"; then
19590       input_to_shortpath="${new_path}.exe"
19591     elif test -f "${new_path}.cmd"; then
19592       input_to_shortpath="${new_path}.cmd"
19593     else
19594       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19595 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19596       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19597 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19598       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19599     fi
19600   else
19601     input_to_shortpath="$new_path"
19602   fi
19603 
19604   # Call helper function which possibly converts this using DOS-style short mode.
19605   # If so, the updated path is stored in $new_path.
19606   new_path="$input_to_shortpath"
19607 
19608   input_path="$input_to_shortpath"
19609   # Check if we need to convert this using DOS-style short mode. If the path
19610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19611   # take no chances and rewrite it.
19612   # Note: m4 eats our [], so we need to use [ and ] instead.
19613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19614   if test "x$has_forbidden_chars" != x; then
19615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19616     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19617     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19618     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19619       # Going to short mode and back again did indeed matter. Since short mode is
19620       # case insensitive, let's make it lowercase to improve readability.
19621       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19622       # Now convert it back to Unix-stile (cygpath)
19623       input_path=`$CYGPATH -u "$shortmode_path"`
19624       new_path="$input_path"
19625     fi
19626   fi
19627 
19628   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19629   if test "x$test_cygdrive_prefix" = x; then
19630     # As a simple fix, exclude /usr/bin since it's not a real path.
19631     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19632       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19633       # a path prefixed by /cygdrive for fixpath to work.
19634       new_path="$CYGWIN_ROOT_PATH$input_path"
19635     fi
19636   fi
19637 
19638   # remove trailing .exe if any
19639   new_path="${new_path/%.exe/}"
19640 
19641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19642 
19643   # First separate the path from the arguments. This will split at the first
19644   # space.
19645   complete="$CC"
19646   path="${complete%% *}"
19647   tmp="$complete EOL"
19648   arguments="${tmp#* }"
19649 
19650   # Input might be given as Windows format, start by converting to
19651   # unix format.
19652   new_path="$path"
19653 
19654   windows_path="$new_path"
19655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19656     unix_path=`$CYGPATH -u "$windows_path"`
19657     new_path="$unix_path"
19658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19660     new_path="$unix_path"
19661   fi
19662 
19663 
19664   # Now try to locate executable using which
19665   new_path=`$WHICH "$new_path" 2> /dev/null`
19666 
19667   if test "x$new_path" = x; then
19668     # Oops. Which didn't find the executable.
19669     # The splitting of arguments from the executable at a space might have been incorrect,
19670     # since paths with space are more likely in Windows. Give it another try with the whole
19671     # argument.
19672     path="$complete"
19673     arguments="EOL"
19674     new_path="$path"
19675 
19676   windows_path="$new_path"
19677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19678     unix_path=`$CYGPATH -u "$windows_path"`
19679     new_path="$unix_path"
19680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19682     new_path="$unix_path"
19683   fi
19684 
19685 
19686     new_path=`$WHICH "$new_path" 2> /dev/null`
19687 
19688     if test "x$new_path" = x; then
19689       # It's still not found. Now this is an unrecoverable error.
19690       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19691 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19692       has_space=`$ECHO "$complete" | $GREP " "`
19693       if test "x$has_space" != x; then
19694         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19695 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19696       fi
19697       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19698     fi
19699   fi
19700 
19701   # Now new_path has a complete unix path to the binary
19702   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19703     # Keep paths in /bin as-is, but remove trailing .exe if any
19704     new_path="${new_path/%.exe/}"
19705     # Do not save /bin paths to all_fixpath_prefixes!
19706   else
19707     # Not in mixed or Windows style, start by that.
19708     new_path=`cmd //c echo $new_path`
19709 
19710   input_path="$new_path"
19711   # Check if we need to convert this using DOS-style short mode. If the path
19712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19713   # take no chances and rewrite it.
19714   # Note: m4 eats our [], so we need to use [ and ] instead.
19715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19716   if test "x$has_forbidden_chars" != x; then
19717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19718     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19719   fi
19720 
19721     # Output is in $new_path
19722 
19723   windows_path="$new_path"
19724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19725     unix_path=`$CYGPATH -u "$windows_path"`
19726     new_path="$unix_path"
19727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19729     new_path="$unix_path"
19730   fi
19731 
19732     # remove trailing .exe if any
19733     new_path="${new_path/%.exe/}"
19734 
19735     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19736     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19737   fi
19738 
19739   else
19740     # We're on a posix platform. Hooray! :)
19741     # First separate the path from the arguments. This will split at the first
19742     # space.
19743     complete="$CC"
19744     path="${complete%% *}"
19745     tmp="$complete EOL"
19746     arguments="${tmp#* }"
19747 
19748     # Cannot rely on the command "which" here since it doesn't always work.
19749     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19750     if test -z "$is_absolute_path"; then
19751       # Path to executable is not absolute. Find it.
19752       IFS_save="$IFS"
19753       IFS=:
19754       for p in $PATH; do
19755         if test -f "$p/$path" && test -x "$p/$path"; then
19756           new_path="$p/$path"
19757           break
19758         fi
19759       done
19760       IFS="$IFS_save"
19761     else
19762       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19763 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19764       new_path="$path"
19765     fi
19766 
19767     if test "x$new_path" = x; then
19768       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19769 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19770       has_space=`$ECHO "$complete" | $GREP " "`
19771       if test "x$has_space" != x; then
19772         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19773 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19774       fi
19775       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19776     fi
19777   fi
19778 
19779   # Now join together the path and the arguments once again
19780   if test "x$arguments" != xEOL; then
19781     new_complete="$new_path ${arguments% *}"
19782   else
19783     new_complete="$new_path"
19784   fi
19785 
19786   if test "x$complete" != "x$new_complete"; then
19787     CC="$new_complete"
19788     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19789 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19790   fi
19791 
19792   TEST_COMPILER="$CC"
19793   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19794   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19795   if test "x$OPENJDK_BUILD_OS" != xaix; then
19796     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19797 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19798 
19799   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19800     # Follow a chain of symbolic links. Use readlink
19801     # where it exists, else fall back to horribly
19802     # complicated shell code.
19803     if test "x$READLINK_TESTED" != yes; then
19804       # On MacOSX there is a readlink tool with a different
19805       # purpose than the GNU readlink tool. Check the found readlink.
19806       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19807       if test "x$ISGNU" = x; then
19808         # A readlink that we do not know how to use.
19809         # Are there other non-GNU readlinks out there?
19810         READLINK_TESTED=yes
19811         READLINK=
19812       fi
19813     fi
19814 
19815     if test "x$READLINK" != x; then
19816       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19817     else
19818       # Save the current directory for restoring afterwards
19819       STARTDIR=$PWD
19820       COUNTER=0
19821       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19822       sym_link_file=`$BASENAME $TEST_COMPILER`
19823       cd $sym_link_dir
19824       # Use -P flag to resolve symlinks in directories.
19825       cd `$THEPWDCMD -P`
19826       sym_link_dir=`$THEPWDCMD -P`
19827       # Resolve file symlinks
19828       while test $COUNTER -lt 20; do
19829         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19830         if test "x$ISLINK" == x; then
19831           # This is not a symbolic link! We are done!
19832           break
19833         fi
19834         # Again resolve directory symlinks since the target of the just found
19835         # link could be in a different directory
19836         cd `$DIRNAME $ISLINK`
19837         sym_link_dir=`$THEPWDCMD -P`
19838         sym_link_file=`$BASENAME $ISLINK`
19839         let COUNTER=COUNTER+1
19840       done
19841       cd $STARTDIR
19842       TEST_COMPILER=$sym_link_dir/$sym_link_file
19843     fi
19844   fi
19845 
19846     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19847 $as_echo "$TEST_COMPILER" >&6; }
19848   fi
19849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19850 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19851 
19852   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19853   if test "x$COMPILER_BASENAME" = "xccache"; then
19854     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19855 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19856     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19857     # We want to control ccache invocation ourselves, so ignore this cc and try
19858     # searching again.
19859 
19860     # Remove the path to the fake ccache cc from the PATH
19861     RETRY_COMPILER_SAVED_PATH="$PATH"
19862     COMPILER_DIRNAME=`$DIRNAME $CC`
19863     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19864 
19865     # Try again looking for our compiler
19866     if test -n "$ac_tool_prefix"; then
19867   for ac_prog in $COMPILER_CHECK_LIST
19868   do
19869     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19870 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19872 $as_echo_n "checking for $ac_word... " >&6; }
19873 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19874   $as_echo_n "(cached) " >&6
19875 else
19876   if test -n "$PROPER_COMPILER_CC"; then
19877   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19878 else
19879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19880 for as_dir in $PATH
19881 do
19882   IFS=$as_save_IFS
19883   test -z "$as_dir" && as_dir=.
19884     for ac_exec_ext in '' $ac_executable_extensions; do
19885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19886     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19888     break 2
19889   fi
19890 done
19891   done
19892 IFS=$as_save_IFS
19893 
19894 fi
19895 fi
19896 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19897 if test -n "$PROPER_COMPILER_CC"; then
19898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19899 $as_echo "$PROPER_COMPILER_CC" >&6; }
19900 else
19901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19902 $as_echo "no" >&6; }
19903 fi
19904 
19905 
19906     test -n "$PROPER_COMPILER_CC" && break
19907   done
19908 fi
19909 if test -z "$PROPER_COMPILER_CC"; then
19910   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19911   for ac_prog in $COMPILER_CHECK_LIST
19912 do
19913   # Extract the first word of "$ac_prog", so it can be a program name with args.
19914 set dummy $ac_prog; ac_word=$2
19915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19916 $as_echo_n "checking for $ac_word... " >&6; }
19917 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19918   $as_echo_n "(cached) " >&6
19919 else
19920   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19921   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19922 else
19923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19924 for as_dir in $PATH
19925 do
19926   IFS=$as_save_IFS
19927   test -z "$as_dir" && as_dir=.
19928     for ac_exec_ext in '' $ac_executable_extensions; do
19929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19930     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19932     break 2
19933   fi
19934 done
19935   done
19936 IFS=$as_save_IFS
19937 
19938 fi
19939 fi
19940 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19941 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19943 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19944 else
19945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19946 $as_echo "no" >&6; }
19947 fi
19948 
19949 
19950   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19951 done
19952 
19953   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19954     PROPER_COMPILER_CC=""
19955   else
19956     case $cross_compiling:$ac_tool_warned in
19957 yes:)
19958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19959 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19960 ac_tool_warned=yes ;;
19961 esac
19962     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19963   fi
19964 fi
19965 
19966 
19967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19968 
19969   # First separate the path from the arguments. This will split at the first
19970   # space.
19971   complete="$PROPER_COMPILER_CC"
19972   path="${complete%% *}"
19973   tmp="$complete EOL"
19974   arguments="${tmp#* }"
19975 
19976   # Input might be given as Windows format, start by converting to
19977   # unix format.
19978   new_path=`$CYGPATH -u "$path"`
19979 
19980   # Now try to locate executable using which
19981   new_path=`$WHICH "$new_path" 2> /dev/null`
19982   # bat and cmd files are not always considered executable in cygwin causing which
19983   # to not find them
19984   if test "x$new_path" = x \
19985       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19986       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19987     new_path=`$CYGPATH -u "$path"`
19988   fi
19989   if test "x$new_path" = x; then
19990     # Oops. Which didn't find the executable.
19991     # The splitting of arguments from the executable at a space might have been incorrect,
19992     # since paths with space are more likely in Windows. Give it another try with the whole
19993     # argument.
19994     path="$complete"
19995     arguments="EOL"
19996     new_path=`$CYGPATH -u "$path"`
19997     new_path=`$WHICH "$new_path" 2> /dev/null`
19998     # bat and cmd files are not always considered executable in cygwin causing which
19999     # to not find them
20000     if test "x$new_path" = x \
20001         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20002         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20003       new_path=`$CYGPATH -u "$path"`
20004     fi
20005     if test "x$new_path" = x; then
20006       # It's still not found. Now this is an unrecoverable error.
20007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20008 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20009       has_space=`$ECHO "$complete" | $GREP " "`
20010       if test "x$has_space" != x; then
20011         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20012 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20013       fi
20014       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20015     fi
20016   fi
20017 
20018   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20019   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20020   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20021   # "foo.exe" is OK but "foo" is an error.
20022   #
20023   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20024   # It is also a way to make sure we got the proper file name for the real test later on.
20025   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20026   if test "x$test_shortpath" = x; then
20027     # Short path failed, file does not exist as specified.
20028     # Try adding .exe or .cmd
20029     if test -f "${new_path}.exe"; then
20030       input_to_shortpath="${new_path}.exe"
20031     elif test -f "${new_path}.cmd"; then
20032       input_to_shortpath="${new_path}.cmd"
20033     else
20034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
20035 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
20036       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20037 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20038       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20039     fi
20040   else
20041     input_to_shortpath="$new_path"
20042   fi
20043 
20044   # Call helper function which possibly converts this using DOS-style short mode.
20045   # If so, the updated path is stored in $new_path.
20046   new_path="$input_to_shortpath"
20047 
20048   input_path="$input_to_shortpath"
20049   # Check if we need to convert this using DOS-style short mode. If the path
20050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20051   # take no chances and rewrite it.
20052   # Note: m4 eats our [], so we need to use [ and ] instead.
20053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20054   if test "x$has_forbidden_chars" != x; then
20055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20056     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20057     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20058     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20059       # Going to short mode and back again did indeed matter. Since short mode is
20060       # case insensitive, let's make it lowercase to improve readability.
20061       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20062       # Now convert it back to Unix-stile (cygpath)
20063       input_path=`$CYGPATH -u "$shortmode_path"`
20064       new_path="$input_path"
20065     fi
20066   fi
20067 
20068   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20069   if test "x$test_cygdrive_prefix" = x; then
20070     # As a simple fix, exclude /usr/bin since it's not a real path.
20071     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20072       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20073       # a path prefixed by /cygdrive for fixpath to work.
20074       new_path="$CYGWIN_ROOT_PATH$input_path"
20075     fi
20076   fi
20077 
20078   # remove trailing .exe if any
20079   new_path="${new_path/%.exe/}"
20080 
20081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20082 
20083   # First separate the path from the arguments. This will split at the first
20084   # space.
20085   complete="$PROPER_COMPILER_CC"
20086   path="${complete%% *}"
20087   tmp="$complete EOL"
20088   arguments="${tmp#* }"
20089 
20090   # Input might be given as Windows format, start by converting to
20091   # unix format.
20092   new_path="$path"
20093 
20094   windows_path="$new_path"
20095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20096     unix_path=`$CYGPATH -u "$windows_path"`
20097     new_path="$unix_path"
20098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20100     new_path="$unix_path"
20101   fi
20102 
20103 
20104   # Now try to locate executable using which
20105   new_path=`$WHICH "$new_path" 2> /dev/null`
20106 
20107   if test "x$new_path" = x; then
20108     # Oops. Which didn't find the executable.
20109     # The splitting of arguments from the executable at a space might have been incorrect,
20110     # since paths with space are more likely in Windows. Give it another try with the whole
20111     # argument.
20112     path="$complete"
20113     arguments="EOL"
20114     new_path="$path"
20115 
20116   windows_path="$new_path"
20117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20118     unix_path=`$CYGPATH -u "$windows_path"`
20119     new_path="$unix_path"
20120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20122     new_path="$unix_path"
20123   fi
20124 
20125 
20126     new_path=`$WHICH "$new_path" 2> /dev/null`
20127 
20128     if test "x$new_path" = x; then
20129       # It's still not found. Now this is an unrecoverable error.
20130       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20131 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20132       has_space=`$ECHO "$complete" | $GREP " "`
20133       if test "x$has_space" != x; then
20134         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20135 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20136       fi
20137       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20138     fi
20139   fi
20140 
20141   # Now new_path has a complete unix path to the binary
20142   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20143     # Keep paths in /bin as-is, but remove trailing .exe if any
20144     new_path="${new_path/%.exe/}"
20145     # Do not save /bin paths to all_fixpath_prefixes!
20146   else
20147     # Not in mixed or Windows style, start by that.
20148     new_path=`cmd //c echo $new_path`
20149 
20150   input_path="$new_path"
20151   # Check if we need to convert this using DOS-style short mode. If the path
20152   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20153   # take no chances and rewrite it.
20154   # Note: m4 eats our [], so we need to use [ and ] instead.
20155   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20156   if test "x$has_forbidden_chars" != x; then
20157     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20158     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20159   fi
20160 
20161     # Output is in $new_path
20162 
20163   windows_path="$new_path"
20164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20165     unix_path=`$CYGPATH -u "$windows_path"`
20166     new_path="$unix_path"
20167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20169     new_path="$unix_path"
20170   fi
20171 
20172     # remove trailing .exe if any
20173     new_path="${new_path/%.exe/}"
20174 
20175     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20176     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20177   fi
20178 
20179   else
20180     # We're on a posix platform. Hooray! :)
20181     # First separate the path from the arguments. This will split at the first
20182     # space.
20183     complete="$PROPER_COMPILER_CC"
20184     path="${complete%% *}"
20185     tmp="$complete EOL"
20186     arguments="${tmp#* }"
20187 
20188     # Cannot rely on the command "which" here since it doesn't always work.
20189     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20190     if test -z "$is_absolute_path"; then
20191       # Path to executable is not absolute. Find it.
20192       IFS_save="$IFS"
20193       IFS=:
20194       for p in $PATH; do
20195         if test -f "$p/$path" && test -x "$p/$path"; then
20196           new_path="$p/$path"
20197           break
20198         fi
20199       done
20200       IFS="$IFS_save"
20201     else
20202       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20203 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20204       new_path="$path"
20205     fi
20206 
20207     if test "x$new_path" = x; then
20208       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20209 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20210       has_space=`$ECHO "$complete" | $GREP " "`
20211       if test "x$has_space" != x; then
20212         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20213 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20214       fi
20215       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20216     fi
20217   fi
20218 
20219   # Now join together the path and the arguments once again
20220   if test "x$arguments" != xEOL; then
20221     new_complete="$new_path ${arguments% *}"
20222   else
20223     new_complete="$new_path"
20224   fi
20225 
20226   if test "x$complete" != "x$new_complete"; then
20227     PROPER_COMPILER_CC="$new_complete"
20228     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20229 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20230   fi
20231 
20232     PATH="$RETRY_COMPILER_SAVED_PATH"
20233 
20234     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20235 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20236 
20237   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20238     # Follow a chain of symbolic links. Use readlink
20239     # where it exists, else fall back to horribly
20240     # complicated shell code.
20241     if test "x$READLINK_TESTED" != yes; then
20242       # On MacOSX there is a readlink tool with a different
20243       # purpose than the GNU readlink tool. Check the found readlink.
20244       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20245       if test "x$ISGNU" = x; then
20246         # A readlink that we do not know how to use.
20247         # Are there other non-GNU readlinks out there?
20248         READLINK_TESTED=yes
20249         READLINK=
20250       fi
20251     fi
20252 
20253     if test "x$READLINK" != x; then
20254       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20255     else
20256       # Save the current directory for restoring afterwards
20257       STARTDIR=$PWD
20258       COUNTER=0
20259       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20260       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20261       cd $sym_link_dir
20262       # Use -P flag to resolve symlinks in directories.
20263       cd `$THEPWDCMD -P`
20264       sym_link_dir=`$THEPWDCMD -P`
20265       # Resolve file symlinks
20266       while test $COUNTER -lt 20; do
20267         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20268         if test "x$ISLINK" == x; then
20269           # This is not a symbolic link! We are done!
20270           break
20271         fi
20272         # Again resolve directory symlinks since the target of the just found
20273         # link could be in a different directory
20274         cd `$DIRNAME $ISLINK`
20275         sym_link_dir=`$THEPWDCMD -P`
20276         sym_link_file=`$BASENAME $ISLINK`
20277         let COUNTER=COUNTER+1
20278       done
20279       cd $STARTDIR
20280       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20281     fi
20282   fi
20283 
20284     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20285 $as_echo "$PROPER_COMPILER_CC" >&6; }
20286     CC="$PROPER_COMPILER_CC"
20287   else
20288     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20289 $as_echo "no, keeping CC" >&6; }
20290     CC="$TEST_COMPILER"
20291   fi
20292 
20293   COMPILER=$CC
20294   COMPILER_NAME=$COMPILER_NAME
20295 
20296   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20297     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20298     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20299     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20300     if test $? -ne 0; then
20301       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20302 
20303       { $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
20304 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20305       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20306 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20307       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20308     else
20309       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20310       COMPILER_VENDOR="Sun Studio"
20311     fi
20312   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20313       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20314       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20315       if test $? -ne 0; then
20316         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20317       else
20318         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20319         COMPILER_VENDOR='IBM'
20320       fi
20321   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20322     # First line typically looks something like:
20323     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20324     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20325     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20326     COMPILER_VENDOR="Microsoft CL.EXE"
20327     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20328     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20329       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20330         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20331       fi
20332     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20333       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20334         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20335       fi
20336     fi
20337   else
20338     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20339     # Check that this is likely to be GCC.
20340     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20341     if test $? -ne 0; then
20342       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20343 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20344       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20345 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20346       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20347     fi
20348 
20349     # First line typically looks something like:
20350     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20351     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20352     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20353   fi
20354   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20355   CC_VERSION="$COMPILER_VERSION"
20356   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20357   CC_VENDOR="$COMPILER_VENDOR"
20358 
20359   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20360 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20361 
20362 
20363   # Now that we have resolved CC ourself, let autoconf have its go at it
20364   ac_ext=c
20365 ac_cpp='$CPP $CPPFLAGS'
20366 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20367 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20368 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20369 if test -n "$ac_tool_prefix"; then
20370   for ac_prog in $CC
20371   do
20372     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20373 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20375 $as_echo_n "checking for $ac_word... " >&6; }
20376 if ${ac_cv_prog_CC+:} false; then :
20377   $as_echo_n "(cached) " >&6
20378 else
20379   if test -n "$CC"; then
20380   ac_cv_prog_CC="$CC" # Let the user override the test.
20381 else
20382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20383 for as_dir in $PATH
20384 do
20385   IFS=$as_save_IFS
20386   test -z "$as_dir" && as_dir=.
20387     for ac_exec_ext in '' $ac_executable_extensions; do
20388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20389     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20391     break 2
20392   fi
20393 done
20394   done
20395 IFS=$as_save_IFS
20396 
20397 fi
20398 fi
20399 CC=$ac_cv_prog_CC
20400 if test -n "$CC"; then
20401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20402 $as_echo "$CC" >&6; }
20403 else
20404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20405 $as_echo "no" >&6; }
20406 fi
20407 
20408 
20409     test -n "$CC" && break
20410   done
20411 fi
20412 if test -z "$CC"; then
20413   ac_ct_CC=$CC
20414   for ac_prog in $CC
20415 do
20416   # Extract the first word of "$ac_prog", so it can be a program name with args.
20417 set dummy $ac_prog; ac_word=$2
20418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20419 $as_echo_n "checking for $ac_word... " >&6; }
20420 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20421   $as_echo_n "(cached) " >&6
20422 else
20423   if test -n "$ac_ct_CC"; then
20424   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20425 else
20426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20427 for as_dir in $PATH
20428 do
20429   IFS=$as_save_IFS
20430   test -z "$as_dir" && as_dir=.
20431     for ac_exec_ext in '' $ac_executable_extensions; do
20432   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20433     ac_cv_prog_ac_ct_CC="$ac_prog"
20434     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20435     break 2
20436   fi
20437 done
20438   done
20439 IFS=$as_save_IFS
20440 
20441 fi
20442 fi
20443 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20444 if test -n "$ac_ct_CC"; then
20445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20446 $as_echo "$ac_ct_CC" >&6; }
20447 else
20448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20449 $as_echo "no" >&6; }
20450 fi
20451 
20452 
20453   test -n "$ac_ct_CC" && break
20454 done
20455 
20456   if test "x$ac_ct_CC" = x; then
20457     CC=""
20458   else
20459     case $cross_compiling:$ac_tool_warned in
20460 yes:)
20461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20462 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20463 ac_tool_warned=yes ;;
20464 esac
20465     CC=$ac_ct_CC
20466   fi
20467 fi
20468 
20469 
20470 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20471 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20472 as_fn_error $? "no acceptable C compiler found in \$PATH
20473 See \`config.log' for more details" "$LINENO" 5; }
20474 
20475 # Provide some information about the compiler.
20476 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20477 set X $ac_compile
20478 ac_compiler=$2
20479 for ac_option in --version -v -V -qversion; do
20480   { { ac_try="$ac_compiler $ac_option >&5"
20481 case "(($ac_try" in
20482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20483   *) ac_try_echo=$ac_try;;
20484 esac
20485 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20486 $as_echo "$ac_try_echo"; } >&5
20487   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20488   ac_status=$?
20489   if test -s conftest.err; then
20490     sed '10a\
20491 ... rest of stderr output deleted ...
20492          10q' conftest.err >conftest.er1
20493     cat conftest.er1 >&5
20494   fi
20495   rm -f conftest.er1 conftest.err
20496   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20497   test $ac_status = 0; }
20498 done
20499 
20500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20501 /* end confdefs.h.  */
20502 
20503 int
20504 main ()
20505 {
20506 
20507   ;
20508   return 0;
20509 }
20510 _ACEOF
20511 ac_clean_files_save=$ac_clean_files
20512 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20513 # Try to create an executable without -o first, disregard a.out.
20514 # It will help us diagnose broken compilers, and finding out an intuition
20515 # of exeext.
20516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20517 $as_echo_n "checking whether the C compiler works... " >&6; }
20518 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20519 
20520 # The possible output files:
20521 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20522 
20523 ac_rmfiles=
20524 for ac_file in $ac_files
20525 do
20526   case $ac_file in
20527     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20528     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20529   esac
20530 done
20531 rm -f $ac_rmfiles
20532 
20533 if { { ac_try="$ac_link_default"
20534 case "(($ac_try" in
20535   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20536   *) ac_try_echo=$ac_try;;
20537 esac
20538 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20539 $as_echo "$ac_try_echo"; } >&5
20540   (eval "$ac_link_default") 2>&5
20541   ac_status=$?
20542   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20543   test $ac_status = 0; }; then :
20544   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20545 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20546 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20547 # so that the user can short-circuit this test for compilers unknown to
20548 # Autoconf.
20549 for ac_file in $ac_files ''
20550 do
20551   test -f "$ac_file" || continue
20552   case $ac_file in
20553     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20554         ;;
20555     [ab].out )
20556         # We found the default executable, but exeext='' is most
20557         # certainly right.
20558         break;;
20559     *.* )
20560         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20561         then :; else
20562            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20563         fi
20564         # We set ac_cv_exeext here because the later test for it is not
20565         # safe: cross compilers may not add the suffix if given an `-o'
20566         # argument, so we may need to know it at that point already.
20567         # Even if this section looks crufty: it has the advantage of
20568         # actually working.
20569         break;;
20570     * )
20571         break;;
20572   esac
20573 done
20574 test "$ac_cv_exeext" = no && ac_cv_exeext=
20575 
20576 else
20577   ac_file=''
20578 fi
20579 if test -z "$ac_file"; then :
20580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20581 $as_echo "no" >&6; }
20582 $as_echo "$as_me: failed program was:" >&5
20583 sed 's/^/| /' conftest.$ac_ext >&5
20584 
20585 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20586 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20587 as_fn_error 77 "C compiler cannot create executables
20588 See \`config.log' for more details" "$LINENO" 5; }
20589 else
20590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20591 $as_echo "yes" >&6; }
20592 fi
20593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20594 $as_echo_n "checking for C compiler default output file name... " >&6; }
20595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20596 $as_echo "$ac_file" >&6; }
20597 ac_exeext=$ac_cv_exeext
20598 
20599 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20600 ac_clean_files=$ac_clean_files_save
20601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20602 $as_echo_n "checking for suffix of executables... " >&6; }
20603 if { { ac_try="$ac_link"
20604 case "(($ac_try" in
20605   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20606   *) ac_try_echo=$ac_try;;
20607 esac
20608 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20609 $as_echo "$ac_try_echo"; } >&5
20610   (eval "$ac_link") 2>&5
20611   ac_status=$?
20612   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20613   test $ac_status = 0; }; then :
20614   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20615 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20616 # work properly (i.e., refer to `conftest.exe'), while it won't with
20617 # `rm'.
20618 for ac_file in conftest.exe conftest conftest.*; do
20619   test -f "$ac_file" || continue
20620   case $ac_file in
20621     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20622     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20623           break;;
20624     * ) break;;
20625   esac
20626 done
20627 else
20628   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20629 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20630 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20631 See \`config.log' for more details" "$LINENO" 5; }
20632 fi
20633 rm -f conftest conftest$ac_cv_exeext
20634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20635 $as_echo "$ac_cv_exeext" >&6; }
20636 
20637 rm -f conftest.$ac_ext
20638 EXEEXT=$ac_cv_exeext
20639 ac_exeext=$EXEEXT
20640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20641 /* end confdefs.h.  */
20642 #include <stdio.h>
20643 int
20644 main ()
20645 {
20646 FILE *f = fopen ("conftest.out", "w");
20647  return ferror (f) || fclose (f) != 0;
20648 
20649   ;
20650   return 0;
20651 }
20652 _ACEOF
20653 ac_clean_files="$ac_clean_files conftest.out"
20654 # Check that the compiler produces executables we can run.  If not, either
20655 # the compiler is broken, or we cross compile.
20656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20657 $as_echo_n "checking whether we are cross compiling... " >&6; }
20658 if test "$cross_compiling" != yes; then
20659   { { ac_try="$ac_link"
20660 case "(($ac_try" in
20661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20662   *) ac_try_echo=$ac_try;;
20663 esac
20664 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20665 $as_echo "$ac_try_echo"; } >&5
20666   (eval "$ac_link") 2>&5
20667   ac_status=$?
20668   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20669   test $ac_status = 0; }
20670   if { ac_try='./conftest$ac_cv_exeext'
20671   { { case "(($ac_try" in
20672   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20673   *) ac_try_echo=$ac_try;;
20674 esac
20675 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20676 $as_echo "$ac_try_echo"; } >&5
20677   (eval "$ac_try") 2>&5
20678   ac_status=$?
20679   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20680   test $ac_status = 0; }; }; then
20681     cross_compiling=no
20682   else
20683     if test "$cross_compiling" = maybe; then
20684         cross_compiling=yes
20685     else
20686         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20687 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20688 as_fn_error $? "cannot run C compiled programs.
20689 If you meant to cross compile, use \`--host'.
20690 See \`config.log' for more details" "$LINENO" 5; }
20691     fi
20692   fi
20693 fi
20694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20695 $as_echo "$cross_compiling" >&6; }
20696 
20697 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20698 ac_clean_files=$ac_clean_files_save
20699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20700 $as_echo_n "checking for suffix of object files... " >&6; }
20701 if ${ac_cv_objext+:} false; then :
20702   $as_echo_n "(cached) " >&6
20703 else
20704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20705 /* end confdefs.h.  */
20706 
20707 int
20708 main ()
20709 {
20710 
20711   ;
20712   return 0;
20713 }
20714 _ACEOF
20715 rm -f conftest.o conftest.obj
20716 if { { ac_try="$ac_compile"
20717 case "(($ac_try" in
20718   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20719   *) ac_try_echo=$ac_try;;
20720 esac
20721 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20722 $as_echo "$ac_try_echo"; } >&5
20723   (eval "$ac_compile") 2>&5
20724   ac_status=$?
20725   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20726   test $ac_status = 0; }; then :
20727   for ac_file in conftest.o conftest.obj conftest.*; do
20728   test -f "$ac_file" || continue;
20729   case $ac_file in
20730     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20731     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20732        break;;
20733   esac
20734 done
20735 else
20736   $as_echo "$as_me: failed program was:" >&5
20737 sed 's/^/| /' conftest.$ac_ext >&5
20738 
20739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20740 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20741 as_fn_error $? "cannot compute suffix of object files: cannot compile
20742 See \`config.log' for more details" "$LINENO" 5; }
20743 fi
20744 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20745 fi
20746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20747 $as_echo "$ac_cv_objext" >&6; }
20748 OBJEXT=$ac_cv_objext
20749 ac_objext=$OBJEXT
20750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20751 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20752 if ${ac_cv_c_compiler_gnu+:} false; then :
20753   $as_echo_n "(cached) " >&6
20754 else
20755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20756 /* end confdefs.h.  */
20757 
20758 int
20759 main ()
20760 {
20761 #ifndef __GNUC__
20762        choke me
20763 #endif
20764 
20765   ;
20766   return 0;
20767 }
20768 _ACEOF
20769 if ac_fn_c_try_compile "$LINENO"; then :
20770   ac_compiler_gnu=yes
20771 else
20772   ac_compiler_gnu=no
20773 fi
20774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20775 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20776 
20777 fi
20778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20779 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20780 if test $ac_compiler_gnu = yes; then
20781   GCC=yes
20782 else
20783   GCC=
20784 fi
20785 ac_test_CFLAGS=${CFLAGS+set}
20786 ac_save_CFLAGS=$CFLAGS
20787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20788 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20789 if ${ac_cv_prog_cc_g+:} false; then :
20790   $as_echo_n "(cached) " >&6
20791 else
20792   ac_save_c_werror_flag=$ac_c_werror_flag
20793    ac_c_werror_flag=yes
20794    ac_cv_prog_cc_g=no
20795    CFLAGS="-g"
20796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20797 /* end confdefs.h.  */
20798 
20799 int
20800 main ()
20801 {
20802 
20803   ;
20804   return 0;
20805 }
20806 _ACEOF
20807 if ac_fn_c_try_compile "$LINENO"; then :
20808   ac_cv_prog_cc_g=yes
20809 else
20810   CFLAGS=""
20811       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20812 /* end confdefs.h.  */
20813 
20814 int
20815 main ()
20816 {
20817 
20818   ;
20819   return 0;
20820 }
20821 _ACEOF
20822 if ac_fn_c_try_compile "$LINENO"; then :
20823 
20824 else
20825   ac_c_werror_flag=$ac_save_c_werror_flag
20826          CFLAGS="-g"
20827          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20828 /* end confdefs.h.  */
20829 
20830 int
20831 main ()
20832 {
20833 
20834   ;
20835   return 0;
20836 }
20837 _ACEOF
20838 if ac_fn_c_try_compile "$LINENO"; then :
20839   ac_cv_prog_cc_g=yes
20840 fi
20841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20842 fi
20843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20844 fi
20845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20846    ac_c_werror_flag=$ac_save_c_werror_flag
20847 fi
20848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20849 $as_echo "$ac_cv_prog_cc_g" >&6; }
20850 if test "$ac_test_CFLAGS" = set; then
20851   CFLAGS=$ac_save_CFLAGS
20852 elif test $ac_cv_prog_cc_g = yes; then
20853   if test "$GCC" = yes; then
20854     CFLAGS="-g -O2"
20855   else
20856     CFLAGS="-g"
20857   fi
20858 else
20859   if test "$GCC" = yes; then
20860     CFLAGS="-O2"
20861   else
20862     CFLAGS=
20863   fi
20864 fi
20865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20866 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20867 if ${ac_cv_prog_cc_c89+:} false; then :
20868   $as_echo_n "(cached) " >&6
20869 else
20870   ac_cv_prog_cc_c89=no
20871 ac_save_CC=$CC
20872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20873 /* end confdefs.h.  */
20874 #include <stdarg.h>
20875 #include <stdio.h>
20876 struct stat;
20877 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20878 struct buf { int x; };
20879 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20880 static char *e (p, i)
20881      char **p;
20882      int i;
20883 {
20884   return p[i];
20885 }
20886 static char *f (char * (*g) (char **, int), char **p, ...)
20887 {
20888   char *s;
20889   va_list v;
20890   va_start (v,p);
20891   s = g (p, va_arg (v,int));
20892   va_end (v);
20893   return s;
20894 }
20895 
20896 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20897    function prototypes and stuff, but not '\xHH' hex character constants.
20898    These don't provoke an error unfortunately, instead are silently treated
20899    as 'x'.  The following induces an error, until -std is added to get
20900    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20901    array size at least.  It's necessary to write '\x00'==0 to get something
20902    that's true only with -std.  */
20903 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20904 
20905 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20906    inside strings and character constants.  */
20907 #define FOO(x) 'x'
20908 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20909 
20910 int test (int i, double x);
20911 struct s1 {int (*f) (int a);};
20912 struct s2 {int (*f) (double a);};
20913 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20914 int argc;
20915 char **argv;
20916 int
20917 main ()
20918 {
20919 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20920   ;
20921   return 0;
20922 }
20923 _ACEOF
20924 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20925         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20926 do
20927   CC="$ac_save_CC $ac_arg"
20928   if ac_fn_c_try_compile "$LINENO"; then :
20929   ac_cv_prog_cc_c89=$ac_arg
20930 fi
20931 rm -f core conftest.err conftest.$ac_objext
20932   test "x$ac_cv_prog_cc_c89" != "xno" && break
20933 done
20934 rm -f conftest.$ac_ext
20935 CC=$ac_save_CC
20936 
20937 fi
20938 # AC_CACHE_VAL
20939 case "x$ac_cv_prog_cc_c89" in
20940   x)
20941     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20942 $as_echo "none needed" >&6; } ;;
20943   xno)
20944     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20945 $as_echo "unsupported" >&6; } ;;
20946   *)
20947     CC="$CC $ac_cv_prog_cc_c89"
20948     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20949 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20950 esac
20951 if test "x$ac_cv_prog_cc_c89" != xno; then :
20952 
20953 fi
20954 
20955 ac_ext=cpp
20956 ac_cpp='$CXXCPP $CPPFLAGS'
20957 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20958 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20959 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20960 
20961 
20962   # Option used to tell the compiler whether to create 32- or 64-bit executables
20963   # Notice that CC contains the full compiler path at this point.
20964   case $CC in
20965     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20966     *)      COMPILER_TARGET_BITS_FLAG="-m";;
20967   esac
20968 
20969 
20970   ### Locate C++ compiler (CXX)
20971 
20972   if test "x$CXX" != x; then
20973     COMPILER_CHECK_LIST="$CXX"
20974   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20975     COMPILER_CHECK_LIST="cl"
20976   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20977     COMPILER_CHECK_LIST="CC g++"
20978   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20979     # Do not probe for CC on AIX .
20980     COMPILER_CHECK_LIST="xlC_r"
20981   else
20982     COMPILER_CHECK_LIST="g++ CC"
20983   fi
20984 
20985 
20986   COMPILER_NAME=C++
20987 
20988   CXX=
20989   # If TOOLS_DIR is set, check for all compiler names in there first
20990   # before checking the rest of the PATH.
20991   if test -n "$TOOLS_DIR"; then
20992     PATH_save="$PATH"
20993     PATH="$TOOLS_DIR"
20994     for ac_prog in $COMPILER_CHECK_LIST
20995 do
20996   # Extract the first word of "$ac_prog", so it can be a program name with args.
20997 set dummy $ac_prog; ac_word=$2
20998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20999 $as_echo_n "checking for $ac_word... " >&6; }
21000 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
21001   $as_echo_n "(cached) " >&6
21002 else
21003   case $TOOLS_DIR_CXX in
21004   [\\/]* | ?:[\\/]*)
21005   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
21006   ;;
21007   *)
21008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21009 for as_dir in $PATH
21010 do
21011   IFS=$as_save_IFS
21012   test -z "$as_dir" && as_dir=.
21013     for ac_exec_ext in '' $ac_executable_extensions; do
21014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21015     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
21016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21017     break 2
21018   fi
21019 done
21020   done
21021 IFS=$as_save_IFS
21022 
21023   ;;
21024 esac
21025 fi
21026 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
21027 if test -n "$TOOLS_DIR_CXX"; then
21028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
21029 $as_echo "$TOOLS_DIR_CXX" >&6; }
21030 else
21031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21032 $as_echo "no" >&6; }
21033 fi
21034 
21035 
21036   test -n "$TOOLS_DIR_CXX" && break
21037 done
21038 
21039     CXX=$TOOLS_DIR_CXX
21040     PATH="$PATH_save"
21041   fi
21042 
21043   # AC_PATH_PROGS can't be run multiple times with the same variable,
21044   # so create a new name for this run.
21045   if test "x$CXX" = x; then
21046     for ac_prog in $COMPILER_CHECK_LIST
21047 do
21048   # Extract the first word of "$ac_prog", so it can be a program name with args.
21049 set dummy $ac_prog; ac_word=$2
21050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21051 $as_echo_n "checking for $ac_word... " >&6; }
21052 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
21053   $as_echo_n "(cached) " >&6
21054 else
21055   case $POTENTIAL_CXX in
21056   [\\/]* | ?:[\\/]*)
21057   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
21058   ;;
21059   *)
21060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21061 for as_dir in $PATH
21062 do
21063   IFS=$as_save_IFS
21064   test -z "$as_dir" && as_dir=.
21065     for ac_exec_ext in '' $ac_executable_extensions; do
21066   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21067     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
21068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21069     break 2
21070   fi
21071 done
21072   done
21073 IFS=$as_save_IFS
21074 
21075   ;;
21076 esac
21077 fi
21078 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
21079 if test -n "$POTENTIAL_CXX"; then
21080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
21081 $as_echo "$POTENTIAL_CXX" >&6; }
21082 else
21083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21084 $as_echo "no" >&6; }
21085 fi
21086 
21087 
21088   test -n "$POTENTIAL_CXX" && break
21089 done
21090 
21091     CXX=$POTENTIAL_CXX
21092   fi
21093 
21094   if test "x$CXX" = x; then
21095 
21096   # Print a helpful message on how to acquire the necessary build dependency.
21097   # devkit is the help tag: freetype, cups, pulse, alsa etc
21098   MISSING_DEPENDENCY=devkit
21099 
21100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21101     cygwin_help $MISSING_DEPENDENCY
21102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21103     msys_help $MISSING_DEPENDENCY
21104   else
21105     PKGHANDLER_COMMAND=
21106 
21107     case $PKGHANDLER in
21108       apt-get)
21109         apt_help     $MISSING_DEPENDENCY ;;
21110       yum)
21111         yum_help     $MISSING_DEPENDENCY ;;
21112       port)
21113         port_help    $MISSING_DEPENDENCY ;;
21114       pkgutil)
21115         pkgutil_help $MISSING_DEPENDENCY ;;
21116       pkgadd)
21117         pkgadd_help  $MISSING_DEPENDENCY ;;
21118     esac
21119 
21120     if test "x$PKGHANDLER_COMMAND" != x; then
21121       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21122     fi
21123   fi
21124 
21125     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21126   fi
21127 
21128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21129 
21130   # First separate the path from the arguments. This will split at the first
21131   # space.
21132   complete="$CXX"
21133   path="${complete%% *}"
21134   tmp="$complete EOL"
21135   arguments="${tmp#* }"
21136 
21137   # Input might be given as Windows format, start by converting to
21138   # unix format.
21139   new_path=`$CYGPATH -u "$path"`
21140 
21141   # Now try to locate executable using which
21142   new_path=`$WHICH "$new_path" 2> /dev/null`
21143   # bat and cmd files are not always considered executable in cygwin causing which
21144   # to not find them
21145   if test "x$new_path" = x \
21146       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21147       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21148     new_path=`$CYGPATH -u "$path"`
21149   fi
21150   if test "x$new_path" = x; then
21151     # Oops. Which didn't find the executable.
21152     # The splitting of arguments from the executable at a space might have been incorrect,
21153     # since paths with space are more likely in Windows. Give it another try with the whole
21154     # argument.
21155     path="$complete"
21156     arguments="EOL"
21157     new_path=`$CYGPATH -u "$path"`
21158     new_path=`$WHICH "$new_path" 2> /dev/null`
21159     # bat and cmd files are not always considered executable in cygwin causing which
21160     # to not find them
21161     if test "x$new_path" = x \
21162         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21163         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21164       new_path=`$CYGPATH -u "$path"`
21165     fi
21166     if test "x$new_path" = x; then
21167       # It's still not found. Now this is an unrecoverable error.
21168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21169 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21170       has_space=`$ECHO "$complete" | $GREP " "`
21171       if test "x$has_space" != x; then
21172         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21173 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21174       fi
21175       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21176     fi
21177   fi
21178 
21179   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21180   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21181   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21182   # "foo.exe" is OK but "foo" is an error.
21183   #
21184   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21185   # It is also a way to make sure we got the proper file name for the real test later on.
21186   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21187   if test "x$test_shortpath" = x; then
21188     # Short path failed, file does not exist as specified.
21189     # Try adding .exe or .cmd
21190     if test -f "${new_path}.exe"; then
21191       input_to_shortpath="${new_path}.exe"
21192     elif test -f "${new_path}.cmd"; then
21193       input_to_shortpath="${new_path}.cmd"
21194     else
21195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21196 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21197       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21198 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21199       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21200     fi
21201   else
21202     input_to_shortpath="$new_path"
21203   fi
21204 
21205   # Call helper function which possibly converts this using DOS-style short mode.
21206   # If so, the updated path is stored in $new_path.
21207   new_path="$input_to_shortpath"
21208 
21209   input_path="$input_to_shortpath"
21210   # Check if we need to convert this using DOS-style short mode. If the path
21211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21212   # take no chances and rewrite it.
21213   # Note: m4 eats our [], so we need to use [ and ] instead.
21214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21215   if test "x$has_forbidden_chars" != x; then
21216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21217     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21218     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21219     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21220       # Going to short mode and back again did indeed matter. Since short mode is
21221       # case insensitive, let's make it lowercase to improve readability.
21222       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21223       # Now convert it back to Unix-stile (cygpath)
21224       input_path=`$CYGPATH -u "$shortmode_path"`
21225       new_path="$input_path"
21226     fi
21227   fi
21228 
21229   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21230   if test "x$test_cygdrive_prefix" = x; then
21231     # As a simple fix, exclude /usr/bin since it's not a real path.
21232     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21233       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21234       # a path prefixed by /cygdrive for fixpath to work.
21235       new_path="$CYGWIN_ROOT_PATH$input_path"
21236     fi
21237   fi
21238 
21239   # remove trailing .exe if any
21240   new_path="${new_path/%.exe/}"
21241 
21242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21243 
21244   # First separate the path from the arguments. This will split at the first
21245   # space.
21246   complete="$CXX"
21247   path="${complete%% *}"
21248   tmp="$complete EOL"
21249   arguments="${tmp#* }"
21250 
21251   # Input might be given as Windows format, start by converting to
21252   # unix format.
21253   new_path="$path"
21254 
21255   windows_path="$new_path"
21256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21257     unix_path=`$CYGPATH -u "$windows_path"`
21258     new_path="$unix_path"
21259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21261     new_path="$unix_path"
21262   fi
21263 
21264 
21265   # Now try to locate executable using which
21266   new_path=`$WHICH "$new_path" 2> /dev/null`
21267 
21268   if test "x$new_path" = x; then
21269     # Oops. Which didn't find the executable.
21270     # The splitting of arguments from the executable at a space might have been incorrect,
21271     # since paths with space are more likely in Windows. Give it another try with the whole
21272     # argument.
21273     path="$complete"
21274     arguments="EOL"
21275     new_path="$path"
21276 
21277   windows_path="$new_path"
21278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21279     unix_path=`$CYGPATH -u "$windows_path"`
21280     new_path="$unix_path"
21281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21283     new_path="$unix_path"
21284   fi
21285 
21286 
21287     new_path=`$WHICH "$new_path" 2> /dev/null`
21288 
21289     if test "x$new_path" = x; then
21290       # It's still not found. Now this is an unrecoverable error.
21291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21292 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21293       has_space=`$ECHO "$complete" | $GREP " "`
21294       if test "x$has_space" != x; then
21295         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21296 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21297       fi
21298       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21299     fi
21300   fi
21301 
21302   # Now new_path has a complete unix path to the binary
21303   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21304     # Keep paths in /bin as-is, but remove trailing .exe if any
21305     new_path="${new_path/%.exe/}"
21306     # Do not save /bin paths to all_fixpath_prefixes!
21307   else
21308     # Not in mixed or Windows style, start by that.
21309     new_path=`cmd //c echo $new_path`
21310 
21311   input_path="$new_path"
21312   # Check if we need to convert this using DOS-style short mode. If the path
21313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21314   # take no chances and rewrite it.
21315   # Note: m4 eats our [], so we need to use [ and ] instead.
21316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21317   if test "x$has_forbidden_chars" != x; then
21318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21319     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21320   fi
21321 
21322     # Output is in $new_path
21323 
21324   windows_path="$new_path"
21325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21326     unix_path=`$CYGPATH -u "$windows_path"`
21327     new_path="$unix_path"
21328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21330     new_path="$unix_path"
21331   fi
21332 
21333     # remove trailing .exe if any
21334     new_path="${new_path/%.exe/}"
21335 
21336     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21337     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21338   fi
21339 
21340   else
21341     # We're on a posix platform. Hooray! :)
21342     # First separate the path from the arguments. This will split at the first
21343     # space.
21344     complete="$CXX"
21345     path="${complete%% *}"
21346     tmp="$complete EOL"
21347     arguments="${tmp#* }"
21348 
21349     # Cannot rely on the command "which" here since it doesn't always work.
21350     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21351     if test -z "$is_absolute_path"; then
21352       # Path to executable is not absolute. Find it.
21353       IFS_save="$IFS"
21354       IFS=:
21355       for p in $PATH; do
21356         if test -f "$p/$path" && test -x "$p/$path"; then
21357           new_path="$p/$path"
21358           break
21359         fi
21360       done
21361       IFS="$IFS_save"
21362     else
21363       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21364 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21365       new_path="$path"
21366     fi
21367 
21368     if test "x$new_path" = x; then
21369       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21370 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21371       has_space=`$ECHO "$complete" | $GREP " "`
21372       if test "x$has_space" != x; then
21373         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21374 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21375       fi
21376       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21377     fi
21378   fi
21379 
21380   # Now join together the path and the arguments once again
21381   if test "x$arguments" != xEOL; then
21382     new_complete="$new_path ${arguments% *}"
21383   else
21384     new_complete="$new_path"
21385   fi
21386 
21387   if test "x$complete" != "x$new_complete"; then
21388     CXX="$new_complete"
21389     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21390 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21391   fi
21392 
21393   TEST_COMPILER="$CXX"
21394   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21395   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21396   if test "x$OPENJDK_BUILD_OS" != xaix; then
21397     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21398 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21399 
21400   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21401     # Follow a chain of symbolic links. Use readlink
21402     # where it exists, else fall back to horribly
21403     # complicated shell code.
21404     if test "x$READLINK_TESTED" != yes; then
21405       # On MacOSX there is a readlink tool with a different
21406       # purpose than the GNU readlink tool. Check the found readlink.
21407       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21408       if test "x$ISGNU" = x; then
21409         # A readlink that we do not know how to use.
21410         # Are there other non-GNU readlinks out there?
21411         READLINK_TESTED=yes
21412         READLINK=
21413       fi
21414     fi
21415 
21416     if test "x$READLINK" != x; then
21417       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21418     else
21419       # Save the current directory for restoring afterwards
21420       STARTDIR=$PWD
21421       COUNTER=0
21422       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21423       sym_link_file=`$BASENAME $TEST_COMPILER`
21424       cd $sym_link_dir
21425       # Use -P flag to resolve symlinks in directories.
21426       cd `$THEPWDCMD -P`
21427       sym_link_dir=`$THEPWDCMD -P`
21428       # Resolve file symlinks
21429       while test $COUNTER -lt 20; do
21430         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21431         if test "x$ISLINK" == x; then
21432           # This is not a symbolic link! We are done!
21433           break
21434         fi
21435         # Again resolve directory symlinks since the target of the just found
21436         # link could be in a different directory
21437         cd `$DIRNAME $ISLINK`
21438         sym_link_dir=`$THEPWDCMD -P`
21439         sym_link_file=`$BASENAME $ISLINK`
21440         let COUNTER=COUNTER+1
21441       done
21442       cd $STARTDIR
21443       TEST_COMPILER=$sym_link_dir/$sym_link_file
21444     fi
21445   fi
21446 
21447     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21448 $as_echo "$TEST_COMPILER" >&6; }
21449   fi
21450   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21451 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21452 
21453   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21454   if test "x$COMPILER_BASENAME" = "xccache"; then
21455     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21456 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21457     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21458     # We want to control ccache invocation ourselves, so ignore this cc and try
21459     # searching again.
21460 
21461     # Remove the path to the fake ccache cc from the PATH
21462     RETRY_COMPILER_SAVED_PATH="$PATH"
21463     COMPILER_DIRNAME=`$DIRNAME $CXX`
21464     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21465 
21466     # Try again looking for our compiler
21467     if test -n "$ac_tool_prefix"; then
21468   for ac_prog in $COMPILER_CHECK_LIST
21469   do
21470     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21471 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21473 $as_echo_n "checking for $ac_word... " >&6; }
21474 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21475   $as_echo_n "(cached) " >&6
21476 else
21477   if test -n "$PROPER_COMPILER_CXX"; then
21478   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21479 else
21480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21481 for as_dir in $PATH
21482 do
21483   IFS=$as_save_IFS
21484   test -z "$as_dir" && as_dir=.
21485     for ac_exec_ext in '' $ac_executable_extensions; do
21486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21487     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21489     break 2
21490   fi
21491 done
21492   done
21493 IFS=$as_save_IFS
21494 
21495 fi
21496 fi
21497 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21498 if test -n "$PROPER_COMPILER_CXX"; then
21499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21500 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21501 else
21502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21503 $as_echo "no" >&6; }
21504 fi
21505 
21506 
21507     test -n "$PROPER_COMPILER_CXX" && break
21508   done
21509 fi
21510 if test -z "$PROPER_COMPILER_CXX"; then
21511   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21512   for ac_prog in $COMPILER_CHECK_LIST
21513 do
21514   # Extract the first word of "$ac_prog", so it can be a program name with args.
21515 set dummy $ac_prog; ac_word=$2
21516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21517 $as_echo_n "checking for $ac_word... " >&6; }
21518 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21519   $as_echo_n "(cached) " >&6
21520 else
21521   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21522   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21523 else
21524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21525 for as_dir in $PATH
21526 do
21527   IFS=$as_save_IFS
21528   test -z "$as_dir" && as_dir=.
21529     for ac_exec_ext in '' $ac_executable_extensions; do
21530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21531     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21533     break 2
21534   fi
21535 done
21536   done
21537 IFS=$as_save_IFS
21538 
21539 fi
21540 fi
21541 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21542 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21544 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21545 else
21546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21547 $as_echo "no" >&6; }
21548 fi
21549 
21550 
21551   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21552 done
21553 
21554   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21555     PROPER_COMPILER_CXX=""
21556   else
21557     case $cross_compiling:$ac_tool_warned in
21558 yes:)
21559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21560 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21561 ac_tool_warned=yes ;;
21562 esac
21563     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21564   fi
21565 fi
21566 
21567 
21568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21569 
21570   # First separate the path from the arguments. This will split at the first
21571   # space.
21572   complete="$PROPER_COMPILER_CXX"
21573   path="${complete%% *}"
21574   tmp="$complete EOL"
21575   arguments="${tmp#* }"
21576 
21577   # Input might be given as Windows format, start by converting to
21578   # unix format.
21579   new_path=`$CYGPATH -u "$path"`
21580 
21581   # Now try to locate executable using which
21582   new_path=`$WHICH "$new_path" 2> /dev/null`
21583   # bat and cmd files are not always considered executable in cygwin causing which
21584   # to not find them
21585   if test "x$new_path" = x \
21586       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21587       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21588     new_path=`$CYGPATH -u "$path"`
21589   fi
21590   if test "x$new_path" = x; then
21591     # Oops. Which didn't find the executable.
21592     # The splitting of arguments from the executable at a space might have been incorrect,
21593     # since paths with space are more likely in Windows. Give it another try with the whole
21594     # argument.
21595     path="$complete"
21596     arguments="EOL"
21597     new_path=`$CYGPATH -u "$path"`
21598     new_path=`$WHICH "$new_path" 2> /dev/null`
21599     # bat and cmd files are not always considered executable in cygwin causing which
21600     # to not find them
21601     if test "x$new_path" = x \
21602         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21603         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21604       new_path=`$CYGPATH -u "$path"`
21605     fi
21606     if test "x$new_path" = x; then
21607       # It's still not found. Now this is an unrecoverable error.
21608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21609 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21610       has_space=`$ECHO "$complete" | $GREP " "`
21611       if test "x$has_space" != x; then
21612         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21614       fi
21615       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21616     fi
21617   fi
21618 
21619   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21620   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21621   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21622   # "foo.exe" is OK but "foo" is an error.
21623   #
21624   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21625   # It is also a way to make sure we got the proper file name for the real test later on.
21626   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21627   if test "x$test_shortpath" = x; then
21628     # Short path failed, file does not exist as specified.
21629     # Try adding .exe or .cmd
21630     if test -f "${new_path}.exe"; then
21631       input_to_shortpath="${new_path}.exe"
21632     elif test -f "${new_path}.cmd"; then
21633       input_to_shortpath="${new_path}.cmd"
21634     else
21635       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21636 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21637       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21638 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21639       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21640     fi
21641   else
21642     input_to_shortpath="$new_path"
21643   fi
21644 
21645   # Call helper function which possibly converts this using DOS-style short mode.
21646   # If so, the updated path is stored in $new_path.
21647   new_path="$input_to_shortpath"
21648 
21649   input_path="$input_to_shortpath"
21650   # Check if we need to convert this using DOS-style short mode. If the path
21651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21652   # take no chances and rewrite it.
21653   # Note: m4 eats our [], so we need to use [ and ] instead.
21654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21655   if test "x$has_forbidden_chars" != x; then
21656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21657     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21658     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21659     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21660       # Going to short mode and back again did indeed matter. Since short mode is
21661       # case insensitive, let's make it lowercase to improve readability.
21662       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21663       # Now convert it back to Unix-stile (cygpath)
21664       input_path=`$CYGPATH -u "$shortmode_path"`
21665       new_path="$input_path"
21666     fi
21667   fi
21668 
21669   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21670   if test "x$test_cygdrive_prefix" = x; then
21671     # As a simple fix, exclude /usr/bin since it's not a real path.
21672     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21673       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21674       # a path prefixed by /cygdrive for fixpath to work.
21675       new_path="$CYGWIN_ROOT_PATH$input_path"
21676     fi
21677   fi
21678 
21679   # remove trailing .exe if any
21680   new_path="${new_path/%.exe/}"
21681 
21682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21683 
21684   # First separate the path from the arguments. This will split at the first
21685   # space.
21686   complete="$PROPER_COMPILER_CXX"
21687   path="${complete%% *}"
21688   tmp="$complete EOL"
21689   arguments="${tmp#* }"
21690 
21691   # Input might be given as Windows format, start by converting to
21692   # unix format.
21693   new_path="$path"
21694 
21695   windows_path="$new_path"
21696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21697     unix_path=`$CYGPATH -u "$windows_path"`
21698     new_path="$unix_path"
21699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21701     new_path="$unix_path"
21702   fi
21703 
21704 
21705   # Now try to locate executable using which
21706   new_path=`$WHICH "$new_path" 2> /dev/null`
21707 
21708   if test "x$new_path" = x; then
21709     # Oops. Which didn't find the executable.
21710     # The splitting of arguments from the executable at a space might have been incorrect,
21711     # since paths with space are more likely in Windows. Give it another try with the whole
21712     # argument.
21713     path="$complete"
21714     arguments="EOL"
21715     new_path="$path"
21716 
21717   windows_path="$new_path"
21718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21719     unix_path=`$CYGPATH -u "$windows_path"`
21720     new_path="$unix_path"
21721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21723     new_path="$unix_path"
21724   fi
21725 
21726 
21727     new_path=`$WHICH "$new_path" 2> /dev/null`
21728 
21729     if test "x$new_path" = x; then
21730       # It's still not found. Now this is an unrecoverable error.
21731       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21732 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21733       has_space=`$ECHO "$complete" | $GREP " "`
21734       if test "x$has_space" != x; then
21735         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21736 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21737       fi
21738       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21739     fi
21740   fi
21741 
21742   # Now new_path has a complete unix path to the binary
21743   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21744     # Keep paths in /bin as-is, but remove trailing .exe if any
21745     new_path="${new_path/%.exe/}"
21746     # Do not save /bin paths to all_fixpath_prefixes!
21747   else
21748     # Not in mixed or Windows style, start by that.
21749     new_path=`cmd //c echo $new_path`
21750 
21751   input_path="$new_path"
21752   # Check if we need to convert this using DOS-style short mode. If the path
21753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21754   # take no chances and rewrite it.
21755   # Note: m4 eats our [], so we need to use [ and ] instead.
21756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21757   if test "x$has_forbidden_chars" != x; then
21758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21759     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21760   fi
21761 
21762     # Output is in $new_path
21763 
21764   windows_path="$new_path"
21765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21766     unix_path=`$CYGPATH -u "$windows_path"`
21767     new_path="$unix_path"
21768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21769     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21770     new_path="$unix_path"
21771   fi
21772 
21773     # remove trailing .exe if any
21774     new_path="${new_path/%.exe/}"
21775 
21776     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21777     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21778   fi
21779 
21780   else
21781     # We're on a posix platform. Hooray! :)
21782     # First separate the path from the arguments. This will split at the first
21783     # space.
21784     complete="$PROPER_COMPILER_CXX"
21785     path="${complete%% *}"
21786     tmp="$complete EOL"
21787     arguments="${tmp#* }"
21788 
21789     # Cannot rely on the command "which" here since it doesn't always work.
21790     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21791     if test -z "$is_absolute_path"; then
21792       # Path to executable is not absolute. Find it.
21793       IFS_save="$IFS"
21794       IFS=:
21795       for p in $PATH; do
21796         if test -f "$p/$path" && test -x "$p/$path"; then
21797           new_path="$p/$path"
21798           break
21799         fi
21800       done
21801       IFS="$IFS_save"
21802     else
21803       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21804 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21805       new_path="$path"
21806     fi
21807 
21808     if test "x$new_path" = x; then
21809       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21810 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21811       has_space=`$ECHO "$complete" | $GREP " "`
21812       if test "x$has_space" != x; then
21813         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21814 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21815       fi
21816       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21817     fi
21818   fi
21819 
21820   # Now join together the path and the arguments once again
21821   if test "x$arguments" != xEOL; then
21822     new_complete="$new_path ${arguments% *}"
21823   else
21824     new_complete="$new_path"
21825   fi
21826 
21827   if test "x$complete" != "x$new_complete"; then
21828     PROPER_COMPILER_CXX="$new_complete"
21829     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21830 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21831   fi
21832 
21833     PATH="$RETRY_COMPILER_SAVED_PATH"
21834 
21835     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21836 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21837 
21838   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21839     # Follow a chain of symbolic links. Use readlink
21840     # where it exists, else fall back to horribly
21841     # complicated shell code.
21842     if test "x$READLINK_TESTED" != yes; then
21843       # On MacOSX there is a readlink tool with a different
21844       # purpose than the GNU readlink tool. Check the found readlink.
21845       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21846       if test "x$ISGNU" = x; then
21847         # A readlink that we do not know how to use.
21848         # Are there other non-GNU readlinks out there?
21849         READLINK_TESTED=yes
21850         READLINK=
21851       fi
21852     fi
21853 
21854     if test "x$READLINK" != x; then
21855       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21856     else
21857       # Save the current directory for restoring afterwards
21858       STARTDIR=$PWD
21859       COUNTER=0
21860       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21861       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21862       cd $sym_link_dir
21863       # Use -P flag to resolve symlinks in directories.
21864       cd `$THEPWDCMD -P`
21865       sym_link_dir=`$THEPWDCMD -P`
21866       # Resolve file symlinks
21867       while test $COUNTER -lt 20; do
21868         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21869         if test "x$ISLINK" == x; then
21870           # This is not a symbolic link! We are done!
21871           break
21872         fi
21873         # Again resolve directory symlinks since the target of the just found
21874         # link could be in a different directory
21875         cd `$DIRNAME $ISLINK`
21876         sym_link_dir=`$THEPWDCMD -P`
21877         sym_link_file=`$BASENAME $ISLINK`
21878         let COUNTER=COUNTER+1
21879       done
21880       cd $STARTDIR
21881       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21882     fi
21883   fi
21884 
21885     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21886 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21887     CXX="$PROPER_COMPILER_CXX"
21888   else
21889     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21890 $as_echo "no, keeping CXX" >&6; }
21891     CXX="$TEST_COMPILER"
21892   fi
21893 
21894   COMPILER=$CXX
21895   COMPILER_NAME=$COMPILER_NAME
21896 
21897   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21898     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21899     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21900     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21901     if test $? -ne 0; then
21902       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21903 
21904       { $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
21905 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21906       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21907 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21908       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21909     else
21910       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21911       COMPILER_VENDOR="Sun Studio"
21912     fi
21913   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21914       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21915       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21916       if test $? -ne 0; then
21917         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21918       else
21919         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21920         COMPILER_VENDOR='IBM'
21921       fi
21922   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21923     # First line typically looks something like:
21924     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21925     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21926     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21927     COMPILER_VENDOR="Microsoft CL.EXE"
21928     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21929     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21930       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21931         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21932       fi
21933     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21934       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21935         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21936       fi
21937     fi
21938   else
21939     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21940     # Check that this is likely to be GCC.
21941     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21942     if test $? -ne 0; then
21943       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21944 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21945       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21946 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21947       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21948     fi
21949 
21950     # First line typically looks something like:
21951     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21952     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21953     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21954   fi
21955   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21956   CXX_VERSION="$COMPILER_VERSION"
21957   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21958   CXX_VENDOR="$COMPILER_VENDOR"
21959 
21960   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21961 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21962 
21963 
21964   # Now that we have resolved CXX ourself, let autoconf have its go at it
21965   ac_ext=cpp
21966 ac_cpp='$CXXCPP $CPPFLAGS'
21967 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21968 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21969 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21970 if test -z "$CXX"; then
21971   if test -n "$CCC"; then
21972     CXX=$CCC
21973   else
21974     if test -n "$ac_tool_prefix"; then
21975   for ac_prog in $CXX
21976   do
21977     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21978 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21980 $as_echo_n "checking for $ac_word... " >&6; }
21981 if ${ac_cv_prog_CXX+:} false; then :
21982   $as_echo_n "(cached) " >&6
21983 else
21984   if test -n "$CXX"; then
21985   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21986 else
21987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21988 for as_dir in $PATH
21989 do
21990   IFS=$as_save_IFS
21991   test -z "$as_dir" && as_dir=.
21992     for ac_exec_ext in '' $ac_executable_extensions; do
21993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21994     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21996     break 2
21997   fi
21998 done
21999   done
22000 IFS=$as_save_IFS
22001 
22002 fi
22003 fi
22004 CXX=$ac_cv_prog_CXX
22005 if test -n "$CXX"; then
22006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
22007 $as_echo "$CXX" >&6; }
22008 else
22009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22010 $as_echo "no" >&6; }
22011 fi
22012 
22013 
22014     test -n "$CXX" && break
22015   done
22016 fi
22017 if test -z "$CXX"; then
22018   ac_ct_CXX=$CXX
22019   for ac_prog in $CXX
22020 do
22021   # Extract the first word of "$ac_prog", so it can be a program name with args.
22022 set dummy $ac_prog; ac_word=$2
22023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22024 $as_echo_n "checking for $ac_word... " >&6; }
22025 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
22026   $as_echo_n "(cached) " >&6
22027 else
22028   if test -n "$ac_ct_CXX"; then
22029   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
22030 else
22031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22032 for as_dir in $PATH
22033 do
22034   IFS=$as_save_IFS
22035   test -z "$as_dir" && as_dir=.
22036     for ac_exec_ext in '' $ac_executable_extensions; do
22037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22038     ac_cv_prog_ac_ct_CXX="$ac_prog"
22039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22040     break 2
22041   fi
22042 done
22043   done
22044 IFS=$as_save_IFS
22045 
22046 fi
22047 fi
22048 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
22049 if test -n "$ac_ct_CXX"; then
22050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
22051 $as_echo "$ac_ct_CXX" >&6; }
22052 else
22053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22054 $as_echo "no" >&6; }
22055 fi
22056 
22057 
22058   test -n "$ac_ct_CXX" && break
22059 done
22060 
22061   if test "x$ac_ct_CXX" = x; then
22062     CXX="g++"
22063   else
22064     case $cross_compiling:$ac_tool_warned in
22065 yes:)
22066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22067 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22068 ac_tool_warned=yes ;;
22069 esac
22070     CXX=$ac_ct_CXX
22071   fi
22072 fi
22073 
22074   fi
22075 fi
22076 # Provide some information about the compiler.
22077 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
22078 set X $ac_compile
22079 ac_compiler=$2
22080 for ac_option in --version -v -V -qversion; do
22081   { { ac_try="$ac_compiler $ac_option >&5"
22082 case "(($ac_try" in
22083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22084   *) ac_try_echo=$ac_try;;
22085 esac
22086 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22087 $as_echo "$ac_try_echo"; } >&5
22088   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22089   ac_status=$?
22090   if test -s conftest.err; then
22091     sed '10a\
22092 ... rest of stderr output deleted ...
22093          10q' conftest.err >conftest.er1
22094     cat conftest.er1 >&5
22095   fi
22096   rm -f conftest.er1 conftest.err
22097   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22098   test $ac_status = 0; }
22099 done
22100 
22101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
22102 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
22103 if ${ac_cv_cxx_compiler_gnu+:} false; then :
22104   $as_echo_n "(cached) " >&6
22105 else
22106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22107 /* end confdefs.h.  */
22108 
22109 int
22110 main ()
22111 {
22112 #ifndef __GNUC__
22113        choke me
22114 #endif
22115 
22116   ;
22117   return 0;
22118 }
22119 _ACEOF
22120 if ac_fn_cxx_try_compile "$LINENO"; then :
22121   ac_compiler_gnu=yes
22122 else
22123   ac_compiler_gnu=no
22124 fi
22125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22126 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22127 
22128 fi
22129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22130 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22131 if test $ac_compiler_gnu = yes; then
22132   GXX=yes
22133 else
22134   GXX=
22135 fi
22136 ac_test_CXXFLAGS=${CXXFLAGS+set}
22137 ac_save_CXXFLAGS=$CXXFLAGS
22138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22139 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
22140 if ${ac_cv_prog_cxx_g+:} false; then :
22141   $as_echo_n "(cached) " >&6
22142 else
22143   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22144    ac_cxx_werror_flag=yes
22145    ac_cv_prog_cxx_g=no
22146    CXXFLAGS="-g"
22147    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22148 /* end confdefs.h.  */
22149 
22150 int
22151 main ()
22152 {
22153 
22154   ;
22155   return 0;
22156 }
22157 _ACEOF
22158 if ac_fn_cxx_try_compile "$LINENO"; then :
22159   ac_cv_prog_cxx_g=yes
22160 else
22161   CXXFLAGS=""
22162       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22163 /* end confdefs.h.  */
22164 
22165 int
22166 main ()
22167 {
22168 
22169   ;
22170   return 0;
22171 }
22172 _ACEOF
22173 if ac_fn_cxx_try_compile "$LINENO"; then :
22174 
22175 else
22176   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22177          CXXFLAGS="-g"
22178          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22179 /* end confdefs.h.  */
22180 
22181 int
22182 main ()
22183 {
22184 
22185   ;
22186   return 0;
22187 }
22188 _ACEOF
22189 if ac_fn_cxx_try_compile "$LINENO"; then :
22190   ac_cv_prog_cxx_g=yes
22191 fi
22192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22193 fi
22194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22195 fi
22196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22197    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22198 fi
22199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22200 $as_echo "$ac_cv_prog_cxx_g" >&6; }
22201 if test "$ac_test_CXXFLAGS" = set; then
22202   CXXFLAGS=$ac_save_CXXFLAGS
22203 elif test $ac_cv_prog_cxx_g = yes; then
22204   if test "$GXX" = yes; then
22205     CXXFLAGS="-g -O2"
22206   else
22207     CXXFLAGS="-g"
22208   fi
22209 else
22210   if test "$GXX" = yes; then
22211     CXXFLAGS="-O2"
22212   else
22213     CXXFLAGS=
22214   fi
22215 fi
22216 ac_ext=cpp
22217 ac_cpp='$CXXCPP $CPPFLAGS'
22218 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22219 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22220 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22221 
22222 
22223   ### Locate other tools
22224 
22225   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22226     ac_ext=m
22227 ac_cpp='$OBJCPP $CPPFLAGS'
22228 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22229 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22230 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22231 if test -n "$ac_tool_prefix"; then
22232   for ac_prog in gcc objcc objc cc CC
22233   do
22234     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22235 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22237 $as_echo_n "checking for $ac_word... " >&6; }
22238 if ${ac_cv_prog_OBJC+:} false; then :
22239   $as_echo_n "(cached) " >&6
22240 else
22241   if test -n "$OBJC"; then
22242   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22243 else
22244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22245 for as_dir in $PATH
22246 do
22247   IFS=$as_save_IFS
22248   test -z "$as_dir" && as_dir=.
22249     for ac_exec_ext in '' $ac_executable_extensions; do
22250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22251     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22253     break 2
22254   fi
22255 done
22256   done
22257 IFS=$as_save_IFS
22258 
22259 fi
22260 fi
22261 OBJC=$ac_cv_prog_OBJC
22262 if test -n "$OBJC"; then
22263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22264 $as_echo "$OBJC" >&6; }
22265 else
22266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22267 $as_echo "no" >&6; }
22268 fi
22269 
22270 
22271     test -n "$OBJC" && break
22272   done
22273 fi
22274 if test -z "$OBJC"; then
22275   ac_ct_OBJC=$OBJC
22276   for ac_prog in gcc objcc objc cc CC
22277 do
22278   # Extract the first word of "$ac_prog", so it can be a program name with args.
22279 set dummy $ac_prog; ac_word=$2
22280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22281 $as_echo_n "checking for $ac_word... " >&6; }
22282 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22283   $as_echo_n "(cached) " >&6
22284 else
22285   if test -n "$ac_ct_OBJC"; then
22286   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22287 else
22288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22289 for as_dir in $PATH
22290 do
22291   IFS=$as_save_IFS
22292   test -z "$as_dir" && as_dir=.
22293     for ac_exec_ext in '' $ac_executable_extensions; do
22294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22295     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22297     break 2
22298   fi
22299 done
22300   done
22301 IFS=$as_save_IFS
22302 
22303 fi
22304 fi
22305 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22306 if test -n "$ac_ct_OBJC"; then
22307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22308 $as_echo "$ac_ct_OBJC" >&6; }
22309 else
22310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22311 $as_echo "no" >&6; }
22312 fi
22313 
22314 
22315   test -n "$ac_ct_OBJC" && break
22316 done
22317 
22318   if test "x$ac_ct_OBJC" = x; then
22319     OBJC="gcc"
22320   else
22321     case $cross_compiling:$ac_tool_warned in
22322 yes:)
22323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22324 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22325 ac_tool_warned=yes ;;
22326 esac
22327     OBJC=$ac_ct_OBJC
22328   fi
22329 fi
22330 
22331 # Provide some information about the compiler.
22332 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22333 set X $ac_compile
22334 ac_compiler=$2
22335 for ac_option in --version -v -V -qversion; do
22336   { { ac_try="$ac_compiler $ac_option >&5"
22337 case "(($ac_try" in
22338   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22339   *) ac_try_echo=$ac_try;;
22340 esac
22341 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22342 $as_echo "$ac_try_echo"; } >&5
22343   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22344   ac_status=$?
22345   if test -s conftest.err; then
22346     sed '10a\
22347 ... rest of stderr output deleted ...
22348          10q' conftest.err >conftest.er1
22349     cat conftest.er1 >&5
22350   fi
22351   rm -f conftest.er1 conftest.err
22352   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22353   test $ac_status = 0; }
22354 done
22355 
22356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22357 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22358 if ${ac_cv_objc_compiler_gnu+:} false; then :
22359   $as_echo_n "(cached) " >&6
22360 else
22361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22362 /* end confdefs.h.  */
22363 
22364 int
22365 main ()
22366 {
22367 #ifndef __GNUC__
22368        choke me
22369 #endif
22370 
22371   ;
22372   return 0;
22373 }
22374 _ACEOF
22375 if ac_fn_objc_try_compile "$LINENO"; then :
22376   ac_compiler_gnu=yes
22377 else
22378   ac_compiler_gnu=no
22379 fi
22380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22381 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22382 
22383 fi
22384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22385 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22386 if test $ac_compiler_gnu = yes; then
22387   GOBJC=yes
22388 else
22389   GOBJC=
22390 fi
22391 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22392 ac_save_OBJCFLAGS=$OBJCFLAGS
22393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22394 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22395 if ${ac_cv_prog_objc_g+:} false; then :
22396   $as_echo_n "(cached) " >&6
22397 else
22398   ac_save_objc_werror_flag=$ac_objc_werror_flag
22399    ac_objc_werror_flag=yes
22400    ac_cv_prog_objc_g=no
22401    OBJCFLAGS="-g"
22402    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22403 /* end confdefs.h.  */
22404 
22405 int
22406 main ()
22407 {
22408 
22409   ;
22410   return 0;
22411 }
22412 _ACEOF
22413 if ac_fn_objc_try_compile "$LINENO"; then :
22414   ac_cv_prog_objc_g=yes
22415 else
22416   OBJCFLAGS=""
22417       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22418 /* end confdefs.h.  */
22419 
22420 int
22421 main ()
22422 {
22423 
22424   ;
22425   return 0;
22426 }
22427 _ACEOF
22428 if ac_fn_objc_try_compile "$LINENO"; then :
22429 
22430 else
22431   ac_objc_werror_flag=$ac_save_objc_werror_flag
22432          OBJCFLAGS="-g"
22433          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22434 /* end confdefs.h.  */
22435 
22436 int
22437 main ()
22438 {
22439 
22440   ;
22441   return 0;
22442 }
22443 _ACEOF
22444 if ac_fn_objc_try_compile "$LINENO"; then :
22445   ac_cv_prog_objc_g=yes
22446 fi
22447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22448 fi
22449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22450 fi
22451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22452    ac_objc_werror_flag=$ac_save_objc_werror_flag
22453 fi
22454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22455 $as_echo "$ac_cv_prog_objc_g" >&6; }
22456 if test "$ac_test_OBJCFLAGS" = set; then
22457   OBJCFLAGS=$ac_save_OBJCFLAGS
22458 elif test $ac_cv_prog_objc_g = yes; then
22459   if test "$GOBJC" = yes; then
22460     OBJCFLAGS="-g -O2"
22461   else
22462     OBJCFLAGS="-g"
22463   fi
22464 else
22465   if test "$GOBJC" = yes; then
22466     OBJCFLAGS="-O2"
22467   else
22468     OBJCFLAGS=
22469   fi
22470 fi
22471 ac_ext=cpp
22472 ac_cpp='$CXXCPP $CPPFLAGS'
22473 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22474 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22475 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22476 
22477 
22478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22479 
22480   # First separate the path from the arguments. This will split at the first
22481   # space.
22482   complete="$OBJC"
22483   path="${complete%% *}"
22484   tmp="$complete EOL"
22485   arguments="${tmp#* }"
22486 
22487   # Input might be given as Windows format, start by converting to
22488   # unix format.
22489   new_path=`$CYGPATH -u "$path"`
22490 
22491   # Now try to locate executable using which
22492   new_path=`$WHICH "$new_path" 2> /dev/null`
22493   # bat and cmd files are not always considered executable in cygwin causing which
22494   # to not find them
22495   if test "x$new_path" = x \
22496       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22497       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22498     new_path=`$CYGPATH -u "$path"`
22499   fi
22500   if test "x$new_path" = x; then
22501     # Oops. Which didn't find the executable.
22502     # The splitting of arguments from the executable at a space might have been incorrect,
22503     # since paths with space are more likely in Windows. Give it another try with the whole
22504     # argument.
22505     path="$complete"
22506     arguments="EOL"
22507     new_path=`$CYGPATH -u "$path"`
22508     new_path=`$WHICH "$new_path" 2> /dev/null`
22509     # bat and cmd files are not always considered executable in cygwin causing which
22510     # to not find them
22511     if test "x$new_path" = x \
22512         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22513         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22514       new_path=`$CYGPATH -u "$path"`
22515     fi
22516     if test "x$new_path" = x; then
22517       # It's still not found. Now this is an unrecoverable error.
22518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22519 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22520       has_space=`$ECHO "$complete" | $GREP " "`
22521       if test "x$has_space" != x; then
22522         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22523 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22524       fi
22525       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22526     fi
22527   fi
22528 
22529   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22530   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22531   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22532   # "foo.exe" is OK but "foo" is an error.
22533   #
22534   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22535   # It is also a way to make sure we got the proper file name for the real test later on.
22536   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22537   if test "x$test_shortpath" = x; then
22538     # Short path failed, file does not exist as specified.
22539     # Try adding .exe or .cmd
22540     if test -f "${new_path}.exe"; then
22541       input_to_shortpath="${new_path}.exe"
22542     elif test -f "${new_path}.cmd"; then
22543       input_to_shortpath="${new_path}.cmd"
22544     else
22545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22546 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22547       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22548 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22549       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22550     fi
22551   else
22552     input_to_shortpath="$new_path"
22553   fi
22554 
22555   # Call helper function which possibly converts this using DOS-style short mode.
22556   # If so, the updated path is stored in $new_path.
22557   new_path="$input_to_shortpath"
22558 
22559   input_path="$input_to_shortpath"
22560   # Check if we need to convert this using DOS-style short mode. If the path
22561   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22562   # take no chances and rewrite it.
22563   # Note: m4 eats our [], so we need to use [ and ] instead.
22564   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22565   if test "x$has_forbidden_chars" != x; then
22566     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22567     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22568     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22569     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22570       # Going to short mode and back again did indeed matter. Since short mode is
22571       # case insensitive, let's make it lowercase to improve readability.
22572       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22573       # Now convert it back to Unix-stile (cygpath)
22574       input_path=`$CYGPATH -u "$shortmode_path"`
22575       new_path="$input_path"
22576     fi
22577   fi
22578 
22579   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22580   if test "x$test_cygdrive_prefix" = x; then
22581     # As a simple fix, exclude /usr/bin since it's not a real path.
22582     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22583       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22584       # a path prefixed by /cygdrive for fixpath to work.
22585       new_path="$CYGWIN_ROOT_PATH$input_path"
22586     fi
22587   fi
22588 
22589   # remove trailing .exe if any
22590   new_path="${new_path/%.exe/}"
22591 
22592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22593 
22594   # First separate the path from the arguments. This will split at the first
22595   # space.
22596   complete="$OBJC"
22597   path="${complete%% *}"
22598   tmp="$complete EOL"
22599   arguments="${tmp#* }"
22600 
22601   # Input might be given as Windows format, start by converting to
22602   # unix format.
22603   new_path="$path"
22604 
22605   windows_path="$new_path"
22606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22607     unix_path=`$CYGPATH -u "$windows_path"`
22608     new_path="$unix_path"
22609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22611     new_path="$unix_path"
22612   fi
22613 
22614 
22615   # Now try to locate executable using which
22616   new_path=`$WHICH "$new_path" 2> /dev/null`
22617 
22618   if test "x$new_path" = x; then
22619     # Oops. Which didn't find the executable.
22620     # The splitting of arguments from the executable at a space might have been incorrect,
22621     # since paths with space are more likely in Windows. Give it another try with the whole
22622     # argument.
22623     path="$complete"
22624     arguments="EOL"
22625     new_path="$path"
22626 
22627   windows_path="$new_path"
22628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22629     unix_path=`$CYGPATH -u "$windows_path"`
22630     new_path="$unix_path"
22631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22633     new_path="$unix_path"
22634   fi
22635 
22636 
22637     new_path=`$WHICH "$new_path" 2> /dev/null`
22638 
22639     if test "x$new_path" = x; then
22640       # It's still not found. Now this is an unrecoverable error.
22641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22642 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22643       has_space=`$ECHO "$complete" | $GREP " "`
22644       if test "x$has_space" != x; then
22645         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22646 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22647       fi
22648       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22649     fi
22650   fi
22651 
22652   # Now new_path has a complete unix path to the binary
22653   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22654     # Keep paths in /bin as-is, but remove trailing .exe if any
22655     new_path="${new_path/%.exe/}"
22656     # Do not save /bin paths to all_fixpath_prefixes!
22657   else
22658     # Not in mixed or Windows style, start by that.
22659     new_path=`cmd //c echo $new_path`
22660 
22661   input_path="$new_path"
22662   # Check if we need to convert this using DOS-style short mode. If the path
22663   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22664   # take no chances and rewrite it.
22665   # Note: m4 eats our [], so we need to use [ and ] instead.
22666   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22667   if test "x$has_forbidden_chars" != x; then
22668     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22669     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22670   fi
22671 
22672     # Output is in $new_path
22673 
22674   windows_path="$new_path"
22675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22676     unix_path=`$CYGPATH -u "$windows_path"`
22677     new_path="$unix_path"
22678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22680     new_path="$unix_path"
22681   fi
22682 
22683     # remove trailing .exe if any
22684     new_path="${new_path/%.exe/}"
22685 
22686     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22687     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22688   fi
22689 
22690   else
22691     # We're on a posix platform. Hooray! :)
22692     # First separate the path from the arguments. This will split at the first
22693     # space.
22694     complete="$OBJC"
22695     path="${complete%% *}"
22696     tmp="$complete EOL"
22697     arguments="${tmp#* }"
22698 
22699     # Cannot rely on the command "which" here since it doesn't always work.
22700     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22701     if test -z "$is_absolute_path"; then
22702       # Path to executable is not absolute. Find it.
22703       IFS_save="$IFS"
22704       IFS=:
22705       for p in $PATH; do
22706         if test -f "$p/$path" && test -x "$p/$path"; then
22707           new_path="$p/$path"
22708           break
22709         fi
22710       done
22711       IFS="$IFS_save"
22712     else
22713       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22714 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22715       new_path="$path"
22716     fi
22717 
22718     if test "x$new_path" = x; then
22719       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22720 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22721       has_space=`$ECHO "$complete" | $GREP " "`
22722       if test "x$has_space" != x; then
22723         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22724 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22725       fi
22726       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22727     fi
22728   fi
22729 
22730   # Now join together the path and the arguments once again
22731   if test "x$arguments" != xEOL; then
22732     new_complete="$new_path ${arguments% *}"
22733   else
22734     new_complete="$new_path"
22735   fi
22736 
22737   if test "x$complete" != "x$new_complete"; then
22738     OBJC="$new_complete"
22739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22740 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22741   fi
22742 
22743   else
22744     OBJC=
22745   fi
22746 
22747   # Restore the flags to the user specified values.
22748   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22749   CFLAGS="$ORG_CFLAGS"
22750   CXXFLAGS="$ORG_CXXFLAGS"
22751   OBJCFLAGS="$ORG_OBJCFLAGS"
22752 
22753   LD="$CC"
22754   LDEXE="$CC"
22755   LDCXX="$CXX"
22756   LDEXECXX="$CXX"
22757 
22758   # LDEXE is the linker to use, when creating executables.
22759 
22760   # Linking C++ libraries.
22761 
22762   # Linking C++ executables.
22763 
22764 
22765   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22766     if test -n "$ac_tool_prefix"; then
22767   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22768 set dummy ${ac_tool_prefix}ar; ac_word=$2
22769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22770 $as_echo_n "checking for $ac_word... " >&6; }
22771 if ${ac_cv_prog_AR+:} false; then :
22772   $as_echo_n "(cached) " >&6
22773 else
22774   if test -n "$AR"; then
22775   ac_cv_prog_AR="$AR" # Let the user override the test.
22776 else
22777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22778 for as_dir in $PATH
22779 do
22780   IFS=$as_save_IFS
22781   test -z "$as_dir" && as_dir=.
22782     for ac_exec_ext in '' $ac_executable_extensions; do
22783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22784     ac_cv_prog_AR="${ac_tool_prefix}ar"
22785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22786     break 2
22787   fi
22788 done
22789   done
22790 IFS=$as_save_IFS
22791 
22792 fi
22793 fi
22794 AR=$ac_cv_prog_AR
22795 if test -n "$AR"; then
22796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22797 $as_echo "$AR" >&6; }
22798 else
22799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22800 $as_echo "no" >&6; }
22801 fi
22802 
22803 
22804 fi
22805 if test -z "$ac_cv_prog_AR"; then
22806   ac_ct_AR=$AR
22807   # Extract the first word of "ar", so it can be a program name with args.
22808 set dummy ar; ac_word=$2
22809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22810 $as_echo_n "checking for $ac_word... " >&6; }
22811 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22812   $as_echo_n "(cached) " >&6
22813 else
22814   if test -n "$ac_ct_AR"; then
22815   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22816 else
22817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22818 for as_dir in $PATH
22819 do
22820   IFS=$as_save_IFS
22821   test -z "$as_dir" && as_dir=.
22822     for ac_exec_ext in '' $ac_executable_extensions; do
22823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22824     ac_cv_prog_ac_ct_AR="ar"
22825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22826     break 2
22827   fi
22828 done
22829   done
22830 IFS=$as_save_IFS
22831 
22832 fi
22833 fi
22834 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22835 if test -n "$ac_ct_AR"; then
22836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22837 $as_echo "$ac_ct_AR" >&6; }
22838 else
22839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22840 $as_echo "no" >&6; }
22841 fi
22842 
22843   if test "x$ac_ct_AR" = x; then
22844     AR=""
22845   else
22846     case $cross_compiling:$ac_tool_warned in
22847 yes:)
22848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22849 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22850 ac_tool_warned=yes ;;
22851 esac
22852     AR=$ac_ct_AR
22853   fi
22854 else
22855   AR="$ac_cv_prog_AR"
22856 fi
22857 
22858 
22859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22860 
22861   # First separate the path from the arguments. This will split at the first
22862   # space.
22863   complete="$AR"
22864   path="${complete%% *}"
22865   tmp="$complete EOL"
22866   arguments="${tmp#* }"
22867 
22868   # Input might be given as Windows format, start by converting to
22869   # unix format.
22870   new_path=`$CYGPATH -u "$path"`
22871 
22872   # Now try to locate executable using which
22873   new_path=`$WHICH "$new_path" 2> /dev/null`
22874   # bat and cmd files are not always considered executable in cygwin causing which
22875   # to not find them
22876   if test "x$new_path" = x \
22877       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22878       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22879     new_path=`$CYGPATH -u "$path"`
22880   fi
22881   if test "x$new_path" = x; then
22882     # Oops. Which didn't find the executable.
22883     # The splitting of arguments from the executable at a space might have been incorrect,
22884     # since paths with space are more likely in Windows. Give it another try with the whole
22885     # argument.
22886     path="$complete"
22887     arguments="EOL"
22888     new_path=`$CYGPATH -u "$path"`
22889     new_path=`$WHICH "$new_path" 2> /dev/null`
22890     # bat and cmd files are not always considered executable in cygwin causing which
22891     # to not find them
22892     if test "x$new_path" = x \
22893         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22894         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22895       new_path=`$CYGPATH -u "$path"`
22896     fi
22897     if test "x$new_path" = x; then
22898       # It's still not found. Now this is an unrecoverable error.
22899       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22900 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22901       has_space=`$ECHO "$complete" | $GREP " "`
22902       if test "x$has_space" != x; then
22903         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22904 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22905       fi
22906       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22907     fi
22908   fi
22909 
22910   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22911   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22912   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22913   # "foo.exe" is OK but "foo" is an error.
22914   #
22915   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22916   # It is also a way to make sure we got the proper file name for the real test later on.
22917   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22918   if test "x$test_shortpath" = x; then
22919     # Short path failed, file does not exist as specified.
22920     # Try adding .exe or .cmd
22921     if test -f "${new_path}.exe"; then
22922       input_to_shortpath="${new_path}.exe"
22923     elif test -f "${new_path}.cmd"; then
22924       input_to_shortpath="${new_path}.cmd"
22925     else
22926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22927 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22928       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22929 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22930       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22931     fi
22932   else
22933     input_to_shortpath="$new_path"
22934   fi
22935 
22936   # Call helper function which possibly converts this using DOS-style short mode.
22937   # If so, the updated path is stored in $new_path.
22938   new_path="$input_to_shortpath"
22939 
22940   input_path="$input_to_shortpath"
22941   # Check if we need to convert this using DOS-style short mode. If the path
22942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22943   # take no chances and rewrite it.
22944   # Note: m4 eats our [], so we need to use [ and ] instead.
22945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22946   if test "x$has_forbidden_chars" != x; then
22947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22948     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22949     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22950     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22951       # Going to short mode and back again did indeed matter. Since short mode is
22952       # case insensitive, let's make it lowercase to improve readability.
22953       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22954       # Now convert it back to Unix-stile (cygpath)
22955       input_path=`$CYGPATH -u "$shortmode_path"`
22956       new_path="$input_path"
22957     fi
22958   fi
22959 
22960   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22961   if test "x$test_cygdrive_prefix" = x; then
22962     # As a simple fix, exclude /usr/bin since it's not a real path.
22963     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22964       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22965       # a path prefixed by /cygdrive for fixpath to work.
22966       new_path="$CYGWIN_ROOT_PATH$input_path"
22967     fi
22968   fi
22969 
22970   # remove trailing .exe if any
22971   new_path="${new_path/%.exe/}"
22972 
22973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22974 
22975   # First separate the path from the arguments. This will split at the first
22976   # space.
22977   complete="$AR"
22978   path="${complete%% *}"
22979   tmp="$complete EOL"
22980   arguments="${tmp#* }"
22981 
22982   # Input might be given as Windows format, start by converting to
22983   # unix format.
22984   new_path="$path"
22985 
22986   windows_path="$new_path"
22987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22988     unix_path=`$CYGPATH -u "$windows_path"`
22989     new_path="$unix_path"
22990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22992     new_path="$unix_path"
22993   fi
22994 
22995 
22996   # Now try to locate executable using which
22997   new_path=`$WHICH "$new_path" 2> /dev/null`
22998 
22999   if test "x$new_path" = x; then
23000     # Oops. Which didn't find the executable.
23001     # The splitting of arguments from the executable at a space might have been incorrect,
23002     # since paths with space are more likely in Windows. Give it another try with the whole
23003     # argument.
23004     path="$complete"
23005     arguments="EOL"
23006     new_path="$path"
23007 
23008   windows_path="$new_path"
23009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23010     unix_path=`$CYGPATH -u "$windows_path"`
23011     new_path="$unix_path"
23012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23014     new_path="$unix_path"
23015   fi
23016 
23017 
23018     new_path=`$WHICH "$new_path" 2> /dev/null`
23019 
23020     if test "x$new_path" = x; then
23021       # It's still not found. Now this is an unrecoverable error.
23022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23023 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23024       has_space=`$ECHO "$complete" | $GREP " "`
23025       if test "x$has_space" != x; then
23026         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23027 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23028       fi
23029       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23030     fi
23031   fi
23032 
23033   # Now new_path has a complete unix path to the binary
23034   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23035     # Keep paths in /bin as-is, but remove trailing .exe if any
23036     new_path="${new_path/%.exe/}"
23037     # Do not save /bin paths to all_fixpath_prefixes!
23038   else
23039     # Not in mixed or Windows style, start by that.
23040     new_path=`cmd //c echo $new_path`
23041 
23042   input_path="$new_path"
23043   # Check if we need to convert this using DOS-style short mode. If the path
23044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23045   # take no chances and rewrite it.
23046   # Note: m4 eats our [], so we need to use [ and ] instead.
23047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23048   if test "x$has_forbidden_chars" != x; then
23049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23050     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23051   fi
23052 
23053     # Output is in $new_path
23054 
23055   windows_path="$new_path"
23056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23057     unix_path=`$CYGPATH -u "$windows_path"`
23058     new_path="$unix_path"
23059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23061     new_path="$unix_path"
23062   fi
23063 
23064     # remove trailing .exe if any
23065     new_path="${new_path/%.exe/}"
23066 
23067     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23068     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23069   fi
23070 
23071   else
23072     # We're on a posix platform. Hooray! :)
23073     # First separate the path from the arguments. This will split at the first
23074     # space.
23075     complete="$AR"
23076     path="${complete%% *}"
23077     tmp="$complete EOL"
23078     arguments="${tmp#* }"
23079 
23080     # Cannot rely on the command "which" here since it doesn't always work.
23081     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23082     if test -z "$is_absolute_path"; then
23083       # Path to executable is not absolute. Find it.
23084       IFS_save="$IFS"
23085       IFS=:
23086       for p in $PATH; do
23087         if test -f "$p/$path" && test -x "$p/$path"; then
23088           new_path="$p/$path"
23089           break
23090         fi
23091       done
23092       IFS="$IFS_save"
23093     else
23094       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
23095 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
23096       new_path="$path"
23097     fi
23098 
23099     if test "x$new_path" = x; then
23100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23101 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23102       has_space=`$ECHO "$complete" | $GREP " "`
23103       if test "x$has_space" != x; then
23104         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23105 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23106       fi
23107       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23108     fi
23109   fi
23110 
23111   # Now join together the path and the arguments once again
23112   if test "x$arguments" != xEOL; then
23113     new_complete="$new_path ${arguments% *}"
23114   else
23115     new_complete="$new_path"
23116   fi
23117 
23118   if test "x$complete" != "x$new_complete"; then
23119     AR="$new_complete"
23120     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23121 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23122   fi
23123 
23124   fi
23125   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23126     ARFLAGS="-r"
23127   elif test "x$OPENJDK_TARGET_OS" = xaix; then
23128     ARFLAGS="-X64"
23129   else
23130     ARFLAGS=""
23131   fi
23132 
23133 
23134   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
23135   HOTSPOT_CXX="$CXX"
23136   HOTSPOT_LD="$LD"
23137 
23138 
23139 
23140   COMPILER_NAME=gcc
23141   COMPILER_TYPE=CC
23142   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23143 
23144     # For now, assume that we are always compiling using cl.exe.
23145     CC_OUT_OPTION=-Fo
23146     EXE_OUT_OPTION=-out:
23147     LD_OUT_OPTION=-out:
23148     AR_OUT_OPTION=-out:
23149     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23150     # program for something completely different.
23151     # Extract the first word of "link", so it can be a program name with args.
23152 set dummy link; ac_word=$2
23153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23154 $as_echo_n "checking for $ac_word... " >&6; }
23155 if ${ac_cv_prog_WINLD+:} false; then :
23156   $as_echo_n "(cached) " >&6
23157 else
23158   if test -n "$WINLD"; then
23159   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23160 else
23161   ac_prog_rejected=no
23162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23163 for as_dir in $PATH
23164 do
23165   IFS=$as_save_IFS
23166   test -z "$as_dir" && as_dir=.
23167     for ac_exec_ext in '' $ac_executable_extensions; do
23168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23169     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23170        ac_prog_rejected=yes
23171        continue
23172      fi
23173     ac_cv_prog_WINLD="link"
23174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23175     break 2
23176   fi
23177 done
23178   done
23179 IFS=$as_save_IFS
23180 
23181 if test $ac_prog_rejected = yes; then
23182   # We found a bogon in the path, so make sure we never use it.
23183   set dummy $ac_cv_prog_WINLD
23184   shift
23185   if test $# != 0; then
23186     # We chose a different compiler from the bogus one.
23187     # However, it has the same basename, so the bogon will be chosen
23188     # first if we set WINLD to just the basename; use the full file name.
23189     shift
23190     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23191   fi
23192 fi
23193 fi
23194 fi
23195 WINLD=$ac_cv_prog_WINLD
23196 if test -n "$WINLD"; then
23197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23198 $as_echo "$WINLD" >&6; }
23199 else
23200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23201 $as_echo "no" >&6; }
23202 fi
23203 
23204 
23205     # Since we must ignore the first found link, WINLD will contain
23206     # the full path to the link.exe program.
23207 
23208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23209 
23210   # First separate the path from the arguments. This will split at the first
23211   # space.
23212   complete="$WINLD"
23213   path="${complete%% *}"
23214   tmp="$complete EOL"
23215   arguments="${tmp#* }"
23216 
23217   # Input might be given as Windows format, start by converting to
23218   # unix format.
23219   new_path=`$CYGPATH -u "$path"`
23220 
23221   # Now try to locate executable using which
23222   new_path=`$WHICH "$new_path" 2> /dev/null`
23223   # bat and cmd files are not always considered executable in cygwin causing which
23224   # to not find them
23225   if test "x$new_path" = x \
23226       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23227       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23228     new_path=`$CYGPATH -u "$path"`
23229   fi
23230   if test "x$new_path" = x; then
23231     # Oops. Which didn't find the executable.
23232     # The splitting of arguments from the executable at a space might have been incorrect,
23233     # since paths with space are more likely in Windows. Give it another try with the whole
23234     # argument.
23235     path="$complete"
23236     arguments="EOL"
23237     new_path=`$CYGPATH -u "$path"`
23238     new_path=`$WHICH "$new_path" 2> /dev/null`
23239     # bat and cmd files are not always considered executable in cygwin causing which
23240     # to not find them
23241     if test "x$new_path" = x \
23242         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23243         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23244       new_path=`$CYGPATH -u "$path"`
23245     fi
23246     if test "x$new_path" = x; then
23247       # It's still not found. Now this is an unrecoverable error.
23248       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23249 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23250       has_space=`$ECHO "$complete" | $GREP " "`
23251       if test "x$has_space" != x; then
23252         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23253 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23254       fi
23255       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23256     fi
23257   fi
23258 
23259   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23260   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23261   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23262   # "foo.exe" is OK but "foo" is an error.
23263   #
23264   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23265   # It is also a way to make sure we got the proper file name for the real test later on.
23266   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23267   if test "x$test_shortpath" = x; then
23268     # Short path failed, file does not exist as specified.
23269     # Try adding .exe or .cmd
23270     if test -f "${new_path}.exe"; then
23271       input_to_shortpath="${new_path}.exe"
23272     elif test -f "${new_path}.cmd"; then
23273       input_to_shortpath="${new_path}.cmd"
23274     else
23275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23276 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23277       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23278 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23279       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23280     fi
23281   else
23282     input_to_shortpath="$new_path"
23283   fi
23284 
23285   # Call helper function which possibly converts this using DOS-style short mode.
23286   # If so, the updated path is stored in $new_path.
23287   new_path="$input_to_shortpath"
23288 
23289   input_path="$input_to_shortpath"
23290   # Check if we need to convert this using DOS-style short mode. If the path
23291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23292   # take no chances and rewrite it.
23293   # Note: m4 eats our [], so we need to use [ and ] instead.
23294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23295   if test "x$has_forbidden_chars" != x; then
23296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23297     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23298     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23299     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23300       # Going to short mode and back again did indeed matter. Since short mode is
23301       # case insensitive, let's make it lowercase to improve readability.
23302       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23303       # Now convert it back to Unix-stile (cygpath)
23304       input_path=`$CYGPATH -u "$shortmode_path"`
23305       new_path="$input_path"
23306     fi
23307   fi
23308 
23309   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23310   if test "x$test_cygdrive_prefix" = x; then
23311     # As a simple fix, exclude /usr/bin since it's not a real path.
23312     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23313       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23314       # a path prefixed by /cygdrive for fixpath to work.
23315       new_path="$CYGWIN_ROOT_PATH$input_path"
23316     fi
23317   fi
23318 
23319   # remove trailing .exe if any
23320   new_path="${new_path/%.exe/}"
23321 
23322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23323 
23324   # First separate the path from the arguments. This will split at the first
23325   # space.
23326   complete="$WINLD"
23327   path="${complete%% *}"
23328   tmp="$complete EOL"
23329   arguments="${tmp#* }"
23330 
23331   # Input might be given as Windows format, start by converting to
23332   # unix format.
23333   new_path="$path"
23334 
23335   windows_path="$new_path"
23336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23337     unix_path=`$CYGPATH -u "$windows_path"`
23338     new_path="$unix_path"
23339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23341     new_path="$unix_path"
23342   fi
23343 
23344 
23345   # Now try to locate executable using which
23346   new_path=`$WHICH "$new_path" 2> /dev/null`
23347 
23348   if test "x$new_path" = x; then
23349     # Oops. Which didn't find the executable.
23350     # The splitting of arguments from the executable at a space might have been incorrect,
23351     # since paths with space are more likely in Windows. Give it another try with the whole
23352     # argument.
23353     path="$complete"
23354     arguments="EOL"
23355     new_path="$path"
23356 
23357   windows_path="$new_path"
23358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23359     unix_path=`$CYGPATH -u "$windows_path"`
23360     new_path="$unix_path"
23361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23363     new_path="$unix_path"
23364   fi
23365 
23366 
23367     new_path=`$WHICH "$new_path" 2> /dev/null`
23368 
23369     if test "x$new_path" = x; then
23370       # It's still not found. Now this is an unrecoverable error.
23371       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23372 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23373       has_space=`$ECHO "$complete" | $GREP " "`
23374       if test "x$has_space" != x; then
23375         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23376 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23377       fi
23378       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23379     fi
23380   fi
23381 
23382   # Now new_path has a complete unix path to the binary
23383   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23384     # Keep paths in /bin as-is, but remove trailing .exe if any
23385     new_path="${new_path/%.exe/}"
23386     # Do not save /bin paths to all_fixpath_prefixes!
23387   else
23388     # Not in mixed or Windows style, start by that.
23389     new_path=`cmd //c echo $new_path`
23390 
23391   input_path="$new_path"
23392   # Check if we need to convert this using DOS-style short mode. If the path
23393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23394   # take no chances and rewrite it.
23395   # Note: m4 eats our [], so we need to use [ and ] instead.
23396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23397   if test "x$has_forbidden_chars" != x; then
23398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23400   fi
23401 
23402     # Output is in $new_path
23403 
23404   windows_path="$new_path"
23405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23406     unix_path=`$CYGPATH -u "$windows_path"`
23407     new_path="$unix_path"
23408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23410     new_path="$unix_path"
23411   fi
23412 
23413     # remove trailing .exe if any
23414     new_path="${new_path/%.exe/}"
23415 
23416     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23417     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23418   fi
23419 
23420   else
23421     # We're on a posix platform. Hooray! :)
23422     # First separate the path from the arguments. This will split at the first
23423     # space.
23424     complete="$WINLD"
23425     path="${complete%% *}"
23426     tmp="$complete EOL"
23427     arguments="${tmp#* }"
23428 
23429     # Cannot rely on the command "which" here since it doesn't always work.
23430     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23431     if test -z "$is_absolute_path"; then
23432       # Path to executable is not absolute. Find it.
23433       IFS_save="$IFS"
23434       IFS=:
23435       for p in $PATH; do
23436         if test -f "$p/$path" && test -x "$p/$path"; then
23437           new_path="$p/$path"
23438           break
23439         fi
23440       done
23441       IFS="$IFS_save"
23442     else
23443       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23444 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23445       new_path="$path"
23446     fi
23447 
23448     if test "x$new_path" = x; then
23449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23450 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23451       has_space=`$ECHO "$complete" | $GREP " "`
23452       if test "x$has_space" != x; then
23453         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23454 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23455       fi
23456       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23457     fi
23458   fi
23459 
23460   # Now join together the path and the arguments once again
23461   if test "x$arguments" != xEOL; then
23462     new_complete="$new_path ${arguments% *}"
23463   else
23464     new_complete="$new_path"
23465   fi
23466 
23467   if test "x$complete" != "x$new_complete"; then
23468     WINLD="$new_complete"
23469     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23470 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23471   fi
23472 
23473     printf "Windows linker was found at $WINLD\n"
23474     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23475 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23476     "$WINLD" --version > /dev/null
23477     if test $? -eq 0 ; then
23478       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23479 $as_echo "no" >&6; }
23480       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23481     else
23482       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23483 $as_echo "yes" >&6; }
23484     fi
23485     LD="$WINLD"
23486     LDEXE="$WINLD"
23487     LDCXX="$WINLD"
23488     LDEXECXX="$WINLD"
23489 
23490     # Extract the first word of "mt", so it can be a program name with args.
23491 set dummy mt; ac_word=$2
23492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23493 $as_echo_n "checking for $ac_word... " >&6; }
23494 if ${ac_cv_prog_MT+:} false; then :
23495   $as_echo_n "(cached) " >&6
23496 else
23497   if test -n "$MT"; then
23498   ac_cv_prog_MT="$MT" # Let the user override the test.
23499 else
23500   ac_prog_rejected=no
23501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23502 for as_dir in $PATH
23503 do
23504   IFS=$as_save_IFS
23505   test -z "$as_dir" && as_dir=.
23506     for ac_exec_ext in '' $ac_executable_extensions; do
23507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23508     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23509        ac_prog_rejected=yes
23510        continue
23511      fi
23512     ac_cv_prog_MT="mt"
23513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23514     break 2
23515   fi
23516 done
23517   done
23518 IFS=$as_save_IFS
23519 
23520 if test $ac_prog_rejected = yes; then
23521   # We found a bogon in the path, so make sure we never use it.
23522   set dummy $ac_cv_prog_MT
23523   shift
23524   if test $# != 0; then
23525     # We chose a different compiler from the bogus one.
23526     # However, it has the same basename, so the bogon will be chosen
23527     # first if we set MT to just the basename; use the full file name.
23528     shift
23529     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23530   fi
23531 fi
23532 fi
23533 fi
23534 MT=$ac_cv_prog_MT
23535 if test -n "$MT"; then
23536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23537 $as_echo "$MT" >&6; }
23538 else
23539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23540 $as_echo "no" >&6; }
23541 fi
23542 
23543 
23544 
23545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23546 
23547   # First separate the path from the arguments. This will split at the first
23548   # space.
23549   complete="$MT"
23550   path="${complete%% *}"
23551   tmp="$complete EOL"
23552   arguments="${tmp#* }"
23553 
23554   # Input might be given as Windows format, start by converting to
23555   # unix format.
23556   new_path=`$CYGPATH -u "$path"`
23557 
23558   # Now try to locate executable using which
23559   new_path=`$WHICH "$new_path" 2> /dev/null`
23560   # bat and cmd files are not always considered executable in cygwin causing which
23561   # to not find them
23562   if test "x$new_path" = x \
23563       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23564       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23565     new_path=`$CYGPATH -u "$path"`
23566   fi
23567   if test "x$new_path" = x; then
23568     # Oops. Which didn't find the executable.
23569     # The splitting of arguments from the executable at a space might have been incorrect,
23570     # since paths with space are more likely in Windows. Give it another try with the whole
23571     # argument.
23572     path="$complete"
23573     arguments="EOL"
23574     new_path=`$CYGPATH -u "$path"`
23575     new_path=`$WHICH "$new_path" 2> /dev/null`
23576     # bat and cmd files are not always considered executable in cygwin causing which
23577     # to not find them
23578     if test "x$new_path" = x \
23579         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23580         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23581       new_path=`$CYGPATH -u "$path"`
23582     fi
23583     if test "x$new_path" = x; then
23584       # It's still not found. Now this is an unrecoverable error.
23585       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23586 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23587       has_space=`$ECHO "$complete" | $GREP " "`
23588       if test "x$has_space" != x; then
23589         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23590 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23591       fi
23592       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23593     fi
23594   fi
23595 
23596   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23597   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23598   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23599   # "foo.exe" is OK but "foo" is an error.
23600   #
23601   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23602   # It is also a way to make sure we got the proper file name for the real test later on.
23603   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23604   if test "x$test_shortpath" = x; then
23605     # Short path failed, file does not exist as specified.
23606     # Try adding .exe or .cmd
23607     if test -f "${new_path}.exe"; then
23608       input_to_shortpath="${new_path}.exe"
23609     elif test -f "${new_path}.cmd"; then
23610       input_to_shortpath="${new_path}.cmd"
23611     else
23612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23613 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23614       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23615 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23616       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23617     fi
23618   else
23619     input_to_shortpath="$new_path"
23620   fi
23621 
23622   # Call helper function which possibly converts this using DOS-style short mode.
23623   # If so, the updated path is stored in $new_path.
23624   new_path="$input_to_shortpath"
23625 
23626   input_path="$input_to_shortpath"
23627   # Check if we need to convert this using DOS-style short mode. If the path
23628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23629   # take no chances and rewrite it.
23630   # Note: m4 eats our [], so we need to use [ and ] instead.
23631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23632   if test "x$has_forbidden_chars" != x; then
23633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23634     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23635     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23636     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23637       # Going to short mode and back again did indeed matter. Since short mode is
23638       # case insensitive, let's make it lowercase to improve readability.
23639       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23640       # Now convert it back to Unix-stile (cygpath)
23641       input_path=`$CYGPATH -u "$shortmode_path"`
23642       new_path="$input_path"
23643     fi
23644   fi
23645 
23646   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23647   if test "x$test_cygdrive_prefix" = x; then
23648     # As a simple fix, exclude /usr/bin since it's not a real path.
23649     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23650       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23651       # a path prefixed by /cygdrive for fixpath to work.
23652       new_path="$CYGWIN_ROOT_PATH$input_path"
23653     fi
23654   fi
23655 
23656   # remove trailing .exe if any
23657   new_path="${new_path/%.exe/}"
23658 
23659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23660 
23661   # First separate the path from the arguments. This will split at the first
23662   # space.
23663   complete="$MT"
23664   path="${complete%% *}"
23665   tmp="$complete EOL"
23666   arguments="${tmp#* }"
23667 
23668   # Input might be given as Windows format, start by converting to
23669   # unix format.
23670   new_path="$path"
23671 
23672   windows_path="$new_path"
23673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23674     unix_path=`$CYGPATH -u "$windows_path"`
23675     new_path="$unix_path"
23676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23678     new_path="$unix_path"
23679   fi
23680 
23681 
23682   # Now try to locate executable using which
23683   new_path=`$WHICH "$new_path" 2> /dev/null`
23684 
23685   if test "x$new_path" = x; then
23686     # Oops. Which didn't find the executable.
23687     # The splitting of arguments from the executable at a space might have been incorrect,
23688     # since paths with space are more likely in Windows. Give it another try with the whole
23689     # argument.
23690     path="$complete"
23691     arguments="EOL"
23692     new_path="$path"
23693 
23694   windows_path="$new_path"
23695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23696     unix_path=`$CYGPATH -u "$windows_path"`
23697     new_path="$unix_path"
23698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23700     new_path="$unix_path"
23701   fi
23702 
23703 
23704     new_path=`$WHICH "$new_path" 2> /dev/null`
23705 
23706     if test "x$new_path" = x; then
23707       # It's still not found. Now this is an unrecoverable error.
23708       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23709 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23710       has_space=`$ECHO "$complete" | $GREP " "`
23711       if test "x$has_space" != x; then
23712         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23713 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23714       fi
23715       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23716     fi
23717   fi
23718 
23719   # Now new_path has a complete unix path to the binary
23720   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23721     # Keep paths in /bin as-is, but remove trailing .exe if any
23722     new_path="${new_path/%.exe/}"
23723     # Do not save /bin paths to all_fixpath_prefixes!
23724   else
23725     # Not in mixed or Windows style, start by that.
23726     new_path=`cmd //c echo $new_path`
23727 
23728   input_path="$new_path"
23729   # Check if we need to convert this using DOS-style short mode. If the path
23730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23731   # take no chances and rewrite it.
23732   # Note: m4 eats our [], so we need to use [ and ] instead.
23733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23734   if test "x$has_forbidden_chars" != x; then
23735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23737   fi
23738 
23739     # Output is in $new_path
23740 
23741   windows_path="$new_path"
23742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23743     unix_path=`$CYGPATH -u "$windows_path"`
23744     new_path="$unix_path"
23745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23746     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23747     new_path="$unix_path"
23748   fi
23749 
23750     # remove trailing .exe if any
23751     new_path="${new_path/%.exe/}"
23752 
23753     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23754     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23755   fi
23756 
23757   else
23758     # We're on a posix platform. Hooray! :)
23759     # First separate the path from the arguments. This will split at the first
23760     # space.
23761     complete="$MT"
23762     path="${complete%% *}"
23763     tmp="$complete EOL"
23764     arguments="${tmp#* }"
23765 
23766     # Cannot rely on the command "which" here since it doesn't always work.
23767     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23768     if test -z "$is_absolute_path"; then
23769       # Path to executable is not absolute. Find it.
23770       IFS_save="$IFS"
23771       IFS=:
23772       for p in $PATH; do
23773         if test -f "$p/$path" && test -x "$p/$path"; then
23774           new_path="$p/$path"
23775           break
23776         fi
23777       done
23778       IFS="$IFS_save"
23779     else
23780       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23781 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23782       new_path="$path"
23783     fi
23784 
23785     if test "x$new_path" = x; then
23786       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23787 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23788       has_space=`$ECHO "$complete" | $GREP " "`
23789       if test "x$has_space" != x; then
23790         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23791 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23792       fi
23793       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23794     fi
23795   fi
23796 
23797   # Now join together the path and the arguments once again
23798   if test "x$arguments" != xEOL; then
23799     new_complete="$new_path ${arguments% *}"
23800   else
23801     new_complete="$new_path"
23802   fi
23803 
23804   if test "x$complete" != "x$new_complete"; then
23805     MT="$new_complete"
23806     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23807 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23808   fi
23809 
23810     # The resource compiler
23811     # Extract the first word of "rc", so it can be a program name with args.
23812 set dummy rc; ac_word=$2
23813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23814 $as_echo_n "checking for $ac_word... " >&6; }
23815 if ${ac_cv_prog_RC+:} false; then :
23816   $as_echo_n "(cached) " >&6
23817 else
23818   if test -n "$RC"; then
23819   ac_cv_prog_RC="$RC" # Let the user override the test.
23820 else
23821   ac_prog_rejected=no
23822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23823 for as_dir in $PATH
23824 do
23825   IFS=$as_save_IFS
23826   test -z "$as_dir" && as_dir=.
23827     for ac_exec_ext in '' $ac_executable_extensions; do
23828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23829     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23830        ac_prog_rejected=yes
23831        continue
23832      fi
23833     ac_cv_prog_RC="rc"
23834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23835     break 2
23836   fi
23837 done
23838   done
23839 IFS=$as_save_IFS
23840 
23841 if test $ac_prog_rejected = yes; then
23842   # We found a bogon in the path, so make sure we never use it.
23843   set dummy $ac_cv_prog_RC
23844   shift
23845   if test $# != 0; then
23846     # We chose a different compiler from the bogus one.
23847     # However, it has the same basename, so the bogon will be chosen
23848     # first if we set RC to just the basename; use the full file name.
23849     shift
23850     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23851   fi
23852 fi
23853 fi
23854 fi
23855 RC=$ac_cv_prog_RC
23856 if test -n "$RC"; then
23857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23858 $as_echo "$RC" >&6; }
23859 else
23860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23861 $as_echo "no" >&6; }
23862 fi
23863 
23864 
23865 
23866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23867 
23868   # First separate the path from the arguments. This will split at the first
23869   # space.
23870   complete="$RC"
23871   path="${complete%% *}"
23872   tmp="$complete EOL"
23873   arguments="${tmp#* }"
23874 
23875   # Input might be given as Windows format, start by converting to
23876   # unix format.
23877   new_path=`$CYGPATH -u "$path"`
23878 
23879   # Now try to locate executable using which
23880   new_path=`$WHICH "$new_path" 2> /dev/null`
23881   # bat and cmd files are not always considered executable in cygwin causing which
23882   # to not find them
23883   if test "x$new_path" = x \
23884       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23885       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23886     new_path=`$CYGPATH -u "$path"`
23887   fi
23888   if test "x$new_path" = x; then
23889     # Oops. Which didn't find the executable.
23890     # The splitting of arguments from the executable at a space might have been incorrect,
23891     # since paths with space are more likely in Windows. Give it another try with the whole
23892     # argument.
23893     path="$complete"
23894     arguments="EOL"
23895     new_path=`$CYGPATH -u "$path"`
23896     new_path=`$WHICH "$new_path" 2> /dev/null`
23897     # bat and cmd files are not always considered executable in cygwin causing which
23898     # to not find them
23899     if test "x$new_path" = x \
23900         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23901         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23902       new_path=`$CYGPATH -u "$path"`
23903     fi
23904     if test "x$new_path" = x; then
23905       # It's still not found. Now this is an unrecoverable error.
23906       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23907 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23908       has_space=`$ECHO "$complete" | $GREP " "`
23909       if test "x$has_space" != x; then
23910         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23911 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23912       fi
23913       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23914     fi
23915   fi
23916 
23917   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23918   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23919   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23920   # "foo.exe" is OK but "foo" is an error.
23921   #
23922   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23923   # It is also a way to make sure we got the proper file name for the real test later on.
23924   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23925   if test "x$test_shortpath" = x; then
23926     # Short path failed, file does not exist as specified.
23927     # Try adding .exe or .cmd
23928     if test -f "${new_path}.exe"; then
23929       input_to_shortpath="${new_path}.exe"
23930     elif test -f "${new_path}.cmd"; then
23931       input_to_shortpath="${new_path}.cmd"
23932     else
23933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23934 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23935       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23936 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23937       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23938     fi
23939   else
23940     input_to_shortpath="$new_path"
23941   fi
23942 
23943   # Call helper function which possibly converts this using DOS-style short mode.
23944   # If so, the updated path is stored in $new_path.
23945   new_path="$input_to_shortpath"
23946 
23947   input_path="$input_to_shortpath"
23948   # Check if we need to convert this using DOS-style short mode. If the path
23949   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23950   # take no chances and rewrite it.
23951   # Note: m4 eats our [], so we need to use [ and ] instead.
23952   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23953   if test "x$has_forbidden_chars" != x; then
23954     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23955     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23956     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23957     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23958       # Going to short mode and back again did indeed matter. Since short mode is
23959       # case insensitive, let's make it lowercase to improve readability.
23960       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23961       # Now convert it back to Unix-stile (cygpath)
23962       input_path=`$CYGPATH -u "$shortmode_path"`
23963       new_path="$input_path"
23964     fi
23965   fi
23966 
23967   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23968   if test "x$test_cygdrive_prefix" = x; then
23969     # As a simple fix, exclude /usr/bin since it's not a real path.
23970     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23971       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23972       # a path prefixed by /cygdrive for fixpath to work.
23973       new_path="$CYGWIN_ROOT_PATH$input_path"
23974     fi
23975   fi
23976 
23977   # remove trailing .exe if any
23978   new_path="${new_path/%.exe/}"
23979 
23980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23981 
23982   # First separate the path from the arguments. This will split at the first
23983   # space.
23984   complete="$RC"
23985   path="${complete%% *}"
23986   tmp="$complete EOL"
23987   arguments="${tmp#* }"
23988 
23989   # Input might be given as Windows format, start by converting to
23990   # unix format.
23991   new_path="$path"
23992 
23993   windows_path="$new_path"
23994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23995     unix_path=`$CYGPATH -u "$windows_path"`
23996     new_path="$unix_path"
23997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23999     new_path="$unix_path"
24000   fi
24001 
24002 
24003   # Now try to locate executable using which
24004   new_path=`$WHICH "$new_path" 2> /dev/null`
24005 
24006   if test "x$new_path" = x; then
24007     # Oops. Which didn't find the executable.
24008     # The splitting of arguments from the executable at a space might have been incorrect,
24009     # since paths with space are more likely in Windows. Give it another try with the whole
24010     # argument.
24011     path="$complete"
24012     arguments="EOL"
24013     new_path="$path"
24014 
24015   windows_path="$new_path"
24016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24017     unix_path=`$CYGPATH -u "$windows_path"`
24018     new_path="$unix_path"
24019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24021     new_path="$unix_path"
24022   fi
24023 
24024 
24025     new_path=`$WHICH "$new_path" 2> /dev/null`
24026 
24027     if test "x$new_path" = x; then
24028       # It's still not found. Now this is an unrecoverable error.
24029       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24030 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24031       has_space=`$ECHO "$complete" | $GREP " "`
24032       if test "x$has_space" != x; then
24033         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24034 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24035       fi
24036       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24037     fi
24038   fi
24039 
24040   # Now new_path has a complete unix path to the binary
24041   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24042     # Keep paths in /bin as-is, but remove trailing .exe if any
24043     new_path="${new_path/%.exe/}"
24044     # Do not save /bin paths to all_fixpath_prefixes!
24045   else
24046     # Not in mixed or Windows style, start by that.
24047     new_path=`cmd //c echo $new_path`
24048 
24049   input_path="$new_path"
24050   # Check if we need to convert this using DOS-style short mode. If the path
24051   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24052   # take no chances and rewrite it.
24053   # Note: m4 eats our [], so we need to use [ and ] instead.
24054   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24055   if test "x$has_forbidden_chars" != x; then
24056     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24057     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24058   fi
24059 
24060     # Output is in $new_path
24061 
24062   windows_path="$new_path"
24063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24064     unix_path=`$CYGPATH -u "$windows_path"`
24065     new_path="$unix_path"
24066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24068     new_path="$unix_path"
24069   fi
24070 
24071     # remove trailing .exe if any
24072     new_path="${new_path/%.exe/}"
24073 
24074     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24075     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24076   fi
24077 
24078   else
24079     # We're on a posix platform. Hooray! :)
24080     # First separate the path from the arguments. This will split at the first
24081     # space.
24082     complete="$RC"
24083     path="${complete%% *}"
24084     tmp="$complete EOL"
24085     arguments="${tmp#* }"
24086 
24087     # Cannot rely on the command "which" here since it doesn't always work.
24088     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24089     if test -z "$is_absolute_path"; then
24090       # Path to executable is not absolute. Find it.
24091       IFS_save="$IFS"
24092       IFS=:
24093       for p in $PATH; do
24094         if test -f "$p/$path" && test -x "$p/$path"; then
24095           new_path="$p/$path"
24096           break
24097         fi
24098       done
24099       IFS="$IFS_save"
24100     else
24101       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
24102 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
24103       new_path="$path"
24104     fi
24105 
24106     if test "x$new_path" = x; then
24107       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24108 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24109       has_space=`$ECHO "$complete" | $GREP " "`
24110       if test "x$has_space" != x; then
24111         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24112 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24113       fi
24114       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24115     fi
24116   fi
24117 
24118   # Now join together the path and the arguments once again
24119   if test "x$arguments" != xEOL; then
24120     new_complete="$new_path ${arguments% *}"
24121   else
24122     new_complete="$new_path"
24123   fi
24124 
24125   if test "x$complete" != "x$new_complete"; then
24126     RC="$new_complete"
24127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24128 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24129   fi
24130 
24131 
24132     # For hotspot, we need these in Windows mixed path,
24133     # so rewrite them all. Need added .exe suffix.
24134     HOTSPOT_CXX="$CXX.exe"
24135     HOTSPOT_LD="$LD.exe"
24136     HOTSPOT_MT="$MT.exe"
24137     HOTSPOT_RC="$RC.exe"
24138 
24139   unix_path="$HOTSPOT_CXX"
24140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24141     windows_path=`$CYGPATH -m "$unix_path"`
24142     HOTSPOT_CXX="$windows_path"
24143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24144     windows_path=`cmd //c echo $unix_path`
24145     HOTSPOT_CXX="$windows_path"
24146   fi
24147 
24148 
24149   unix_path="$HOTSPOT_LD"
24150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24151     windows_path=`$CYGPATH -m "$unix_path"`
24152     HOTSPOT_LD="$windows_path"
24153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24154     windows_path=`cmd //c echo $unix_path`
24155     HOTSPOT_LD="$windows_path"
24156   fi
24157 
24158 
24159   unix_path="$HOTSPOT_MT"
24160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24161     windows_path=`$CYGPATH -m "$unix_path"`
24162     HOTSPOT_MT="$windows_path"
24163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24164     windows_path=`cmd //c echo $unix_path`
24165     HOTSPOT_MT="$windows_path"
24166   fi
24167 
24168 
24169   unix_path="$HOTSPOT_RC"
24170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24171     windows_path=`$CYGPATH -m "$unix_path"`
24172     HOTSPOT_RC="$windows_path"
24173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24174     windows_path=`cmd //c echo $unix_path`
24175     HOTSPOT_RC="$windows_path"
24176   fi
24177 
24178 
24179 
24180 
24181     RC_FLAGS="-nologo -l 0x409 -r"
24182     if test "x$VARIANT" = xOPT; then :
24183 
24184     RC_FLAGS="$RC_FLAGS -d NDEBUG"
24185 
24186 fi
24187 
24188   # The version variables used to create RC_FLAGS may be overridden
24189   # in a custom configure script, or possibly the command line.
24190   # Let those variables be expanded at make time in spec.gmk.
24191   # The \$ are escaped to the shell, and the $(...) variables
24192   # are evaluated by make.
24193   RC_FLAGS="$RC_FLAGS \
24194       -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
24195       -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
24196       -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
24197       -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
24198       -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
24199       -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
24200       -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
24201 
24202   # lib.exe is used to create static libraries.
24203   # Extract the first word of "lib", so it can be a program name with args.
24204 set dummy lib; ac_word=$2
24205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24206 $as_echo_n "checking for $ac_word... " >&6; }
24207 if ${ac_cv_prog_WINAR+:} false; then :
24208   $as_echo_n "(cached) " >&6
24209 else
24210   if test -n "$WINAR"; then
24211   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24212 else
24213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24214 for as_dir in $PATH
24215 do
24216   IFS=$as_save_IFS
24217   test -z "$as_dir" && as_dir=.
24218     for ac_exec_ext in '' $ac_executable_extensions; do
24219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24220     ac_cv_prog_WINAR="lib"
24221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24222     break 2
24223   fi
24224 done
24225   done
24226 IFS=$as_save_IFS
24227 
24228 fi
24229 fi
24230 WINAR=$ac_cv_prog_WINAR
24231 if test -n "$WINAR"; then
24232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24233 $as_echo "$WINAR" >&6; }
24234 else
24235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24236 $as_echo "no" >&6; }
24237 fi
24238 
24239 
24240 
24241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24242 
24243   # First separate the path from the arguments. This will split at the first
24244   # space.
24245   complete="$WINAR"
24246   path="${complete%% *}"
24247   tmp="$complete EOL"
24248   arguments="${tmp#* }"
24249 
24250   # Input might be given as Windows format, start by converting to
24251   # unix format.
24252   new_path=`$CYGPATH -u "$path"`
24253 
24254   # Now try to locate executable using which
24255   new_path=`$WHICH "$new_path" 2> /dev/null`
24256   # bat and cmd files are not always considered executable in cygwin causing which
24257   # to not find them
24258   if test "x$new_path" = x \
24259       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24260       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24261     new_path=`$CYGPATH -u "$path"`
24262   fi
24263   if test "x$new_path" = x; then
24264     # Oops. Which didn't find the executable.
24265     # The splitting of arguments from the executable at a space might have been incorrect,
24266     # since paths with space are more likely in Windows. Give it another try with the whole
24267     # argument.
24268     path="$complete"
24269     arguments="EOL"
24270     new_path=`$CYGPATH -u "$path"`
24271     new_path=`$WHICH "$new_path" 2> /dev/null`
24272     # bat and cmd files are not always considered executable in cygwin causing which
24273     # to not find them
24274     if test "x$new_path" = x \
24275         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24276         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24277       new_path=`$CYGPATH -u "$path"`
24278     fi
24279     if test "x$new_path" = x; then
24280       # It's still not found. Now this is an unrecoverable error.
24281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24282 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24283       has_space=`$ECHO "$complete" | $GREP " "`
24284       if test "x$has_space" != x; then
24285         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24286 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24287       fi
24288       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24289     fi
24290   fi
24291 
24292   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24293   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24294   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24295   # "foo.exe" is OK but "foo" is an error.
24296   #
24297   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24298   # It is also a way to make sure we got the proper file name for the real test later on.
24299   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24300   if test "x$test_shortpath" = x; then
24301     # Short path failed, file does not exist as specified.
24302     # Try adding .exe or .cmd
24303     if test -f "${new_path}.exe"; then
24304       input_to_shortpath="${new_path}.exe"
24305     elif test -f "${new_path}.cmd"; then
24306       input_to_shortpath="${new_path}.cmd"
24307     else
24308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24309 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24310       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24311 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24312       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24313     fi
24314   else
24315     input_to_shortpath="$new_path"
24316   fi
24317 
24318   # Call helper function which possibly converts this using DOS-style short mode.
24319   # If so, the updated path is stored in $new_path.
24320   new_path="$input_to_shortpath"
24321 
24322   input_path="$input_to_shortpath"
24323   # Check if we need to convert this using DOS-style short mode. If the path
24324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24325   # take no chances and rewrite it.
24326   # Note: m4 eats our [], so we need to use [ and ] instead.
24327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24328   if test "x$has_forbidden_chars" != x; then
24329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24330     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24331     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24332     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24333       # Going to short mode and back again did indeed matter. Since short mode is
24334       # case insensitive, let's make it lowercase to improve readability.
24335       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24336       # Now convert it back to Unix-stile (cygpath)
24337       input_path=`$CYGPATH -u "$shortmode_path"`
24338       new_path="$input_path"
24339     fi
24340   fi
24341 
24342   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24343   if test "x$test_cygdrive_prefix" = x; then
24344     # As a simple fix, exclude /usr/bin since it's not a real path.
24345     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24346       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24347       # a path prefixed by /cygdrive for fixpath to work.
24348       new_path="$CYGWIN_ROOT_PATH$input_path"
24349     fi
24350   fi
24351 
24352   # remove trailing .exe if any
24353   new_path="${new_path/%.exe/}"
24354 
24355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24356 
24357   # First separate the path from the arguments. This will split at the first
24358   # space.
24359   complete="$WINAR"
24360   path="${complete%% *}"
24361   tmp="$complete EOL"
24362   arguments="${tmp#* }"
24363 
24364   # Input might be given as Windows format, start by converting to
24365   # unix format.
24366   new_path="$path"
24367 
24368   windows_path="$new_path"
24369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24370     unix_path=`$CYGPATH -u "$windows_path"`
24371     new_path="$unix_path"
24372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24374     new_path="$unix_path"
24375   fi
24376 
24377 
24378   # Now try to locate executable using which
24379   new_path=`$WHICH "$new_path" 2> /dev/null`
24380 
24381   if test "x$new_path" = x; then
24382     # Oops. Which didn't find the executable.
24383     # The splitting of arguments from the executable at a space might have been incorrect,
24384     # since paths with space are more likely in Windows. Give it another try with the whole
24385     # argument.
24386     path="$complete"
24387     arguments="EOL"
24388     new_path="$path"
24389 
24390   windows_path="$new_path"
24391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24392     unix_path=`$CYGPATH -u "$windows_path"`
24393     new_path="$unix_path"
24394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24396     new_path="$unix_path"
24397   fi
24398 
24399 
24400     new_path=`$WHICH "$new_path" 2> /dev/null`
24401 
24402     if test "x$new_path" = x; then
24403       # It's still not found. Now this is an unrecoverable error.
24404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24405 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24406       has_space=`$ECHO "$complete" | $GREP " "`
24407       if test "x$has_space" != x; then
24408         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24409 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24410       fi
24411       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24412     fi
24413   fi
24414 
24415   # Now new_path has a complete unix path to the binary
24416   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24417     # Keep paths in /bin as-is, but remove trailing .exe if any
24418     new_path="${new_path/%.exe/}"
24419     # Do not save /bin paths to all_fixpath_prefixes!
24420   else
24421     # Not in mixed or Windows style, start by that.
24422     new_path=`cmd //c echo $new_path`
24423 
24424   input_path="$new_path"
24425   # Check if we need to convert this using DOS-style short mode. If the path
24426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24427   # take no chances and rewrite it.
24428   # Note: m4 eats our [], so we need to use [ and ] instead.
24429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24430   if test "x$has_forbidden_chars" != x; then
24431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24433   fi
24434 
24435     # Output is in $new_path
24436 
24437   windows_path="$new_path"
24438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24439     unix_path=`$CYGPATH -u "$windows_path"`
24440     new_path="$unix_path"
24441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24443     new_path="$unix_path"
24444   fi
24445 
24446     # remove trailing .exe if any
24447     new_path="${new_path/%.exe/}"
24448 
24449     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24450     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24451   fi
24452 
24453   else
24454     # We're on a posix platform. Hooray! :)
24455     # First separate the path from the arguments. This will split at the first
24456     # space.
24457     complete="$WINAR"
24458     path="${complete%% *}"
24459     tmp="$complete EOL"
24460     arguments="${tmp#* }"
24461 
24462     # Cannot rely on the command "which" here since it doesn't always work.
24463     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24464     if test -z "$is_absolute_path"; then
24465       # Path to executable is not absolute. Find it.
24466       IFS_save="$IFS"
24467       IFS=:
24468       for p in $PATH; do
24469         if test -f "$p/$path" && test -x "$p/$path"; then
24470           new_path="$p/$path"
24471           break
24472         fi
24473       done
24474       IFS="$IFS_save"
24475     else
24476       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24477 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24478       new_path="$path"
24479     fi
24480 
24481     if test "x$new_path" = x; then
24482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24483 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24484       has_space=`$ECHO "$complete" | $GREP " "`
24485       if test "x$has_space" != x; then
24486         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24487 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24488       fi
24489       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24490     fi
24491   fi
24492 
24493   # Now join together the path and the arguments once again
24494   if test "x$arguments" != xEOL; then
24495     new_complete="$new_path ${arguments% *}"
24496   else
24497     new_complete="$new_path"
24498   fi
24499 
24500   if test "x$complete" != "x$new_complete"; then
24501     WINAR="$new_complete"
24502     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24503 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24504   fi
24505 
24506   AR="$WINAR"
24507   ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24508 
24509   # Extract the first word of "dumpbin", so it can be a program name with args.
24510 set dummy dumpbin; ac_word=$2
24511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24512 $as_echo_n "checking for $ac_word... " >&6; }
24513 if ${ac_cv_prog_DUMPBIN+:} false; then :
24514   $as_echo_n "(cached) " >&6
24515 else
24516   if test -n "$DUMPBIN"; then
24517   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24518 else
24519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24520 for as_dir in $PATH
24521 do
24522   IFS=$as_save_IFS
24523   test -z "$as_dir" && as_dir=.
24524     for ac_exec_ext in '' $ac_executable_extensions; do
24525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24526     ac_cv_prog_DUMPBIN="dumpbin"
24527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24528     break 2
24529   fi
24530 done
24531   done
24532 IFS=$as_save_IFS
24533 
24534 fi
24535 fi
24536 DUMPBIN=$ac_cv_prog_DUMPBIN
24537 if test -n "$DUMPBIN"; then
24538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24539 $as_echo "$DUMPBIN" >&6; }
24540 else
24541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24542 $as_echo "no" >&6; }
24543 fi
24544 
24545 
24546 
24547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24548 
24549   # First separate the path from the arguments. This will split at the first
24550   # space.
24551   complete="$DUMPBIN"
24552   path="${complete%% *}"
24553   tmp="$complete EOL"
24554   arguments="${tmp#* }"
24555 
24556   # Input might be given as Windows format, start by converting to
24557   # unix format.
24558   new_path=`$CYGPATH -u "$path"`
24559 
24560   # Now try to locate executable using which
24561   new_path=`$WHICH "$new_path" 2> /dev/null`
24562   # bat and cmd files are not always considered executable in cygwin causing which
24563   # to not find them
24564   if test "x$new_path" = x \
24565       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24566       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24567     new_path=`$CYGPATH -u "$path"`
24568   fi
24569   if test "x$new_path" = x; then
24570     # Oops. Which didn't find the executable.
24571     # The splitting of arguments from the executable at a space might have been incorrect,
24572     # since paths with space are more likely in Windows. Give it another try with the whole
24573     # argument.
24574     path="$complete"
24575     arguments="EOL"
24576     new_path=`$CYGPATH -u "$path"`
24577     new_path=`$WHICH "$new_path" 2> /dev/null`
24578     # bat and cmd files are not always considered executable in cygwin causing which
24579     # to not find them
24580     if test "x$new_path" = x \
24581         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24582         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24583       new_path=`$CYGPATH -u "$path"`
24584     fi
24585     if test "x$new_path" = x; then
24586       # It's still not found. Now this is an unrecoverable error.
24587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24588 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24589       has_space=`$ECHO "$complete" | $GREP " "`
24590       if test "x$has_space" != x; then
24591         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24592 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24593       fi
24594       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24595     fi
24596   fi
24597 
24598   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24599   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24600   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24601   # "foo.exe" is OK but "foo" is an error.
24602   #
24603   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24604   # It is also a way to make sure we got the proper file name for the real test later on.
24605   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24606   if test "x$test_shortpath" = x; then
24607     # Short path failed, file does not exist as specified.
24608     # Try adding .exe or .cmd
24609     if test -f "${new_path}.exe"; then
24610       input_to_shortpath="${new_path}.exe"
24611     elif test -f "${new_path}.cmd"; then
24612       input_to_shortpath="${new_path}.cmd"
24613     else
24614       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24615 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24616       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24617 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24618       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24619     fi
24620   else
24621     input_to_shortpath="$new_path"
24622   fi
24623 
24624   # Call helper function which possibly converts this using DOS-style short mode.
24625   # If so, the updated path is stored in $new_path.
24626   new_path="$input_to_shortpath"
24627 
24628   input_path="$input_to_shortpath"
24629   # Check if we need to convert this using DOS-style short mode. If the path
24630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24631   # take no chances and rewrite it.
24632   # Note: m4 eats our [], so we need to use [ and ] instead.
24633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24634   if test "x$has_forbidden_chars" != x; then
24635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24636     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24637     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24638     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24639       # Going to short mode and back again did indeed matter. Since short mode is
24640       # case insensitive, let's make it lowercase to improve readability.
24641       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24642       # Now convert it back to Unix-stile (cygpath)
24643       input_path=`$CYGPATH -u "$shortmode_path"`
24644       new_path="$input_path"
24645     fi
24646   fi
24647 
24648   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24649   if test "x$test_cygdrive_prefix" = x; then
24650     # As a simple fix, exclude /usr/bin since it's not a real path.
24651     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24652       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24653       # a path prefixed by /cygdrive for fixpath to work.
24654       new_path="$CYGWIN_ROOT_PATH$input_path"
24655     fi
24656   fi
24657 
24658   # remove trailing .exe if any
24659   new_path="${new_path/%.exe/}"
24660 
24661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24662 
24663   # First separate the path from the arguments. This will split at the first
24664   # space.
24665   complete="$DUMPBIN"
24666   path="${complete%% *}"
24667   tmp="$complete EOL"
24668   arguments="${tmp#* }"
24669 
24670   # Input might be given as Windows format, start by converting to
24671   # unix format.
24672   new_path="$path"
24673 
24674   windows_path="$new_path"
24675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24676     unix_path=`$CYGPATH -u "$windows_path"`
24677     new_path="$unix_path"
24678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24680     new_path="$unix_path"
24681   fi
24682 
24683 
24684   # Now try to locate executable using which
24685   new_path=`$WHICH "$new_path" 2> /dev/null`
24686 
24687   if test "x$new_path" = x; then
24688     # Oops. Which didn't find the executable.
24689     # The splitting of arguments from the executable at a space might have been incorrect,
24690     # since paths with space are more likely in Windows. Give it another try with the whole
24691     # argument.
24692     path="$complete"
24693     arguments="EOL"
24694     new_path="$path"
24695 
24696   windows_path="$new_path"
24697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24698     unix_path=`$CYGPATH -u "$windows_path"`
24699     new_path="$unix_path"
24700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24702     new_path="$unix_path"
24703   fi
24704 
24705 
24706     new_path=`$WHICH "$new_path" 2> /dev/null`
24707 
24708     if test "x$new_path" = x; then
24709       # It's still not found. Now this is an unrecoverable error.
24710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24711 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24712       has_space=`$ECHO "$complete" | $GREP " "`
24713       if test "x$has_space" != x; then
24714         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24715 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24716       fi
24717       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24718     fi
24719   fi
24720 
24721   # Now new_path has a complete unix path to the binary
24722   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24723     # Keep paths in /bin as-is, but remove trailing .exe if any
24724     new_path="${new_path/%.exe/}"
24725     # Do not save /bin paths to all_fixpath_prefixes!
24726   else
24727     # Not in mixed or Windows style, start by that.
24728     new_path=`cmd //c echo $new_path`
24729 
24730   input_path="$new_path"
24731   # Check if we need to convert this using DOS-style short mode. If the path
24732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24733   # take no chances and rewrite it.
24734   # Note: m4 eats our [], so we need to use [ and ] instead.
24735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24736   if test "x$has_forbidden_chars" != x; then
24737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24739   fi
24740 
24741     # Output is in $new_path
24742 
24743   windows_path="$new_path"
24744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24745     unix_path=`$CYGPATH -u "$windows_path"`
24746     new_path="$unix_path"
24747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24749     new_path="$unix_path"
24750   fi
24751 
24752     # remove trailing .exe if any
24753     new_path="${new_path/%.exe/}"
24754 
24755     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24756     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24757   fi
24758 
24759   else
24760     # We're on a posix platform. Hooray! :)
24761     # First separate the path from the arguments. This will split at the first
24762     # space.
24763     complete="$DUMPBIN"
24764     path="${complete%% *}"
24765     tmp="$complete EOL"
24766     arguments="${tmp#* }"
24767 
24768     # Cannot rely on the command "which" here since it doesn't always work.
24769     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24770     if test -z "$is_absolute_path"; then
24771       # Path to executable is not absolute. Find it.
24772       IFS_save="$IFS"
24773       IFS=:
24774       for p in $PATH; do
24775         if test -f "$p/$path" && test -x "$p/$path"; then
24776           new_path="$p/$path"
24777           break
24778         fi
24779       done
24780       IFS="$IFS_save"
24781     else
24782       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24783 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24784       new_path="$path"
24785     fi
24786 
24787     if test "x$new_path" = x; then
24788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24789 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24790       has_space=`$ECHO "$complete" | $GREP " "`
24791       if test "x$has_space" != x; then
24792         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24793 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24794       fi
24795       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24796     fi
24797   fi
24798 
24799   # Now join together the path and the arguments once again
24800   if test "x$arguments" != xEOL; then
24801     new_complete="$new_path ${arguments% *}"
24802   else
24803     new_complete="$new_path"
24804   fi
24805 
24806   if test "x$complete" != "x$new_complete"; then
24807     DUMPBIN="$new_complete"
24808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24809 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24810   fi
24811 
24812 
24813       COMPILER_TYPE=CL
24814       CCXXFLAGS="$CCXXFLAGS -nologo"
24815 
24816 fi
24817 
24818 
24819 
24820   ac_ext=c
24821 ac_cpp='$CPP $CPPFLAGS'
24822 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24823 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24824 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24826 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24827 # On Suns, sometimes $CPP names a directory.
24828 if test -n "$CPP" && test -d "$CPP"; then
24829   CPP=
24830 fi
24831 if test -z "$CPP"; then
24832   if ${ac_cv_prog_CPP+:} false; then :
24833   $as_echo_n "(cached) " >&6
24834 else
24835       # Double quotes because CPP needs to be expanded
24836     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24837     do
24838       ac_preproc_ok=false
24839 for ac_c_preproc_warn_flag in '' yes
24840 do
24841   # Use a header file that comes with gcc, so configuring glibc
24842   # with a fresh cross-compiler works.
24843   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24844   # <limits.h> exists even on freestanding compilers.
24845   # On the NeXT, cc -E runs the code through the compiler's parser,
24846   # not just through cpp. "Syntax error" is here to catch this case.
24847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24848 /* end confdefs.h.  */
24849 #ifdef __STDC__
24850 # include <limits.h>
24851 #else
24852 # include <assert.h>
24853 #endif
24854                      Syntax error
24855 _ACEOF
24856 if ac_fn_c_try_cpp "$LINENO"; then :
24857 
24858 else
24859   # Broken: fails on valid input.
24860 continue
24861 fi
24862 rm -f conftest.err conftest.i conftest.$ac_ext
24863 
24864   # OK, works on sane cases.  Now check whether nonexistent headers
24865   # can be detected and how.
24866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24867 /* end confdefs.h.  */
24868 #include <ac_nonexistent.h>
24869 _ACEOF
24870 if ac_fn_c_try_cpp "$LINENO"; then :
24871   # Broken: success on invalid input.
24872 continue
24873 else
24874   # Passes both tests.
24875 ac_preproc_ok=:
24876 break
24877 fi
24878 rm -f conftest.err conftest.i conftest.$ac_ext
24879 
24880 done
24881 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24882 rm -f conftest.i conftest.err conftest.$ac_ext
24883 if $ac_preproc_ok; then :
24884   break
24885 fi
24886 
24887     done
24888     ac_cv_prog_CPP=$CPP
24889 
24890 fi
24891   CPP=$ac_cv_prog_CPP
24892 else
24893   ac_cv_prog_CPP=$CPP
24894 fi
24895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24896 $as_echo "$CPP" >&6; }
24897 ac_preproc_ok=false
24898 for ac_c_preproc_warn_flag in '' yes
24899 do
24900   # Use a header file that comes with gcc, so configuring glibc
24901   # with a fresh cross-compiler works.
24902   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24903   # <limits.h> exists even on freestanding compilers.
24904   # On the NeXT, cc -E runs the code through the compiler's parser,
24905   # not just through cpp. "Syntax error" is here to catch this case.
24906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24907 /* end confdefs.h.  */
24908 #ifdef __STDC__
24909 # include <limits.h>
24910 #else
24911 # include <assert.h>
24912 #endif
24913                      Syntax error
24914 _ACEOF
24915 if ac_fn_c_try_cpp "$LINENO"; then :
24916 
24917 else
24918   # Broken: fails on valid input.
24919 continue
24920 fi
24921 rm -f conftest.err conftest.i conftest.$ac_ext
24922 
24923   # OK, works on sane cases.  Now check whether nonexistent headers
24924   # can be detected and how.
24925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24926 /* end confdefs.h.  */
24927 #include <ac_nonexistent.h>
24928 _ACEOF
24929 if ac_fn_c_try_cpp "$LINENO"; then :
24930   # Broken: success on invalid input.
24931 continue
24932 else
24933   # Passes both tests.
24934 ac_preproc_ok=:
24935 break
24936 fi
24937 rm -f conftest.err conftest.i conftest.$ac_ext
24938 
24939 done
24940 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24941 rm -f conftest.i conftest.err conftest.$ac_ext
24942 if $ac_preproc_ok; then :
24943 
24944 else
24945   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24946 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24947 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24948 See \`config.log' for more details" "$LINENO" 5; }
24949 fi
24950 
24951 ac_ext=cpp
24952 ac_cpp='$CXXCPP $CPPFLAGS'
24953 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24954 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24955 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24956 
24957 
24958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24959 
24960   # First separate the path from the arguments. This will split at the first
24961   # space.
24962   complete="$CPP"
24963   path="${complete%% *}"
24964   tmp="$complete EOL"
24965   arguments="${tmp#* }"
24966 
24967   # Input might be given as Windows format, start by converting to
24968   # unix format.
24969   new_path=`$CYGPATH -u "$path"`
24970 
24971   # Now try to locate executable using which
24972   new_path=`$WHICH "$new_path" 2> /dev/null`
24973   # bat and cmd files are not always considered executable in cygwin causing which
24974   # to not find them
24975   if test "x$new_path" = x \
24976       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24977       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24978     new_path=`$CYGPATH -u "$path"`
24979   fi
24980   if test "x$new_path" = x; then
24981     # Oops. Which didn't find the executable.
24982     # The splitting of arguments from the executable at a space might have been incorrect,
24983     # since paths with space are more likely in Windows. Give it another try with the whole
24984     # argument.
24985     path="$complete"
24986     arguments="EOL"
24987     new_path=`$CYGPATH -u "$path"`
24988     new_path=`$WHICH "$new_path" 2> /dev/null`
24989     # bat and cmd files are not always considered executable in cygwin causing which
24990     # to not find them
24991     if test "x$new_path" = x \
24992         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24993         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24994       new_path=`$CYGPATH -u "$path"`
24995     fi
24996     if test "x$new_path" = x; then
24997       # It's still not found. Now this is an unrecoverable error.
24998       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24999 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25000       has_space=`$ECHO "$complete" | $GREP " "`
25001       if test "x$has_space" != x; then
25002         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25003 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25004       fi
25005       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25006     fi
25007   fi
25008 
25009   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25010   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25011   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25012   # "foo.exe" is OK but "foo" is an error.
25013   #
25014   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25015   # It is also a way to make sure we got the proper file name for the real test later on.
25016   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25017   if test "x$test_shortpath" = x; then
25018     # Short path failed, file does not exist as specified.
25019     # Try adding .exe or .cmd
25020     if test -f "${new_path}.exe"; then
25021       input_to_shortpath="${new_path}.exe"
25022     elif test -f "${new_path}.cmd"; then
25023       input_to_shortpath="${new_path}.cmd"
25024     else
25025       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
25026 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
25027       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25028 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25029       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25030     fi
25031   else
25032     input_to_shortpath="$new_path"
25033   fi
25034 
25035   # Call helper function which possibly converts this using DOS-style short mode.
25036   # If so, the updated path is stored in $new_path.
25037   new_path="$input_to_shortpath"
25038 
25039   input_path="$input_to_shortpath"
25040   # Check if we need to convert this using DOS-style short mode. If the path
25041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25042   # take no chances and rewrite it.
25043   # Note: m4 eats our [], so we need to use [ and ] instead.
25044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25045   if test "x$has_forbidden_chars" != x; then
25046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25047     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25048     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25049     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25050       # Going to short mode and back again did indeed matter. Since short mode is
25051       # case insensitive, let's make it lowercase to improve readability.
25052       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25053       # Now convert it back to Unix-stile (cygpath)
25054       input_path=`$CYGPATH -u "$shortmode_path"`
25055       new_path="$input_path"
25056     fi
25057   fi
25058 
25059   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25060   if test "x$test_cygdrive_prefix" = x; then
25061     # As a simple fix, exclude /usr/bin since it's not a real path.
25062     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25063       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25064       # a path prefixed by /cygdrive for fixpath to work.
25065       new_path="$CYGWIN_ROOT_PATH$input_path"
25066     fi
25067   fi
25068 
25069   # remove trailing .exe if any
25070   new_path="${new_path/%.exe/}"
25071 
25072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25073 
25074   # First separate the path from the arguments. This will split at the first
25075   # space.
25076   complete="$CPP"
25077   path="${complete%% *}"
25078   tmp="$complete EOL"
25079   arguments="${tmp#* }"
25080 
25081   # Input might be given as Windows format, start by converting to
25082   # unix format.
25083   new_path="$path"
25084 
25085   windows_path="$new_path"
25086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25087     unix_path=`$CYGPATH -u "$windows_path"`
25088     new_path="$unix_path"
25089   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25090     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25091     new_path="$unix_path"
25092   fi
25093 
25094 
25095   # Now try to locate executable using which
25096   new_path=`$WHICH "$new_path" 2> /dev/null`
25097 
25098   if test "x$new_path" = x; then
25099     # Oops. Which didn't find the executable.
25100     # The splitting of arguments from the executable at a space might have been incorrect,
25101     # since paths with space are more likely in Windows. Give it another try with the whole
25102     # argument.
25103     path="$complete"
25104     arguments="EOL"
25105     new_path="$path"
25106 
25107   windows_path="$new_path"
25108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25109     unix_path=`$CYGPATH -u "$windows_path"`
25110     new_path="$unix_path"
25111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25113     new_path="$unix_path"
25114   fi
25115 
25116 
25117     new_path=`$WHICH "$new_path" 2> /dev/null`
25118 
25119     if test "x$new_path" = x; then
25120       # It's still not found. Now this is an unrecoverable error.
25121       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25122 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25123       has_space=`$ECHO "$complete" | $GREP " "`
25124       if test "x$has_space" != x; then
25125         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25126 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25127       fi
25128       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25129     fi
25130   fi
25131 
25132   # Now new_path has a complete unix path to the binary
25133   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25134     # Keep paths in /bin as-is, but remove trailing .exe if any
25135     new_path="${new_path/%.exe/}"
25136     # Do not save /bin paths to all_fixpath_prefixes!
25137   else
25138     # Not in mixed or Windows style, start by that.
25139     new_path=`cmd //c echo $new_path`
25140 
25141   input_path="$new_path"
25142   # Check if we need to convert this using DOS-style short mode. If the path
25143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25144   # take no chances and rewrite it.
25145   # Note: m4 eats our [], so we need to use [ and ] instead.
25146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25147   if test "x$has_forbidden_chars" != x; then
25148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25149     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25150   fi
25151 
25152     # Output is in $new_path
25153 
25154   windows_path="$new_path"
25155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25156     unix_path=`$CYGPATH -u "$windows_path"`
25157     new_path="$unix_path"
25158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25160     new_path="$unix_path"
25161   fi
25162 
25163     # remove trailing .exe if any
25164     new_path="${new_path/%.exe/}"
25165 
25166     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25167     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25168   fi
25169 
25170   else
25171     # We're on a posix platform. Hooray! :)
25172     # First separate the path from the arguments. This will split at the first
25173     # space.
25174     complete="$CPP"
25175     path="${complete%% *}"
25176     tmp="$complete EOL"
25177     arguments="${tmp#* }"
25178 
25179     # Cannot rely on the command "which" here since it doesn't always work.
25180     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25181     if test -z "$is_absolute_path"; then
25182       # Path to executable is not absolute. Find it.
25183       IFS_save="$IFS"
25184       IFS=:
25185       for p in $PATH; do
25186         if test -f "$p/$path" && test -x "$p/$path"; then
25187           new_path="$p/$path"
25188           break
25189         fi
25190       done
25191       IFS="$IFS_save"
25192     else
25193       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
25194 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
25195       new_path="$path"
25196     fi
25197 
25198     if test "x$new_path" = x; then
25199       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25200 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25201       has_space=`$ECHO "$complete" | $GREP " "`
25202       if test "x$has_space" != x; then
25203         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25204 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25205       fi
25206       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25207     fi
25208   fi
25209 
25210   # Now join together the path and the arguments once again
25211   if test "x$arguments" != xEOL; then
25212     new_complete="$new_path ${arguments% *}"
25213   else
25214     new_complete="$new_path"
25215   fi
25216 
25217   if test "x$complete" != "x$new_complete"; then
25218     CPP="$new_complete"
25219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25220 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25221   fi
25222 
25223 
25224   ac_ext=cpp
25225 ac_cpp='$CXXCPP $CPPFLAGS'
25226 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25227 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25228 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25230 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25231 if test -z "$CXXCPP"; then
25232   if ${ac_cv_prog_CXXCPP+:} false; then :
25233   $as_echo_n "(cached) " >&6
25234 else
25235       # Double quotes because CXXCPP needs to be expanded
25236     for CXXCPP in "$CXX -E" "/lib/cpp"
25237     do
25238       ac_preproc_ok=false
25239 for ac_cxx_preproc_warn_flag in '' yes
25240 do
25241   # Use a header file that comes with gcc, so configuring glibc
25242   # with a fresh cross-compiler works.
25243   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25244   # <limits.h> exists even on freestanding compilers.
25245   # On the NeXT, cc -E runs the code through the compiler's parser,
25246   # not just through cpp. "Syntax error" is here to catch this case.
25247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25248 /* end confdefs.h.  */
25249 #ifdef __STDC__
25250 # include <limits.h>
25251 #else
25252 # include <assert.h>
25253 #endif
25254                      Syntax error
25255 _ACEOF
25256 if ac_fn_cxx_try_cpp "$LINENO"; then :
25257 
25258 else
25259   # Broken: fails on valid input.
25260 continue
25261 fi
25262 rm -f conftest.err conftest.i conftest.$ac_ext
25263 
25264   # OK, works on sane cases.  Now check whether nonexistent headers
25265   # can be detected and how.
25266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25267 /* end confdefs.h.  */
25268 #include <ac_nonexistent.h>
25269 _ACEOF
25270 if ac_fn_cxx_try_cpp "$LINENO"; then :
25271   # Broken: success on invalid input.
25272 continue
25273 else
25274   # Passes both tests.
25275 ac_preproc_ok=:
25276 break
25277 fi
25278 rm -f conftest.err conftest.i conftest.$ac_ext
25279 
25280 done
25281 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25282 rm -f conftest.i conftest.err conftest.$ac_ext
25283 if $ac_preproc_ok; then :
25284   break
25285 fi
25286 
25287     done
25288     ac_cv_prog_CXXCPP=$CXXCPP
25289 
25290 fi
25291   CXXCPP=$ac_cv_prog_CXXCPP
25292 else
25293   ac_cv_prog_CXXCPP=$CXXCPP
25294 fi
25295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25296 $as_echo "$CXXCPP" >&6; }
25297 ac_preproc_ok=false
25298 for ac_cxx_preproc_warn_flag in '' yes
25299 do
25300   # Use a header file that comes with gcc, so configuring glibc
25301   # with a fresh cross-compiler works.
25302   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25303   # <limits.h> exists even on freestanding compilers.
25304   # On the NeXT, cc -E runs the code through the compiler's parser,
25305   # not just through cpp. "Syntax error" is here to catch this case.
25306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25307 /* end confdefs.h.  */
25308 #ifdef __STDC__
25309 # include <limits.h>
25310 #else
25311 # include <assert.h>
25312 #endif
25313                      Syntax error
25314 _ACEOF
25315 if ac_fn_cxx_try_cpp "$LINENO"; then :
25316 
25317 else
25318   # Broken: fails on valid input.
25319 continue
25320 fi
25321 rm -f conftest.err conftest.i conftest.$ac_ext
25322 
25323   # OK, works on sane cases.  Now check whether nonexistent headers
25324   # can be detected and how.
25325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25326 /* end confdefs.h.  */
25327 #include <ac_nonexistent.h>
25328 _ACEOF
25329 if ac_fn_cxx_try_cpp "$LINENO"; then :
25330   # Broken: success on invalid input.
25331 continue
25332 else
25333   # Passes both tests.
25334 ac_preproc_ok=:
25335 break
25336 fi
25337 rm -f conftest.err conftest.i conftest.$ac_ext
25338 
25339 done
25340 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25341 rm -f conftest.i conftest.err conftest.$ac_ext
25342 if $ac_preproc_ok; then :
25343 
25344 else
25345   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25346 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25347 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25348 See \`config.log' for more details" "$LINENO" 5; }
25349 fi
25350 
25351 ac_ext=cpp
25352 ac_cpp='$CXXCPP $CPPFLAGS'
25353 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25354 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25355 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25356 
25357 
25358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25359 
25360   # First separate the path from the arguments. This will split at the first
25361   # space.
25362   complete="$CXXCPP"
25363   path="${complete%% *}"
25364   tmp="$complete EOL"
25365   arguments="${tmp#* }"
25366 
25367   # Input might be given as Windows format, start by converting to
25368   # unix format.
25369   new_path=`$CYGPATH -u "$path"`
25370 
25371   # Now try to locate executable using which
25372   new_path=`$WHICH "$new_path" 2> /dev/null`
25373   # bat and cmd files are not always considered executable in cygwin causing which
25374   # to not find them
25375   if test "x$new_path" = x \
25376       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25377       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25378     new_path=`$CYGPATH -u "$path"`
25379   fi
25380   if test "x$new_path" = x; then
25381     # Oops. Which didn't find the executable.
25382     # The splitting of arguments from the executable at a space might have been incorrect,
25383     # since paths with space are more likely in Windows. Give it another try with the whole
25384     # argument.
25385     path="$complete"
25386     arguments="EOL"
25387     new_path=`$CYGPATH -u "$path"`
25388     new_path=`$WHICH "$new_path" 2> /dev/null`
25389     # bat and cmd files are not always considered executable in cygwin causing which
25390     # to not find them
25391     if test "x$new_path" = x \
25392         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25393         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25394       new_path=`$CYGPATH -u "$path"`
25395     fi
25396     if test "x$new_path" = x; then
25397       # It's still not found. Now this is an unrecoverable error.
25398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25399 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25400       has_space=`$ECHO "$complete" | $GREP " "`
25401       if test "x$has_space" != x; then
25402         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25403 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25404       fi
25405       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25406     fi
25407   fi
25408 
25409   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25410   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25411   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25412   # "foo.exe" is OK but "foo" is an error.
25413   #
25414   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25415   # It is also a way to make sure we got the proper file name for the real test later on.
25416   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25417   if test "x$test_shortpath" = x; then
25418     # Short path failed, file does not exist as specified.
25419     # Try adding .exe or .cmd
25420     if test -f "${new_path}.exe"; then
25421       input_to_shortpath="${new_path}.exe"
25422     elif test -f "${new_path}.cmd"; then
25423       input_to_shortpath="${new_path}.cmd"
25424     else
25425       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25426 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25427       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25428 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25429       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25430     fi
25431   else
25432     input_to_shortpath="$new_path"
25433   fi
25434 
25435   # Call helper function which possibly converts this using DOS-style short mode.
25436   # If so, the updated path is stored in $new_path.
25437   new_path="$input_to_shortpath"
25438 
25439   input_path="$input_to_shortpath"
25440   # Check if we need to convert this using DOS-style short mode. If the path
25441   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25442   # take no chances and rewrite it.
25443   # Note: m4 eats our [], so we need to use [ and ] instead.
25444   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25445   if test "x$has_forbidden_chars" != x; then
25446     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25447     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25448     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25449     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25450       # Going to short mode and back again did indeed matter. Since short mode is
25451       # case insensitive, let's make it lowercase to improve readability.
25452       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25453       # Now convert it back to Unix-stile (cygpath)
25454       input_path=`$CYGPATH -u "$shortmode_path"`
25455       new_path="$input_path"
25456     fi
25457   fi
25458 
25459   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25460   if test "x$test_cygdrive_prefix" = x; then
25461     # As a simple fix, exclude /usr/bin since it's not a real path.
25462     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25463       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25464       # a path prefixed by /cygdrive for fixpath to work.
25465       new_path="$CYGWIN_ROOT_PATH$input_path"
25466     fi
25467   fi
25468 
25469   # remove trailing .exe if any
25470   new_path="${new_path/%.exe/}"
25471 
25472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25473 
25474   # First separate the path from the arguments. This will split at the first
25475   # space.
25476   complete="$CXXCPP"
25477   path="${complete%% *}"
25478   tmp="$complete EOL"
25479   arguments="${tmp#* }"
25480 
25481   # Input might be given as Windows format, start by converting to
25482   # unix format.
25483   new_path="$path"
25484 
25485   windows_path="$new_path"
25486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25487     unix_path=`$CYGPATH -u "$windows_path"`
25488     new_path="$unix_path"
25489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25491     new_path="$unix_path"
25492   fi
25493 
25494 
25495   # Now try to locate executable using which
25496   new_path=`$WHICH "$new_path" 2> /dev/null`
25497 
25498   if test "x$new_path" = x; then
25499     # Oops. Which didn't find the executable.
25500     # The splitting of arguments from the executable at a space might have been incorrect,
25501     # since paths with space are more likely in Windows. Give it another try with the whole
25502     # argument.
25503     path="$complete"
25504     arguments="EOL"
25505     new_path="$path"
25506 
25507   windows_path="$new_path"
25508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25509     unix_path=`$CYGPATH -u "$windows_path"`
25510     new_path="$unix_path"
25511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25512     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25513     new_path="$unix_path"
25514   fi
25515 
25516 
25517     new_path=`$WHICH "$new_path" 2> /dev/null`
25518 
25519     if test "x$new_path" = x; then
25520       # It's still not found. Now this is an unrecoverable error.
25521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25522 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25523       has_space=`$ECHO "$complete" | $GREP " "`
25524       if test "x$has_space" != x; then
25525         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25526 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25527       fi
25528       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25529     fi
25530   fi
25531 
25532   # Now new_path has a complete unix path to the binary
25533   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25534     # Keep paths in /bin as-is, but remove trailing .exe if any
25535     new_path="${new_path/%.exe/}"
25536     # Do not save /bin paths to all_fixpath_prefixes!
25537   else
25538     # Not in mixed or Windows style, start by that.
25539     new_path=`cmd //c echo $new_path`
25540 
25541   input_path="$new_path"
25542   # Check if we need to convert this using DOS-style short mode. If the path
25543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25544   # take no chances and rewrite it.
25545   # Note: m4 eats our [], so we need to use [ and ] instead.
25546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25547   if test "x$has_forbidden_chars" != x; then
25548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25549     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25550   fi
25551 
25552     # Output is in $new_path
25553 
25554   windows_path="$new_path"
25555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25556     unix_path=`$CYGPATH -u "$windows_path"`
25557     new_path="$unix_path"
25558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25560     new_path="$unix_path"
25561   fi
25562 
25563     # remove trailing .exe if any
25564     new_path="${new_path/%.exe/}"
25565 
25566     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25567     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25568   fi
25569 
25570   else
25571     # We're on a posix platform. Hooray! :)
25572     # First separate the path from the arguments. This will split at the first
25573     # space.
25574     complete="$CXXCPP"
25575     path="${complete%% *}"
25576     tmp="$complete EOL"
25577     arguments="${tmp#* }"
25578 
25579     # Cannot rely on the command "which" here since it doesn't always work.
25580     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25581     if test -z "$is_absolute_path"; then
25582       # Path to executable is not absolute. Find it.
25583       IFS_save="$IFS"
25584       IFS=:
25585       for p in $PATH; do
25586         if test -f "$p/$path" && test -x "$p/$path"; then
25587           new_path="$p/$path"
25588           break
25589         fi
25590       done
25591       IFS="$IFS_save"
25592     else
25593       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25594 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25595       new_path="$path"
25596     fi
25597 
25598     if test "x$new_path" = x; then
25599       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25600 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25601       has_space=`$ECHO "$complete" | $GREP " "`
25602       if test "x$has_space" != x; then
25603         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25604 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25605       fi
25606       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25607     fi
25608   fi
25609 
25610   # Now join together the path and the arguments once again
25611   if test "x$arguments" != xEOL; then
25612     new_complete="$new_path ${arguments% *}"
25613   else
25614     new_complete="$new_path"
25615   fi
25616 
25617   if test "x$complete" != "x$new_complete"; then
25618     CXXCPP="$new_complete"
25619     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25620 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25621   fi
25622 
25623 
25624   if test "x$COMPILE_TYPE" != "xcross"; then
25625     # If we are not cross compiling, use the same compilers for
25626     # building the build platform executables. The cross-compilation
25627     # case needed to be done earlier, but this can only be done after
25628     # the native tools have been localized.
25629     BUILD_CC="$CC"
25630     BUILD_CXX="$CXX"
25631     BUILD_LD="$LD"
25632   fi
25633 
25634   # for solaris we really need solaris tools, and not gnu equivalent
25635   #   these seems to normally reside in /usr/ccs/bin so add that to path before
25636   #   starting to probe
25637   #
25638   #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25639   #         so that it can be overriden --with-tools-dir
25640   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25641     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25642   fi
25643 
25644   # Find the right assembler.
25645   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25646     # Extract the first word of "as", so it can be a program name with args.
25647 set dummy as; ac_word=$2
25648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25649 $as_echo_n "checking for $ac_word... " >&6; }
25650 if ${ac_cv_path_AS+:} false; then :
25651   $as_echo_n "(cached) " >&6
25652 else
25653   case $AS in
25654   [\\/]* | ?:[\\/]*)
25655   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25656   ;;
25657   *)
25658   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25659 for as_dir in $PATH
25660 do
25661   IFS=$as_save_IFS
25662   test -z "$as_dir" && as_dir=.
25663     for ac_exec_ext in '' $ac_executable_extensions; do
25664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25665     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25667     break 2
25668   fi
25669 done
25670   done
25671 IFS=$as_save_IFS
25672 
25673   ;;
25674 esac
25675 fi
25676 AS=$ac_cv_path_AS
25677 if test -n "$AS"; then
25678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25679 $as_echo "$AS" >&6; }
25680 else
25681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25682 $as_echo "no" >&6; }
25683 fi
25684 
25685 
25686 
25687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25688 
25689   # First separate the path from the arguments. This will split at the first
25690   # space.
25691   complete="$AS"
25692   path="${complete%% *}"
25693   tmp="$complete EOL"
25694   arguments="${tmp#* }"
25695 
25696   # Input might be given as Windows format, start by converting to
25697   # unix format.
25698   new_path=`$CYGPATH -u "$path"`
25699 
25700   # Now try to locate executable using which
25701   new_path=`$WHICH "$new_path" 2> /dev/null`
25702   # bat and cmd files are not always considered executable in cygwin causing which
25703   # to not find them
25704   if test "x$new_path" = x \
25705       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25706       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25707     new_path=`$CYGPATH -u "$path"`
25708   fi
25709   if test "x$new_path" = x; then
25710     # Oops. Which didn't find the executable.
25711     # The splitting of arguments from the executable at a space might have been incorrect,
25712     # since paths with space are more likely in Windows. Give it another try with the whole
25713     # argument.
25714     path="$complete"
25715     arguments="EOL"
25716     new_path=`$CYGPATH -u "$path"`
25717     new_path=`$WHICH "$new_path" 2> /dev/null`
25718     # bat and cmd files are not always considered executable in cygwin causing which
25719     # to not find them
25720     if test "x$new_path" = x \
25721         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25722         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25723       new_path=`$CYGPATH -u "$path"`
25724     fi
25725     if test "x$new_path" = x; then
25726       # It's still not found. Now this is an unrecoverable error.
25727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25728 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25729       has_space=`$ECHO "$complete" | $GREP " "`
25730       if test "x$has_space" != x; then
25731         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25732 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25733       fi
25734       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25735     fi
25736   fi
25737 
25738   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25739   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25740   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25741   # "foo.exe" is OK but "foo" is an error.
25742   #
25743   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25744   # It is also a way to make sure we got the proper file name for the real test later on.
25745   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25746   if test "x$test_shortpath" = x; then
25747     # Short path failed, file does not exist as specified.
25748     # Try adding .exe or .cmd
25749     if test -f "${new_path}.exe"; then
25750       input_to_shortpath="${new_path}.exe"
25751     elif test -f "${new_path}.cmd"; then
25752       input_to_shortpath="${new_path}.cmd"
25753     else
25754       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25755 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25756       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25757 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25758       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25759     fi
25760   else
25761     input_to_shortpath="$new_path"
25762   fi
25763 
25764   # Call helper function which possibly converts this using DOS-style short mode.
25765   # If so, the updated path is stored in $new_path.
25766   new_path="$input_to_shortpath"
25767 
25768   input_path="$input_to_shortpath"
25769   # Check if we need to convert this using DOS-style short mode. If the path
25770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25771   # take no chances and rewrite it.
25772   # Note: m4 eats our [], so we need to use [ and ] instead.
25773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25774   if test "x$has_forbidden_chars" != x; then
25775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25776     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25777     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25778     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25779       # Going to short mode and back again did indeed matter. Since short mode is
25780       # case insensitive, let's make it lowercase to improve readability.
25781       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25782       # Now convert it back to Unix-stile (cygpath)
25783       input_path=`$CYGPATH -u "$shortmode_path"`
25784       new_path="$input_path"
25785     fi
25786   fi
25787 
25788   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25789   if test "x$test_cygdrive_prefix" = x; then
25790     # As a simple fix, exclude /usr/bin since it's not a real path.
25791     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25792       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25793       # a path prefixed by /cygdrive for fixpath to work.
25794       new_path="$CYGWIN_ROOT_PATH$input_path"
25795     fi
25796   fi
25797 
25798   # remove trailing .exe if any
25799   new_path="${new_path/%.exe/}"
25800 
25801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25802 
25803   # First separate the path from the arguments. This will split at the first
25804   # space.
25805   complete="$AS"
25806   path="${complete%% *}"
25807   tmp="$complete EOL"
25808   arguments="${tmp#* }"
25809 
25810   # Input might be given as Windows format, start by converting to
25811   # unix format.
25812   new_path="$path"
25813 
25814   windows_path="$new_path"
25815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25816     unix_path=`$CYGPATH -u "$windows_path"`
25817     new_path="$unix_path"
25818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25820     new_path="$unix_path"
25821   fi
25822 
25823 
25824   # Now try to locate executable using which
25825   new_path=`$WHICH "$new_path" 2> /dev/null`
25826 
25827   if test "x$new_path" = x; then
25828     # Oops. Which didn't find the executable.
25829     # The splitting of arguments from the executable at a space might have been incorrect,
25830     # since paths with space are more likely in Windows. Give it another try with the whole
25831     # argument.
25832     path="$complete"
25833     arguments="EOL"
25834     new_path="$path"
25835 
25836   windows_path="$new_path"
25837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25838     unix_path=`$CYGPATH -u "$windows_path"`
25839     new_path="$unix_path"
25840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25842     new_path="$unix_path"
25843   fi
25844 
25845 
25846     new_path=`$WHICH "$new_path" 2> /dev/null`
25847 
25848     if test "x$new_path" = x; then
25849       # It's still not found. Now this is an unrecoverable error.
25850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25851 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25852       has_space=`$ECHO "$complete" | $GREP " "`
25853       if test "x$has_space" != x; then
25854         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25855 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25856       fi
25857       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25858     fi
25859   fi
25860 
25861   # Now new_path has a complete unix path to the binary
25862   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25863     # Keep paths in /bin as-is, but remove trailing .exe if any
25864     new_path="${new_path/%.exe/}"
25865     # Do not save /bin paths to all_fixpath_prefixes!
25866   else
25867     # Not in mixed or Windows style, start by that.
25868     new_path=`cmd //c echo $new_path`
25869 
25870   input_path="$new_path"
25871   # Check if we need to convert this using DOS-style short mode. If the path
25872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25873   # take no chances and rewrite it.
25874   # Note: m4 eats our [], so we need to use [ and ] instead.
25875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25876   if test "x$has_forbidden_chars" != x; then
25877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25878     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25879   fi
25880 
25881     # Output is in $new_path
25882 
25883   windows_path="$new_path"
25884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25885     unix_path=`$CYGPATH -u "$windows_path"`
25886     new_path="$unix_path"
25887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25889     new_path="$unix_path"
25890   fi
25891 
25892     # remove trailing .exe if any
25893     new_path="${new_path/%.exe/}"
25894 
25895     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25896     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25897   fi
25898 
25899   else
25900     # We're on a posix platform. Hooray! :)
25901     # First separate the path from the arguments. This will split at the first
25902     # space.
25903     complete="$AS"
25904     path="${complete%% *}"
25905     tmp="$complete EOL"
25906     arguments="${tmp#* }"
25907 
25908     # Cannot rely on the command "which" here since it doesn't always work.
25909     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25910     if test -z "$is_absolute_path"; then
25911       # Path to executable is not absolute. Find it.
25912       IFS_save="$IFS"
25913       IFS=:
25914       for p in $PATH; do
25915         if test -f "$p/$path" && test -x "$p/$path"; then
25916           new_path="$p/$path"
25917           break
25918         fi
25919       done
25920       IFS="$IFS_save"
25921     else
25922       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25923 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25924       new_path="$path"
25925     fi
25926 
25927     if test "x$new_path" = x; then
25928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25929 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25930       has_space=`$ECHO "$complete" | $GREP " "`
25931       if test "x$has_space" != x; then
25932         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25933 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25934       fi
25935       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25936     fi
25937   fi
25938 
25939   # Now join together the path and the arguments once again
25940   if test "x$arguments" != xEOL; then
25941     new_complete="$new_path ${arguments% *}"
25942   else
25943     new_complete="$new_path"
25944   fi
25945 
25946   if test "x$complete" != "x$new_complete"; then
25947     AS="$new_complete"
25948     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25949 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25950   fi
25951 
25952   else
25953     AS="$CC -c"
25954   fi
25955 
25956 
25957   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25958     # Extract the first word of "nm", so it can be a program name with args.
25959 set dummy nm; ac_word=$2
25960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25961 $as_echo_n "checking for $ac_word... " >&6; }
25962 if ${ac_cv_path_NM+:} false; then :
25963   $as_echo_n "(cached) " >&6
25964 else
25965   case $NM in
25966   [\\/]* | ?:[\\/]*)
25967   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25968   ;;
25969   *)
25970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25971 for as_dir in $PATH
25972 do
25973   IFS=$as_save_IFS
25974   test -z "$as_dir" && as_dir=.
25975     for ac_exec_ext in '' $ac_executable_extensions; do
25976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25977     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25979     break 2
25980   fi
25981 done
25982   done
25983 IFS=$as_save_IFS
25984 
25985   ;;
25986 esac
25987 fi
25988 NM=$ac_cv_path_NM
25989 if test -n "$NM"; then
25990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25991 $as_echo "$NM" >&6; }
25992 else
25993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25994 $as_echo "no" >&6; }
25995 fi
25996 
25997 
25998 
25999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26000 
26001   # First separate the path from the arguments. This will split at the first
26002   # space.
26003   complete="$NM"
26004   path="${complete%% *}"
26005   tmp="$complete EOL"
26006   arguments="${tmp#* }"
26007 
26008   # Input might be given as Windows format, start by converting to
26009   # unix format.
26010   new_path=`$CYGPATH -u "$path"`
26011 
26012   # Now try to locate executable using which
26013   new_path=`$WHICH "$new_path" 2> /dev/null`
26014   # bat and cmd files are not always considered executable in cygwin causing which
26015   # to not find them
26016   if test "x$new_path" = x \
26017       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26018       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26019     new_path=`$CYGPATH -u "$path"`
26020   fi
26021   if test "x$new_path" = x; then
26022     # Oops. Which didn't find the executable.
26023     # The splitting of arguments from the executable at a space might have been incorrect,
26024     # since paths with space are more likely in Windows. Give it another try with the whole
26025     # argument.
26026     path="$complete"
26027     arguments="EOL"
26028     new_path=`$CYGPATH -u "$path"`
26029     new_path=`$WHICH "$new_path" 2> /dev/null`
26030     # bat and cmd files are not always considered executable in cygwin causing which
26031     # to not find them
26032     if test "x$new_path" = x \
26033         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26034         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26035       new_path=`$CYGPATH -u "$path"`
26036     fi
26037     if test "x$new_path" = x; then
26038       # It's still not found. Now this is an unrecoverable error.
26039       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26040 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26041       has_space=`$ECHO "$complete" | $GREP " "`
26042       if test "x$has_space" != x; then
26043         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26044 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26045       fi
26046       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26047     fi
26048   fi
26049 
26050   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26051   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26052   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26053   # "foo.exe" is OK but "foo" is an error.
26054   #
26055   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26056   # It is also a way to make sure we got the proper file name for the real test later on.
26057   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26058   if test "x$test_shortpath" = x; then
26059     # Short path failed, file does not exist as specified.
26060     # Try adding .exe or .cmd
26061     if test -f "${new_path}.exe"; then
26062       input_to_shortpath="${new_path}.exe"
26063     elif test -f "${new_path}.cmd"; then
26064       input_to_shortpath="${new_path}.cmd"
26065     else
26066       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26067 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26068       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26069 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26070       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26071     fi
26072   else
26073     input_to_shortpath="$new_path"
26074   fi
26075 
26076   # Call helper function which possibly converts this using DOS-style short mode.
26077   # If so, the updated path is stored in $new_path.
26078   new_path="$input_to_shortpath"
26079 
26080   input_path="$input_to_shortpath"
26081   # Check if we need to convert this using DOS-style short mode. If the path
26082   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26083   # take no chances and rewrite it.
26084   # Note: m4 eats our [], so we need to use [ and ] instead.
26085   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26086   if test "x$has_forbidden_chars" != x; then
26087     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26088     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26089     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26090     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26091       # Going to short mode and back again did indeed matter. Since short mode is
26092       # case insensitive, let's make it lowercase to improve readability.
26093       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26094       # Now convert it back to Unix-stile (cygpath)
26095       input_path=`$CYGPATH -u "$shortmode_path"`
26096       new_path="$input_path"
26097     fi
26098   fi
26099 
26100   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26101   if test "x$test_cygdrive_prefix" = x; then
26102     # As a simple fix, exclude /usr/bin since it's not a real path.
26103     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26104       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26105       # a path prefixed by /cygdrive for fixpath to work.
26106       new_path="$CYGWIN_ROOT_PATH$input_path"
26107     fi
26108   fi
26109 
26110   # remove trailing .exe if any
26111   new_path="${new_path/%.exe/}"
26112 
26113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26114 
26115   # First separate the path from the arguments. This will split at the first
26116   # space.
26117   complete="$NM"
26118   path="${complete%% *}"
26119   tmp="$complete EOL"
26120   arguments="${tmp#* }"
26121 
26122   # Input might be given as Windows format, start by converting to
26123   # unix format.
26124   new_path="$path"
26125 
26126   windows_path="$new_path"
26127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26128     unix_path=`$CYGPATH -u "$windows_path"`
26129     new_path="$unix_path"
26130   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26131     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26132     new_path="$unix_path"
26133   fi
26134 
26135 
26136   # Now try to locate executable using which
26137   new_path=`$WHICH "$new_path" 2> /dev/null`
26138 
26139   if test "x$new_path" = x; then
26140     # Oops. Which didn't find the executable.
26141     # The splitting of arguments from the executable at a space might have been incorrect,
26142     # since paths with space are more likely in Windows. Give it another try with the whole
26143     # argument.
26144     path="$complete"
26145     arguments="EOL"
26146     new_path="$path"
26147 
26148   windows_path="$new_path"
26149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26150     unix_path=`$CYGPATH -u "$windows_path"`
26151     new_path="$unix_path"
26152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26154     new_path="$unix_path"
26155   fi
26156 
26157 
26158     new_path=`$WHICH "$new_path" 2> /dev/null`
26159 
26160     if test "x$new_path" = x; then
26161       # It's still not found. Now this is an unrecoverable error.
26162       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26163 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26164       has_space=`$ECHO "$complete" | $GREP " "`
26165       if test "x$has_space" != x; then
26166         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26167 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26168       fi
26169       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26170     fi
26171   fi
26172 
26173   # Now new_path has a complete unix path to the binary
26174   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26175     # Keep paths in /bin as-is, but remove trailing .exe if any
26176     new_path="${new_path/%.exe/}"
26177     # Do not save /bin paths to all_fixpath_prefixes!
26178   else
26179     # Not in mixed or Windows style, start by that.
26180     new_path=`cmd //c echo $new_path`
26181 
26182   input_path="$new_path"
26183   # Check if we need to convert this using DOS-style short mode. If the path
26184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26185   # take no chances and rewrite it.
26186   # Note: m4 eats our [], so we need to use [ and ] instead.
26187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26188   if test "x$has_forbidden_chars" != x; then
26189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26190     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26191   fi
26192 
26193     # Output is in $new_path
26194 
26195   windows_path="$new_path"
26196   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197     unix_path=`$CYGPATH -u "$windows_path"`
26198     new_path="$unix_path"
26199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26200     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26201     new_path="$unix_path"
26202   fi
26203 
26204     # remove trailing .exe if any
26205     new_path="${new_path/%.exe/}"
26206 
26207     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26208     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26209   fi
26210 
26211   else
26212     # We're on a posix platform. Hooray! :)
26213     # First separate the path from the arguments. This will split at the first
26214     # space.
26215     complete="$NM"
26216     path="${complete%% *}"
26217     tmp="$complete EOL"
26218     arguments="${tmp#* }"
26219 
26220     # Cannot rely on the command "which" here since it doesn't always work.
26221     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26222     if test -z "$is_absolute_path"; then
26223       # Path to executable is not absolute. Find it.
26224       IFS_save="$IFS"
26225       IFS=:
26226       for p in $PATH; do
26227         if test -f "$p/$path" && test -x "$p/$path"; then
26228           new_path="$p/$path"
26229           break
26230         fi
26231       done
26232       IFS="$IFS_save"
26233     else
26234       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26235 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26236       new_path="$path"
26237     fi
26238 
26239     if test "x$new_path" = x; then
26240       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26241 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26242       has_space=`$ECHO "$complete" | $GREP " "`
26243       if test "x$has_space" != x; then
26244         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26245 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26246       fi
26247       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26248     fi
26249   fi
26250 
26251   # Now join together the path and the arguments once again
26252   if test "x$arguments" != xEOL; then
26253     new_complete="$new_path ${arguments% *}"
26254   else
26255     new_complete="$new_path"
26256   fi
26257 
26258   if test "x$complete" != "x$new_complete"; then
26259     NM="$new_complete"
26260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26261 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26262   fi
26263 
26264     # Extract the first word of "gnm", so it can be a program name with args.
26265 set dummy gnm; ac_word=$2
26266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26267 $as_echo_n "checking for $ac_word... " >&6; }
26268 if ${ac_cv_path_GNM+:} false; then :
26269   $as_echo_n "(cached) " >&6
26270 else
26271   case $GNM in
26272   [\\/]* | ?:[\\/]*)
26273   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26274   ;;
26275   *)
26276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26277 for as_dir in $PATH
26278 do
26279   IFS=$as_save_IFS
26280   test -z "$as_dir" && as_dir=.
26281     for ac_exec_ext in '' $ac_executable_extensions; do
26282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26283     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26285     break 2
26286   fi
26287 done
26288   done
26289 IFS=$as_save_IFS
26290 
26291   ;;
26292 esac
26293 fi
26294 GNM=$ac_cv_path_GNM
26295 if test -n "$GNM"; then
26296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26297 $as_echo "$GNM" >&6; }
26298 else
26299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26300 $as_echo "no" >&6; }
26301 fi
26302 
26303 
26304 
26305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26306 
26307   # First separate the path from the arguments. This will split at the first
26308   # space.
26309   complete="$GNM"
26310   path="${complete%% *}"
26311   tmp="$complete EOL"
26312   arguments="${tmp#* }"
26313 
26314   # Input might be given as Windows format, start by converting to
26315   # unix format.
26316   new_path=`$CYGPATH -u "$path"`
26317 
26318   # Now try to locate executable using which
26319   new_path=`$WHICH "$new_path" 2> /dev/null`
26320   # bat and cmd files are not always considered executable in cygwin causing which
26321   # to not find them
26322   if test "x$new_path" = x \
26323       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26324       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26325     new_path=`$CYGPATH -u "$path"`
26326   fi
26327   if test "x$new_path" = x; then
26328     # Oops. Which didn't find the executable.
26329     # The splitting of arguments from the executable at a space might have been incorrect,
26330     # since paths with space are more likely in Windows. Give it another try with the whole
26331     # argument.
26332     path="$complete"
26333     arguments="EOL"
26334     new_path=`$CYGPATH -u "$path"`
26335     new_path=`$WHICH "$new_path" 2> /dev/null`
26336     # bat and cmd files are not always considered executable in cygwin causing which
26337     # to not find them
26338     if test "x$new_path" = x \
26339         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26340         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26341       new_path=`$CYGPATH -u "$path"`
26342     fi
26343     if test "x$new_path" = x; then
26344       # It's still not found. Now this is an unrecoverable error.
26345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26346 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26347       has_space=`$ECHO "$complete" | $GREP " "`
26348       if test "x$has_space" != x; then
26349         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26350 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26351       fi
26352       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26353     fi
26354   fi
26355 
26356   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26357   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26358   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26359   # "foo.exe" is OK but "foo" is an error.
26360   #
26361   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26362   # It is also a way to make sure we got the proper file name for the real test later on.
26363   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26364   if test "x$test_shortpath" = x; then
26365     # Short path failed, file does not exist as specified.
26366     # Try adding .exe or .cmd
26367     if test -f "${new_path}.exe"; then
26368       input_to_shortpath="${new_path}.exe"
26369     elif test -f "${new_path}.cmd"; then
26370       input_to_shortpath="${new_path}.cmd"
26371     else
26372       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26373 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26374       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26375 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26376       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26377     fi
26378   else
26379     input_to_shortpath="$new_path"
26380   fi
26381 
26382   # Call helper function which possibly converts this using DOS-style short mode.
26383   # If so, the updated path is stored in $new_path.
26384   new_path="$input_to_shortpath"
26385 
26386   input_path="$input_to_shortpath"
26387   # Check if we need to convert this using DOS-style short mode. If the path
26388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26389   # take no chances and rewrite it.
26390   # Note: m4 eats our [], so we need to use [ and ] instead.
26391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26392   if test "x$has_forbidden_chars" != x; then
26393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26394     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26395     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26396     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26397       # Going to short mode and back again did indeed matter. Since short mode is
26398       # case insensitive, let's make it lowercase to improve readability.
26399       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26400       # Now convert it back to Unix-stile (cygpath)
26401       input_path=`$CYGPATH -u "$shortmode_path"`
26402       new_path="$input_path"
26403     fi
26404   fi
26405 
26406   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26407   if test "x$test_cygdrive_prefix" = x; then
26408     # As a simple fix, exclude /usr/bin since it's not a real path.
26409     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26410       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26411       # a path prefixed by /cygdrive for fixpath to work.
26412       new_path="$CYGWIN_ROOT_PATH$input_path"
26413     fi
26414   fi
26415 
26416   # remove trailing .exe if any
26417   new_path="${new_path/%.exe/}"
26418 
26419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26420 
26421   # First separate the path from the arguments. This will split at the first
26422   # space.
26423   complete="$GNM"
26424   path="${complete%% *}"
26425   tmp="$complete EOL"
26426   arguments="${tmp#* }"
26427 
26428   # Input might be given as Windows format, start by converting to
26429   # unix format.
26430   new_path="$path"
26431 
26432   windows_path="$new_path"
26433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26434     unix_path=`$CYGPATH -u "$windows_path"`
26435     new_path="$unix_path"
26436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26438     new_path="$unix_path"
26439   fi
26440 
26441 
26442   # Now try to locate executable using which
26443   new_path=`$WHICH "$new_path" 2> /dev/null`
26444 
26445   if test "x$new_path" = x; then
26446     # Oops. Which didn't find the executable.
26447     # The splitting of arguments from the executable at a space might have been incorrect,
26448     # since paths with space are more likely in Windows. Give it another try with the whole
26449     # argument.
26450     path="$complete"
26451     arguments="EOL"
26452     new_path="$path"
26453 
26454   windows_path="$new_path"
26455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26456     unix_path=`$CYGPATH -u "$windows_path"`
26457     new_path="$unix_path"
26458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26459     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26460     new_path="$unix_path"
26461   fi
26462 
26463 
26464     new_path=`$WHICH "$new_path" 2> /dev/null`
26465 
26466     if test "x$new_path" = x; then
26467       # It's still not found. Now this is an unrecoverable error.
26468       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26469 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26470       has_space=`$ECHO "$complete" | $GREP " "`
26471       if test "x$has_space" != x; then
26472         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26473 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26474       fi
26475       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26476     fi
26477   fi
26478 
26479   # Now new_path has a complete unix path to the binary
26480   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26481     # Keep paths in /bin as-is, but remove trailing .exe if any
26482     new_path="${new_path/%.exe/}"
26483     # Do not save /bin paths to all_fixpath_prefixes!
26484   else
26485     # Not in mixed or Windows style, start by that.
26486     new_path=`cmd //c echo $new_path`
26487 
26488   input_path="$new_path"
26489   # Check if we need to convert this using DOS-style short mode. If the path
26490   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26491   # take no chances and rewrite it.
26492   # Note: m4 eats our [], so we need to use [ and ] instead.
26493   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26494   if test "x$has_forbidden_chars" != x; then
26495     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26496     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26497   fi
26498 
26499     # Output is in $new_path
26500 
26501   windows_path="$new_path"
26502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26503     unix_path=`$CYGPATH -u "$windows_path"`
26504     new_path="$unix_path"
26505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26506     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26507     new_path="$unix_path"
26508   fi
26509 
26510     # remove trailing .exe if any
26511     new_path="${new_path/%.exe/}"
26512 
26513     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26514     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26515   fi
26516 
26517   else
26518     # We're on a posix platform. Hooray! :)
26519     # First separate the path from the arguments. This will split at the first
26520     # space.
26521     complete="$GNM"
26522     path="${complete%% *}"
26523     tmp="$complete EOL"
26524     arguments="${tmp#* }"
26525 
26526     # Cannot rely on the command "which" here since it doesn't always work.
26527     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26528     if test -z "$is_absolute_path"; then
26529       # Path to executable is not absolute. Find it.
26530       IFS_save="$IFS"
26531       IFS=:
26532       for p in $PATH; do
26533         if test -f "$p/$path" && test -x "$p/$path"; then
26534           new_path="$p/$path"
26535           break
26536         fi
26537       done
26538       IFS="$IFS_save"
26539     else
26540       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26541 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26542       new_path="$path"
26543     fi
26544 
26545     if test "x$new_path" = x; then
26546       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26547 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26548       has_space=`$ECHO "$complete" | $GREP " "`
26549       if test "x$has_space" != x; then
26550         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26551 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26552       fi
26553       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26554     fi
26555   fi
26556 
26557   # Now join together the path and the arguments once again
26558   if test "x$arguments" != xEOL; then
26559     new_complete="$new_path ${arguments% *}"
26560   else
26561     new_complete="$new_path"
26562   fi
26563 
26564   if test "x$complete" != "x$new_complete"; then
26565     GNM="$new_complete"
26566     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26567 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26568   fi
26569 
26570     # Extract the first word of "strip", so it can be a program name with args.
26571 set dummy strip; ac_word=$2
26572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26573 $as_echo_n "checking for $ac_word... " >&6; }
26574 if ${ac_cv_path_STRIP+:} false; then :
26575   $as_echo_n "(cached) " >&6
26576 else
26577   case $STRIP in
26578   [\\/]* | ?:[\\/]*)
26579   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26580   ;;
26581   *)
26582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26583 for as_dir in $PATH
26584 do
26585   IFS=$as_save_IFS
26586   test -z "$as_dir" && as_dir=.
26587     for ac_exec_ext in '' $ac_executable_extensions; do
26588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26589     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26591     break 2
26592   fi
26593 done
26594   done
26595 IFS=$as_save_IFS
26596 
26597   ;;
26598 esac
26599 fi
26600 STRIP=$ac_cv_path_STRIP
26601 if test -n "$STRIP"; then
26602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26603 $as_echo "$STRIP" >&6; }
26604 else
26605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26606 $as_echo "no" >&6; }
26607 fi
26608 
26609 
26610 
26611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26612 
26613   # First separate the path from the arguments. This will split at the first
26614   # space.
26615   complete="$STRIP"
26616   path="${complete%% *}"
26617   tmp="$complete EOL"
26618   arguments="${tmp#* }"
26619 
26620   # Input might be given as Windows format, start by converting to
26621   # unix format.
26622   new_path=`$CYGPATH -u "$path"`
26623 
26624   # Now try to locate executable using which
26625   new_path=`$WHICH "$new_path" 2> /dev/null`
26626   # bat and cmd files are not always considered executable in cygwin causing which
26627   # to not find them
26628   if test "x$new_path" = x \
26629       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26630       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26631     new_path=`$CYGPATH -u "$path"`
26632   fi
26633   if test "x$new_path" = x; then
26634     # Oops. Which didn't find the executable.
26635     # The splitting of arguments from the executable at a space might have been incorrect,
26636     # since paths with space are more likely in Windows. Give it another try with the whole
26637     # argument.
26638     path="$complete"
26639     arguments="EOL"
26640     new_path=`$CYGPATH -u "$path"`
26641     new_path=`$WHICH "$new_path" 2> /dev/null`
26642     # bat and cmd files are not always considered executable in cygwin causing which
26643     # to not find them
26644     if test "x$new_path" = x \
26645         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26646         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26647       new_path=`$CYGPATH -u "$path"`
26648     fi
26649     if test "x$new_path" = x; then
26650       # It's still not found. Now this is an unrecoverable error.
26651       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26652 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26653       has_space=`$ECHO "$complete" | $GREP " "`
26654       if test "x$has_space" != x; then
26655         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26656 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26657       fi
26658       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26659     fi
26660   fi
26661 
26662   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26663   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26664   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26665   # "foo.exe" is OK but "foo" is an error.
26666   #
26667   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26668   # It is also a way to make sure we got the proper file name for the real test later on.
26669   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26670   if test "x$test_shortpath" = x; then
26671     # Short path failed, file does not exist as specified.
26672     # Try adding .exe or .cmd
26673     if test -f "${new_path}.exe"; then
26674       input_to_shortpath="${new_path}.exe"
26675     elif test -f "${new_path}.cmd"; then
26676       input_to_shortpath="${new_path}.cmd"
26677     else
26678       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26679 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26680       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26681 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26682       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26683     fi
26684   else
26685     input_to_shortpath="$new_path"
26686   fi
26687 
26688   # Call helper function which possibly converts this using DOS-style short mode.
26689   # If so, the updated path is stored in $new_path.
26690   new_path="$input_to_shortpath"
26691 
26692   input_path="$input_to_shortpath"
26693   # Check if we need to convert this using DOS-style short mode. If the path
26694   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26695   # take no chances and rewrite it.
26696   # Note: m4 eats our [], so we need to use [ and ] instead.
26697   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26698   if test "x$has_forbidden_chars" != x; then
26699     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26700     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26701     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26702     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26703       # Going to short mode and back again did indeed matter. Since short mode is
26704       # case insensitive, let's make it lowercase to improve readability.
26705       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26706       # Now convert it back to Unix-stile (cygpath)
26707       input_path=`$CYGPATH -u "$shortmode_path"`
26708       new_path="$input_path"
26709     fi
26710   fi
26711 
26712   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26713   if test "x$test_cygdrive_prefix" = x; then
26714     # As a simple fix, exclude /usr/bin since it's not a real path.
26715     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26716       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26717       # a path prefixed by /cygdrive for fixpath to work.
26718       new_path="$CYGWIN_ROOT_PATH$input_path"
26719     fi
26720   fi
26721 
26722   # remove trailing .exe if any
26723   new_path="${new_path/%.exe/}"
26724 
26725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26726 
26727   # First separate the path from the arguments. This will split at the first
26728   # space.
26729   complete="$STRIP"
26730   path="${complete%% *}"
26731   tmp="$complete EOL"
26732   arguments="${tmp#* }"
26733 
26734   # Input might be given as Windows format, start by converting to
26735   # unix format.
26736   new_path="$path"
26737 
26738   windows_path="$new_path"
26739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740     unix_path=`$CYGPATH -u "$windows_path"`
26741     new_path="$unix_path"
26742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26744     new_path="$unix_path"
26745   fi
26746 
26747 
26748   # Now try to locate executable using which
26749   new_path=`$WHICH "$new_path" 2> /dev/null`
26750 
26751   if test "x$new_path" = x; then
26752     # Oops. Which didn't find the executable.
26753     # The splitting of arguments from the executable at a space might have been incorrect,
26754     # since paths with space are more likely in Windows. Give it another try with the whole
26755     # argument.
26756     path="$complete"
26757     arguments="EOL"
26758     new_path="$path"
26759 
26760   windows_path="$new_path"
26761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26762     unix_path=`$CYGPATH -u "$windows_path"`
26763     new_path="$unix_path"
26764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26766     new_path="$unix_path"
26767   fi
26768 
26769 
26770     new_path=`$WHICH "$new_path" 2> /dev/null`
26771 
26772     if test "x$new_path" = x; then
26773       # It's still not found. Now this is an unrecoverable error.
26774       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26775 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26776       has_space=`$ECHO "$complete" | $GREP " "`
26777       if test "x$has_space" != x; then
26778         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26779 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26780       fi
26781       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26782     fi
26783   fi
26784 
26785   # Now new_path has a complete unix path to the binary
26786   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26787     # Keep paths in /bin as-is, but remove trailing .exe if any
26788     new_path="${new_path/%.exe/}"
26789     # Do not save /bin paths to all_fixpath_prefixes!
26790   else
26791     # Not in mixed or Windows style, start by that.
26792     new_path=`cmd //c echo $new_path`
26793 
26794   input_path="$new_path"
26795   # Check if we need to convert this using DOS-style short mode. If the path
26796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26797   # take no chances and rewrite it.
26798   # Note: m4 eats our [], so we need to use [ and ] instead.
26799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26800   if test "x$has_forbidden_chars" != x; then
26801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26802     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26803   fi
26804 
26805     # Output is in $new_path
26806 
26807   windows_path="$new_path"
26808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26809     unix_path=`$CYGPATH -u "$windows_path"`
26810     new_path="$unix_path"
26811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26813     new_path="$unix_path"
26814   fi
26815 
26816     # remove trailing .exe if any
26817     new_path="${new_path/%.exe/}"
26818 
26819     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26820     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26821   fi
26822 
26823   else
26824     # We're on a posix platform. Hooray! :)
26825     # First separate the path from the arguments. This will split at the first
26826     # space.
26827     complete="$STRIP"
26828     path="${complete%% *}"
26829     tmp="$complete EOL"
26830     arguments="${tmp#* }"
26831 
26832     # Cannot rely on the command "which" here since it doesn't always work.
26833     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26834     if test -z "$is_absolute_path"; then
26835       # Path to executable is not absolute. Find it.
26836       IFS_save="$IFS"
26837       IFS=:
26838       for p in $PATH; do
26839         if test -f "$p/$path" && test -x "$p/$path"; then
26840           new_path="$p/$path"
26841           break
26842         fi
26843       done
26844       IFS="$IFS_save"
26845     else
26846       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26847 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26848       new_path="$path"
26849     fi
26850 
26851     if test "x$new_path" = x; then
26852       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26853 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26854       has_space=`$ECHO "$complete" | $GREP " "`
26855       if test "x$has_space" != x; then
26856         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26857 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26858       fi
26859       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26860     fi
26861   fi
26862 
26863   # Now join together the path and the arguments once again
26864   if test "x$arguments" != xEOL; then
26865     new_complete="$new_path ${arguments% *}"
26866   else
26867     new_complete="$new_path"
26868   fi
26869 
26870   if test "x$complete" != "x$new_complete"; then
26871     STRIP="$new_complete"
26872     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26873 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26874   fi
26875 
26876     # Extract the first word of "mcs", so it can be a program name with args.
26877 set dummy mcs; ac_word=$2
26878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26879 $as_echo_n "checking for $ac_word... " >&6; }
26880 if ${ac_cv_path_MCS+:} false; then :
26881   $as_echo_n "(cached) " >&6
26882 else
26883   case $MCS in
26884   [\\/]* | ?:[\\/]*)
26885   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26886   ;;
26887   *)
26888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26889 for as_dir in $PATH
26890 do
26891   IFS=$as_save_IFS
26892   test -z "$as_dir" && as_dir=.
26893     for ac_exec_ext in '' $ac_executable_extensions; do
26894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26895     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26897     break 2
26898   fi
26899 done
26900   done
26901 IFS=$as_save_IFS
26902 
26903   ;;
26904 esac
26905 fi
26906 MCS=$ac_cv_path_MCS
26907 if test -n "$MCS"; then
26908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26909 $as_echo "$MCS" >&6; }
26910 else
26911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26912 $as_echo "no" >&6; }
26913 fi
26914 
26915 
26916 
26917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26918 
26919   # First separate the path from the arguments. This will split at the first
26920   # space.
26921   complete="$MCS"
26922   path="${complete%% *}"
26923   tmp="$complete EOL"
26924   arguments="${tmp#* }"
26925 
26926   # Input might be given as Windows format, start by converting to
26927   # unix format.
26928   new_path=`$CYGPATH -u "$path"`
26929 
26930   # Now try to locate executable using which
26931   new_path=`$WHICH "$new_path" 2> /dev/null`
26932   # bat and cmd files are not always considered executable in cygwin causing which
26933   # to not find them
26934   if test "x$new_path" = x \
26935       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26936       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26937     new_path=`$CYGPATH -u "$path"`
26938   fi
26939   if test "x$new_path" = x; then
26940     # Oops. Which didn't find the executable.
26941     # The splitting of arguments from the executable at a space might have been incorrect,
26942     # since paths with space are more likely in Windows. Give it another try with the whole
26943     # argument.
26944     path="$complete"
26945     arguments="EOL"
26946     new_path=`$CYGPATH -u "$path"`
26947     new_path=`$WHICH "$new_path" 2> /dev/null`
26948     # bat and cmd files are not always considered executable in cygwin causing which
26949     # to not find them
26950     if test "x$new_path" = x \
26951         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26952         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26953       new_path=`$CYGPATH -u "$path"`
26954     fi
26955     if test "x$new_path" = x; then
26956       # It's still not found. Now this is an unrecoverable error.
26957       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26958 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26959       has_space=`$ECHO "$complete" | $GREP " "`
26960       if test "x$has_space" != x; then
26961         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26962 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26963       fi
26964       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26965     fi
26966   fi
26967 
26968   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26969   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26970   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26971   # "foo.exe" is OK but "foo" is an error.
26972   #
26973   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26974   # It is also a way to make sure we got the proper file name for the real test later on.
26975   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26976   if test "x$test_shortpath" = x; then
26977     # Short path failed, file does not exist as specified.
26978     # Try adding .exe or .cmd
26979     if test -f "${new_path}.exe"; then
26980       input_to_shortpath="${new_path}.exe"
26981     elif test -f "${new_path}.cmd"; then
26982       input_to_shortpath="${new_path}.cmd"
26983     else
26984       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26985 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26986       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26987 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26988       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26989     fi
26990   else
26991     input_to_shortpath="$new_path"
26992   fi
26993 
26994   # Call helper function which possibly converts this using DOS-style short mode.
26995   # If so, the updated path is stored in $new_path.
26996   new_path="$input_to_shortpath"
26997 
26998   input_path="$input_to_shortpath"
26999   # Check if we need to convert this using DOS-style short mode. If the path
27000   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27001   # take no chances and rewrite it.
27002   # Note: m4 eats our [], so we need to use [ and ] instead.
27003   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27004   if test "x$has_forbidden_chars" != x; then
27005     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27006     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27007     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27008     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27009       # Going to short mode and back again did indeed matter. Since short mode is
27010       # case insensitive, let's make it lowercase to improve readability.
27011       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27012       # Now convert it back to Unix-stile (cygpath)
27013       input_path=`$CYGPATH -u "$shortmode_path"`
27014       new_path="$input_path"
27015     fi
27016   fi
27017 
27018   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27019   if test "x$test_cygdrive_prefix" = x; then
27020     # As a simple fix, exclude /usr/bin since it's not a real path.
27021     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27022       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27023       # a path prefixed by /cygdrive for fixpath to work.
27024       new_path="$CYGWIN_ROOT_PATH$input_path"
27025     fi
27026   fi
27027 
27028   # remove trailing .exe if any
27029   new_path="${new_path/%.exe/}"
27030 
27031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27032 
27033   # First separate the path from the arguments. This will split at the first
27034   # space.
27035   complete="$MCS"
27036   path="${complete%% *}"
27037   tmp="$complete EOL"
27038   arguments="${tmp#* }"
27039 
27040   # Input might be given as Windows format, start by converting to
27041   # unix format.
27042   new_path="$path"
27043 
27044   windows_path="$new_path"
27045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27046     unix_path=`$CYGPATH -u "$windows_path"`
27047     new_path="$unix_path"
27048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27050     new_path="$unix_path"
27051   fi
27052 
27053 
27054   # Now try to locate executable using which
27055   new_path=`$WHICH "$new_path" 2> /dev/null`
27056 
27057   if test "x$new_path" = x; then
27058     # Oops. Which didn't find the executable.
27059     # The splitting of arguments from the executable at a space might have been incorrect,
27060     # since paths with space are more likely in Windows. Give it another try with the whole
27061     # argument.
27062     path="$complete"
27063     arguments="EOL"
27064     new_path="$path"
27065 
27066   windows_path="$new_path"
27067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27068     unix_path=`$CYGPATH -u "$windows_path"`
27069     new_path="$unix_path"
27070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27072     new_path="$unix_path"
27073   fi
27074 
27075 
27076     new_path=`$WHICH "$new_path" 2> /dev/null`
27077 
27078     if test "x$new_path" = x; then
27079       # It's still not found. Now this is an unrecoverable error.
27080       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27081 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27082       has_space=`$ECHO "$complete" | $GREP " "`
27083       if test "x$has_space" != x; then
27084         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27085 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27086       fi
27087       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27088     fi
27089   fi
27090 
27091   # Now new_path has a complete unix path to the binary
27092   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27093     # Keep paths in /bin as-is, but remove trailing .exe if any
27094     new_path="${new_path/%.exe/}"
27095     # Do not save /bin paths to all_fixpath_prefixes!
27096   else
27097     # Not in mixed or Windows style, start by that.
27098     new_path=`cmd //c echo $new_path`
27099 
27100   input_path="$new_path"
27101   # Check if we need to convert this using DOS-style short mode. If the path
27102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27103   # take no chances and rewrite it.
27104   # Note: m4 eats our [], so we need to use [ and ] instead.
27105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27106   if test "x$has_forbidden_chars" != x; then
27107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27108     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27109   fi
27110 
27111     # Output is in $new_path
27112 
27113   windows_path="$new_path"
27114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27115     unix_path=`$CYGPATH -u "$windows_path"`
27116     new_path="$unix_path"
27117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27119     new_path="$unix_path"
27120   fi
27121 
27122     # remove trailing .exe if any
27123     new_path="${new_path/%.exe/}"
27124 
27125     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27126     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27127   fi
27128 
27129   else
27130     # We're on a posix platform. Hooray! :)
27131     # First separate the path from the arguments. This will split at the first
27132     # space.
27133     complete="$MCS"
27134     path="${complete%% *}"
27135     tmp="$complete EOL"
27136     arguments="${tmp#* }"
27137 
27138     # Cannot rely on the command "which" here since it doesn't always work.
27139     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27140     if test -z "$is_absolute_path"; then
27141       # Path to executable is not absolute. Find it.
27142       IFS_save="$IFS"
27143       IFS=:
27144       for p in $PATH; do
27145         if test -f "$p/$path" && test -x "$p/$path"; then
27146           new_path="$p/$path"
27147           break
27148         fi
27149       done
27150       IFS="$IFS_save"
27151     else
27152       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
27153 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
27154       new_path="$path"
27155     fi
27156 
27157     if test "x$new_path" = x; then
27158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27159 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27160       has_space=`$ECHO "$complete" | $GREP " "`
27161       if test "x$has_space" != x; then
27162         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27163 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27164       fi
27165       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27166     fi
27167   fi
27168 
27169   # Now join together the path and the arguments once again
27170   if test "x$arguments" != xEOL; then
27171     new_complete="$new_path ${arguments% *}"
27172   else
27173     new_complete="$new_path"
27174   fi
27175 
27176   if test "x$complete" != "x$new_complete"; then
27177     MCS="$new_complete"
27178     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
27179 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
27180   fi
27181 
27182   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
27183     # Extract the first word of "otool", so it can be a program name with args.
27184 set dummy otool; ac_word=$2
27185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27186 $as_echo_n "checking for $ac_word... " >&6; }
27187 if ${ac_cv_path_OTOOL+:} false; then :
27188   $as_echo_n "(cached) " >&6
27189 else
27190   case $OTOOL in
27191   [\\/]* | ?:[\\/]*)
27192   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
27193   ;;
27194   *)
27195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27196 for as_dir in $PATH
27197 do
27198   IFS=$as_save_IFS
27199   test -z "$as_dir" && as_dir=.
27200     for ac_exec_ext in '' $ac_executable_extensions; do
27201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27202     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
27203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27204     break 2
27205   fi
27206 done
27207   done
27208 IFS=$as_save_IFS
27209 
27210   ;;
27211 esac
27212 fi
27213 OTOOL=$ac_cv_path_OTOOL
27214 if test -n "$OTOOL"; then
27215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
27216 $as_echo "$OTOOL" >&6; }
27217 else
27218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27219 $as_echo "no" >&6; }
27220 fi
27221 
27222 
27223     if test "x$OTOOL" = "x"; then
27224       OTOOL="true"
27225     fi
27226     if test -n "$ac_tool_prefix"; then
27227   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
27228 set dummy ${ac_tool_prefix}nm; ac_word=$2
27229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27230 $as_echo_n "checking for $ac_word... " >&6; }
27231 if ${ac_cv_prog_NM+:} false; then :
27232   $as_echo_n "(cached) " >&6
27233 else
27234   if test -n "$NM"; then
27235   ac_cv_prog_NM="$NM" # Let the user override the test.
27236 else
27237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27238 for as_dir in $PATH
27239 do
27240   IFS=$as_save_IFS
27241   test -z "$as_dir" && as_dir=.
27242     for ac_exec_ext in '' $ac_executable_extensions; do
27243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27244     ac_cv_prog_NM="${ac_tool_prefix}nm"
27245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27246     break 2
27247   fi
27248 done
27249   done
27250 IFS=$as_save_IFS
27251 
27252 fi
27253 fi
27254 NM=$ac_cv_prog_NM
27255 if test -n "$NM"; then
27256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27257 $as_echo "$NM" >&6; }
27258 else
27259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27260 $as_echo "no" >&6; }
27261 fi
27262 
27263 
27264 fi
27265 if test -z "$ac_cv_prog_NM"; then
27266   ac_ct_NM=$NM
27267   # Extract the first word of "nm", so it can be a program name with args.
27268 set dummy nm; ac_word=$2
27269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27270 $as_echo_n "checking for $ac_word... " >&6; }
27271 if ${ac_cv_prog_ac_ct_NM+:} false; then :
27272   $as_echo_n "(cached) " >&6
27273 else
27274   if test -n "$ac_ct_NM"; then
27275   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27276 else
27277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27278 for as_dir in $PATH
27279 do
27280   IFS=$as_save_IFS
27281   test -z "$as_dir" && as_dir=.
27282     for ac_exec_ext in '' $ac_executable_extensions; do
27283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27284     ac_cv_prog_ac_ct_NM="nm"
27285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27286     break 2
27287   fi
27288 done
27289   done
27290 IFS=$as_save_IFS
27291 
27292 fi
27293 fi
27294 ac_ct_NM=$ac_cv_prog_ac_ct_NM
27295 if test -n "$ac_ct_NM"; then
27296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27297 $as_echo "$ac_ct_NM" >&6; }
27298 else
27299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27300 $as_echo "no" >&6; }
27301 fi
27302 
27303   if test "x$ac_ct_NM" = x; then
27304     NM=""
27305   else
27306     case $cross_compiling:$ac_tool_warned in
27307 yes:)
27308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27309 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27310 ac_tool_warned=yes ;;
27311 esac
27312     NM=$ac_ct_NM
27313   fi
27314 else
27315   NM="$ac_cv_prog_NM"
27316 fi
27317 
27318 
27319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27320 
27321   # First separate the path from the arguments. This will split at the first
27322   # space.
27323   complete="$NM"
27324   path="${complete%% *}"
27325   tmp="$complete EOL"
27326   arguments="${tmp#* }"
27327 
27328   # Input might be given as Windows format, start by converting to
27329   # unix format.
27330   new_path=`$CYGPATH -u "$path"`
27331 
27332   # Now try to locate executable using which
27333   new_path=`$WHICH "$new_path" 2> /dev/null`
27334   # bat and cmd files are not always considered executable in cygwin causing which
27335   # to not find them
27336   if test "x$new_path" = x \
27337       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27338       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27339     new_path=`$CYGPATH -u "$path"`
27340   fi
27341   if test "x$new_path" = x; then
27342     # Oops. Which didn't find the executable.
27343     # The splitting of arguments from the executable at a space might have been incorrect,
27344     # since paths with space are more likely in Windows. Give it another try with the whole
27345     # argument.
27346     path="$complete"
27347     arguments="EOL"
27348     new_path=`$CYGPATH -u "$path"`
27349     new_path=`$WHICH "$new_path" 2> /dev/null`
27350     # bat and cmd files are not always considered executable in cygwin causing which
27351     # to not find them
27352     if test "x$new_path" = x \
27353         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27354         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27355       new_path=`$CYGPATH -u "$path"`
27356     fi
27357     if test "x$new_path" = x; then
27358       # It's still not found. Now this is an unrecoverable error.
27359       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27360 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27361       has_space=`$ECHO "$complete" | $GREP " "`
27362       if test "x$has_space" != x; then
27363         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27364 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27365       fi
27366       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27367     fi
27368   fi
27369 
27370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27373   # "foo.exe" is OK but "foo" is an error.
27374   #
27375   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27376   # It is also a way to make sure we got the proper file name for the real test later on.
27377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27378   if test "x$test_shortpath" = x; then
27379     # Short path failed, file does not exist as specified.
27380     # Try adding .exe or .cmd
27381     if test -f "${new_path}.exe"; then
27382       input_to_shortpath="${new_path}.exe"
27383     elif test -f "${new_path}.cmd"; then
27384       input_to_shortpath="${new_path}.cmd"
27385     else
27386       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27387 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27388       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27389 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27390       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27391     fi
27392   else
27393     input_to_shortpath="$new_path"
27394   fi
27395 
27396   # Call helper function which possibly converts this using DOS-style short mode.
27397   # If so, the updated path is stored in $new_path.
27398   new_path="$input_to_shortpath"
27399 
27400   input_path="$input_to_shortpath"
27401   # Check if we need to convert this using DOS-style short mode. If the path
27402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27403   # take no chances and rewrite it.
27404   # Note: m4 eats our [], so we need to use [ and ] instead.
27405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27406   if test "x$has_forbidden_chars" != x; then
27407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27408     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27409     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27410     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27411       # Going to short mode and back again did indeed matter. Since short mode is
27412       # case insensitive, let's make it lowercase to improve readability.
27413       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27414       # Now convert it back to Unix-stile (cygpath)
27415       input_path=`$CYGPATH -u "$shortmode_path"`
27416       new_path="$input_path"
27417     fi
27418   fi
27419 
27420   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27421   if test "x$test_cygdrive_prefix" = x; then
27422     # As a simple fix, exclude /usr/bin since it's not a real path.
27423     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27424       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27425       # a path prefixed by /cygdrive for fixpath to work.
27426       new_path="$CYGWIN_ROOT_PATH$input_path"
27427     fi
27428   fi
27429 
27430   # remove trailing .exe if any
27431   new_path="${new_path/%.exe/}"
27432 
27433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27434 
27435   # First separate the path from the arguments. This will split at the first
27436   # space.
27437   complete="$NM"
27438   path="${complete%% *}"
27439   tmp="$complete EOL"
27440   arguments="${tmp#* }"
27441 
27442   # Input might be given as Windows format, start by converting to
27443   # unix format.
27444   new_path="$path"
27445 
27446   windows_path="$new_path"
27447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27448     unix_path=`$CYGPATH -u "$windows_path"`
27449     new_path="$unix_path"
27450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27452     new_path="$unix_path"
27453   fi
27454 
27455 
27456   # Now try to locate executable using which
27457   new_path=`$WHICH "$new_path" 2> /dev/null`
27458 
27459   if test "x$new_path" = x; then
27460     # Oops. Which didn't find the executable.
27461     # The splitting of arguments from the executable at a space might have been incorrect,
27462     # since paths with space are more likely in Windows. Give it another try with the whole
27463     # argument.
27464     path="$complete"
27465     arguments="EOL"
27466     new_path="$path"
27467 
27468   windows_path="$new_path"
27469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27470     unix_path=`$CYGPATH -u "$windows_path"`
27471     new_path="$unix_path"
27472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27473     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27474     new_path="$unix_path"
27475   fi
27476 
27477 
27478     new_path=`$WHICH "$new_path" 2> /dev/null`
27479 
27480     if test "x$new_path" = x; then
27481       # It's still not found. Now this is an unrecoverable error.
27482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27483 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27484       has_space=`$ECHO "$complete" | $GREP " "`
27485       if test "x$has_space" != x; then
27486         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27487 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27488       fi
27489       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27490     fi
27491   fi
27492 
27493   # Now new_path has a complete unix path to the binary
27494   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27495     # Keep paths in /bin as-is, but remove trailing .exe if any
27496     new_path="${new_path/%.exe/}"
27497     # Do not save /bin paths to all_fixpath_prefixes!
27498   else
27499     # Not in mixed or Windows style, start by that.
27500     new_path=`cmd //c echo $new_path`
27501 
27502   input_path="$new_path"
27503   # Check if we need to convert this using DOS-style short mode. If the path
27504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27505   # take no chances and rewrite it.
27506   # Note: m4 eats our [], so we need to use [ and ] instead.
27507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27508   if test "x$has_forbidden_chars" != x; then
27509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27510     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27511   fi
27512 
27513     # Output is in $new_path
27514 
27515   windows_path="$new_path"
27516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27517     unix_path=`$CYGPATH -u "$windows_path"`
27518     new_path="$unix_path"
27519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27521     new_path="$unix_path"
27522   fi
27523 
27524     # remove trailing .exe if any
27525     new_path="${new_path/%.exe/}"
27526 
27527     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27528     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27529   fi
27530 
27531   else
27532     # We're on a posix platform. Hooray! :)
27533     # First separate the path from the arguments. This will split at the first
27534     # space.
27535     complete="$NM"
27536     path="${complete%% *}"
27537     tmp="$complete EOL"
27538     arguments="${tmp#* }"
27539 
27540     # Cannot rely on the command "which" here since it doesn't always work.
27541     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27542     if test -z "$is_absolute_path"; then
27543       # Path to executable is not absolute. Find it.
27544       IFS_save="$IFS"
27545       IFS=:
27546       for p in $PATH; do
27547         if test -f "$p/$path" && test -x "$p/$path"; then
27548           new_path="$p/$path"
27549           break
27550         fi
27551       done
27552       IFS="$IFS_save"
27553     else
27554       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27555 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27556       new_path="$path"
27557     fi
27558 
27559     if test "x$new_path" = x; then
27560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27561 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27562       has_space=`$ECHO "$complete" | $GREP " "`
27563       if test "x$has_space" != x; then
27564         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27565 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27566       fi
27567       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27568     fi
27569   fi
27570 
27571   # Now join together the path and the arguments once again
27572   if test "x$arguments" != xEOL; then
27573     new_complete="$new_path ${arguments% *}"
27574   else
27575     new_complete="$new_path"
27576   fi
27577 
27578   if test "x$complete" != "x$new_complete"; then
27579     NM="$new_complete"
27580     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27581 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27582   fi
27583 
27584     GNM="$NM"
27585 
27586     if test -n "$ac_tool_prefix"; then
27587   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27588 set dummy ${ac_tool_prefix}strip; ac_word=$2
27589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27590 $as_echo_n "checking for $ac_word... " >&6; }
27591 if ${ac_cv_prog_STRIP+:} false; then :
27592   $as_echo_n "(cached) " >&6
27593 else
27594   if test -n "$STRIP"; then
27595   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27596 else
27597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27598 for as_dir in $PATH
27599 do
27600   IFS=$as_save_IFS
27601   test -z "$as_dir" && as_dir=.
27602     for ac_exec_ext in '' $ac_executable_extensions; do
27603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27604     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27606     break 2
27607   fi
27608 done
27609   done
27610 IFS=$as_save_IFS
27611 
27612 fi
27613 fi
27614 STRIP=$ac_cv_prog_STRIP
27615 if test -n "$STRIP"; then
27616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27617 $as_echo "$STRIP" >&6; }
27618 else
27619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27620 $as_echo "no" >&6; }
27621 fi
27622 
27623 
27624 fi
27625 if test -z "$ac_cv_prog_STRIP"; then
27626   ac_ct_STRIP=$STRIP
27627   # Extract the first word of "strip", so it can be a program name with args.
27628 set dummy strip; ac_word=$2
27629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27630 $as_echo_n "checking for $ac_word... " >&6; }
27631 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27632   $as_echo_n "(cached) " >&6
27633 else
27634   if test -n "$ac_ct_STRIP"; then
27635   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27636 else
27637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27638 for as_dir in $PATH
27639 do
27640   IFS=$as_save_IFS
27641   test -z "$as_dir" && as_dir=.
27642     for ac_exec_ext in '' $ac_executable_extensions; do
27643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27644     ac_cv_prog_ac_ct_STRIP="strip"
27645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27646     break 2
27647   fi
27648 done
27649   done
27650 IFS=$as_save_IFS
27651 
27652 fi
27653 fi
27654 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27655 if test -n "$ac_ct_STRIP"; then
27656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27657 $as_echo "$ac_ct_STRIP" >&6; }
27658 else
27659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27660 $as_echo "no" >&6; }
27661 fi
27662 
27663   if test "x$ac_ct_STRIP" = x; then
27664     STRIP=""
27665   else
27666     case $cross_compiling:$ac_tool_warned in
27667 yes:)
27668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27669 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27670 ac_tool_warned=yes ;;
27671 esac
27672     STRIP=$ac_ct_STRIP
27673   fi
27674 else
27675   STRIP="$ac_cv_prog_STRIP"
27676 fi
27677 
27678 
27679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27680 
27681   # First separate the path from the arguments. This will split at the first
27682   # space.
27683   complete="$STRIP"
27684   path="${complete%% *}"
27685   tmp="$complete EOL"
27686   arguments="${tmp#* }"
27687 
27688   # Input might be given as Windows format, start by converting to
27689   # unix format.
27690   new_path=`$CYGPATH -u "$path"`
27691 
27692   # Now try to locate executable using which
27693   new_path=`$WHICH "$new_path" 2> /dev/null`
27694   # bat and cmd files are not always considered executable in cygwin causing which
27695   # to not find them
27696   if test "x$new_path" = x \
27697       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27698       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27699     new_path=`$CYGPATH -u "$path"`
27700   fi
27701   if test "x$new_path" = x; then
27702     # Oops. Which didn't find the executable.
27703     # The splitting of arguments from the executable at a space might have been incorrect,
27704     # since paths with space are more likely in Windows. Give it another try with the whole
27705     # argument.
27706     path="$complete"
27707     arguments="EOL"
27708     new_path=`$CYGPATH -u "$path"`
27709     new_path=`$WHICH "$new_path" 2> /dev/null`
27710     # bat and cmd files are not always considered executable in cygwin causing which
27711     # to not find them
27712     if test "x$new_path" = x \
27713         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27714         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27715       new_path=`$CYGPATH -u "$path"`
27716     fi
27717     if test "x$new_path" = x; then
27718       # It's still not found. Now this is an unrecoverable error.
27719       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27720 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27721       has_space=`$ECHO "$complete" | $GREP " "`
27722       if test "x$has_space" != x; then
27723         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27724 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27725       fi
27726       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27727     fi
27728   fi
27729 
27730   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27731   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27732   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27733   # "foo.exe" is OK but "foo" is an error.
27734   #
27735   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27736   # It is also a way to make sure we got the proper file name for the real test later on.
27737   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27738   if test "x$test_shortpath" = x; then
27739     # Short path failed, file does not exist as specified.
27740     # Try adding .exe or .cmd
27741     if test -f "${new_path}.exe"; then
27742       input_to_shortpath="${new_path}.exe"
27743     elif test -f "${new_path}.cmd"; then
27744       input_to_shortpath="${new_path}.cmd"
27745     else
27746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27747 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27748       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27749 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27750       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27751     fi
27752   else
27753     input_to_shortpath="$new_path"
27754   fi
27755 
27756   # Call helper function which possibly converts this using DOS-style short mode.
27757   # If so, the updated path is stored in $new_path.
27758   new_path="$input_to_shortpath"
27759 
27760   input_path="$input_to_shortpath"
27761   # Check if we need to convert this using DOS-style short mode. If the path
27762   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27763   # take no chances and rewrite it.
27764   # Note: m4 eats our [], so we need to use [ and ] instead.
27765   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27766   if test "x$has_forbidden_chars" != x; then
27767     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27768     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27769     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27770     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27771       # Going to short mode and back again did indeed matter. Since short mode is
27772       # case insensitive, let's make it lowercase to improve readability.
27773       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27774       # Now convert it back to Unix-stile (cygpath)
27775       input_path=`$CYGPATH -u "$shortmode_path"`
27776       new_path="$input_path"
27777     fi
27778   fi
27779 
27780   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27781   if test "x$test_cygdrive_prefix" = x; then
27782     # As a simple fix, exclude /usr/bin since it's not a real path.
27783     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27784       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27785       # a path prefixed by /cygdrive for fixpath to work.
27786       new_path="$CYGWIN_ROOT_PATH$input_path"
27787     fi
27788   fi
27789 
27790   # remove trailing .exe if any
27791   new_path="${new_path/%.exe/}"
27792 
27793   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27794 
27795   # First separate the path from the arguments. This will split at the first
27796   # space.
27797   complete="$STRIP"
27798   path="${complete%% *}"
27799   tmp="$complete EOL"
27800   arguments="${tmp#* }"
27801 
27802   # Input might be given as Windows format, start by converting to
27803   # unix format.
27804   new_path="$path"
27805 
27806   windows_path="$new_path"
27807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27808     unix_path=`$CYGPATH -u "$windows_path"`
27809     new_path="$unix_path"
27810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27812     new_path="$unix_path"
27813   fi
27814 
27815 
27816   # Now try to locate executable using which
27817   new_path=`$WHICH "$new_path" 2> /dev/null`
27818 
27819   if test "x$new_path" = x; then
27820     # Oops. Which didn't find the executable.
27821     # The splitting of arguments from the executable at a space might have been incorrect,
27822     # since paths with space are more likely in Windows. Give it another try with the whole
27823     # argument.
27824     path="$complete"
27825     arguments="EOL"
27826     new_path="$path"
27827 
27828   windows_path="$new_path"
27829   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27830     unix_path=`$CYGPATH -u "$windows_path"`
27831     new_path="$unix_path"
27832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27833     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27834     new_path="$unix_path"
27835   fi
27836 
27837 
27838     new_path=`$WHICH "$new_path" 2> /dev/null`
27839 
27840     if test "x$new_path" = x; then
27841       # It's still not found. Now this is an unrecoverable error.
27842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27843 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27844       has_space=`$ECHO "$complete" | $GREP " "`
27845       if test "x$has_space" != x; then
27846         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27847 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27848       fi
27849       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27850     fi
27851   fi
27852 
27853   # Now new_path has a complete unix path to the binary
27854   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27855     # Keep paths in /bin as-is, but remove trailing .exe if any
27856     new_path="${new_path/%.exe/}"
27857     # Do not save /bin paths to all_fixpath_prefixes!
27858   else
27859     # Not in mixed or Windows style, start by that.
27860     new_path=`cmd //c echo $new_path`
27861 
27862   input_path="$new_path"
27863   # Check if we need to convert this using DOS-style short mode. If the path
27864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27865   # take no chances and rewrite it.
27866   # Note: m4 eats our [], so we need to use [ and ] instead.
27867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27868   if test "x$has_forbidden_chars" != x; then
27869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27870     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27871   fi
27872 
27873     # Output is in $new_path
27874 
27875   windows_path="$new_path"
27876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27877     unix_path=`$CYGPATH -u "$windows_path"`
27878     new_path="$unix_path"
27879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27881     new_path="$unix_path"
27882   fi
27883 
27884     # remove trailing .exe if any
27885     new_path="${new_path/%.exe/}"
27886 
27887     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27888     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27889   fi
27890 
27891   else
27892     # We're on a posix platform. Hooray! :)
27893     # First separate the path from the arguments. This will split at the first
27894     # space.
27895     complete="$STRIP"
27896     path="${complete%% *}"
27897     tmp="$complete EOL"
27898     arguments="${tmp#* }"
27899 
27900     # Cannot rely on the command "which" here since it doesn't always work.
27901     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27902     if test -z "$is_absolute_path"; then
27903       # Path to executable is not absolute. Find it.
27904       IFS_save="$IFS"
27905       IFS=:
27906       for p in $PATH; do
27907         if test -f "$p/$path" && test -x "$p/$path"; then
27908           new_path="$p/$path"
27909           break
27910         fi
27911       done
27912       IFS="$IFS_save"
27913     else
27914       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27915 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27916       new_path="$path"
27917     fi
27918 
27919     if test "x$new_path" = x; then
27920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27921 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27922       has_space=`$ECHO "$complete" | $GREP " "`
27923       if test "x$has_space" != x; then
27924         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27925 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27926       fi
27927       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27928     fi
27929   fi
27930 
27931   # Now join together the path and the arguments once again
27932   if test "x$arguments" != xEOL; then
27933     new_complete="$new_path ${arguments% *}"
27934   else
27935     new_complete="$new_path"
27936   fi
27937 
27938   if test "x$complete" != "x$new_complete"; then
27939     STRIP="$new_complete"
27940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27941 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27942   fi
27943 
27944   fi
27945 
27946   # objcopy is used for moving debug symbols to separate files when
27947   # full debug symbols are enabled.
27948   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27949     if test -n "$ac_tool_prefix"; then
27950   for ac_prog in gobjcopy objcopy
27951   do
27952     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27953 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27955 $as_echo_n "checking for $ac_word... " >&6; }
27956 if ${ac_cv_prog_OBJCOPY+:} false; then :
27957   $as_echo_n "(cached) " >&6
27958 else
27959   if test -n "$OBJCOPY"; then
27960   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27961 else
27962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27963 for as_dir in $PATH
27964 do
27965   IFS=$as_save_IFS
27966   test -z "$as_dir" && as_dir=.
27967     for ac_exec_ext in '' $ac_executable_extensions; do
27968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27969     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27971     break 2
27972   fi
27973 done
27974   done
27975 IFS=$as_save_IFS
27976 
27977 fi
27978 fi
27979 OBJCOPY=$ac_cv_prog_OBJCOPY
27980 if test -n "$OBJCOPY"; then
27981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27982 $as_echo "$OBJCOPY" >&6; }
27983 else
27984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27985 $as_echo "no" >&6; }
27986 fi
27987 
27988 
27989     test -n "$OBJCOPY" && break
27990   done
27991 fi
27992 if test -z "$OBJCOPY"; then
27993   ac_ct_OBJCOPY=$OBJCOPY
27994   for ac_prog in gobjcopy objcopy
27995 do
27996   # Extract the first word of "$ac_prog", so it can be a program name with args.
27997 set dummy $ac_prog; ac_word=$2
27998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27999 $as_echo_n "checking for $ac_word... " >&6; }
28000 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
28001   $as_echo_n "(cached) " >&6
28002 else
28003   if test -n "$ac_ct_OBJCOPY"; then
28004   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
28005 else
28006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28007 for as_dir in $PATH
28008 do
28009   IFS=$as_save_IFS
28010   test -z "$as_dir" && as_dir=.
28011     for ac_exec_ext in '' $ac_executable_extensions; do
28012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28013     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
28014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28015     break 2
28016   fi
28017 done
28018   done
28019 IFS=$as_save_IFS
28020 
28021 fi
28022 fi
28023 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
28024 if test -n "$ac_ct_OBJCOPY"; then
28025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
28026 $as_echo "$ac_ct_OBJCOPY" >&6; }
28027 else
28028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28029 $as_echo "no" >&6; }
28030 fi
28031 
28032 
28033   test -n "$ac_ct_OBJCOPY" && break
28034 done
28035 
28036   if test "x$ac_ct_OBJCOPY" = x; then
28037     OBJCOPY=""
28038   else
28039     case $cross_compiling:$ac_tool_warned in
28040 yes:)
28041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28042 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28043 ac_tool_warned=yes ;;
28044 esac
28045     OBJCOPY=$ac_ct_OBJCOPY
28046   fi
28047 fi
28048 
28049     # Only call fixup if objcopy was found.
28050     if test -n "$OBJCOPY"; then
28051 
28052   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28053 
28054   # First separate the path from the arguments. This will split at the first
28055   # space.
28056   complete="$OBJCOPY"
28057   path="${complete%% *}"
28058   tmp="$complete EOL"
28059   arguments="${tmp#* }"
28060 
28061   # Input might be given as Windows format, start by converting to
28062   # unix format.
28063   new_path=`$CYGPATH -u "$path"`
28064 
28065   # Now try to locate executable using which
28066   new_path=`$WHICH "$new_path" 2> /dev/null`
28067   # bat and cmd files are not always considered executable in cygwin causing which
28068   # to not find them
28069   if test "x$new_path" = x \
28070       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28071       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28072     new_path=`$CYGPATH -u "$path"`
28073   fi
28074   if test "x$new_path" = x; then
28075     # Oops. Which didn't find the executable.
28076     # The splitting of arguments from the executable at a space might have been incorrect,
28077     # since paths with space are more likely in Windows. Give it another try with the whole
28078     # argument.
28079     path="$complete"
28080     arguments="EOL"
28081     new_path=`$CYGPATH -u "$path"`
28082     new_path=`$WHICH "$new_path" 2> /dev/null`
28083     # bat and cmd files are not always considered executable in cygwin causing which
28084     # to not find them
28085     if test "x$new_path" = x \
28086         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28087         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28088       new_path=`$CYGPATH -u "$path"`
28089     fi
28090     if test "x$new_path" = x; then
28091       # It's still not found. Now this is an unrecoverable error.
28092       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28093 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28094       has_space=`$ECHO "$complete" | $GREP " "`
28095       if test "x$has_space" != x; then
28096         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28097 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28098       fi
28099       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28100     fi
28101   fi
28102 
28103   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28104   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28105   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28106   # "foo.exe" is OK but "foo" is an error.
28107   #
28108   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28109   # It is also a way to make sure we got the proper file name for the real test later on.
28110   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28111   if test "x$test_shortpath" = x; then
28112     # Short path failed, file does not exist as specified.
28113     # Try adding .exe or .cmd
28114     if test -f "${new_path}.exe"; then
28115       input_to_shortpath="${new_path}.exe"
28116     elif test -f "${new_path}.cmd"; then
28117       input_to_shortpath="${new_path}.cmd"
28118     else
28119       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
28120 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
28121       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28122 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28123       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28124     fi
28125   else
28126     input_to_shortpath="$new_path"
28127   fi
28128 
28129   # Call helper function which possibly converts this using DOS-style short mode.
28130   # If so, the updated path is stored in $new_path.
28131   new_path="$input_to_shortpath"
28132 
28133   input_path="$input_to_shortpath"
28134   # Check if we need to convert this using DOS-style short mode. If the path
28135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28136   # take no chances and rewrite it.
28137   # Note: m4 eats our [], so we need to use [ and ] instead.
28138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28139   if test "x$has_forbidden_chars" != x; then
28140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28141     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28142     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28143     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28144       # Going to short mode and back again did indeed matter. Since short mode is
28145       # case insensitive, let's make it lowercase to improve readability.
28146       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28147       # Now convert it back to Unix-stile (cygpath)
28148       input_path=`$CYGPATH -u "$shortmode_path"`
28149       new_path="$input_path"
28150     fi
28151   fi
28152 
28153   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28154   if test "x$test_cygdrive_prefix" = x; then
28155     # As a simple fix, exclude /usr/bin since it's not a real path.
28156     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28157       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28158       # a path prefixed by /cygdrive for fixpath to work.
28159       new_path="$CYGWIN_ROOT_PATH$input_path"
28160     fi
28161   fi
28162 
28163   # remove trailing .exe if any
28164   new_path="${new_path/%.exe/}"
28165 
28166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28167 
28168   # First separate the path from the arguments. This will split at the first
28169   # space.
28170   complete="$OBJCOPY"
28171   path="${complete%% *}"
28172   tmp="$complete EOL"
28173   arguments="${tmp#* }"
28174 
28175   # Input might be given as Windows format, start by converting to
28176   # unix format.
28177   new_path="$path"
28178 
28179   windows_path="$new_path"
28180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28181     unix_path=`$CYGPATH -u "$windows_path"`
28182     new_path="$unix_path"
28183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28185     new_path="$unix_path"
28186   fi
28187 
28188 
28189   # Now try to locate executable using which
28190   new_path=`$WHICH "$new_path" 2> /dev/null`
28191 
28192   if test "x$new_path" = x; then
28193     # Oops. Which didn't find the executable.
28194     # The splitting of arguments from the executable at a space might have been incorrect,
28195     # since paths with space are more likely in Windows. Give it another try with the whole
28196     # argument.
28197     path="$complete"
28198     arguments="EOL"
28199     new_path="$path"
28200 
28201   windows_path="$new_path"
28202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28203     unix_path=`$CYGPATH -u "$windows_path"`
28204     new_path="$unix_path"
28205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28206     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28207     new_path="$unix_path"
28208   fi
28209 
28210 
28211     new_path=`$WHICH "$new_path" 2> /dev/null`
28212 
28213     if test "x$new_path" = x; then
28214       # It's still not found. Now this is an unrecoverable error.
28215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28216 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28217       has_space=`$ECHO "$complete" | $GREP " "`
28218       if test "x$has_space" != x; then
28219         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28220 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28221       fi
28222       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28223     fi
28224   fi
28225 
28226   # Now new_path has a complete unix path to the binary
28227   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28228     # Keep paths in /bin as-is, but remove trailing .exe if any
28229     new_path="${new_path/%.exe/}"
28230     # Do not save /bin paths to all_fixpath_prefixes!
28231   else
28232     # Not in mixed or Windows style, start by that.
28233     new_path=`cmd //c echo $new_path`
28234 
28235   input_path="$new_path"
28236   # Check if we need to convert this using DOS-style short mode. If the path
28237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28238   # take no chances and rewrite it.
28239   # Note: m4 eats our [], so we need to use [ and ] instead.
28240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28241   if test "x$has_forbidden_chars" != x; then
28242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28243     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28244   fi
28245 
28246     # Output is in $new_path
28247 
28248   windows_path="$new_path"
28249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28250     unix_path=`$CYGPATH -u "$windows_path"`
28251     new_path="$unix_path"
28252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28254     new_path="$unix_path"
28255   fi
28256 
28257     # remove trailing .exe if any
28258     new_path="${new_path/%.exe/}"
28259 
28260     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28261     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28262   fi
28263 
28264   else
28265     # We're on a posix platform. Hooray! :)
28266     # First separate the path from the arguments. This will split at the first
28267     # space.
28268     complete="$OBJCOPY"
28269     path="${complete%% *}"
28270     tmp="$complete EOL"
28271     arguments="${tmp#* }"
28272 
28273     # Cannot rely on the command "which" here since it doesn't always work.
28274     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28275     if test -z "$is_absolute_path"; then
28276       # Path to executable is not absolute. Find it.
28277       IFS_save="$IFS"
28278       IFS=:
28279       for p in $PATH; do
28280         if test -f "$p/$path" && test -x "$p/$path"; then
28281           new_path="$p/$path"
28282           break
28283         fi
28284       done
28285       IFS="$IFS_save"
28286     else
28287       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28288 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28289       new_path="$path"
28290     fi
28291 
28292     if test "x$new_path" = x; then
28293       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28294 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28295       has_space=`$ECHO "$complete" | $GREP " "`
28296       if test "x$has_space" != x; then
28297         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28298 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28299       fi
28300       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28301     fi
28302   fi
28303 
28304   # Now join together the path and the arguments once again
28305   if test "x$arguments" != xEOL; then
28306     new_complete="$new_path ${arguments% *}"
28307   else
28308     new_complete="$new_path"
28309   fi
28310 
28311   if test "x$complete" != "x$new_complete"; then
28312     OBJCOPY="$new_complete"
28313     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28314 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28315   fi
28316 
28317     fi
28318   fi
28319 
28320   if test -n "$ac_tool_prefix"; then
28321   for ac_prog in gobjdump objdump
28322   do
28323     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28324 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28326 $as_echo_n "checking for $ac_word... " >&6; }
28327 if ${ac_cv_prog_OBJDUMP+:} false; then :
28328   $as_echo_n "(cached) " >&6
28329 else
28330   if test -n "$OBJDUMP"; then
28331   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28332 else
28333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28334 for as_dir in $PATH
28335 do
28336   IFS=$as_save_IFS
28337   test -z "$as_dir" && as_dir=.
28338     for ac_exec_ext in '' $ac_executable_extensions; do
28339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28340     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28342     break 2
28343   fi
28344 done
28345   done
28346 IFS=$as_save_IFS
28347 
28348 fi
28349 fi
28350 OBJDUMP=$ac_cv_prog_OBJDUMP
28351 if test -n "$OBJDUMP"; then
28352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28353 $as_echo "$OBJDUMP" >&6; }
28354 else
28355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28356 $as_echo "no" >&6; }
28357 fi
28358 
28359 
28360     test -n "$OBJDUMP" && break
28361   done
28362 fi
28363 if test -z "$OBJDUMP"; then
28364   ac_ct_OBJDUMP=$OBJDUMP
28365   for ac_prog in gobjdump objdump
28366 do
28367   # Extract the first word of "$ac_prog", so it can be a program name with args.
28368 set dummy $ac_prog; ac_word=$2
28369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28370 $as_echo_n "checking for $ac_word... " >&6; }
28371 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28372   $as_echo_n "(cached) " >&6
28373 else
28374   if test -n "$ac_ct_OBJDUMP"; then
28375   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28376 else
28377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28378 for as_dir in $PATH
28379 do
28380   IFS=$as_save_IFS
28381   test -z "$as_dir" && as_dir=.
28382     for ac_exec_ext in '' $ac_executable_extensions; do
28383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28384     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28386     break 2
28387   fi
28388 done
28389   done
28390 IFS=$as_save_IFS
28391 
28392 fi
28393 fi
28394 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28395 if test -n "$ac_ct_OBJDUMP"; then
28396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28397 $as_echo "$ac_ct_OBJDUMP" >&6; }
28398 else
28399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28400 $as_echo "no" >&6; }
28401 fi
28402 
28403 
28404   test -n "$ac_ct_OBJDUMP" && break
28405 done
28406 
28407   if test "x$ac_ct_OBJDUMP" = x; then
28408     OBJDUMP=""
28409   else
28410     case $cross_compiling:$ac_tool_warned in
28411 yes:)
28412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28413 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28414 ac_tool_warned=yes ;;
28415 esac
28416     OBJDUMP=$ac_ct_OBJDUMP
28417   fi
28418 fi
28419 
28420   if test "x$OBJDUMP" != x; then
28421     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28422 
28423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28424 
28425   # First separate the path from the arguments. This will split at the first
28426   # space.
28427   complete="$OBJDUMP"
28428   path="${complete%% *}"
28429   tmp="$complete EOL"
28430   arguments="${tmp#* }"
28431 
28432   # Input might be given as Windows format, start by converting to
28433   # unix format.
28434   new_path=`$CYGPATH -u "$path"`
28435 
28436   # Now try to locate executable using which
28437   new_path=`$WHICH "$new_path" 2> /dev/null`
28438   # bat and cmd files are not always considered executable in cygwin causing which
28439   # to not find them
28440   if test "x$new_path" = x \
28441       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28442       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28443     new_path=`$CYGPATH -u "$path"`
28444   fi
28445   if test "x$new_path" = x; then
28446     # Oops. Which didn't find the executable.
28447     # The splitting of arguments from the executable at a space might have been incorrect,
28448     # since paths with space are more likely in Windows. Give it another try with the whole
28449     # argument.
28450     path="$complete"
28451     arguments="EOL"
28452     new_path=`$CYGPATH -u "$path"`
28453     new_path=`$WHICH "$new_path" 2> /dev/null`
28454     # bat and cmd files are not always considered executable in cygwin causing which
28455     # to not find them
28456     if test "x$new_path" = x \
28457         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28458         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28459       new_path=`$CYGPATH -u "$path"`
28460     fi
28461     if test "x$new_path" = x; then
28462       # It's still not found. Now this is an unrecoverable error.
28463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28464 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28465       has_space=`$ECHO "$complete" | $GREP " "`
28466       if test "x$has_space" != x; then
28467         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28468 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28469       fi
28470       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28471     fi
28472   fi
28473 
28474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28477   # "foo.exe" is OK but "foo" is an error.
28478   #
28479   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28480   # It is also a way to make sure we got the proper file name for the real test later on.
28481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28482   if test "x$test_shortpath" = x; then
28483     # Short path failed, file does not exist as specified.
28484     # Try adding .exe or .cmd
28485     if test -f "${new_path}.exe"; then
28486       input_to_shortpath="${new_path}.exe"
28487     elif test -f "${new_path}.cmd"; then
28488       input_to_shortpath="${new_path}.cmd"
28489     else
28490       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28491 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28492       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28493 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28494       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28495     fi
28496   else
28497     input_to_shortpath="$new_path"
28498   fi
28499 
28500   # Call helper function which possibly converts this using DOS-style short mode.
28501   # If so, the updated path is stored in $new_path.
28502   new_path="$input_to_shortpath"
28503 
28504   input_path="$input_to_shortpath"
28505   # Check if we need to convert this using DOS-style short mode. If the path
28506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28507   # take no chances and rewrite it.
28508   # Note: m4 eats our [], so we need to use [ and ] instead.
28509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28510   if test "x$has_forbidden_chars" != x; then
28511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28512     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28513     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28514     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28515       # Going to short mode and back again did indeed matter. Since short mode is
28516       # case insensitive, let's make it lowercase to improve readability.
28517       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28518       # Now convert it back to Unix-stile (cygpath)
28519       input_path=`$CYGPATH -u "$shortmode_path"`
28520       new_path="$input_path"
28521     fi
28522   fi
28523 
28524   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28525   if test "x$test_cygdrive_prefix" = x; then
28526     # As a simple fix, exclude /usr/bin since it's not a real path.
28527     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28528       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28529       # a path prefixed by /cygdrive for fixpath to work.
28530       new_path="$CYGWIN_ROOT_PATH$input_path"
28531     fi
28532   fi
28533 
28534   # remove trailing .exe if any
28535   new_path="${new_path/%.exe/}"
28536 
28537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28538 
28539   # First separate the path from the arguments. This will split at the first
28540   # space.
28541   complete="$OBJDUMP"
28542   path="${complete%% *}"
28543   tmp="$complete EOL"
28544   arguments="${tmp#* }"
28545 
28546   # Input might be given as Windows format, start by converting to
28547   # unix format.
28548   new_path="$path"
28549 
28550   windows_path="$new_path"
28551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28552     unix_path=`$CYGPATH -u "$windows_path"`
28553     new_path="$unix_path"
28554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28556     new_path="$unix_path"
28557   fi
28558 
28559 
28560   # Now try to locate executable using which
28561   new_path=`$WHICH "$new_path" 2> /dev/null`
28562 
28563   if test "x$new_path" = x; then
28564     # Oops. Which didn't find the executable.
28565     # The splitting of arguments from the executable at a space might have been incorrect,
28566     # since paths with space are more likely in Windows. Give it another try with the whole
28567     # argument.
28568     path="$complete"
28569     arguments="EOL"
28570     new_path="$path"
28571 
28572   windows_path="$new_path"
28573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28574     unix_path=`$CYGPATH -u "$windows_path"`
28575     new_path="$unix_path"
28576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28578     new_path="$unix_path"
28579   fi
28580 
28581 
28582     new_path=`$WHICH "$new_path" 2> /dev/null`
28583 
28584     if test "x$new_path" = x; then
28585       # It's still not found. Now this is an unrecoverable error.
28586       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28587 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28588       has_space=`$ECHO "$complete" | $GREP " "`
28589       if test "x$has_space" != x; then
28590         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28591 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28592       fi
28593       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28594     fi
28595   fi
28596 
28597   # Now new_path has a complete unix path to the binary
28598   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28599     # Keep paths in /bin as-is, but remove trailing .exe if any
28600     new_path="${new_path/%.exe/}"
28601     # Do not save /bin paths to all_fixpath_prefixes!
28602   else
28603     # Not in mixed or Windows style, start by that.
28604     new_path=`cmd //c echo $new_path`
28605 
28606   input_path="$new_path"
28607   # Check if we need to convert this using DOS-style short mode. If the path
28608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28609   # take no chances and rewrite it.
28610   # Note: m4 eats our [], so we need to use [ and ] instead.
28611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28612   if test "x$has_forbidden_chars" != x; then
28613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28615   fi
28616 
28617     # Output is in $new_path
28618 
28619   windows_path="$new_path"
28620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28621     unix_path=`$CYGPATH -u "$windows_path"`
28622     new_path="$unix_path"
28623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28625     new_path="$unix_path"
28626   fi
28627 
28628     # remove trailing .exe if any
28629     new_path="${new_path/%.exe/}"
28630 
28631     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28632     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28633   fi
28634 
28635   else
28636     # We're on a posix platform. Hooray! :)
28637     # First separate the path from the arguments. This will split at the first
28638     # space.
28639     complete="$OBJDUMP"
28640     path="${complete%% *}"
28641     tmp="$complete EOL"
28642     arguments="${tmp#* }"
28643 
28644     # Cannot rely on the command "which" here since it doesn't always work.
28645     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28646     if test -z "$is_absolute_path"; then
28647       # Path to executable is not absolute. Find it.
28648       IFS_save="$IFS"
28649       IFS=:
28650       for p in $PATH; do
28651         if test -f "$p/$path" && test -x "$p/$path"; then
28652           new_path="$p/$path"
28653           break
28654         fi
28655       done
28656       IFS="$IFS_save"
28657     else
28658       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28659 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28660       new_path="$path"
28661     fi
28662 
28663     if test "x$new_path" = x; then
28664       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28665 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28666       has_space=`$ECHO "$complete" | $GREP " "`
28667       if test "x$has_space" != x; then
28668         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28669 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28670       fi
28671       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28672     fi
28673   fi
28674 
28675   # Now join together the path and the arguments once again
28676   if test "x$arguments" != xEOL; then
28677     new_complete="$new_path ${arguments% *}"
28678   else
28679     new_complete="$new_path"
28680   fi
28681 
28682   if test "x$complete" != "x$new_complete"; then
28683     OBJDUMP="$new_complete"
28684     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28685 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28686   fi
28687 
28688   fi
28689 
28690 
28691 
28692   # Restore old path without tools dir
28693   PATH="$OLD_PATH"
28694 
28695 
28696 # FIXME: Currently we must test this after paths but before flags. Fix!
28697 
28698 # And we can test some aspects on the target using configure macros.
28699 
28700 
28701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28702 $as_echo_n "checking for ANSI C header files... " >&6; }
28703 if ${ac_cv_header_stdc+:} false; then :
28704   $as_echo_n "(cached) " >&6
28705 else
28706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28707 /* end confdefs.h.  */
28708 #include <stdlib.h>
28709 #include <stdarg.h>
28710 #include <string.h>
28711 #include <float.h>
28712 
28713 int
28714 main ()
28715 {
28716 
28717   ;
28718   return 0;
28719 }
28720 _ACEOF
28721 if ac_fn_cxx_try_compile "$LINENO"; then :
28722   ac_cv_header_stdc=yes
28723 else
28724   ac_cv_header_stdc=no
28725 fi
28726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28727 
28728 if test $ac_cv_header_stdc = yes; then
28729   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28731 /* end confdefs.h.  */
28732 #include <string.h>
28733 
28734 _ACEOF
28735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28736   $EGREP "memchr" >/dev/null 2>&1; then :
28737 
28738 else
28739   ac_cv_header_stdc=no
28740 fi
28741 rm -f conftest*
28742 
28743 fi
28744 
28745 if test $ac_cv_header_stdc = yes; then
28746   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28748 /* end confdefs.h.  */
28749 #include <stdlib.h>
28750 
28751 _ACEOF
28752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28753   $EGREP "free" >/dev/null 2>&1; then :
28754 
28755 else
28756   ac_cv_header_stdc=no
28757 fi
28758 rm -f conftest*
28759 
28760 fi
28761 
28762 if test $ac_cv_header_stdc = yes; then
28763   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28764   if test "$cross_compiling" = yes; then :
28765   :
28766 else
28767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28768 /* end confdefs.h.  */
28769 #include <ctype.h>
28770 #include <stdlib.h>
28771 #if ((' ' & 0x0FF) == 0x020)
28772 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28773 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28774 #else
28775 # define ISLOWER(c) \
28776                    (('a' <= (c) && (c) <= 'i') \
28777                      || ('j' <= (c) && (c) <= 'r') \
28778                      || ('s' <= (c) && (c) <= 'z'))
28779 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28780 #endif
28781 
28782 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28783 int
28784 main ()
28785 {
28786   int i;
28787   for (i = 0; i < 256; i++)
28788     if (XOR (islower (i), ISLOWER (i))
28789         || toupper (i) != TOUPPER (i))
28790       return 2;
28791   return 0;
28792 }
28793 _ACEOF
28794 if ac_fn_cxx_try_run "$LINENO"; then :
28795 
28796 else
28797   ac_cv_header_stdc=no
28798 fi
28799 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28800   conftest.$ac_objext conftest.beam conftest.$ac_ext
28801 fi
28802 
28803 fi
28804 fi
28805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28806 $as_echo "$ac_cv_header_stdc" >&6; }
28807 if test $ac_cv_header_stdc = yes; then
28808 
28809 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28810 
28811 fi
28812 
28813 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28814 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28815                   inttypes.h stdint.h unistd.h
28816 do :
28817   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28818 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28819 "
28820 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28821   cat >>confdefs.h <<_ACEOF
28822 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28823 _ACEOF
28824 
28825 fi
28826 
28827 done
28828 
28829 
28830 
28831   ###############################################################################
28832   #
28833   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28834   # (The JVM can use 32 or 64 bit Java pointers but that decision
28835   # is made at runtime.)
28836   #
28837 
28838   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28839     # Always specify -m flag on Solaris
28840     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28841 
28842   # When we add flags to the "official" CFLAGS etc, we need to
28843   # keep track of these additions in ADDED_CFLAGS etc. These
28844   # will later be checked to make sure only controlled additions
28845   # have been made to CFLAGS etc.
28846   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28847   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28848   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28849 
28850   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28851   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28852   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28853 
28854   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28855   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28856   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28857 
28858   elif test "x$COMPILE_TYPE" = xreduced; then
28859     if test "x$OPENJDK_TARGET_OS" != xwindows; then
28860       # Specify -m if running reduced on other Posix platforms
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     fi
28879   fi
28880 
28881   # Make compilation sanity check
28882   for ac_header in stdio.h
28883 do :
28884   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28885 if test "x$ac_cv_header_stdio_h" = xyes; then :
28886   cat >>confdefs.h <<_ACEOF
28887 #define HAVE_STDIO_H 1
28888 _ACEOF
28889 
28890 else
28891 
28892     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28893 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28894     if test "x$COMPILE_TYPE" = xreduced; then
28895       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28896 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28897     elif test "x$COMPILE_TYPE" = xcross; then
28898       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28899 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28900     fi
28901     as_fn_error $? "Cannot continue." "$LINENO" 5
28902 
28903 fi
28904 
28905 done
28906 
28907 
28908   # The cast to long int works around a bug in the HP C Compiler
28909 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28910 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28911 # This bug is HP SR number 8606223364.
28912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28913 $as_echo_n "checking size of int *... " >&6; }
28914 if ${ac_cv_sizeof_int_p+:} false; then :
28915   $as_echo_n "(cached) " >&6
28916 else
28917   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28918 
28919 else
28920   if test "$ac_cv_type_int_p" = yes; then
28921      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28922 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28923 as_fn_error 77 "cannot compute sizeof (int *)
28924 See \`config.log' for more details" "$LINENO" 5; }
28925    else
28926      ac_cv_sizeof_int_p=0
28927    fi
28928 fi
28929 
28930 fi
28931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28932 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28933 
28934 
28935 
28936 cat >>confdefs.h <<_ACEOF
28937 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28938 _ACEOF
28939 
28940 
28941 
28942   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
28943   if test "x$ac_cv_sizeof_int_p" = x; then
28944     # The test failed, lets stick to the assumed value.
28945     { $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
28946 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28947   else
28948     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
28949 
28950     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28951       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
28952       # Let's try to implicitely set the compilers target architecture and retry the test
28953       { $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
28954 $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;}
28955       { $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
28956 $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;}
28957 
28958   # When we add flags to the "official" CFLAGS etc, we need to
28959   # keep track of these additions in ADDED_CFLAGS etc. These
28960   # will later be checked to make sure only controlled additions
28961   # have been made to CFLAGS etc.
28962   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28963   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28964   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28965 
28966   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28967   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28968   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28969 
28970   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28971   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28972   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28973 
28974 
28975       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
28976       unset ac_cv_sizeof_int_p
28977       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
28978       cat >>confdefs.h <<_ACEOF
28979 #undef SIZEOF_INT_P
28980 _ACEOF
28981 
28982       # The cast to long int works around a bug in the HP C Compiler
28983 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28984 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28985 # This bug is HP SR number 8606223364.
28986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28987 $as_echo_n "checking size of int *... " >&6; }
28988 if ${ac_cv_sizeof_int_p+:} false; then :
28989   $as_echo_n "(cached) " >&6
28990 else
28991   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28992 
28993 else
28994   if test "$ac_cv_type_int_p" = yes; then
28995      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28996 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28997 as_fn_error 77 "cannot compute sizeof (int *)
28998 See \`config.log' for more details" "$LINENO" 5; }
28999    else
29000      ac_cv_sizeof_int_p=0
29001    fi
29002 fi
29003 
29004 fi
29005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29006 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29007 
29008 
29009 
29010 cat >>confdefs.h <<_ACEOF
29011 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29012 _ACEOF
29013 
29014 
29015 
29016       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29017 
29018       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29019         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
29020       fi
29021     fi
29022   fi
29023 
29024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29025 $as_echo_n "checking for target address size... " >&6; }
29026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29027 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29028 
29029 
29030   ###############################################################################
29031   #
29032   # Is the target little of big endian?
29033   #
29034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29035 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29036 if ${ac_cv_c_bigendian+:} false; then :
29037   $as_echo_n "(cached) " >&6
29038 else
29039   ac_cv_c_bigendian=unknown
29040     # See if we're dealing with a universal compiler.
29041     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29042 /* end confdefs.h.  */
29043 #ifndef __APPLE_CC__
29044                not a universal capable compiler
29045              #endif
29046              typedef int dummy;
29047 
29048 _ACEOF
29049 if ac_fn_cxx_try_compile "$LINENO"; then :
29050 
29051         # Check for potential -arch flags.  It is not universal unless
29052         # there are at least two -arch flags with different values.
29053         ac_arch=
29054         ac_prev=
29055         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29056          if test -n "$ac_prev"; then
29057            case $ac_word in
29058              i?86 | x86_64 | ppc | ppc64)
29059                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29060                  ac_arch=$ac_word
29061                else
29062                  ac_cv_c_bigendian=universal
29063                  break
29064                fi
29065                ;;
29066            esac
29067            ac_prev=
29068          elif test "x$ac_word" = "x-arch"; then
29069            ac_prev=arch
29070          fi
29071        done
29072 fi
29073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29074     if test $ac_cv_c_bigendian = unknown; then
29075       # See if sys/param.h defines the BYTE_ORDER macro.
29076       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29077 /* end confdefs.h.  */
29078 #include <sys/types.h>
29079              #include <sys/param.h>
29080 
29081 int
29082 main ()
29083 {
29084 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29085                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29086                      && LITTLE_ENDIAN)
29087               bogus endian macros
29088              #endif
29089 
29090   ;
29091   return 0;
29092 }
29093 _ACEOF
29094 if ac_fn_cxx_try_compile "$LINENO"; then :
29095   # It does; now see whether it defined to BIG_ENDIAN or not.
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 BYTE_ORDER != BIG_ENDIAN
29105                  not big endian
29106                 #endif
29107 
29108   ;
29109   return 0;
29110 }
29111 _ACEOF
29112 if ac_fn_cxx_try_compile "$LINENO"; then :
29113   ac_cv_c_bigendian=yes
29114 else
29115   ac_cv_c_bigendian=no
29116 fi
29117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29118 fi
29119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29120     fi
29121     if test $ac_cv_c_bigendian = unknown; then
29122       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29123       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29124 /* end confdefs.h.  */
29125 #include <limits.h>
29126 
29127 int
29128 main ()
29129 {
29130 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29131               bogus endian macros
29132              #endif
29133 
29134   ;
29135   return 0;
29136 }
29137 _ACEOF
29138 if ac_fn_cxx_try_compile "$LINENO"; then :
29139   # It does; now see whether it defined to _BIG_ENDIAN or not.
29140          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29141 /* end confdefs.h.  */
29142 #include <limits.h>
29143 
29144 int
29145 main ()
29146 {
29147 #ifndef _BIG_ENDIAN
29148                  not big endian
29149                 #endif
29150 
29151   ;
29152   return 0;
29153 }
29154 _ACEOF
29155 if ac_fn_cxx_try_compile "$LINENO"; then :
29156   ac_cv_c_bigendian=yes
29157 else
29158   ac_cv_c_bigendian=no
29159 fi
29160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29161 fi
29162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29163     fi
29164     if test $ac_cv_c_bigendian = unknown; then
29165       # Compile a test program.
29166       if test "$cross_compiling" = yes; then :
29167   # Try to guess by grepping values from an object file.
29168          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29169 /* end confdefs.h.  */
29170 short int ascii_mm[] =
29171                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29172                 short int ascii_ii[] =
29173                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29174                 int use_ascii (int i) {
29175                   return ascii_mm[i] + ascii_ii[i];
29176                 }
29177                 short int ebcdic_ii[] =
29178                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29179                 short int ebcdic_mm[] =
29180                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29181                 int use_ebcdic (int i) {
29182                   return ebcdic_mm[i] + ebcdic_ii[i];
29183                 }
29184                 extern int foo;
29185 
29186 int
29187 main ()
29188 {
29189 return use_ascii (foo) == use_ebcdic (foo);
29190   ;
29191   return 0;
29192 }
29193 _ACEOF
29194 if ac_fn_cxx_try_compile "$LINENO"; then :
29195   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29196               ac_cv_c_bigendian=yes
29197             fi
29198             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29199               if test "$ac_cv_c_bigendian" = unknown; then
29200                 ac_cv_c_bigendian=no
29201               else
29202                 # finding both strings is unlikely to happen, but who knows?
29203                 ac_cv_c_bigendian=unknown
29204               fi
29205             fi
29206 fi
29207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29208 else
29209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29210 /* end confdefs.h.  */
29211 $ac_includes_default
29212 int
29213 main ()
29214 {
29215 
29216              /* Are we little or big endian?  From Harbison&Steele.  */
29217              union
29218              {
29219                long int l;
29220                char c[sizeof (long int)];
29221              } u;
29222              u.l = 1;
29223              return u.c[sizeof (long int) - 1] == 1;
29224 
29225   ;
29226   return 0;
29227 }
29228 _ACEOF
29229 if ac_fn_cxx_try_run "$LINENO"; then :
29230   ac_cv_c_bigendian=no
29231 else
29232   ac_cv_c_bigendian=yes
29233 fi
29234 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29235   conftest.$ac_objext conftest.beam conftest.$ac_ext
29236 fi
29237 
29238     fi
29239 fi
29240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29241 $as_echo "$ac_cv_c_bigendian" >&6; }
29242  case $ac_cv_c_bigendian in #(
29243    yes)
29244      ENDIAN="big";; #(
29245    no)
29246      ENDIAN="little" ;; #(
29247    universal)
29248      ENDIAN="universal_endianness"
29249      ;; #(
29250    *)
29251      ENDIAN="unknown" ;;
29252  esac
29253 
29254 
29255   if test "x$ENDIAN" = xuniversal_endianness; then
29256     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29257   fi
29258   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29259     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
29260   fi
29261 
29262 
29263 # Configure flags for the tools
29264 
29265 
29266   ###############################################################################
29267   #
29268   # How to compile shared libraries.
29269   #
29270 
29271   if test "x$GCC" = xyes; then
29272     COMPILER_NAME=gcc
29273     PICFLAG="-fPIC"
29274     LIBRARY_PREFIX=lib
29275     SHARED_LIBRARY='lib$1.so'
29276     STATIC_LIBRARY='lib$1.a'
29277     SHARED_LIBRARY_FLAGS="-shared"
29278     SHARED_LIBRARY_SUFFIX='.so'
29279     STATIC_LIBRARY_SUFFIX='.a'
29280     OBJ_SUFFIX='.o'
29281     EXE_SUFFIX=''
29282     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29283     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29284     C_FLAG_REORDER=''
29285     CXX_FLAG_REORDER=''
29286     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29287     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29288     LD="$CC"
29289     LDEXE="$CC"
29290     LDCXX="$CXX"
29291     LDEXECXX="$CXX"
29292     POST_STRIP_CMD="$STRIP -g"
29293 
29294     # Linking is different on MacOSX
29295     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29296       # Might change in the future to clang.
29297       COMPILER_NAME=gcc
29298       SHARED_LIBRARY='lib$1.dylib'
29299       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29300       SHARED_LIBRARY_SUFFIX='.dylib'
29301       EXE_SUFFIX=''
29302       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29303       SET_SHARED_LIBRARY_MAPFILE=''
29304       SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29305       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29306       POST_STRIP_CMD="$STRIP -S"
29307     fi
29308   else
29309     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29310       # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29311       COMPILER_NAME=ossc
29312       PICFLAG="-KPIC"
29313       LIBRARY_PREFIX=lib
29314       SHARED_LIBRARY='lib$1.so'
29315       STATIC_LIBRARY='lib$1.a'
29316       SHARED_LIBRARY_FLAGS="-G"
29317       SHARED_LIBRARY_SUFFIX='.so'
29318       STATIC_LIBRARY_SUFFIX='.a'
29319       OBJ_SUFFIX='.o'
29320       EXE_SUFFIX=''
29321       SET_SHARED_LIBRARY_NAME=''
29322       SET_SHARED_LIBRARY_MAPFILE='-M$1'
29323       C_FLAG_REORDER='-xF'
29324       CXX_FLAG_REORDER='-xF'
29325       SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29326       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29327       CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29328       CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29329       CFLAGS_JDKLIB_EXTRA='-xstrconst'
29330       POST_STRIP_CMD="$STRIP -x"
29331       POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29332     fi
29333     if test "x$OPENJDK_TARGET_OS" = xaix; then
29334         COMPILER_NAME=xlc
29335         PICFLAG="-qpic=large"
29336         LIBRARY_PREFIX=lib
29337         SHARED_LIBRARY='lib$1.so'
29338         STATIC_LIBRARY='lib$1.a'
29339         SHARED_LIBRARY_FLAGS="-qmkshrobj"
29340         SHARED_LIBRARY_SUFFIX='.so'
29341         STATIC_LIBRARY_SUFFIX='.a'
29342         OBJ_SUFFIX='.o'
29343         EXE_SUFFIX=''
29344         SET_SHARED_LIBRARY_NAME=''
29345         SET_SHARED_LIBRARY_MAPFILE=''
29346         C_FLAG_REORDER=''
29347         CXX_FLAG_REORDER=''
29348         SET_SHARED_LIBRARY_ORIGIN=''
29349         SET_EXECUTABLE_ORIGIN=""
29350         CFLAGS_JDK=""
29351         CXXFLAGS_JDK=""
29352         CFLAGS_JDKLIB_EXTRA=''
29353         POST_STRIP_CMD="$STRIP -X32_64"
29354         POST_MCS_CMD=""
29355     fi
29356     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29357       # If it is not gcc, then assume it is the MS Visual Studio compiler
29358       COMPILER_NAME=cl
29359       PICFLAG=""
29360       LIBRARY_PREFIX=
29361       SHARED_LIBRARY='$1.dll'
29362       STATIC_LIBRARY='$1.lib'
29363       SHARED_LIBRARY_FLAGS="-LD"
29364       SHARED_LIBRARY_SUFFIX='.dll'
29365       STATIC_LIBRARY_SUFFIX='.lib'
29366       OBJ_SUFFIX='.obj'
29367       EXE_SUFFIX='.exe'
29368       SET_SHARED_LIBRARY_NAME=''
29369       SET_SHARED_LIBRARY_MAPFILE=''
29370       SET_SHARED_LIBRARY_ORIGIN=''
29371       SET_EXECUTABLE_ORIGIN=''
29372     fi
29373   fi
29374 
29375 
29376 
29377 
29378 
29379 
29380 
29381 
29382 
29383 
29384 
29385 
29386 
29387 
29388 
29389 
29390 
29391 
29392 
29393   # The (cross) compiler is now configured, we can now test capabilities
29394   # of the target platform.
29395 
29396 
29397 
29398   ###############################################################################
29399   #
29400   # Setup the opt flags for different compilers
29401   # and different operating systems.
29402   #
29403 
29404   #
29405   # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29406   #
29407   if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29408     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29409     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29410     CFLAGS="$CFLAGS -mstackrealign"
29411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29412 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29413     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29414 /* end confdefs.h.  */
29415 int main() { return 0; }
29416 _ACEOF
29417 if ac_fn_cxx_try_link "$LINENO"; then :
29418 
29419           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29420 $as_echo "yes" >&6; }
29421 
29422 else
29423 
29424           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29425 $as_echo "no" >&6; }
29426           as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29427 
29428 
29429 fi
29430 rm -f core conftest.err conftest.$ac_objext \
29431     conftest$ac_exeext conftest.$ac_ext
29432   fi
29433 
29434   C_FLAG_DEPS="-MMD -MF"
29435   CXX_FLAG_DEPS="-MMD -MF"
29436 
29437   case $COMPILER_TYPE in
29438     CC )
29439       case $COMPILER_NAME in
29440         gcc )
29441           case $OPENJDK_TARGET_OS in
29442             macosx )
29443               # On MacOSX we optimize for size, something
29444               # we should do for all platforms?
29445               C_O_FLAG_HI="-Os"
29446               C_O_FLAG_NORM="-Os"
29447               C_O_FLAG_NONE=""
29448               ;;
29449             *)
29450               C_O_FLAG_HI="-O3"
29451               C_O_FLAG_NORM="-O2"
29452               C_O_FLAG_NONE="-O0"
29453               ;;
29454           esac
29455           CXX_O_FLAG_HI="$C_O_FLAG_HI"
29456           CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29457           CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29458           CFLAGS_DEBUG_SYMBOLS="-g"
29459           CXXFLAGS_DEBUG_SYMBOLS="-g"
29460           if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29461             CFLAGS_DEBUG_SYMBOLS="-g1"
29462             CXXFLAGS_DEBUG_SYMBOLS="-g1"
29463           fi
29464           ;;
29465         ossc )
29466           #
29467           # Forte has different names for this with their C++ compiler...
29468           #
29469           C_FLAG_DEPS="-xMMD -xMF"
29470           CXX_FLAG_DEPS="-xMMD -xMF"
29471 
29472           # Extra options used with HIGHEST
29473           #
29474           # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29475           #          done with care, there are some assumptions below that need to
29476           #          be understood about the use of pointers, and IEEE behavior.
29477           #
29478           # Use non-standard floating point mode (not IEEE 754)
29479           CC_HIGHEST="$CC_HIGHEST -fns"
29480           # Do some simplification of floating point arithmetic (not IEEE 754)
29481           CC_HIGHEST="$CC_HIGHEST -fsimple"
29482           # Use single precision floating point with 'float'
29483           CC_HIGHEST="$CC_HIGHEST -fsingle"
29484           # Assume memory references via basic pointer types do not alias
29485           #   (Source with excessing pointer casting and data access with mixed
29486           #    pointer types are not recommended)
29487           CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29488           # Use intrinsic or inline versions for math/std functions
29489           #   (If you expect perfect errno behavior, do not use this)
29490           CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29491           # Loop data dependency optimizations (need -xO3 or higher)
29492           CC_HIGHEST="$CC_HIGHEST -xdepend"
29493           # Pointer parameters to functions do not overlap
29494           #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29495           #    If you pass in multiple pointers to the same data, do not use this)
29496           CC_HIGHEST="$CC_HIGHEST -xrestrict"
29497           # Inline some library routines
29498           #   (If you expect perfect errno behavior, do not use this)
29499           CC_HIGHEST="$CC_HIGHEST -xlibmil"
29500           # Use optimized math routines
29501           #   (If you expect perfect errno behavior, do not use this)
29502           #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29503           #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29504 
29505           if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29506             CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29507             CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29508           fi
29509 
29510           case $OPENJDK_TARGET_CPU_ARCH in
29511             x86)
29512               C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29513               C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29514               C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29515               C_O_FLAG_NONE="-xregs=no%frameptr"
29516               CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29517               CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29518               CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29519               CXX_O_FLAG_NONE="-xregs=no%frameptr"
29520               if test "x$OPENJDK_TARGET_CPU" = xx86; then
29521                 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29522                 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29523               fi
29524               ;;
29525             sparc)
29526               CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29527               CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29528               C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29529               C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29530               C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29531               C_O_FLAG_NONE=""
29532               CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29533               CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29534               CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29535               CXX_O_FLAG_NONE=""
29536               ;;
29537           esac
29538 
29539           CFLAGS_DEBUG_SYMBOLS="-g -xs"
29540           CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29541           ;;
29542         xlc )
29543           C_FLAG_DEPS="-qmakedep=gcc -MF"
29544           CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29545           C_O_FLAG_HIGHEST="-O3"
29546           C_O_FLAG_HI="-O3 -qstrict"
29547           C_O_FLAG_NORM="-O2"
29548           C_O_FLAG_NONE=""
29549           CXX_O_FLAG_HIGHEST="-O3"
29550           CXX_O_FLAG_HI="-O3 -qstrict"
29551           CXX_O_FLAG_NORM="-O2"
29552           CXX_O_FLAG_NONE=""
29553           CFLAGS_DEBUG_SYMBOLS="-g"
29554           CXXFLAGS_DEBUG_SYMBOLS="-g"
29555           LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29556           CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29557           CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29558           ;;
29559       esac
29560       ;;
29561     CL )
29562       C_O_FLAG_HIGHEST="-O2"
29563       C_O_FLAG_HI="-O1"
29564       C_O_FLAG_NORM="-O1"
29565       C_O_FLAG_NONE="-Od"
29566       CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29567       CXX_O_FLAG_HI="$C_O_FLAG_HI"
29568       CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29569       CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29570       ;;
29571   esac
29572 
29573   if test -z "$C_O_FLAG_HIGHEST"; then
29574     C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29575   fi
29576 
29577   if test -z "$CXX_O_FLAG_HIGHEST"; then
29578     CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29579   fi
29580 
29581 
29582 
29583 
29584 
29585 
29586 
29587 
29588 
29589 
29590 
29591 
29592 
29593 
29594   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29595     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29596 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29597   fi
29598 
29599   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29600     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29601 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29602   fi
29603 
29604   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29605     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29606 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29607   fi
29608 
29609 
29610 # Check whether --with-extra-cflags was given.
29611 if test "${with_extra_cflags+set}" = set; then :
29612   withval=$with_extra_cflags;
29613 fi
29614 
29615 
29616 
29617 # Check whether --with-extra-cxxflags was given.
29618 if test "${with_extra_cxxflags+set}" = set; then :
29619   withval=$with_extra_cxxflags;
29620 fi
29621 
29622 
29623 
29624 # Check whether --with-extra-ldflags was given.
29625 if test "${with_extra_ldflags+set}" = set; then :
29626   withval=$with_extra_ldflags;
29627 fi
29628 
29629 
29630   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29631   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29632   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29633 
29634   # Hotspot needs these set in their legacy form
29635   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29636   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29637   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29638 
29639 
29640 
29641 
29642 
29643   ###############################################################################
29644   #
29645   # Now setup the CFLAGS and LDFLAGS for the JDK build.
29646   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29647   #
29648   case $COMPILER_NAME in
29649     gcc )
29650       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29651       -pipe \
29652       -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29653       case $OPENJDK_TARGET_CPU_ARCH in
29654         arm )
29655           # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29656           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29657           ;;
29658         ppc )
29659           # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29660           ;;
29661         * )
29662           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29663           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29664           ;;
29665       esac
29666       ;;
29667     ossc )
29668       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29669       case $OPENJDK_TARGET_CPU_ARCH in
29670         x86 )
29671           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29672           CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29673           ;;
29674       esac
29675 
29676       CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29677       CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29678 
29679       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29680       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29681       ;;
29682     xlc )
29683       CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29684       CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29685 
29686       LDFLAGS_JDK="$LDFLAGS_JDK"
29687       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29688       ;;
29689     cl )
29690       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29691       -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29692       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29693       -DWIN32 -DIAL"
29694       case $OPENJDK_TARGET_CPU in
29695         x86 )
29696           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29697           ;;
29698         x86_64 )
29699           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29700           ;;
29701       esac
29702       ;;
29703   esac
29704 
29705   ###############################################################################
29706 
29707   # Adjust flags according to debug level.
29708   case $DEBUG_LEVEL in
29709     fastdebug )
29710       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29711       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29712       C_O_FLAG_HI="$C_O_FLAG_NORM"
29713       C_O_FLAG_NORM="$C_O_FLAG_NORM"
29714       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29715       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29716       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29717       ;;
29718     slowdebug )
29719       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29720       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29721       C_O_FLAG_HI="$C_O_FLAG_NONE"
29722       C_O_FLAG_NORM="$C_O_FLAG_NONE"
29723       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29724       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29725       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29726       ;;
29727   esac
29728 
29729   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29730 
29731   # The package path is used only on macosx?
29732   PACKAGE_PATH=/opt/local
29733 
29734 
29735   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29736     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29737     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29738     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29739     #   Note: -Dmacro         is the same as    #define macro 1
29740     #         -Dmacro=        is the same as    #define macro
29741     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29742       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29743     else
29744       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29745     fi
29746   else
29747     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29748   fi
29749   if test "x$OPENJDK_TARGET_OS" = xlinux; then
29750     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29751   fi
29752   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29753     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29754   fi
29755   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29756     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29757   fi
29758   if test "x$OPENJDK_TARGET_OS" = xaix; then
29759     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29760   fi
29761   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29762     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29763     # Setting these parameters makes it an error to link to macosx APIs that are
29764     # newer than the given OS version and makes the linked binaries compatible even
29765     # if built on a newer version of the OS.
29766     # The expected format is X.Y.Z
29767     MACOSX_VERSION_MIN=10.7.0
29768 
29769     # The macro takes the version with no dots, ex: 1070
29770     # Let the flags variables get resolved in make for easier override on make
29771     # command line.
29772     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29773     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29774   fi
29775   if test "x$OPENJDK_TARGET_OS" = xbsd; then
29776     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29777   fi
29778   if test "x$DEBUG_LEVEL" = xrelease; then
29779     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29780   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29781     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29782   fi
29783   else
29784     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29785   fi
29786 
29787   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29788   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29789 
29790   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29791       -I${JDK_OUTPUTDIR}/include \
29792       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29793       -I${JDK_TOPDIR}/src/share/javavm/export \
29794       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29795       -I${JDK_TOPDIR}/src/share/native/common \
29796       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29797 
29798   # The shared libraries are compiled using the picflag.
29799   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29800   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29801 
29802   # Executable flags
29803   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29804   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29805 
29806   # Now this is odd. The JDK native libraries have to link against libjvm.so
29807   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29808   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29809   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29810   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29811   # libraries will link to whatever is in memory. Yuck.
29812   #
29813   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29814   if test "x$COMPILER_NAME" = xcl; then
29815     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29816     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29817       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29818     fi
29819     # TODO: make -debug optional "--disable-full-debug-symbols"
29820     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29821     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29822     LDFLAGS_JDKLIB_SUFFIX=""
29823     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29824       LDFLAGS_STACK_SIZE=1048576
29825     else
29826       LDFLAGS_STACK_SIZE=327680
29827     fi
29828     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29829   else
29830     if test "x$COMPILER_NAME" = xgcc; then
29831       # If this is a --hash-style=gnu system, use --hash-style=both, why?
29832       HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29833       if test -n "$HAS_GNU_HASH"; then
29834         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29835       fi
29836       if test "x$OPENJDK_TARGET_OS" = xlinux; then
29837         # And since we now know that the linker is gnu, then add -z defs, to forbid
29838         # undefined symbols in object files.
29839         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29840         if test "x$DEBUG_LEVEL" = "xrelease"; then
29841           # When building release libraries, tell the linker optimize them.
29842           # Should this be supplied to the OSS linker as well?
29843           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29844         fi
29845       fi
29846     fi
29847     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29848         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29849 
29850     # On some platforms (mac) the linker warns about non existing -L dirs.
29851     # Add server first if available. Linking aginst client does not always produce the same results.
29852     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29853     # Default to server for other variants.
29854     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29855       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29856     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29857       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29858     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29859       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29860     else
29861       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29862     fi
29863 
29864     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29865     if test "x$COMPILER_NAME" = xossc; then
29866       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29867     fi
29868 
29869     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29870     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29871       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29872     fi
29873   fi
29874 
29875 
29876 
29877 
29878 
29879 
29880 
29881 
29882 
29883 
29884 
29885 
29886 
29887 
29888 
29889   # Some Zero and Shark settings.
29890   # ZERO_ARCHFLAG tells the compiler which mode to build for
29891   case "${OPENJDK_TARGET_CPU}" in
29892     s390)
29893       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
29894       ;;
29895     *)
29896       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29897   esac
29898 
29899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29900 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29901   supports=yes
29902 
29903   saved_cflags="$CFLAGS"
29904   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29905   ac_ext=c
29906 ac_cpp='$CPP $CPPFLAGS'
29907 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29908 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29909 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29910 
29911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29912 /* end confdefs.h.  */
29913 int i;
29914 _ACEOF
29915 if ac_fn_c_try_compile "$LINENO"; then :
29916 
29917 else
29918   supports=no
29919 fi
29920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29921   ac_ext=cpp
29922 ac_cpp='$CXXCPP $CPPFLAGS'
29923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29926 
29927   CFLAGS="$saved_cflags"
29928 
29929   saved_cxxflags="$CXXFLAGS"
29930   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29931   ac_ext=cpp
29932 ac_cpp='$CXXCPP $CPPFLAGS'
29933 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29934 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29935 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29936 
29937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29938 /* end confdefs.h.  */
29939 int i;
29940 _ACEOF
29941 if ac_fn_cxx_try_compile "$LINENO"; then :
29942 
29943 else
29944   supports=no
29945 fi
29946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29947   ac_ext=cpp
29948 ac_cpp='$CXXCPP $CPPFLAGS'
29949 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29950 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29951 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29952 
29953   CXXFLAGS="$saved_cxxflags"
29954 
29955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29956 $as_echo "$supports" >&6; }
29957   if test "x$supports" = "xyes" ; then
29958     :
29959   else
29960     ZERO_ARCHFLAG=""
29961   fi
29962 
29963 
29964 
29965   # Check that the compiler supports -mX (or -qX on AIX) flags
29966   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29967 
29968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
29969 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29970   supports=yes
29971 
29972   saved_cflags="$CFLAGS"
29973   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29974   ac_ext=c
29975 ac_cpp='$CPP $CPPFLAGS'
29976 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29977 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29978 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29979 
29980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29981 /* end confdefs.h.  */
29982 int i;
29983 _ACEOF
29984 if ac_fn_c_try_compile "$LINENO"; then :
29985 
29986 else
29987   supports=no
29988 fi
29989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29990   ac_ext=cpp
29991 ac_cpp='$CXXCPP $CPPFLAGS'
29992 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29993 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29994 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29995 
29996   CFLAGS="$saved_cflags"
29997 
29998   saved_cxxflags="$CXXFLAGS"
29999   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30000   ac_ext=cpp
30001 ac_cpp='$CXXCPP $CPPFLAGS'
30002 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30003 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30004 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30005 
30006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30007 /* end confdefs.h.  */
30008 int i;
30009 _ACEOF
30010 if ac_fn_cxx_try_compile "$LINENO"; then :
30011 
30012 else
30013   supports=no
30014 fi
30015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30016   ac_ext=cpp
30017 ac_cpp='$CXXCPP $CPPFLAGS'
30018 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30019 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30020 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30021 
30022   CXXFLAGS="$saved_cxxflags"
30023 
30024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30025 $as_echo "$supports" >&6; }
30026   if test "x$supports" = "xyes" ; then
30027     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30028   else
30029     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30030   fi
30031 
30032 
30033 
30034 
30035   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30036   USING_BROKEN_SUSE_LD=no
30037   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30038     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30039 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30040     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30041     echo "int main() { }" > main.c
30042     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30043       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30044 $as_echo "no" >&6; }
30045       USING_BROKEN_SUSE_LD=no
30046     else
30047       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30048 $as_echo "yes" >&6; }
30049       USING_BROKEN_SUSE_LD=yes
30050     fi
30051     rm -rf version-script.map main.c
30052   fi
30053 
30054 
30055 
30056 # Setup debug symbols (need objcopy from the toolchain for that)
30057 
30058   #
30059   # ENABLE_DEBUG_SYMBOLS
30060   # This must be done after the toolchain is setup, since we're looking at objcopy.
30061   #
30062   # Check whether --enable-debug-symbols was given.
30063 if test "${enable_debug_symbols+set}" = set; then :
30064   enableval=$enable_debug_symbols;
30065 fi
30066 
30067 
30068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30069 $as_echo_n "checking if we should generate debug symbols... " >&6; }
30070 
30071   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30072     # explicit enabling of enable-debug-symbols and can't find objcopy
30073     #   this is an error
30074     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30075   fi
30076 
30077   if test "x$enable_debug_symbols" = "xyes"; then
30078     ENABLE_DEBUG_SYMBOLS=true
30079   elif test "x$enable_debug_symbols" = "xno"; then
30080     ENABLE_DEBUG_SYMBOLS=false
30081   else
30082     # Default is on if objcopy is found
30083     if test "x$OBJCOPY" != x; then
30084       ENABLE_DEBUG_SYMBOLS=true
30085     # MacOS X and Windows don't use objcopy but default is on for those OSes
30086     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30087       ENABLE_DEBUG_SYMBOLS=true
30088     else
30089       ENABLE_DEBUG_SYMBOLS=false
30090     fi
30091   fi
30092 
30093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30094 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30095 
30096   #
30097   # ZIP_DEBUGINFO_FILES
30098   #
30099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30100 $as_echo_n "checking if we should zip debug-info files... " >&6; }
30101   # Check whether --enable-zip-debug-info was given.
30102 if test "${enable_zip_debug_info+set}" = set; then :
30103   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30104 else
30105   enable_zip_debug_info="yes"
30106 fi
30107 
30108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30109 $as_echo "${enable_zip_debug_info}" >&6; }
30110 
30111   if test "x${enable_zip_debug_info}" = "xno"; then
30112     ZIP_DEBUGINFO_FILES=false
30113   else
30114     ZIP_DEBUGINFO_FILES=true
30115   fi
30116 
30117 
30118 
30119 
30120 
30121 
30122 
30123 ###############################################################################
30124 #
30125 # Check dependencies for external and internal libraries.
30126 #
30127 ###############################################################################
30128 
30129 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30130 
30131   # When using cygwin or msys, we need a wrapper binary that renames
30132   # /cygdrive/c/ arguments into c:/ arguments and peeks into
30133   # @files and rewrites these too! This wrapper binary is
30134   # called fixpath.
30135   FIXPATH=
30136   if test "x$OPENJDK_BUILD_OS" = xwindows; then
30137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30138 $as_echo_n "checking if fixpath can be created... " >&6; }
30139     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30140     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30141     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30142       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30143       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30144       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30145       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30146     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30147       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30148       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30149 
30150       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30151       # @ was chosen as separator to minimize risk of other tools messing around with it
30152       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30153       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30154 
30155       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30156     fi
30157     rm -f $OUTPUT_ROOT/fixpath*
30158     cd $OUTPUT_ROOT
30159     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30160     cd $CURDIR
30161 
30162     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30163       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30164 $as_echo "no" >&6; }
30165       cat $OUTPUT_ROOT/fixpath1.log
30166       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30167     fi
30168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30169 $as_echo "yes" >&6; }
30170     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30171 $as_echo_n "checking if fixpath.exe works... " >&6; }
30172     cd $OUTPUT_ROOT
30173     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30174     cd $CURDIR
30175     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30176       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30177 $as_echo "no" >&6; }
30178       cat $OUTPUT_ROOT/fixpath2.log
30179       as_fn_error $? "fixpath did not work!" "$LINENO" 5
30180     fi
30181     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30182 $as_echo "yes" >&6; }
30183     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30184   fi
30185 
30186 
30187 
30188 
30189 
30190 
30191   ###############################################################################
30192   #
30193   # OS specific settings that we never will need to probe.
30194   #
30195   if test "x$OPENJDK_TARGET_OS" = xlinux; then
30196     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30197 $as_echo_n "checking what is not needed on Linux?... " >&6; }
30198     PULSE_NOT_NEEDED=yes
30199     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30200 $as_echo "pulse" >&6; }
30201   fi
30202 
30203   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30204     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30205 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
30206     ALSA_NOT_NEEDED=yes
30207     PULSE_NOT_NEEDED=yes
30208     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30209 $as_echo "alsa pulse" >&6; }
30210   fi
30211 
30212   if test "x$OPENJDK_TARGET_OS" = xaix; then
30213     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30214 $as_echo_n "checking what is not needed on AIX?... " >&6; }
30215     ALSA_NOT_NEEDED=yes
30216     PULSE_NOT_NEEDED=yes
30217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30218 $as_echo "alsa pulse" >&6; }
30219   fi
30220 
30221 
30222   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30223     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30224 $as_echo_n "checking what is not needed on Windows?... " >&6; }
30225     CUPS_NOT_NEEDED=yes
30226     ALSA_NOT_NEEDED=yes
30227     PULSE_NOT_NEEDED=yes
30228     X11_NOT_NEEDED=yes
30229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30230 $as_echo "alsa cups pulse x11" >&6; }
30231   fi
30232 
30233   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30234     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30235 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30236     ALSA_NOT_NEEDED=yes
30237     PULSE_NOT_NEEDED=yes
30238     X11_NOT_NEEDED=yes
30239     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30240 $as_echo "alsa pulse x11" >&6; }
30241   fi
30242 
30243   if test "x$OPENJDK_TARGET_OS" = xbsd; then
30244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30245 $as_echo_n "checking what is not needed on bsd?... " >&6; }
30246     ALSA_NOT_NEEDED=yes
30247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30248 $as_echo "alsa" >&6; }
30249   fi
30250 
30251   if test "x$OPENJDK" = "xfalse"; then
30252     FREETYPE_NOT_NEEDED=yes
30253   fi
30254 
30255   if test "x$SUPPORT_HEADFUL" = xno; then
30256     X11_NOT_NEEDED=yes
30257   fi
30258 
30259   # Deprecated and now ignored
30260 
30261   # Check whether --enable-macosx-runtime-support was given.
30262 if test "${enable_macosx_runtime_support+set}" = set; then :
30263   enableval=$enable_macosx_runtime_support;
30264 fi
30265 
30266   if test "x$enable_macosx_runtime_support" != x; then
30267     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30268 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30269   fi
30270 
30271 
30272 
30273 
30274   ###############################################################################
30275   #
30276   # Check for X Windows
30277   #
30278 
30279   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30280   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30281   # --x-libraries for the sysroot, if that seems to be correct.
30282   if test "x$SYS_ROOT" != "x/"; then
30283     if test "x$x_includes" = xNONE; then
30284       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30285         x_includes="$SYS_ROOT/usr/X11R6/include"
30286       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30287         x_includes="$SYS_ROOT/usr/include"
30288       fi
30289     fi
30290     if test "x$x_libraries" = xNONE; then
30291       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30292         x_libraries="$SYS_ROOT/usr/X11R6/lib"
30293       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30294         x_libraries="$SYS_ROOT/usr/lib64"
30295       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30296         x_libraries="$SYS_ROOT/usr/lib"
30297       fi
30298     fi
30299   fi
30300 
30301   # Now let autoconf do it's magic
30302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30303 $as_echo_n "checking for X... " >&6; }
30304 
30305 
30306 # Check whether --with-x was given.
30307 if test "${with_x+set}" = set; then :
30308   withval=$with_x;
30309 fi
30310 
30311 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30312 if test "x$with_x" = xno; then
30313   # The user explicitly disabled X.
30314   have_x=disabled
30315 else
30316   case $x_includes,$x_libraries in #(
30317     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30318     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30319   $as_echo_n "(cached) " >&6
30320 else
30321   # One or both of the vars are not set, and there is no cached value.
30322 ac_x_includes=no ac_x_libraries=no
30323 rm -f -r conftest.dir
30324 if mkdir conftest.dir; then
30325   cd conftest.dir
30326   cat >Imakefile <<'_ACEOF'
30327 incroot:
30328         @echo incroot='${INCROOT}'
30329 usrlibdir:
30330         @echo usrlibdir='${USRLIBDIR}'
30331 libdir:
30332         @echo libdir='${LIBDIR}'
30333 _ACEOF
30334   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30335     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30336     for ac_var in incroot usrlibdir libdir; do
30337       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30338     done
30339     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30340     for ac_extension in a so sl dylib la dll; do
30341       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30342          test -f "$ac_im_libdir/libX11.$ac_extension"; then
30343         ac_im_usrlibdir=$ac_im_libdir; break
30344       fi
30345     done
30346     # Screen out bogus values from the imake configuration.  They are
30347     # bogus both because they are the default anyway, and because
30348     # using them would break gcc on systems where it needs fixed includes.
30349     case $ac_im_incroot in
30350         /usr/include) ac_x_includes= ;;
30351         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30352     esac
30353     case $ac_im_usrlibdir in
30354         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
30355         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30356     esac
30357   fi
30358   cd ..
30359   rm -f -r conftest.dir
30360 fi
30361 
30362 # Standard set of common directories for X headers.
30363 # Check X11 before X11Rn because it is often a symlink to the current release.
30364 ac_x_header_dirs='
30365 /usr/X11/include
30366 /usr/X11R7/include
30367 /usr/X11R6/include
30368 /usr/X11R5/include
30369 /usr/X11R4/include
30370 
30371 /usr/include/X11
30372 /usr/include/X11R7
30373 /usr/include/X11R6
30374 /usr/include/X11R5
30375 /usr/include/X11R4
30376 
30377 /usr/local/X11/include
30378 /usr/local/X11R7/include
30379 /usr/local/X11R6/include
30380 /usr/local/X11R5/include
30381 /usr/local/X11R4/include
30382 
30383 /usr/local/include/X11
30384 /usr/local/include/X11R7
30385 /usr/local/include/X11R6
30386 /usr/local/include/X11R5
30387 /usr/local/include/X11R4
30388 
30389 /usr/X386/include
30390 /usr/x386/include
30391 /usr/XFree86/include/X11
30392 
30393 /usr/include
30394 /usr/local/include
30395 /usr/unsupported/include
30396 /usr/athena/include
30397 /usr/local/x11r5/include
30398 /usr/lpp/Xamples/include
30399 
30400 /usr/openwin/include
30401 /usr/openwin/share/include'
30402 
30403 if test "$ac_x_includes" = no; then
30404   # Guess where to find include files, by looking for Xlib.h.
30405   # First, try using that file with no special directory specified.
30406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30407 /* end confdefs.h.  */
30408 #include <X11/Xlib.h>
30409 _ACEOF
30410 if ac_fn_cxx_try_cpp "$LINENO"; then :
30411   # We can compile using X headers with no special include directory.
30412 ac_x_includes=
30413 else
30414   for ac_dir in $ac_x_header_dirs; do
30415   if test -r "$ac_dir/X11/Xlib.h"; then
30416     ac_x_includes=$ac_dir
30417     break
30418   fi
30419 done
30420 fi
30421 rm -f conftest.err conftest.i conftest.$ac_ext
30422 fi # $ac_x_includes = no
30423 
30424 if test "$ac_x_libraries" = no; then
30425   # Check for the libraries.
30426   # See if we find them without any special options.
30427   # Don't add to $LIBS permanently.
30428   ac_save_LIBS=$LIBS
30429   LIBS="-lX11 $LIBS"
30430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30431 /* end confdefs.h.  */
30432 #include <X11/Xlib.h>
30433 int
30434 main ()
30435 {
30436 XrmInitialize ()
30437   ;
30438   return 0;
30439 }
30440 _ACEOF
30441 if ac_fn_cxx_try_link "$LINENO"; then :
30442   LIBS=$ac_save_LIBS
30443 # We can link X programs with no special library path.
30444 ac_x_libraries=
30445 else
30446   LIBS=$ac_save_LIBS
30447 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30448 do
30449   # Don't even attempt the hair of trying to link an X program!
30450   for ac_extension in a so sl dylib la dll; do
30451     if test -r "$ac_dir/libX11.$ac_extension"; then
30452       ac_x_libraries=$ac_dir
30453       break 2
30454     fi
30455   done
30456 done
30457 fi
30458 rm -f core conftest.err conftest.$ac_objext \
30459     conftest$ac_exeext conftest.$ac_ext
30460 fi # $ac_x_libraries = no
30461 
30462 case $ac_x_includes,$ac_x_libraries in #(
30463   no,* | *,no | *\'*)
30464     # Didn't find X, or a directory has "'" in its name.
30465     ac_cv_have_x="have_x=no";; #(
30466   *)
30467     # Record where we found X for the cache.
30468     ac_cv_have_x="have_x=yes\
30469         ac_x_includes='$ac_x_includes'\
30470         ac_x_libraries='$ac_x_libraries'"
30471 esac
30472 fi
30473 ;; #(
30474     *) have_x=yes;;
30475   esac
30476   eval "$ac_cv_have_x"
30477 fi # $with_x != no
30478 
30479 if test "$have_x" != yes; then
30480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30481 $as_echo "$have_x" >&6; }
30482   no_x=yes
30483 else
30484   # If each of the values was on the command line, it overrides each guess.
30485   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30486   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30487   # Update the cache value to reflect the command line values.
30488   ac_cv_have_x="have_x=yes\
30489         ac_x_includes='$x_includes'\
30490         ac_x_libraries='$x_libraries'"
30491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30492 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30493 fi
30494 
30495   if test "$no_x" = yes; then
30496   # Not all programs may use this symbol, but it does not hurt to define it.
30497 
30498 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30499 
30500   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30501 else
30502   if test -n "$x_includes"; then
30503     X_CFLAGS="$X_CFLAGS -I$x_includes"
30504   fi
30505 
30506   # It would also be nice to do this for all -L options, not just this one.
30507   if test -n "$x_libraries"; then
30508     X_LIBS="$X_LIBS -L$x_libraries"
30509     # For Solaris; some versions of Sun CC require a space after -R and
30510     # others require no space.  Words are not sufficient . . . .
30511     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30512 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30513     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30514     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30515     ac_cxx_werror_flag=yes
30516     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30517 /* end confdefs.h.  */
30518 
30519 int
30520 main ()
30521 {
30522 
30523   ;
30524   return 0;
30525 }
30526 _ACEOF
30527 if ac_fn_cxx_try_link "$LINENO"; then :
30528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30529 $as_echo "no" >&6; }
30530        X_LIBS="$X_LIBS -R$x_libraries"
30531 else
30532   LIBS="$ac_xsave_LIBS -R $x_libraries"
30533        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30534 /* end confdefs.h.  */
30535 
30536 int
30537 main ()
30538 {
30539 
30540   ;
30541   return 0;
30542 }
30543 _ACEOF
30544 if ac_fn_cxx_try_link "$LINENO"; then :
30545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30546 $as_echo "yes" >&6; }
30547           X_LIBS="$X_LIBS -R $x_libraries"
30548 else
30549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30550 $as_echo "neither works" >&6; }
30551 fi
30552 rm -f core conftest.err conftest.$ac_objext \
30553     conftest$ac_exeext conftest.$ac_ext
30554 fi
30555 rm -f core conftest.err conftest.$ac_objext \
30556     conftest$ac_exeext conftest.$ac_ext
30557     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30558     LIBS=$ac_xsave_LIBS
30559   fi
30560 
30561   # Check for system-dependent libraries X programs must link with.
30562   # Do this before checking for the system-independent R6 libraries
30563   # (-lICE), since we may need -lsocket or whatever for X linking.
30564 
30565   if test "$ISC" = yes; then
30566     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30567   else
30568     # Martyn Johnson says this is needed for Ultrix, if the X
30569     # libraries were built with DECnet support.  And Karl Berry says
30570     # the Alpha needs dnet_stub (dnet does not exist).
30571     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30572     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30573 /* end confdefs.h.  */
30574 
30575 /* Override any GCC internal prototype to avoid an error.
30576    Use char because int might match the return type of a GCC
30577    builtin and then its argument prototype would still apply.  */
30578 #ifdef __cplusplus
30579 extern "C"
30580 #endif
30581 char XOpenDisplay ();
30582 int
30583 main ()
30584 {
30585 return XOpenDisplay ();
30586   ;
30587   return 0;
30588 }
30589 _ACEOF
30590 if ac_fn_cxx_try_link "$LINENO"; then :
30591 
30592 else
30593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30594 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30595 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30596   $as_echo_n "(cached) " >&6
30597 else
30598   ac_check_lib_save_LIBS=$LIBS
30599 LIBS="-ldnet  $LIBS"
30600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30601 /* end confdefs.h.  */
30602 
30603 /* Override any GCC internal prototype to avoid an error.
30604    Use char because int might match the return type of a GCC
30605    builtin and then its argument prototype would still apply.  */
30606 #ifdef __cplusplus
30607 extern "C"
30608 #endif
30609 char dnet_ntoa ();
30610 int
30611 main ()
30612 {
30613 return dnet_ntoa ();
30614   ;
30615   return 0;
30616 }
30617 _ACEOF
30618 if ac_fn_cxx_try_link "$LINENO"; then :
30619   ac_cv_lib_dnet_dnet_ntoa=yes
30620 else
30621   ac_cv_lib_dnet_dnet_ntoa=no
30622 fi
30623 rm -f core conftest.err conftest.$ac_objext \
30624     conftest$ac_exeext conftest.$ac_ext
30625 LIBS=$ac_check_lib_save_LIBS
30626 fi
30627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30628 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30629 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30630   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30631 fi
30632 
30633     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30634       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30635 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30636 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30637   $as_echo_n "(cached) " >&6
30638 else
30639   ac_check_lib_save_LIBS=$LIBS
30640 LIBS="-ldnet_stub  $LIBS"
30641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30642 /* end confdefs.h.  */
30643 
30644 /* Override any GCC internal prototype to avoid an error.
30645    Use char because int might match the return type of a GCC
30646    builtin and then its argument prototype would still apply.  */
30647 #ifdef __cplusplus
30648 extern "C"
30649 #endif
30650 char dnet_ntoa ();
30651 int
30652 main ()
30653 {
30654 return dnet_ntoa ();
30655   ;
30656   return 0;
30657 }
30658 _ACEOF
30659 if ac_fn_cxx_try_link "$LINENO"; then :
30660   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30661 else
30662   ac_cv_lib_dnet_stub_dnet_ntoa=no
30663 fi
30664 rm -f core conftest.err conftest.$ac_objext \
30665     conftest$ac_exeext conftest.$ac_ext
30666 LIBS=$ac_check_lib_save_LIBS
30667 fi
30668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30669 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30670 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30671   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30672 fi
30673 
30674     fi
30675 fi
30676 rm -f core conftest.err conftest.$ac_objext \
30677     conftest$ac_exeext conftest.$ac_ext
30678     LIBS="$ac_xsave_LIBS"
30679 
30680     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30681     # to get the SysV transport functions.
30682     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30683     # needs -lnsl.
30684     # The nsl library prevents programs from opening the X display
30685     # on Irix 5.2, according to T.E. Dickey.
30686     # The functions gethostbyname, getservbyname, and inet_addr are
30687     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30688     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30689 if test "x$ac_cv_func_gethostbyname" = xyes; then :
30690 
30691 fi
30692 
30693     if test $ac_cv_func_gethostbyname = no; then
30694       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30695 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30696 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30697   $as_echo_n "(cached) " >&6
30698 else
30699   ac_check_lib_save_LIBS=$LIBS
30700 LIBS="-lnsl  $LIBS"
30701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30702 /* end confdefs.h.  */
30703 
30704 /* Override any GCC internal prototype to avoid an error.
30705    Use char because int might match the return type of a GCC
30706    builtin and then its argument prototype would still apply.  */
30707 #ifdef __cplusplus
30708 extern "C"
30709 #endif
30710 char gethostbyname ();
30711 int
30712 main ()
30713 {
30714 return gethostbyname ();
30715   ;
30716   return 0;
30717 }
30718 _ACEOF
30719 if ac_fn_cxx_try_link "$LINENO"; then :
30720   ac_cv_lib_nsl_gethostbyname=yes
30721 else
30722   ac_cv_lib_nsl_gethostbyname=no
30723 fi
30724 rm -f core conftest.err conftest.$ac_objext \
30725     conftest$ac_exeext conftest.$ac_ext
30726 LIBS=$ac_check_lib_save_LIBS
30727 fi
30728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30729 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30730 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30731   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30732 fi
30733 
30734       if test $ac_cv_lib_nsl_gethostbyname = no; then
30735         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30736 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30737 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30738   $as_echo_n "(cached) " >&6
30739 else
30740   ac_check_lib_save_LIBS=$LIBS
30741 LIBS="-lbsd  $LIBS"
30742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30743 /* end confdefs.h.  */
30744 
30745 /* Override any GCC internal prototype to avoid an error.
30746    Use char because int might match the return type of a GCC
30747    builtin and then its argument prototype would still apply.  */
30748 #ifdef __cplusplus
30749 extern "C"
30750 #endif
30751 char gethostbyname ();
30752 int
30753 main ()
30754 {
30755 return gethostbyname ();
30756   ;
30757   return 0;
30758 }
30759 _ACEOF
30760 if ac_fn_cxx_try_link "$LINENO"; then :
30761   ac_cv_lib_bsd_gethostbyname=yes
30762 else
30763   ac_cv_lib_bsd_gethostbyname=no
30764 fi
30765 rm -f core conftest.err conftest.$ac_objext \
30766     conftest$ac_exeext conftest.$ac_ext
30767 LIBS=$ac_check_lib_save_LIBS
30768 fi
30769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30770 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30771 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30772   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30773 fi
30774 
30775       fi
30776     fi
30777 
30778     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30779     # socket/setsockopt and other routines are undefined under SCO ODT
30780     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30781     # on later versions), says Simon Leinen: it contains gethostby*
30782     # variants that don't use the name server (or something).  -lsocket
30783     # must be given before -lnsl if both are needed.  We assume that
30784     # if connect needs -lnsl, so does gethostbyname.
30785     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30786 if test "x$ac_cv_func_connect" = xyes; then :
30787 
30788 fi
30789 
30790     if test $ac_cv_func_connect = no; then
30791       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30792 $as_echo_n "checking for connect in -lsocket... " >&6; }
30793 if ${ac_cv_lib_socket_connect+:} false; then :
30794   $as_echo_n "(cached) " >&6
30795 else
30796   ac_check_lib_save_LIBS=$LIBS
30797 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30799 /* end confdefs.h.  */
30800 
30801 /* Override any GCC internal prototype to avoid an error.
30802    Use char because int might match the return type of a GCC
30803    builtin and then its argument prototype would still apply.  */
30804 #ifdef __cplusplus
30805 extern "C"
30806 #endif
30807 char connect ();
30808 int
30809 main ()
30810 {
30811 return connect ();
30812   ;
30813   return 0;
30814 }
30815 _ACEOF
30816 if ac_fn_cxx_try_link "$LINENO"; then :
30817   ac_cv_lib_socket_connect=yes
30818 else
30819   ac_cv_lib_socket_connect=no
30820 fi
30821 rm -f core conftest.err conftest.$ac_objext \
30822     conftest$ac_exeext conftest.$ac_ext
30823 LIBS=$ac_check_lib_save_LIBS
30824 fi
30825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30826 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30827 if test "x$ac_cv_lib_socket_connect" = xyes; then :
30828   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30829 fi
30830 
30831     fi
30832 
30833     # Guillermo Gomez says -lposix is necessary on A/UX.
30834     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30835 if test "x$ac_cv_func_remove" = xyes; then :
30836 
30837 fi
30838 
30839     if test $ac_cv_func_remove = no; then
30840       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30841 $as_echo_n "checking for remove in -lposix... " >&6; }
30842 if ${ac_cv_lib_posix_remove+:} false; then :
30843   $as_echo_n "(cached) " >&6
30844 else
30845   ac_check_lib_save_LIBS=$LIBS
30846 LIBS="-lposix  $LIBS"
30847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30848 /* end confdefs.h.  */
30849 
30850 /* Override any GCC internal prototype to avoid an error.
30851    Use char because int might match the return type of a GCC
30852    builtin and then its argument prototype would still apply.  */
30853 #ifdef __cplusplus
30854 extern "C"
30855 #endif
30856 char remove ();
30857 int
30858 main ()
30859 {
30860 return remove ();
30861   ;
30862   return 0;
30863 }
30864 _ACEOF
30865 if ac_fn_cxx_try_link "$LINENO"; then :
30866   ac_cv_lib_posix_remove=yes
30867 else
30868   ac_cv_lib_posix_remove=no
30869 fi
30870 rm -f core conftest.err conftest.$ac_objext \
30871     conftest$ac_exeext conftest.$ac_ext
30872 LIBS=$ac_check_lib_save_LIBS
30873 fi
30874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30875 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30876 if test "x$ac_cv_lib_posix_remove" = xyes; then :
30877   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30878 fi
30879 
30880     fi
30881 
30882     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30883     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30884 if test "x$ac_cv_func_shmat" = xyes; then :
30885 
30886 fi
30887 
30888     if test $ac_cv_func_shmat = no; then
30889       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30890 $as_echo_n "checking for shmat in -lipc... " >&6; }
30891 if ${ac_cv_lib_ipc_shmat+:} false; then :
30892   $as_echo_n "(cached) " >&6
30893 else
30894   ac_check_lib_save_LIBS=$LIBS
30895 LIBS="-lipc  $LIBS"
30896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30897 /* end confdefs.h.  */
30898 
30899 /* Override any GCC internal prototype to avoid an error.
30900    Use char because int might match the return type of a GCC
30901    builtin and then its argument prototype would still apply.  */
30902 #ifdef __cplusplus
30903 extern "C"
30904 #endif
30905 char shmat ();
30906 int
30907 main ()
30908 {
30909 return shmat ();
30910   ;
30911   return 0;
30912 }
30913 _ACEOF
30914 if ac_fn_cxx_try_link "$LINENO"; then :
30915   ac_cv_lib_ipc_shmat=yes
30916 else
30917   ac_cv_lib_ipc_shmat=no
30918 fi
30919 rm -f core conftest.err conftest.$ac_objext \
30920     conftest$ac_exeext conftest.$ac_ext
30921 LIBS=$ac_check_lib_save_LIBS
30922 fi
30923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30924 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30925 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30926   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30927 fi
30928 
30929     fi
30930   fi
30931 
30932   # Check for libraries that X11R6 Xt/Xaw programs need.
30933   ac_save_LDFLAGS=$LDFLAGS
30934   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30935   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30936   # check for ICE first), but we must link in the order -lSM -lICE or
30937   # we get undefined symbols.  So assume we have SM if we have ICE.
30938   # These have to be linked with before -lX11, unlike the other
30939   # libraries we check for below, so use a different variable.
30940   # John Interrante, Karl Berry
30941   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30942 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30943 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30944   $as_echo_n "(cached) " >&6
30945 else
30946   ac_check_lib_save_LIBS=$LIBS
30947 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30949 /* end confdefs.h.  */
30950 
30951 /* Override any GCC internal prototype to avoid an error.
30952    Use char because int might match the return type of a GCC
30953    builtin and then its argument prototype would still apply.  */
30954 #ifdef __cplusplus
30955 extern "C"
30956 #endif
30957 char IceConnectionNumber ();
30958 int
30959 main ()
30960 {
30961 return IceConnectionNumber ();
30962   ;
30963   return 0;
30964 }
30965 _ACEOF
30966 if ac_fn_cxx_try_link "$LINENO"; then :
30967   ac_cv_lib_ICE_IceConnectionNumber=yes
30968 else
30969   ac_cv_lib_ICE_IceConnectionNumber=no
30970 fi
30971 rm -f core conftest.err conftest.$ac_objext \
30972     conftest$ac_exeext conftest.$ac_ext
30973 LIBS=$ac_check_lib_save_LIBS
30974 fi
30975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30976 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30977 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30978   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30979 fi
30980 
30981   LDFLAGS=$ac_save_LDFLAGS
30982 
30983 fi
30984 
30985 
30986   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30987   # this doesn't make sense so we remove it.
30988   if test "x$COMPILE_TYPE" = xcross; then
30989     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30990   fi
30991 
30992   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30993 
30994   # Print a helpful message on how to acquire the necessary build dependency.
30995   # x11 is the help tag: freetype, cups, pulse, alsa etc
30996   MISSING_DEPENDENCY=x11
30997 
30998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30999     cygwin_help $MISSING_DEPENDENCY
31000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31001     msys_help $MISSING_DEPENDENCY
31002   else
31003     PKGHANDLER_COMMAND=
31004 
31005     case $PKGHANDLER in
31006       apt-get)
31007         apt_help     $MISSING_DEPENDENCY ;;
31008       yum)
31009         yum_help     $MISSING_DEPENDENCY ;;
31010       port)
31011         port_help    $MISSING_DEPENDENCY ;;
31012       pkgutil)
31013         pkgutil_help $MISSING_DEPENDENCY ;;
31014       pkgadd)
31015         pkgadd_help  $MISSING_DEPENDENCY ;;
31016     esac
31017 
31018     if test "x$PKGHANDLER_COMMAND" != x; then
31019       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31020     fi
31021   fi
31022 
31023     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31024   fi
31025 
31026   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31027     OPENWIN_HOME="/usr/openwin"
31028   fi
31029 
31030 
31031 
31032   #
31033   # Weird Sol10 something check...TODO change to try compile
31034   #
31035   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31036     if test "`uname -r`" = "5.10"; then
31037       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31038         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31039       fi
31040     fi
31041   fi
31042 
31043   ac_ext=c
31044 ac_cpp='$CPP $CPPFLAGS'
31045 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31046 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31047 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31048 
31049   OLD_CFLAGS="$CFLAGS"
31050   CFLAGS="$CFLAGS $X_CFLAGS"
31051 
31052   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31053   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31054 do :
31055   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31056 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31057         # include <X11/Xlib.h>
31058         # include <X11/Xutil.h>
31059 
31060 
31061 "
31062 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31063   cat >>confdefs.h <<_ACEOF
31064 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31065 _ACEOF
31066  X11_A_OK=yes
31067 else
31068   X11_A_OK=no; break
31069 fi
31070 
31071 done
31072 
31073 
31074   CFLAGS="$OLD_CFLAGS"
31075   ac_ext=cpp
31076 ac_cpp='$CXXCPP $CPPFLAGS'
31077 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31078 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31079 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31080 
31081 
31082   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31083 
31084   # Print a helpful message on how to acquire the necessary build dependency.
31085   # x11 is the help tag: freetype, cups, pulse, alsa etc
31086   MISSING_DEPENDENCY=x11
31087 
31088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31089     cygwin_help $MISSING_DEPENDENCY
31090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31091     msys_help $MISSING_DEPENDENCY
31092   else
31093     PKGHANDLER_COMMAND=
31094 
31095     case $PKGHANDLER in
31096       apt-get)
31097         apt_help     $MISSING_DEPENDENCY ;;
31098       yum)
31099         yum_help     $MISSING_DEPENDENCY ;;
31100       port)
31101         port_help    $MISSING_DEPENDENCY ;;
31102       pkgutil)
31103         pkgutil_help $MISSING_DEPENDENCY ;;
31104       pkgadd)
31105         pkgadd_help  $MISSING_DEPENDENCY ;;
31106     esac
31107 
31108     if test "x$PKGHANDLER_COMMAND" != x; then
31109       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31110     fi
31111   fi
31112 
31113     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31114   fi
31115 
31116 
31117 
31118 
31119 
31120 
31121   ###############################################################################
31122   #
31123   # The common unix printing system cups is used to print from java.
31124   #
31125 
31126 # Check whether --with-cups was given.
31127 if test "${with_cups+set}" = set; then :
31128   withval=$with_cups;
31129 fi
31130 
31131 
31132 # Check whether --with-cups-include was given.
31133 if test "${with_cups_include+set}" = set; then :
31134   withval=$with_cups_include;
31135 fi
31136 
31137 
31138   if test "x$CUPS_NOT_NEEDED" = xyes; then
31139     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31140       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31141 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31142     fi
31143     CUPS_CFLAGS=
31144   else
31145     CUPS_FOUND=no
31146 
31147     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31148       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31149     fi
31150 
31151     if test "x${with_cups}" != x; then
31152       CUPS_CFLAGS="-I${with_cups}/include"
31153       CUPS_FOUND=yes
31154     fi
31155     if test "x${with_cups_include}" != x; then
31156       CUPS_CFLAGS="-I${with_cups_include}"
31157       CUPS_FOUND=yes
31158     fi
31159     if test "x$CUPS_FOUND" = xno; then
31160 
31161 
31162   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31163     # Source the builddeps file again, to make sure it uses the latest variables!
31164     . $builddepsfile
31165     # Look for a target and build machine specific resource!
31166     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31167     if test "x$resource" = x; then
31168       # Ok, lets instead look for a target specific resource
31169       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31170     fi
31171     if test "x$resource" = x; then
31172       # Ok, lets instead look for a build specific resource
31173       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31174     fi
31175     if test "x$resource" = x; then
31176       # Ok, lets instead look for a generic resource
31177       # (The cups comes from M4 and not the shell, thus no need for eval here.)
31178       resource=${builddep_cups}
31179     fi
31180     if test "x$resource" != x; then
31181       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31182 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31183       # If the resource in the builddeps.conf file is an existing directory,
31184       # for example /java/linux/cups
31185       if test -d ${resource}; then
31186         depdir=${resource}
31187       else
31188 
31189   # cups is for example mymodule
31190   # $resource is for example libs/general/libmymod_1_2_3.zip
31191   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31192   # $with_builddeps_dir is for example /localhome/builddeps
31193   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31194   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31195   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31196   filename=`basename $resource`
31197   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31198   filebase=${filename%%.*}
31199   extension=${filename#*.}
31200   installdir=$with_builddeps_dir/$filebase
31201   if test ! -f $installdir/$filename.unpacked; then
31202     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31203 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31204     if test ! -d $installdir; then
31205       mkdir -p $installdir
31206     fi
31207     if test ! -d $installdir; then
31208       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31209     fi
31210     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31211     touch $tmpfile
31212     if test ! -f $tmpfile; then
31213       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31214     fi
31215 
31216   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31217   # $tmpfile is the local file name for the downloaded file.
31218   VALID_TOOL=no
31219   if test "x$BDEPS_FTP" = xwget; then
31220     VALID_TOOL=yes
31221     wget -O $tmpfile $with_builddeps_server/$resource
31222   fi
31223   if test "x$BDEPS_FTP" = xlftp; then
31224     VALID_TOOL=yes
31225     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31226   fi
31227   if test "x$BDEPS_FTP" = xftp; then
31228     VALID_TOOL=yes
31229     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31230     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31231     FTPUSERPWD=${FTPSERVER%%@*}
31232     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31233       FTPUSER=${userpwd%%:*}
31234       FTPPWD=${userpwd#*@}
31235       FTPSERVER=${FTPSERVER#*@}
31236     else
31237       FTPUSER=ftp
31238       FTPPWD=ftp
31239     fi
31240     # the "pass" command does not work on some
31241     # ftp clients (read ftp.exe) but if it works,
31242     # passive mode is better!
31243     ( \
31244         echo "user $FTPUSER $FTPPWD"        ; \
31245         echo "pass"                         ; \
31246         echo "bin"                          ; \
31247         echo "get $FTPPATH $tmpfile"              ; \
31248     ) | ftp -in $FTPSERVER
31249   fi
31250   if test "x$VALID_TOOL" != xyes; then
31251     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31252   fi
31253 
31254     mv $tmpfile $installdir/$filename
31255     if test ! -s $installdir/$filename; then
31256       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31257     fi
31258     case "$extension" in
31259       zip)  echo "Unzipping $installdir/$filename..."
31260         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31261         ;;
31262       tar.gz) echo "Untaring $installdir/$filename..."
31263         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31264         ;;
31265       tgz) echo "Untaring $installdir/$filename..."
31266         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31267         ;;
31268       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31269         ;;
31270     esac
31271   fi
31272   if test -f $installdir/$filename.unpacked; then
31273     depdir=$installdir
31274   fi
31275 
31276       fi
31277       # Source the builddeps file again, because in the previous command, the depdir
31278       # was updated to point at the current build dependency install directory.
31279       . $builddepsfile
31280       # Now extract variables from the builddeps.conf files.
31281       theroot=${builddep_cups_ROOT}
31282       thecflags=${builddep_cups_CFLAGS}
31283       thelibs=${builddep_cups_LIBS}
31284       if test "x$depdir" = x; then
31285         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31286       fi
31287       CUPS=$depdir
31288       if test "x$theroot" != x; then
31289         CUPS="$theroot"
31290       fi
31291       if test "x$thecflags" != x; then
31292         CUPS_CFLAGS="$thecflags"
31293       fi
31294       if test "x$thelibs" != x; then
31295         CUPS_LIBS="$thelibs"
31296       fi
31297       CUPS_FOUND=yes
31298 
31299     fi
31300 
31301   fi
31302 
31303     fi
31304     if test "x$CUPS_FOUND" = xno; then
31305       # Are the cups headers installed in the default /usr/include location?
31306       for ac_header in cups/cups.h cups/ppd.h
31307 do :
31308   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31309 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31310 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31311   cat >>confdefs.h <<_ACEOF
31312 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31313 _ACEOF
31314 
31315             CUPS_FOUND=yes
31316             CUPS_CFLAGS=
31317             DEFAULT_CUPS=yes
31318 
31319 
31320 fi
31321 
31322 done
31323 
31324     fi
31325     if test "x$CUPS_FOUND" = xno; then
31326       # Getting nervous now? Lets poke around for standard Solaris third-party
31327       # package installation locations.
31328       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31329 $as_echo_n "checking for cups headers... " >&6; }
31330       if test -s /opt/sfw/cups/include/cups/cups.h; then
31331         # An SFW package seems to be installed!
31332         CUPS_FOUND=yes
31333         CUPS_CFLAGS="-I/opt/sfw/cups/include"
31334       elif test -s /opt/csw/include/cups/cups.h; then
31335         # A CSW package seems to be installed!
31336         CUPS_FOUND=yes
31337         CUPS_CFLAGS="-I/opt/csw/include"
31338       fi
31339       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31340 $as_echo "$CUPS_FOUND" >&6; }
31341     fi
31342     if test "x$CUPS_FOUND" = xno; then
31343 
31344   # Print a helpful message on how to acquire the necessary build dependency.
31345   # cups is the help tag: freetype, cups, pulse, alsa etc
31346   MISSING_DEPENDENCY=cups
31347 
31348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31349     cygwin_help $MISSING_DEPENDENCY
31350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31351     msys_help $MISSING_DEPENDENCY
31352   else
31353     PKGHANDLER_COMMAND=
31354 
31355     case $PKGHANDLER in
31356       apt-get)
31357         apt_help     $MISSING_DEPENDENCY ;;
31358       yum)
31359         yum_help     $MISSING_DEPENDENCY ;;
31360       port)
31361         port_help    $MISSING_DEPENDENCY ;;
31362       pkgutil)
31363         pkgutil_help $MISSING_DEPENDENCY ;;
31364       pkgadd)
31365         pkgadd_help  $MISSING_DEPENDENCY ;;
31366     esac
31367 
31368     if test "x$PKGHANDLER_COMMAND" != x; then
31369       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31370     fi
31371   fi
31372 
31373       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31374     fi
31375   fi
31376 
31377 
31378 
31379 
31380 
31381 
31382   ###############################################################################
31383   #
31384   # The ubiquitous freetype library is used to render fonts.
31385   #
31386 
31387 # Check whether --with-freetype was given.
31388 if test "${with_freetype+set}" = set; then :
31389   withval=$with_freetype;
31390 fi
31391 
31392 
31393 # Check whether --with-freetype-include was given.
31394 if test "${with_freetype_include+set}" = set; then :
31395   withval=$with_freetype_include;
31396 fi
31397 
31398 
31399 # Check whether --with-freetype-lib was given.
31400 if test "${with_freetype_lib+set}" = set; then :
31401   withval=$with_freetype_lib;
31402 fi
31403 
31404   # Check whether --enable-freetype-bundling was given.
31405 if test "${enable_freetype_bundling+set}" = set; then :
31406   enableval=$enable_freetype_bundling;
31407 fi
31408 
31409 
31410   FREETYPE_CFLAGS=
31411   FREETYPE_LIBS=
31412   FREETYPE_BUNDLE_LIB_PATH=
31413 
31414   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31415     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31416       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31417 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31418     fi
31419     if test "x$enable_freetype_bundling" != x; then
31420       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31421 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31422     fi
31423   else
31424     # freetype is needed to build; go get it!
31425 
31426     BUNDLE_FREETYPE="$enable_freetype_bundling"
31427 
31428     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31429       # User has specified settings
31430 
31431       if test "x$BUNDLE_FREETYPE" = x; then
31432         # If not specified, default is to bundle freetype
31433         BUNDLE_FREETYPE=yes
31434       fi
31435 
31436       if test "x$with_freetype" != x; then
31437         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31438         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31439       fi
31440 
31441       # Allow --with-freetype-lib and --with-freetype-include to override
31442       if test "x$with_freetype_include" != x; then
31443         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31444       fi
31445       if test "x$with_freetype_lib" != x; then
31446         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31447       fi
31448 
31449       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31450         # Okay, we got it. Check that it works.
31451 
31452   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31453   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31454   METHOD="--with-freetype"
31455 
31456   # First check if the files exists.
31457   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31458     # We found an arbitrary include file. That's a good sign.
31459     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31460 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31461     FOUND_FREETYPE=yes
31462 
31463     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31464     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31465       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31466 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31467       FOUND_FREETYPE=no
31468     else
31469       if test "x$OPENJDK_TARGET_OS" = xwindows; then
31470         # On Windows, we will need both .lib and .dll file.
31471         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31472           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31473 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31474           FOUND_FREETYPE=no
31475         fi
31476       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
31477         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31478         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31479       fi
31480     fi
31481   fi
31482 
31483   if test "x$FOUND_FREETYPE" = xyes; then
31484 
31485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31486 
31487   # Input might be given as Windows format, start by converting to
31488   # unix format.
31489   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31490   new_path=`$CYGPATH -u "$path"`
31491 
31492   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31493   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31494   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31495   # "foo.exe" is OK but "foo" is an error.
31496   #
31497   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31498   # It is also a way to make sure we got the proper file name for the real test later on.
31499   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31500   if test "x$test_shortpath" = x; then
31501     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31502 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31503     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31504   fi
31505 
31506   # Call helper function which possibly converts this using DOS-style short mode.
31507   # If so, the updated path is stored in $new_path.
31508 
31509   input_path="$new_path"
31510   # Check if we need to convert this using DOS-style short mode. If the path
31511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31512   # take no chances and rewrite it.
31513   # Note: m4 eats our [], so we need to use [ and ] instead.
31514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31515   if test "x$has_forbidden_chars" != x; then
31516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31517     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31518     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31519     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31520       # Going to short mode and back again did indeed matter. Since short mode is
31521       # case insensitive, let's make it lowercase to improve readability.
31522       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31523       # Now convert it back to Unix-stile (cygpath)
31524       input_path=`$CYGPATH -u "$shortmode_path"`
31525       new_path="$input_path"
31526     fi
31527   fi
31528 
31529   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31530   if test "x$test_cygdrive_prefix" = x; then
31531     # As a simple fix, exclude /usr/bin since it's not a real path.
31532     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31533       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31534       # a path prefixed by /cygdrive for fixpath to work.
31535       new_path="$CYGWIN_ROOT_PATH$input_path"
31536     fi
31537   fi
31538 
31539 
31540   if test "x$path" != "x$new_path"; then
31541     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31542     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31543 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31544   fi
31545 
31546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31547 
31548   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31549   has_colon=`$ECHO $path | $GREP ^.:`
31550   new_path="$path"
31551   if test "x$has_colon" = x; then
31552     # Not in mixed or Windows style, start by that.
31553     new_path=`cmd //c echo $path`
31554   fi
31555 
31556 
31557   input_path="$new_path"
31558   # Check if we need to convert this using DOS-style short mode. If the path
31559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31560   # take no chances and rewrite it.
31561   # Note: m4 eats our [], so we need to use [ and ] instead.
31562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31563   if test "x$has_forbidden_chars" != x; then
31564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31565     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31566   fi
31567 
31568 
31569   windows_path="$new_path"
31570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31571     unix_path=`$CYGPATH -u "$windows_path"`
31572     new_path="$unix_path"
31573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31575     new_path="$unix_path"
31576   fi
31577 
31578   if test "x$path" != "x$new_path"; then
31579     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31580     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31581 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31582   fi
31583 
31584   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31585   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31586 
31587   else
31588     # We're on a posix platform. Hooray! :)
31589     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31590     has_space=`$ECHO "$path" | $GREP " "`
31591     if test "x$has_space" != x; then
31592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31593 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31594       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31595     fi
31596 
31597     # Use eval to expand a potential ~
31598     eval path="$path"
31599     if test ! -f "$path" && test ! -d "$path"; then
31600       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31601     fi
31602 
31603     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31604   fi
31605 
31606 
31607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31608 
31609   # Input might be given as Windows format, start by converting to
31610   # unix format.
31611   path="$POTENTIAL_FREETYPE_LIB_PATH"
31612   new_path=`$CYGPATH -u "$path"`
31613 
31614   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31615   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31616   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31617   # "foo.exe" is OK but "foo" is an error.
31618   #
31619   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31620   # It is also a way to make sure we got the proper file name for the real test later on.
31621   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31622   if test "x$test_shortpath" = x; then
31623     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31624 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31625     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31626   fi
31627 
31628   # Call helper function which possibly converts this using DOS-style short mode.
31629   # If so, the updated path is stored in $new_path.
31630 
31631   input_path="$new_path"
31632   # Check if we need to convert this using DOS-style short mode. If the path
31633   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31634   # take no chances and rewrite it.
31635   # Note: m4 eats our [], so we need to use [ and ] instead.
31636   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31637   if test "x$has_forbidden_chars" != x; then
31638     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31639     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31640     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31641     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31642       # Going to short mode and back again did indeed matter. Since short mode is
31643       # case insensitive, let's make it lowercase to improve readability.
31644       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31645       # Now convert it back to Unix-stile (cygpath)
31646       input_path=`$CYGPATH -u "$shortmode_path"`
31647       new_path="$input_path"
31648     fi
31649   fi
31650 
31651   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31652   if test "x$test_cygdrive_prefix" = x; then
31653     # As a simple fix, exclude /usr/bin since it's not a real path.
31654     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31655       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31656       # a path prefixed by /cygdrive for fixpath to work.
31657       new_path="$CYGWIN_ROOT_PATH$input_path"
31658     fi
31659   fi
31660 
31661 
31662   if test "x$path" != "x$new_path"; then
31663     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31664     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31665 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31666   fi
31667 
31668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31669 
31670   path="$POTENTIAL_FREETYPE_LIB_PATH"
31671   has_colon=`$ECHO $path | $GREP ^.:`
31672   new_path="$path"
31673   if test "x$has_colon" = x; then
31674     # Not in mixed or Windows style, start by that.
31675     new_path=`cmd //c echo $path`
31676   fi
31677 
31678 
31679   input_path="$new_path"
31680   # Check if we need to convert this using DOS-style short mode. If the path
31681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31682   # take no chances and rewrite it.
31683   # Note: m4 eats our [], so we need to use [ and ] instead.
31684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31685   if test "x$has_forbidden_chars" != x; then
31686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31687     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31688   fi
31689 
31690 
31691   windows_path="$new_path"
31692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31693     unix_path=`$CYGPATH -u "$windows_path"`
31694     new_path="$unix_path"
31695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31696     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31697     new_path="$unix_path"
31698   fi
31699 
31700   if test "x$path" != "x$new_path"; then
31701     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31702     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31703 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31704   fi
31705 
31706   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31707   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31708 
31709   else
31710     # We're on a posix platform. Hooray! :)
31711     path="$POTENTIAL_FREETYPE_LIB_PATH"
31712     has_space=`$ECHO "$path" | $GREP " "`
31713     if test "x$has_space" != x; then
31714       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31715 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31716       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31717     fi
31718 
31719     # Use eval to expand a potential ~
31720     eval path="$path"
31721     if test ! -f "$path" && test ! -d "$path"; then
31722       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31723     fi
31724 
31725     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31726   fi
31727 
31728 
31729     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31731 $as_echo_n "checking for freetype includes... " >&6; }
31732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31733 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31734     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31735     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31736 $as_echo_n "checking for freetype libraries... " >&6; }
31737     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31738 $as_echo "$FREETYPE_LIB_PATH" >&6; }
31739   fi
31740 
31741         if test "x$FOUND_FREETYPE" != xyes; then
31742           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31743         fi
31744       else
31745         # User specified only one of lib or include. This is an error.
31746         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31747           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31748 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31749           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31750         else
31751           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31752 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31753           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31754         fi
31755       fi
31756     else
31757       # User did not specify settings, but we need freetype. Try to locate it.
31758 
31759       if test "x$BUNDLE_FREETYPE" = x; then
31760         # If not specified, default is to bundle freetype only on windows
31761         if test "x$OPENJDK_TARGET_OS" = xwindows; then
31762           BUNDLE_FREETYPE=yes
31763         else
31764           BUNDLE_FREETYPE=no
31765         fi
31766       fi
31767 
31768       if test "x$FOUND_FREETYPE" != xyes; then
31769         # Check builddeps
31770 
31771 
31772   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31773     # Source the builddeps file again, to make sure it uses the latest variables!
31774     . $builddepsfile
31775     # Look for a target and build machine specific resource!
31776     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31777     if test "x$resource" = x; then
31778       # Ok, lets instead look for a target specific resource
31779       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31780     fi
31781     if test "x$resource" = x; then
31782       # Ok, lets instead look for a build specific resource
31783       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31784     fi
31785     if test "x$resource" = x; then
31786       # Ok, lets instead look for a generic resource
31787       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31788       resource=${builddep_freetype2}
31789     fi
31790     if test "x$resource" != x; then
31791       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31792 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31793       # If the resource in the builddeps.conf file is an existing directory,
31794       # for example /java/linux/cups
31795       if test -d ${resource}; then
31796         depdir=${resource}
31797       else
31798 
31799   # freetype2 is for example mymodule
31800   # $resource is for example libs/general/libmymod_1_2_3.zip
31801   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31802   # $with_builddeps_dir is for example /localhome/builddeps
31803   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31804   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31805   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31806   filename=`basename $resource`
31807   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31808   filebase=${filename%%.*}
31809   extension=${filename#*.}
31810   installdir=$with_builddeps_dir/$filebase
31811   if test ! -f $installdir/$filename.unpacked; then
31812     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31813 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31814     if test ! -d $installdir; then
31815       mkdir -p $installdir
31816     fi
31817     if test ! -d $installdir; then
31818       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31819     fi
31820     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31821     touch $tmpfile
31822     if test ! -f $tmpfile; then
31823       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31824     fi
31825 
31826   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31827   # $tmpfile is the local file name for the downloaded file.
31828   VALID_TOOL=no
31829   if test "x$BDEPS_FTP" = xwget; then
31830     VALID_TOOL=yes
31831     wget -O $tmpfile $with_builddeps_server/$resource
31832   fi
31833   if test "x$BDEPS_FTP" = xlftp; then
31834     VALID_TOOL=yes
31835     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31836   fi
31837   if test "x$BDEPS_FTP" = xftp; then
31838     VALID_TOOL=yes
31839     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31840     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31841     FTPUSERPWD=${FTPSERVER%%@*}
31842     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31843       FTPUSER=${userpwd%%:*}
31844       FTPPWD=${userpwd#*@}
31845       FTPSERVER=${FTPSERVER#*@}
31846     else
31847       FTPUSER=ftp
31848       FTPPWD=ftp
31849     fi
31850     # the "pass" command does not work on some
31851     # ftp clients (read ftp.exe) but if it works,
31852     # passive mode is better!
31853     ( \
31854         echo "user $FTPUSER $FTPPWD"        ; \
31855         echo "pass"                         ; \
31856         echo "bin"                          ; \
31857         echo "get $FTPPATH $tmpfile"              ; \
31858     ) | ftp -in $FTPSERVER
31859   fi
31860   if test "x$VALID_TOOL" != xyes; then
31861     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31862   fi
31863 
31864     mv $tmpfile $installdir/$filename
31865     if test ! -s $installdir/$filename; then
31866       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31867     fi
31868     case "$extension" in
31869       zip)  echo "Unzipping $installdir/$filename..."
31870         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31871         ;;
31872       tar.gz) echo "Untaring $installdir/$filename..."
31873         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31874         ;;
31875       tgz) echo "Untaring $installdir/$filename..."
31876         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31877         ;;
31878       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31879         ;;
31880     esac
31881   fi
31882   if test -f $installdir/$filename.unpacked; then
31883     depdir=$installdir
31884   fi
31885 
31886       fi
31887       # Source the builddeps file again, because in the previous command, the depdir
31888       # was updated to point at the current build dependency install directory.
31889       . $builddepsfile
31890       # Now extract variables from the builddeps.conf files.
31891       theroot=${builddep_freetype2_ROOT}
31892       thecflags=${builddep_freetype2_CFLAGS}
31893       thelibs=${builddep_freetype2_LIBS}
31894       if test "x$depdir" = x; then
31895         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31896       fi
31897       FREETYPE=$depdir
31898       if test "x$theroot" != x; then
31899         FREETYPE="$theroot"
31900       fi
31901       if test "x$thecflags" != x; then
31902         FREETYPE_CFLAGS="$thecflags"
31903       fi
31904       if test "x$thelibs" != x; then
31905         FREETYPE_LIBS="$thelibs"
31906       fi
31907       FOUND_FREETYPE=yes
31908       else FOUND_FREETYPE=no
31909 
31910     fi
31911     else FOUND_FREETYPE=no
31912 
31913   fi
31914 
31915         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31916         if test "x$FOUND_FREETYPE" = xyes; then
31917           if test "x$BUNDLE_FREETYPE" = xyes; then
31918             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31919 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31920             FOUND_FREETYPE=no
31921           else
31922             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31923 $as_echo_n "checking for freetype... " >&6; }
31924             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31925 $as_echo "yes (using builddeps)" >&6; }
31926           fi
31927         fi
31928       fi
31929 
31930       if test "x$FOUND_FREETYPE" != xyes; then
31931         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31932         if test "x$PKG_CONFIG" != x; then
31933 
31934 pkg_failed=no
31935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31936 $as_echo_n "checking for FREETYPE... " >&6; }
31937 
31938 if test -n "$FREETYPE_CFLAGS"; then
31939     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31940  elif test -n "$PKG_CONFIG"; then
31941     if test -n "$PKG_CONFIG" && \
31942     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31943   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31944   ac_status=$?
31945   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31946   test $ac_status = 0; }; then
31947   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31948 else
31949   pkg_failed=yes
31950 fi
31951  else
31952     pkg_failed=untried
31953 fi
31954 if test -n "$FREETYPE_LIBS"; then
31955     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31956  elif test -n "$PKG_CONFIG"; then
31957     if test -n "$PKG_CONFIG" && \
31958     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31959   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31960   ac_status=$?
31961   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31962   test $ac_status = 0; }; then
31963   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31964 else
31965   pkg_failed=yes
31966 fi
31967  else
31968     pkg_failed=untried
31969 fi
31970 
31971 
31972 
31973 if test $pkg_failed = yes; then
31974 
31975 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31976         _pkg_short_errors_supported=yes
31977 else
31978         _pkg_short_errors_supported=no
31979 fi
31980         if test $_pkg_short_errors_supported = yes; then
31981                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31982         else
31983                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31984         fi
31985         # Put the nasty error message in config.log where it belongs
31986         echo "$FREETYPE_PKG_ERRORS" >&5
31987 
31988         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31989 $as_echo "no" >&6; }
31990                 FOUND_FREETYPE=no
31991 elif test $pkg_failed = untried; then
31992         FOUND_FREETYPE=no
31993 else
31994         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
31995         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
31996         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31997 $as_echo "yes" >&6; }
31998         FOUND_FREETYPE=yes
31999 fi
32000           if test "x$FOUND_FREETYPE" = xyes; then
32001             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32002             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
32003             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32004             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32005               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
32006             fi
32007             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32008             if test "x$BUNDLE_FREETYPE" = xyes; then
32009               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
32010 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
32011               FOUND_FREETYPE=no
32012             else
32013               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32014 $as_echo_n "checking for freetype... " >&6; }
32015               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
32016 $as_echo "yes (using pkg-config)" >&6; }
32017             fi
32018           fi
32019         fi
32020       fi
32021 
32022       if test "x$FOUND_FREETYPE" != xyes; then
32023         # Check in well-known locations
32024         if test "x$OPENJDK_TARGET_OS" = xwindows; then
32025           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32026 
32027   windows_path="$FREETYPE_BASE_DIR"
32028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32029     unix_path=`$CYGPATH -u "$windows_path"`
32030     FREETYPE_BASE_DIR="$unix_path"
32031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32033     FREETYPE_BASE_DIR="$unix_path"
32034   fi
32035 
32036 
32037   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32038   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32039   METHOD="well-known location"
32040 
32041   # First check if the files exists.
32042   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32043     # We found an arbitrary include file. That's a good sign.
32044     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32045 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32046     FOUND_FREETYPE=yes
32047 
32048     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32049     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32050       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32051 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32052       FOUND_FREETYPE=no
32053     else
32054       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32055         # On Windows, we will need both .lib and .dll file.
32056         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32057           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32058 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32059           FOUND_FREETYPE=no
32060         fi
32061       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
32062         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32063         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32064       fi
32065     fi
32066   fi
32067 
32068   if test "x$FOUND_FREETYPE" = xyes; then
32069 
32070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32071 
32072   # Input might be given as Windows format, start by converting to
32073   # unix format.
32074   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32075   new_path=`$CYGPATH -u "$path"`
32076 
32077   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32078   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32079   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32080   # "foo.exe" is OK but "foo" is an error.
32081   #
32082   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32083   # It is also a way to make sure we got the proper file name for the real test later on.
32084   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32085   if test "x$test_shortpath" = x; then
32086     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32087 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32088     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32089   fi
32090 
32091   # Call helper function which possibly converts this using DOS-style short mode.
32092   # If so, the updated path is stored in $new_path.
32093 
32094   input_path="$new_path"
32095   # Check if we need to convert this using DOS-style short mode. If the path
32096   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32097   # take no chances and rewrite it.
32098   # Note: m4 eats our [], so we need to use [ and ] instead.
32099   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32100   if test "x$has_forbidden_chars" != x; then
32101     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32102     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32103     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32104     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32105       # Going to short mode and back again did indeed matter. Since short mode is
32106       # case insensitive, let's make it lowercase to improve readability.
32107       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32108       # Now convert it back to Unix-stile (cygpath)
32109       input_path=`$CYGPATH -u "$shortmode_path"`
32110       new_path="$input_path"
32111     fi
32112   fi
32113 
32114   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32115   if test "x$test_cygdrive_prefix" = x; then
32116     # As a simple fix, exclude /usr/bin since it's not a real path.
32117     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32118       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32119       # a path prefixed by /cygdrive for fixpath to work.
32120       new_path="$CYGWIN_ROOT_PATH$input_path"
32121     fi
32122   fi
32123 
32124 
32125   if test "x$path" != "x$new_path"; then
32126     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32128 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32129   fi
32130 
32131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32132 
32133   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32134   has_colon=`$ECHO $path | $GREP ^.:`
32135   new_path="$path"
32136   if test "x$has_colon" = x; then
32137     # Not in mixed or Windows style, start by that.
32138     new_path=`cmd //c echo $path`
32139   fi
32140 
32141 
32142   input_path="$new_path"
32143   # Check if we need to convert this using DOS-style short mode. If the path
32144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32145   # take no chances and rewrite it.
32146   # Note: m4 eats our [], so we need to use [ and ] instead.
32147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32148   if test "x$has_forbidden_chars" != x; then
32149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32150     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32151   fi
32152 
32153 
32154   windows_path="$new_path"
32155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32156     unix_path=`$CYGPATH -u "$windows_path"`
32157     new_path="$unix_path"
32158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32160     new_path="$unix_path"
32161   fi
32162 
32163   if test "x$path" != "x$new_path"; then
32164     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32166 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32167   fi
32168 
32169   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32170   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32171 
32172   else
32173     # We're on a posix platform. Hooray! :)
32174     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32175     has_space=`$ECHO "$path" | $GREP " "`
32176     if test "x$has_space" != x; then
32177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32178 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32179       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32180     fi
32181 
32182     # Use eval to expand a potential ~
32183     eval path="$path"
32184     if test ! -f "$path" && test ! -d "$path"; then
32185       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32186     fi
32187 
32188     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32189   fi
32190 
32191 
32192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32193 
32194   # Input might be given as Windows format, start by converting to
32195   # unix format.
32196   path="$POTENTIAL_FREETYPE_LIB_PATH"
32197   new_path=`$CYGPATH -u "$path"`
32198 
32199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32202   # "foo.exe" is OK but "foo" is an error.
32203   #
32204   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32205   # It is also a way to make sure we got the proper file name for the real test later on.
32206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32207   if test "x$test_shortpath" = x; then
32208     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32209 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32210     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32211   fi
32212 
32213   # Call helper function which possibly converts this using DOS-style short mode.
32214   # If so, the updated path is stored in $new_path.
32215 
32216   input_path="$new_path"
32217   # Check if we need to convert this using DOS-style short mode. If the path
32218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32219   # take no chances and rewrite it.
32220   # Note: m4 eats our [], so we need to use [ and ] instead.
32221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32222   if test "x$has_forbidden_chars" != x; then
32223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32224     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32225     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32226     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32227       # Going to short mode and back again did indeed matter. Since short mode is
32228       # case insensitive, let's make it lowercase to improve readability.
32229       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32230       # Now convert it back to Unix-stile (cygpath)
32231       input_path=`$CYGPATH -u "$shortmode_path"`
32232       new_path="$input_path"
32233     fi
32234   fi
32235 
32236   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32237   if test "x$test_cygdrive_prefix" = x; then
32238     # As a simple fix, exclude /usr/bin since it's not a real path.
32239     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32240       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32241       # a path prefixed by /cygdrive for fixpath to work.
32242       new_path="$CYGWIN_ROOT_PATH$input_path"
32243     fi
32244   fi
32245 
32246 
32247   if test "x$path" != "x$new_path"; then
32248     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32250 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32251   fi
32252 
32253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32254 
32255   path="$POTENTIAL_FREETYPE_LIB_PATH"
32256   has_colon=`$ECHO $path | $GREP ^.:`
32257   new_path="$path"
32258   if test "x$has_colon" = x; then
32259     # Not in mixed or Windows style, start by that.
32260     new_path=`cmd //c echo $path`
32261   fi
32262 
32263 
32264   input_path="$new_path"
32265   # Check if we need to convert this using DOS-style short mode. If the path
32266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32267   # take no chances and rewrite it.
32268   # Note: m4 eats our [], so we need to use [ and ] instead.
32269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32270   if test "x$has_forbidden_chars" != x; then
32271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32272     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32273   fi
32274 
32275 
32276   windows_path="$new_path"
32277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32278     unix_path=`$CYGPATH -u "$windows_path"`
32279     new_path="$unix_path"
32280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32282     new_path="$unix_path"
32283   fi
32284 
32285   if test "x$path" != "x$new_path"; then
32286     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32287     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32288 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32289   fi
32290 
32291   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32292   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32293 
32294   else
32295     # We're on a posix platform. Hooray! :)
32296     path="$POTENTIAL_FREETYPE_LIB_PATH"
32297     has_space=`$ECHO "$path" | $GREP " "`
32298     if test "x$has_space" != x; then
32299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32300 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32301       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32302     fi
32303 
32304     # Use eval to expand a potential ~
32305     eval path="$path"
32306     if test ! -f "$path" && test ! -d "$path"; then
32307       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32308     fi
32309 
32310     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32311   fi
32312 
32313 
32314     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32316 $as_echo_n "checking for freetype includes... " >&6; }
32317     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32318 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32319     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32320     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32321 $as_echo_n "checking for freetype libraries... " >&6; }
32322     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32323 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32324   fi
32325 
32326           if test "x$FOUND_FREETYPE" != xyes; then
32327             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32328 
32329   windows_path="$FREETYPE_BASE_DIR"
32330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32331     unix_path=`$CYGPATH -u "$windows_path"`
32332     FREETYPE_BASE_DIR="$unix_path"
32333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32335     FREETYPE_BASE_DIR="$unix_path"
32336   fi
32337 
32338 
32339   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32340   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32341   METHOD="well-known location"
32342 
32343   # First check if the files exists.
32344   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32345     # We found an arbitrary include file. That's a good sign.
32346     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32347 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32348     FOUND_FREETYPE=yes
32349 
32350     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32351     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32352       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32353 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32354       FOUND_FREETYPE=no
32355     else
32356       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32357         # On Windows, we will need both .lib and .dll file.
32358         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32359           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32360 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32361           FOUND_FREETYPE=no
32362         fi
32363       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
32364         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32365         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32366       fi
32367     fi
32368   fi
32369 
32370   if test "x$FOUND_FREETYPE" = xyes; then
32371 
32372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32373 
32374   # Input might be given as Windows format, start by converting to
32375   # unix format.
32376   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32377   new_path=`$CYGPATH -u "$path"`
32378 
32379   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32380   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32381   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32382   # "foo.exe" is OK but "foo" is an error.
32383   #
32384   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32385   # It is also a way to make sure we got the proper file name for the real test later on.
32386   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32387   if test "x$test_shortpath" = x; then
32388     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32389 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32390     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32391   fi
32392 
32393   # Call helper function which possibly converts this using DOS-style short mode.
32394   # If so, the updated path is stored in $new_path.
32395 
32396   input_path="$new_path"
32397   # Check if we need to convert this using DOS-style short mode. If the path
32398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32399   # take no chances and rewrite it.
32400   # Note: m4 eats our [], so we need to use [ and ] instead.
32401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32402   if test "x$has_forbidden_chars" != x; then
32403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32404     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32405     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32406     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32407       # Going to short mode and back again did indeed matter. Since short mode is
32408       # case insensitive, let's make it lowercase to improve readability.
32409       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32410       # Now convert it back to Unix-stile (cygpath)
32411       input_path=`$CYGPATH -u "$shortmode_path"`
32412       new_path="$input_path"
32413     fi
32414   fi
32415 
32416   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32417   if test "x$test_cygdrive_prefix" = x; then
32418     # As a simple fix, exclude /usr/bin since it's not a real path.
32419     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32420       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32421       # a path prefixed by /cygdrive for fixpath to work.
32422       new_path="$CYGWIN_ROOT_PATH$input_path"
32423     fi
32424   fi
32425 
32426 
32427   if test "x$path" != "x$new_path"; then
32428     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32429     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32430 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32431   fi
32432 
32433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32434 
32435   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32436   has_colon=`$ECHO $path | $GREP ^.:`
32437   new_path="$path"
32438   if test "x$has_colon" = x; then
32439     # Not in mixed or Windows style, start by that.
32440     new_path=`cmd //c echo $path`
32441   fi
32442 
32443 
32444   input_path="$new_path"
32445   # Check if we need to convert this using DOS-style short mode. If the path
32446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32447   # take no chances and rewrite it.
32448   # Note: m4 eats our [], so we need to use [ and ] instead.
32449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32450   if test "x$has_forbidden_chars" != x; then
32451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32452     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32453   fi
32454 
32455 
32456   windows_path="$new_path"
32457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32458     unix_path=`$CYGPATH -u "$windows_path"`
32459     new_path="$unix_path"
32460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32462     new_path="$unix_path"
32463   fi
32464 
32465   if test "x$path" != "x$new_path"; then
32466     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32467     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32468 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32469   fi
32470 
32471   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32472   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32473 
32474   else
32475     # We're on a posix platform. Hooray! :)
32476     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32477     has_space=`$ECHO "$path" | $GREP " "`
32478     if test "x$has_space" != x; then
32479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32480 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32481       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32482     fi
32483 
32484     # Use eval to expand a potential ~
32485     eval path="$path"
32486     if test ! -f "$path" && test ! -d "$path"; then
32487       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32488     fi
32489 
32490     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32491   fi
32492 
32493 
32494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32495 
32496   # Input might be given as Windows format, start by converting to
32497   # unix format.
32498   path="$POTENTIAL_FREETYPE_LIB_PATH"
32499   new_path=`$CYGPATH -u "$path"`
32500 
32501   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32502   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32503   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32504   # "foo.exe" is OK but "foo" is an error.
32505   #
32506   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32507   # It is also a way to make sure we got the proper file name for the real test later on.
32508   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32509   if test "x$test_shortpath" = x; then
32510     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32511 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32512     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32513   fi
32514 
32515   # Call helper function which possibly converts this using DOS-style short mode.
32516   # If so, the updated path is stored in $new_path.
32517 
32518   input_path="$new_path"
32519   # Check if we need to convert this using DOS-style short mode. If the path
32520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32521   # take no chances and rewrite it.
32522   # Note: m4 eats our [], so we need to use [ and ] instead.
32523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32524   if test "x$has_forbidden_chars" != x; then
32525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32526     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32527     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32528     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32529       # Going to short mode and back again did indeed matter. Since short mode is
32530       # case insensitive, let's make it lowercase to improve readability.
32531       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32532       # Now convert it back to Unix-stile (cygpath)
32533       input_path=`$CYGPATH -u "$shortmode_path"`
32534       new_path="$input_path"
32535     fi
32536   fi
32537 
32538   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32539   if test "x$test_cygdrive_prefix" = x; then
32540     # As a simple fix, exclude /usr/bin since it's not a real path.
32541     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32542       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32543       # a path prefixed by /cygdrive for fixpath to work.
32544       new_path="$CYGWIN_ROOT_PATH$input_path"
32545     fi
32546   fi
32547 
32548 
32549   if test "x$path" != "x$new_path"; then
32550     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32552 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32553   fi
32554 
32555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32556 
32557   path="$POTENTIAL_FREETYPE_LIB_PATH"
32558   has_colon=`$ECHO $path | $GREP ^.:`
32559   new_path="$path"
32560   if test "x$has_colon" = x; then
32561     # Not in mixed or Windows style, start by that.
32562     new_path=`cmd //c echo $path`
32563   fi
32564 
32565 
32566   input_path="$new_path"
32567   # Check if we need to convert this using DOS-style short mode. If the path
32568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32569   # take no chances and rewrite it.
32570   # Note: m4 eats our [], so we need to use [ and ] instead.
32571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32572   if test "x$has_forbidden_chars" != x; then
32573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32574     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32575   fi
32576 
32577 
32578   windows_path="$new_path"
32579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32580     unix_path=`$CYGPATH -u "$windows_path"`
32581     new_path="$unix_path"
32582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32584     new_path="$unix_path"
32585   fi
32586 
32587   if test "x$path" != "x$new_path"; then
32588     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32590 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32591   fi
32592 
32593   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32594   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32595 
32596   else
32597     # We're on a posix platform. Hooray! :)
32598     path="$POTENTIAL_FREETYPE_LIB_PATH"
32599     has_space=`$ECHO "$path" | $GREP " "`
32600     if test "x$has_space" != x; then
32601       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32602 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32603       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32604     fi
32605 
32606     # Use eval to expand a potential ~
32607     eval path="$path"
32608     if test ! -f "$path" && test ! -d "$path"; then
32609       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32610     fi
32611 
32612     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32613   fi
32614 
32615 
32616     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32617     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32618 $as_echo_n "checking for freetype includes... " >&6; }
32619     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32620 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32621     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32622     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32623 $as_echo_n "checking for freetype libraries... " >&6; }
32624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32625 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32626   fi
32627 
32628           fi
32629         else
32630           if test "x$SYS_ROOT" = "x/"; then
32631             FREETYPE_ROOT=
32632           else
32633             FREETYPE_ROOT="$SYS_ROOT"
32634           fi
32635           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32636 
32637   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32638   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32639   METHOD="well-known location"
32640 
32641   # First check if the files exists.
32642   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32643     # We found an arbitrary include file. That's a good sign.
32644     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32645 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32646     FOUND_FREETYPE=yes
32647 
32648     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32649     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32650       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32651 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32652       FOUND_FREETYPE=no
32653     else
32654       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32655         # On Windows, we will need both .lib and .dll file.
32656         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32657           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32658 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32659           FOUND_FREETYPE=no
32660         fi
32661       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
32662         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32663         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32664       fi
32665     fi
32666   fi
32667 
32668   if test "x$FOUND_FREETYPE" = xyes; then
32669 
32670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32671 
32672   # Input might be given as Windows format, start by converting to
32673   # unix format.
32674   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32675   new_path=`$CYGPATH -u "$path"`
32676 
32677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32680   # "foo.exe" is OK but "foo" is an error.
32681   #
32682   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32683   # It is also a way to make sure we got the proper file name for the real test later on.
32684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32685   if test "x$test_shortpath" = x; then
32686     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32687 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32688     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32689   fi
32690 
32691   # Call helper function which possibly converts this using DOS-style short mode.
32692   # If so, the updated path is stored in $new_path.
32693 
32694   input_path="$new_path"
32695   # Check if we need to convert this using DOS-style short mode. If the path
32696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32697   # take no chances and rewrite it.
32698   # Note: m4 eats our [], so we need to use [ and ] instead.
32699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32700   if test "x$has_forbidden_chars" != x; then
32701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32702     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32703     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32704     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32705       # Going to short mode and back again did indeed matter. Since short mode is
32706       # case insensitive, let's make it lowercase to improve readability.
32707       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32708       # Now convert it back to Unix-stile (cygpath)
32709       input_path=`$CYGPATH -u "$shortmode_path"`
32710       new_path="$input_path"
32711     fi
32712   fi
32713 
32714   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32715   if test "x$test_cygdrive_prefix" = x; then
32716     # As a simple fix, exclude /usr/bin since it's not a real path.
32717     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32718       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32719       # a path prefixed by /cygdrive for fixpath to work.
32720       new_path="$CYGWIN_ROOT_PATH$input_path"
32721     fi
32722   fi
32723 
32724 
32725   if test "x$path" != "x$new_path"; then
32726     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32728 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32729   fi
32730 
32731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32732 
32733   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32734   has_colon=`$ECHO $path | $GREP ^.:`
32735   new_path="$path"
32736   if test "x$has_colon" = x; then
32737     # Not in mixed or Windows style, start by that.
32738     new_path=`cmd //c echo $path`
32739   fi
32740 
32741 
32742   input_path="$new_path"
32743   # Check if we need to convert this using DOS-style short mode. If the path
32744   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32745   # take no chances and rewrite it.
32746   # Note: m4 eats our [], so we need to use [ and ] instead.
32747   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32748   if test "x$has_forbidden_chars" != x; then
32749     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32750     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32751   fi
32752 
32753 
32754   windows_path="$new_path"
32755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32756     unix_path=`$CYGPATH -u "$windows_path"`
32757     new_path="$unix_path"
32758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32760     new_path="$unix_path"
32761   fi
32762 
32763   if test "x$path" != "x$new_path"; then
32764     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32766 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32767   fi
32768 
32769   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32770   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32771 
32772   else
32773     # We're on a posix platform. Hooray! :)
32774     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32775     has_space=`$ECHO "$path" | $GREP " "`
32776     if test "x$has_space" != x; then
32777       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32778 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32779       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32780     fi
32781 
32782     # Use eval to expand a potential ~
32783     eval path="$path"
32784     if test ! -f "$path" && test ! -d "$path"; then
32785       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32786     fi
32787 
32788     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32789   fi
32790 
32791 
32792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32793 
32794   # Input might be given as Windows format, start by converting to
32795   # unix format.
32796   path="$POTENTIAL_FREETYPE_LIB_PATH"
32797   new_path=`$CYGPATH -u "$path"`
32798 
32799   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32800   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32801   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32802   # "foo.exe" is OK but "foo" is an error.
32803   #
32804   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32805   # It is also a way to make sure we got the proper file name for the real test later on.
32806   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32807   if test "x$test_shortpath" = x; then
32808     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32809 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32810     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32811   fi
32812 
32813   # Call helper function which possibly converts this using DOS-style short mode.
32814   # If so, the updated path is stored in $new_path.
32815 
32816   input_path="$new_path"
32817   # Check if we need to convert this using DOS-style short mode. If the path
32818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32819   # take no chances and rewrite it.
32820   # Note: m4 eats our [], so we need to use [ and ] instead.
32821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32822   if test "x$has_forbidden_chars" != x; then
32823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32824     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32825     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32826     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32827       # Going to short mode and back again did indeed matter. Since short mode is
32828       # case insensitive, let's make it lowercase to improve readability.
32829       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32830       # Now convert it back to Unix-stile (cygpath)
32831       input_path=`$CYGPATH -u "$shortmode_path"`
32832       new_path="$input_path"
32833     fi
32834   fi
32835 
32836   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32837   if test "x$test_cygdrive_prefix" = x; then
32838     # As a simple fix, exclude /usr/bin since it's not a real path.
32839     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32840       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32841       # a path prefixed by /cygdrive for fixpath to work.
32842       new_path="$CYGWIN_ROOT_PATH$input_path"
32843     fi
32844   fi
32845 
32846 
32847   if test "x$path" != "x$new_path"; then
32848     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32850 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32851   fi
32852 
32853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32854 
32855   path="$POTENTIAL_FREETYPE_LIB_PATH"
32856   has_colon=`$ECHO $path | $GREP ^.:`
32857   new_path="$path"
32858   if test "x$has_colon" = x; then
32859     # Not in mixed or Windows style, start by that.
32860     new_path=`cmd //c echo $path`
32861   fi
32862 
32863 
32864   input_path="$new_path"
32865   # Check if we need to convert this using DOS-style short mode. If the path
32866   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32867   # take no chances and rewrite it.
32868   # Note: m4 eats our [], so we need to use [ and ] instead.
32869   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32870   if test "x$has_forbidden_chars" != x; then
32871     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32872     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32873   fi
32874 
32875 
32876   windows_path="$new_path"
32877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32878     unix_path=`$CYGPATH -u "$windows_path"`
32879     new_path="$unix_path"
32880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32882     new_path="$unix_path"
32883   fi
32884 
32885   if test "x$path" != "x$new_path"; then
32886     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32888 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32889   fi
32890 
32891   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32892   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32893 
32894   else
32895     # We're on a posix platform. Hooray! :)
32896     path="$POTENTIAL_FREETYPE_LIB_PATH"
32897     has_space=`$ECHO "$path" | $GREP " "`
32898     if test "x$has_space" != x; then
32899       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32900 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32901       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32902     fi
32903 
32904     # Use eval to expand a potential ~
32905     eval path="$path"
32906     if test ! -f "$path" && test ! -d "$path"; then
32907       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32908     fi
32909 
32910     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32911   fi
32912 
32913 
32914     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32915     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32916 $as_echo_n "checking for freetype includes... " >&6; }
32917     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32918 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32919     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32920     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32921 $as_echo_n "checking for freetype libraries... " >&6; }
32922     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32923 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32924   fi
32925 
32926 
32927           if test "x$FOUND_FREETYPE" != xyes; then
32928             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32929 
32930   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32931   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32932   METHOD="well-known location"
32933 
32934   # First check if the files exists.
32935   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32936     # We found an arbitrary include file. That's a good sign.
32937     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32938 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32939     FOUND_FREETYPE=yes
32940 
32941     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32942     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32943       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32944 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32945       FOUND_FREETYPE=no
32946     else
32947       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32948         # On Windows, we will need both .lib and .dll file.
32949         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32950           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32951 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32952           FOUND_FREETYPE=no
32953         fi
32954       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
32955         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32956         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32957       fi
32958     fi
32959   fi
32960 
32961   if test "x$FOUND_FREETYPE" = xyes; then
32962 
32963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32964 
32965   # Input might be given as Windows format, start by converting to
32966   # unix format.
32967   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32968   new_path=`$CYGPATH -u "$path"`
32969 
32970   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32971   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32972   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32973   # "foo.exe" is OK but "foo" is an error.
32974   #
32975   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32976   # It is also a way to make sure we got the proper file name for the real test later on.
32977   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32978   if test "x$test_shortpath" = x; then
32979     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32980 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32981     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32982   fi
32983 
32984   # Call helper function which possibly converts this using DOS-style short mode.
32985   # If so, the updated path is stored in $new_path.
32986 
32987   input_path="$new_path"
32988   # Check if we need to convert this using DOS-style short mode. If the path
32989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32990   # take no chances and rewrite it.
32991   # Note: m4 eats our [], so we need to use [ and ] instead.
32992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32993   if test "x$has_forbidden_chars" != x; then
32994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32998       # Going to short mode and back again did indeed matter. Since short mode is
32999       # case insensitive, let's make it lowercase to improve readability.
33000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33001       # Now convert it back to Unix-stile (cygpath)
33002       input_path=`$CYGPATH -u "$shortmode_path"`
33003       new_path="$input_path"
33004     fi
33005   fi
33006 
33007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33008   if test "x$test_cygdrive_prefix" = x; then
33009     # As a simple fix, exclude /usr/bin since it's not a real path.
33010     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33012       # a path prefixed by /cygdrive for fixpath to work.
33013       new_path="$CYGWIN_ROOT_PATH$input_path"
33014     fi
33015   fi
33016 
33017 
33018   if test "x$path" != "x$new_path"; then
33019     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33021 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33022   fi
33023 
33024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33025 
33026   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33027   has_colon=`$ECHO $path | $GREP ^.:`
33028   new_path="$path"
33029   if test "x$has_colon" = x; then
33030     # Not in mixed or Windows style, start by that.
33031     new_path=`cmd //c echo $path`
33032   fi
33033 
33034 
33035   input_path="$new_path"
33036   # Check if we need to convert this using DOS-style short mode. If the path
33037   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33038   # take no chances and rewrite it.
33039   # Note: m4 eats our [], so we need to use [ and ] instead.
33040   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33041   if test "x$has_forbidden_chars" != x; then
33042     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33043     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33044   fi
33045 
33046 
33047   windows_path="$new_path"
33048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33049     unix_path=`$CYGPATH -u "$windows_path"`
33050     new_path="$unix_path"
33051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33053     new_path="$unix_path"
33054   fi
33055 
33056   if test "x$path" != "x$new_path"; then
33057     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33058     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33059 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33060   fi
33061 
33062   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33063   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33064 
33065   else
33066     # We're on a posix platform. Hooray! :)
33067     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33068     has_space=`$ECHO "$path" | $GREP " "`
33069     if test "x$has_space" != x; then
33070       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33071 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33072       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33073     fi
33074 
33075     # Use eval to expand a potential ~
33076     eval path="$path"
33077     if test ! -f "$path" && test ! -d "$path"; then
33078       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33079     fi
33080 
33081     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33082   fi
33083 
33084 
33085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33086 
33087   # Input might be given as Windows format, start by converting to
33088   # unix format.
33089   path="$POTENTIAL_FREETYPE_LIB_PATH"
33090   new_path=`$CYGPATH -u "$path"`
33091 
33092   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33093   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33094   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33095   # "foo.exe" is OK but "foo" is an error.
33096   #
33097   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33098   # It is also a way to make sure we got the proper file name for the real test later on.
33099   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33100   if test "x$test_shortpath" = x; then
33101     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33102 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33103     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33104   fi
33105 
33106   # Call helper function which possibly converts this using DOS-style short mode.
33107   # If so, the updated path is stored in $new_path.
33108 
33109   input_path="$new_path"
33110   # Check if we need to convert this using DOS-style short mode. If the path
33111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33112   # take no chances and rewrite it.
33113   # Note: m4 eats our [], so we need to use [ and ] instead.
33114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33115   if test "x$has_forbidden_chars" != x; then
33116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33117     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33118     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33119     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33120       # Going to short mode and back again did indeed matter. Since short mode is
33121       # case insensitive, let's make it lowercase to improve readability.
33122       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33123       # Now convert it back to Unix-stile (cygpath)
33124       input_path=`$CYGPATH -u "$shortmode_path"`
33125       new_path="$input_path"
33126     fi
33127   fi
33128 
33129   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33130   if test "x$test_cygdrive_prefix" = x; then
33131     # As a simple fix, exclude /usr/bin since it's not a real path.
33132     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33133       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33134       # a path prefixed by /cygdrive for fixpath to work.
33135       new_path="$CYGWIN_ROOT_PATH$input_path"
33136     fi
33137   fi
33138 
33139 
33140   if test "x$path" != "x$new_path"; then
33141     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33143 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33144   fi
33145 
33146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33147 
33148   path="$POTENTIAL_FREETYPE_LIB_PATH"
33149   has_colon=`$ECHO $path | $GREP ^.:`
33150   new_path="$path"
33151   if test "x$has_colon" = x; then
33152     # Not in mixed or Windows style, start by that.
33153     new_path=`cmd //c echo $path`
33154   fi
33155 
33156 
33157   input_path="$new_path"
33158   # Check if we need to convert this using DOS-style short mode. If the path
33159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33160   # take no chances and rewrite it.
33161   # Note: m4 eats our [], so we need to use [ and ] instead.
33162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33163   if test "x$has_forbidden_chars" != x; then
33164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33165     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33166   fi
33167 
33168 
33169   windows_path="$new_path"
33170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33171     unix_path=`$CYGPATH -u "$windows_path"`
33172     new_path="$unix_path"
33173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33175     new_path="$unix_path"
33176   fi
33177 
33178   if test "x$path" != "x$new_path"; then
33179     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33181 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33182   fi
33183 
33184   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33185   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33186 
33187   else
33188     # We're on a posix platform. Hooray! :)
33189     path="$POTENTIAL_FREETYPE_LIB_PATH"
33190     has_space=`$ECHO "$path" | $GREP " "`
33191     if test "x$has_space" != x; then
33192       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33193 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33194       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33195     fi
33196 
33197     # Use eval to expand a potential ~
33198     eval path="$path"
33199     if test ! -f "$path" && test ! -d "$path"; then
33200       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33201     fi
33202 
33203     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33204   fi
33205 
33206 
33207     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33209 $as_echo_n "checking for freetype includes... " >&6; }
33210     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33211 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33212     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33213     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33214 $as_echo_n "checking for freetype libraries... " >&6; }
33215     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33216 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33217   fi
33218 
33219           fi
33220 
33221           if test "x$FOUND_FREETYPE" != xyes; then
33222             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33223             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33224 
33225   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33226   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33227   METHOD="well-known location"
33228 
33229   # First check if the files exists.
33230   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33231     # We found an arbitrary include file. That's a good sign.
33232     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33233 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33234     FOUND_FREETYPE=yes
33235 
33236     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33237     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33238       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33239 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33240       FOUND_FREETYPE=no
33241     else
33242       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33243         # On Windows, we will need both .lib and .dll file.
33244         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33245           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33246 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33247           FOUND_FREETYPE=no
33248         fi
33249       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
33250         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33251         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33252       fi
33253     fi
33254   fi
33255 
33256   if test "x$FOUND_FREETYPE" = xyes; then
33257 
33258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33259 
33260   # Input might be given as Windows format, start by converting to
33261   # unix format.
33262   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33263   new_path=`$CYGPATH -u "$path"`
33264 
33265   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33266   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33267   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33268   # "foo.exe" is OK but "foo" is an error.
33269   #
33270   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33271   # It is also a way to make sure we got the proper file name for the real test later on.
33272   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33273   if test "x$test_shortpath" = x; then
33274     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33275 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33276     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33277   fi
33278 
33279   # Call helper function which possibly converts this using DOS-style short mode.
33280   # If so, the updated path is stored in $new_path.
33281 
33282   input_path="$new_path"
33283   # Check if we need to convert this using DOS-style short mode. If the path
33284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33285   # take no chances and rewrite it.
33286   # Note: m4 eats our [], so we need to use [ and ] instead.
33287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33288   if test "x$has_forbidden_chars" != x; then
33289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33290     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33291     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33292     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33293       # Going to short mode and back again did indeed matter. Since short mode is
33294       # case insensitive, let's make it lowercase to improve readability.
33295       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33296       # Now convert it back to Unix-stile (cygpath)
33297       input_path=`$CYGPATH -u "$shortmode_path"`
33298       new_path="$input_path"
33299     fi
33300   fi
33301 
33302   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33303   if test "x$test_cygdrive_prefix" = x; then
33304     # As a simple fix, exclude /usr/bin since it's not a real path.
33305     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33306       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33307       # a path prefixed by /cygdrive for fixpath to work.
33308       new_path="$CYGWIN_ROOT_PATH$input_path"
33309     fi
33310   fi
33311 
33312 
33313   if test "x$path" != "x$new_path"; then
33314     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33315     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33316 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33317   fi
33318 
33319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33320 
33321   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33322   has_colon=`$ECHO $path | $GREP ^.:`
33323   new_path="$path"
33324   if test "x$has_colon" = x; then
33325     # Not in mixed or Windows style, start by that.
33326     new_path=`cmd //c echo $path`
33327   fi
33328 
33329 
33330   input_path="$new_path"
33331   # Check if we need to convert this using DOS-style short mode. If the path
33332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33333   # take no chances and rewrite it.
33334   # Note: m4 eats our [], so we need to use [ and ] instead.
33335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33336   if test "x$has_forbidden_chars" != x; then
33337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33338     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33339   fi
33340 
33341 
33342   windows_path="$new_path"
33343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33344     unix_path=`$CYGPATH -u "$windows_path"`
33345     new_path="$unix_path"
33346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33348     new_path="$unix_path"
33349   fi
33350 
33351   if test "x$path" != "x$new_path"; then
33352     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33353     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33354 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33355   fi
33356 
33357   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33358   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33359 
33360   else
33361     # We're on a posix platform. Hooray! :)
33362     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33363     has_space=`$ECHO "$path" | $GREP " "`
33364     if test "x$has_space" != x; then
33365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33366 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33367       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33368     fi
33369 
33370     # Use eval to expand a potential ~
33371     eval path="$path"
33372     if test ! -f "$path" && test ! -d "$path"; then
33373       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33374     fi
33375 
33376     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33377   fi
33378 
33379 
33380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33381 
33382   # Input might be given as Windows format, start by converting to
33383   # unix format.
33384   path="$POTENTIAL_FREETYPE_LIB_PATH"
33385   new_path=`$CYGPATH -u "$path"`
33386 
33387   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33388   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33389   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33390   # "foo.exe" is OK but "foo" is an error.
33391   #
33392   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33393   # It is also a way to make sure we got the proper file name for the real test later on.
33394   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33395   if test "x$test_shortpath" = x; then
33396     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33397 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33398     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33399   fi
33400 
33401   # Call helper function which possibly converts this using DOS-style short mode.
33402   # If so, the updated path is stored in $new_path.
33403 
33404   input_path="$new_path"
33405   # Check if we need to convert this using DOS-style short mode. If the path
33406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33407   # take no chances and rewrite it.
33408   # Note: m4 eats our [], so we need to use [ and ] instead.
33409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33410   if test "x$has_forbidden_chars" != x; then
33411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33412     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33413     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33414     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33415       # Going to short mode and back again did indeed matter. Since short mode is
33416       # case insensitive, let's make it lowercase to improve readability.
33417       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33418       # Now convert it back to Unix-stile (cygpath)
33419       input_path=`$CYGPATH -u "$shortmode_path"`
33420       new_path="$input_path"
33421     fi
33422   fi
33423 
33424   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33425   if test "x$test_cygdrive_prefix" = x; then
33426     # As a simple fix, exclude /usr/bin since it's not a real path.
33427     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33428       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33429       # a path prefixed by /cygdrive for fixpath to work.
33430       new_path="$CYGWIN_ROOT_PATH$input_path"
33431     fi
33432   fi
33433 
33434 
33435   if test "x$path" != "x$new_path"; then
33436     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33437     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33438 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33439   fi
33440 
33441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33442 
33443   path="$POTENTIAL_FREETYPE_LIB_PATH"
33444   has_colon=`$ECHO $path | $GREP ^.:`
33445   new_path="$path"
33446   if test "x$has_colon" = x; then
33447     # Not in mixed or Windows style, start by that.
33448     new_path=`cmd //c echo $path`
33449   fi
33450 
33451 
33452   input_path="$new_path"
33453   # Check if we need to convert this using DOS-style short mode. If the path
33454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33455   # take no chances and rewrite it.
33456   # Note: m4 eats our [], so we need to use [ and ] instead.
33457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33458   if test "x$has_forbidden_chars" != x; then
33459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33460     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33461   fi
33462 
33463 
33464   windows_path="$new_path"
33465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33466     unix_path=`$CYGPATH -u "$windows_path"`
33467     new_path="$unix_path"
33468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33470     new_path="$unix_path"
33471   fi
33472 
33473   if test "x$path" != "x$new_path"; then
33474     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33475     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33476 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33477   fi
33478 
33479   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33480   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33481 
33482   else
33483     # We're on a posix platform. Hooray! :)
33484     path="$POTENTIAL_FREETYPE_LIB_PATH"
33485     has_space=`$ECHO "$path" | $GREP " "`
33486     if test "x$has_space" != x; then
33487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33488 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33489       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33490     fi
33491 
33492     # Use eval to expand a potential ~
33493     eval path="$path"
33494     if test ! -f "$path" && test ! -d "$path"; then
33495       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33496     fi
33497 
33498     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33499   fi
33500 
33501 
33502     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33504 $as_echo_n "checking for freetype includes... " >&6; }
33505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33506 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33507     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33508     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33509 $as_echo_n "checking for freetype libraries... " >&6; }
33510     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33511 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33512   fi
33513 
33514             else
33515 
33516   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33517   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33518   METHOD="well-known location"
33519 
33520   # First check if the files exists.
33521   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33522     # We found an arbitrary include file. That's a good sign.
33523     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33524 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33525     FOUND_FREETYPE=yes
33526 
33527     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33528     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33529       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33530 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33531       FOUND_FREETYPE=no
33532     else
33533       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33534         # On Windows, we will need both .lib and .dll file.
33535         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33536           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33537 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33538           FOUND_FREETYPE=no
33539         fi
33540       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
33541         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33542         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33543       fi
33544     fi
33545   fi
33546 
33547   if test "x$FOUND_FREETYPE" = xyes; then
33548 
33549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33550 
33551   # Input might be given as Windows format, start by converting to
33552   # unix format.
33553   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33554   new_path=`$CYGPATH -u "$path"`
33555 
33556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33559   # "foo.exe" is OK but "foo" is an error.
33560   #
33561   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33562   # It is also a way to make sure we got the proper file name for the real test later on.
33563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33564   if test "x$test_shortpath" = x; then
33565     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33566 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33567     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33568   fi
33569 
33570   # Call helper function which possibly converts this using DOS-style short mode.
33571   # If so, the updated path is stored in $new_path.
33572 
33573   input_path="$new_path"
33574   # Check if we need to convert this using DOS-style short mode. If the path
33575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33576   # take no chances and rewrite it.
33577   # Note: m4 eats our [], so we need to use [ and ] instead.
33578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33579   if test "x$has_forbidden_chars" != x; then
33580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33581     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33582     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33583     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33584       # Going to short mode and back again did indeed matter. Since short mode is
33585       # case insensitive, let's make it lowercase to improve readability.
33586       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33587       # Now convert it back to Unix-stile (cygpath)
33588       input_path=`$CYGPATH -u "$shortmode_path"`
33589       new_path="$input_path"
33590     fi
33591   fi
33592 
33593   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33594   if test "x$test_cygdrive_prefix" = x; then
33595     # As a simple fix, exclude /usr/bin since it's not a real path.
33596     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33597       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33598       # a path prefixed by /cygdrive for fixpath to work.
33599       new_path="$CYGWIN_ROOT_PATH$input_path"
33600     fi
33601   fi
33602 
33603 
33604   if test "x$path" != "x$new_path"; then
33605     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33607 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33608   fi
33609 
33610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33611 
33612   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33613   has_colon=`$ECHO $path | $GREP ^.:`
33614   new_path="$path"
33615   if test "x$has_colon" = x; then
33616     # Not in mixed or Windows style, start by that.
33617     new_path=`cmd //c echo $path`
33618   fi
33619 
33620 
33621   input_path="$new_path"
33622   # Check if we need to convert this using DOS-style short mode. If the path
33623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33624   # take no chances and rewrite it.
33625   # Note: m4 eats our [], so we need to use [ and ] instead.
33626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33627   if test "x$has_forbidden_chars" != x; then
33628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33629     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33630   fi
33631 
33632 
33633   windows_path="$new_path"
33634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33635     unix_path=`$CYGPATH -u "$windows_path"`
33636     new_path="$unix_path"
33637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33639     new_path="$unix_path"
33640   fi
33641 
33642   if test "x$path" != "x$new_path"; then
33643     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33645 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33646   fi
33647 
33648   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33649   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33650 
33651   else
33652     # We're on a posix platform. Hooray! :)
33653     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33654     has_space=`$ECHO "$path" | $GREP " "`
33655     if test "x$has_space" != x; then
33656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33657 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33658       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33659     fi
33660 
33661     # Use eval to expand a potential ~
33662     eval path="$path"
33663     if test ! -f "$path" && test ! -d "$path"; then
33664       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33665     fi
33666 
33667     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33668   fi
33669 
33670 
33671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33672 
33673   # Input might be given as Windows format, start by converting to
33674   # unix format.
33675   path="$POTENTIAL_FREETYPE_LIB_PATH"
33676   new_path=`$CYGPATH -u "$path"`
33677 
33678   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33679   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33680   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33681   # "foo.exe" is OK but "foo" is an error.
33682   #
33683   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33684   # It is also a way to make sure we got the proper file name for the real test later on.
33685   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33686   if test "x$test_shortpath" = x; then
33687     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33688 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33689     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33690   fi
33691 
33692   # Call helper function which possibly converts this using DOS-style short mode.
33693   # If so, the updated path is stored in $new_path.
33694 
33695   input_path="$new_path"
33696   # Check if we need to convert this using DOS-style short mode. If the path
33697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33698   # take no chances and rewrite it.
33699   # Note: m4 eats our [], so we need to use [ and ] instead.
33700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33701   if test "x$has_forbidden_chars" != x; then
33702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33703     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33704     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33705     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33706       # Going to short mode and back again did indeed matter. Since short mode is
33707       # case insensitive, let's make it lowercase to improve readability.
33708       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33709       # Now convert it back to Unix-stile (cygpath)
33710       input_path=`$CYGPATH -u "$shortmode_path"`
33711       new_path="$input_path"
33712     fi
33713   fi
33714 
33715   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33716   if test "x$test_cygdrive_prefix" = x; then
33717     # As a simple fix, exclude /usr/bin since it's not a real path.
33718     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33719       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33720       # a path prefixed by /cygdrive for fixpath to work.
33721       new_path="$CYGWIN_ROOT_PATH$input_path"
33722     fi
33723   fi
33724 
33725 
33726   if test "x$path" != "x$new_path"; then
33727     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33728     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33729 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33730   fi
33731 
33732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33733 
33734   path="$POTENTIAL_FREETYPE_LIB_PATH"
33735   has_colon=`$ECHO $path | $GREP ^.:`
33736   new_path="$path"
33737   if test "x$has_colon" = x; then
33738     # Not in mixed or Windows style, start by that.
33739     new_path=`cmd //c echo $path`
33740   fi
33741 
33742 
33743   input_path="$new_path"
33744   # Check if we need to convert this using DOS-style short mode. If the path
33745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33746   # take no chances and rewrite it.
33747   # Note: m4 eats our [], so we need to use [ and ] instead.
33748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33749   if test "x$has_forbidden_chars" != x; then
33750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33751     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33752   fi
33753 
33754 
33755   windows_path="$new_path"
33756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33757     unix_path=`$CYGPATH -u "$windows_path"`
33758     new_path="$unix_path"
33759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33761     new_path="$unix_path"
33762   fi
33763 
33764   if test "x$path" != "x$new_path"; then
33765     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33767 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33768   fi
33769 
33770   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33771   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33772 
33773   else
33774     # We're on a posix platform. Hooray! :)
33775     path="$POTENTIAL_FREETYPE_LIB_PATH"
33776     has_space=`$ECHO "$path" | $GREP " "`
33777     if test "x$has_space" != x; then
33778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33779 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33780       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33781     fi
33782 
33783     # Use eval to expand a potential ~
33784     eval path="$path"
33785     if test ! -f "$path" && test ! -d "$path"; then
33786       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33787     fi
33788 
33789     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33790   fi
33791 
33792 
33793     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33794     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33795 $as_echo_n "checking for freetype includes... " >&6; }
33796     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33797 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33798     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33799     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33800 $as_echo_n "checking for freetype libraries... " >&6; }
33801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33802 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33803   fi
33804 
33805               if test "x$FOUND_FREETYPE" != xyes; then
33806 
33807   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33808   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33809   METHOD="well-known location"
33810 
33811   # First check if the files exists.
33812   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33813     # We found an arbitrary include file. That's a good sign.
33814     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33815 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33816     FOUND_FREETYPE=yes
33817 
33818     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33819     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33820       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33821 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33822       FOUND_FREETYPE=no
33823     else
33824       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33825         # On Windows, we will need both .lib and .dll file.
33826         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33827           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33828 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33829           FOUND_FREETYPE=no
33830         fi
33831       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
33832         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33833         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33834       fi
33835     fi
33836   fi
33837 
33838   if test "x$FOUND_FREETYPE" = xyes; then
33839 
33840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33841 
33842   # Input might be given as Windows format, start by converting to
33843   # unix format.
33844   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33845   new_path=`$CYGPATH -u "$path"`
33846 
33847   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33848   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33849   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33850   # "foo.exe" is OK but "foo" is an error.
33851   #
33852   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33853   # It is also a way to make sure we got the proper file name for the real test later on.
33854   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33855   if test "x$test_shortpath" = x; then
33856     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33857 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33858     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33859   fi
33860 
33861   # Call helper function which possibly converts this using DOS-style short mode.
33862   # If so, the updated path is stored in $new_path.
33863 
33864   input_path="$new_path"
33865   # Check if we need to convert this using DOS-style short mode. If the path
33866   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33867   # take no chances and rewrite it.
33868   # Note: m4 eats our [], so we need to use [ and ] instead.
33869   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33870   if test "x$has_forbidden_chars" != x; then
33871     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33872     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33873     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33874     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33875       # Going to short mode and back again did indeed matter. Since short mode is
33876       # case insensitive, let's make it lowercase to improve readability.
33877       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33878       # Now convert it back to Unix-stile (cygpath)
33879       input_path=`$CYGPATH -u "$shortmode_path"`
33880       new_path="$input_path"
33881     fi
33882   fi
33883 
33884   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33885   if test "x$test_cygdrive_prefix" = x; then
33886     # As a simple fix, exclude /usr/bin since it's not a real path.
33887     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33888       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33889       # a path prefixed by /cygdrive for fixpath to work.
33890       new_path="$CYGWIN_ROOT_PATH$input_path"
33891     fi
33892   fi
33893 
33894 
33895   if test "x$path" != "x$new_path"; then
33896     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33897     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33898 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33899   fi
33900 
33901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33902 
33903   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33904   has_colon=`$ECHO $path | $GREP ^.:`
33905   new_path="$path"
33906   if test "x$has_colon" = x; then
33907     # Not in mixed or Windows style, start by that.
33908     new_path=`cmd //c echo $path`
33909   fi
33910 
33911 
33912   input_path="$new_path"
33913   # Check if we need to convert this using DOS-style short mode. If the path
33914   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33915   # take no chances and rewrite it.
33916   # Note: m4 eats our [], so we need to use [ and ] instead.
33917   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33918   if test "x$has_forbidden_chars" != x; then
33919     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33920     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33921   fi
33922 
33923 
33924   windows_path="$new_path"
33925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33926     unix_path=`$CYGPATH -u "$windows_path"`
33927     new_path="$unix_path"
33928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33930     new_path="$unix_path"
33931   fi
33932 
33933   if test "x$path" != "x$new_path"; then
33934     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33935     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33936 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33937   fi
33938 
33939   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33940   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33941 
33942   else
33943     # We're on a posix platform. Hooray! :)
33944     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33945     has_space=`$ECHO "$path" | $GREP " "`
33946     if test "x$has_space" != x; then
33947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33948 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33949       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33950     fi
33951 
33952     # Use eval to expand a potential ~
33953     eval path="$path"
33954     if test ! -f "$path" && test ! -d "$path"; then
33955       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33956     fi
33957 
33958     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33959   fi
33960 
33961 
33962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33963 
33964   # Input might be given as Windows format, start by converting to
33965   # unix format.
33966   path="$POTENTIAL_FREETYPE_LIB_PATH"
33967   new_path=`$CYGPATH -u "$path"`
33968 
33969   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33970   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33971   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33972   # "foo.exe" is OK but "foo" is an error.
33973   #
33974   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33975   # It is also a way to make sure we got the proper file name for the real test later on.
33976   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33977   if test "x$test_shortpath" = x; then
33978     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33979 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33980     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33981   fi
33982 
33983   # Call helper function which possibly converts this using DOS-style short mode.
33984   # If so, the updated path is stored in $new_path.
33985 
33986   input_path="$new_path"
33987   # Check if we need to convert this using DOS-style short mode. If the path
33988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33989   # take no chances and rewrite it.
33990   # Note: m4 eats our [], so we need to use [ and ] instead.
33991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33992   if test "x$has_forbidden_chars" != x; then
33993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33994     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33995     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33996     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33997       # Going to short mode and back again did indeed matter. Since short mode is
33998       # case insensitive, let's make it lowercase to improve readability.
33999       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34000       # Now convert it back to Unix-stile (cygpath)
34001       input_path=`$CYGPATH -u "$shortmode_path"`
34002       new_path="$input_path"
34003     fi
34004   fi
34005 
34006   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34007   if test "x$test_cygdrive_prefix" = x; then
34008     # As a simple fix, exclude /usr/bin since it's not a real path.
34009     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34010       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34011       # a path prefixed by /cygdrive for fixpath to work.
34012       new_path="$CYGWIN_ROOT_PATH$input_path"
34013     fi
34014   fi
34015 
34016 
34017   if test "x$path" != "x$new_path"; then
34018     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34019     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34020 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34021   fi
34022 
34023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34024 
34025   path="$POTENTIAL_FREETYPE_LIB_PATH"
34026   has_colon=`$ECHO $path | $GREP ^.:`
34027   new_path="$path"
34028   if test "x$has_colon" = x; then
34029     # Not in mixed or Windows style, start by that.
34030     new_path=`cmd //c echo $path`
34031   fi
34032 
34033 
34034   input_path="$new_path"
34035   # Check if we need to convert this using DOS-style short mode. If the path
34036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34037   # take no chances and rewrite it.
34038   # Note: m4 eats our [], so we need to use [ and ] instead.
34039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34040   if test "x$has_forbidden_chars" != x; then
34041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34042     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34043   fi
34044 
34045 
34046   windows_path="$new_path"
34047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34048     unix_path=`$CYGPATH -u "$windows_path"`
34049     new_path="$unix_path"
34050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34052     new_path="$unix_path"
34053   fi
34054 
34055   if test "x$path" != "x$new_path"; then
34056     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34057     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34058 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34059   fi
34060 
34061   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34062   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34063 
34064   else
34065     # We're on a posix platform. Hooray! :)
34066     path="$POTENTIAL_FREETYPE_LIB_PATH"
34067     has_space=`$ECHO "$path" | $GREP " "`
34068     if test "x$has_space" != x; then
34069       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34070 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34071       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34072     fi
34073 
34074     # Use eval to expand a potential ~
34075     eval path="$path"
34076     if test ! -f "$path" && test ! -d "$path"; then
34077       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34078     fi
34079 
34080     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34081   fi
34082 
34083 
34084     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34086 $as_echo_n "checking for freetype includes... " >&6; }
34087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34088 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34089     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34091 $as_echo_n "checking for freetype libraries... " >&6; }
34092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34093 $as_echo "$FREETYPE_LIB_PATH" >&6; }
34094   fi
34095 
34096               fi
34097             fi
34098           fi
34099         fi
34100       fi # end check in well-known locations
34101 
34102       if test "x$FOUND_FREETYPE" != xyes; then
34103 
34104   # Print a helpful message on how to acquire the necessary build dependency.
34105   # freetype is the help tag: freetype, cups, pulse, alsa etc
34106   MISSING_DEPENDENCY=freetype
34107 
34108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34109     cygwin_help $MISSING_DEPENDENCY
34110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34111     msys_help $MISSING_DEPENDENCY
34112   else
34113     PKGHANDLER_COMMAND=
34114 
34115     case $PKGHANDLER in
34116       apt-get)
34117         apt_help     $MISSING_DEPENDENCY ;;
34118       yum)
34119         yum_help     $MISSING_DEPENDENCY ;;
34120       port)
34121         port_help    $MISSING_DEPENDENCY ;;
34122       pkgutil)
34123         pkgutil_help $MISSING_DEPENDENCY ;;
34124       pkgadd)
34125         pkgadd_help  $MISSING_DEPENDENCY ;;
34126     esac
34127 
34128     if test "x$PKGHANDLER_COMMAND" != x; then
34129       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34130     fi
34131   fi
34132 
34133         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34134       fi
34135     fi # end user specified settings
34136 
34137     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34138     if test "x$FREETYPE_CFLAGS" = x; then
34139 
34140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34141 
34142   # Input might be given as Windows format, start by converting to
34143   # unix format.
34144   path="$FREETYPE_INCLUDE_PATH"
34145   new_path=`$CYGPATH -u "$path"`
34146 
34147   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34148   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34149   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34150   # "foo.exe" is OK but "foo" is an error.
34151   #
34152   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34153   # It is also a way to make sure we got the proper file name for the real test later on.
34154   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34155   if test "x$test_shortpath" = x; then
34156     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34157 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34158     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34159   fi
34160 
34161   # Call helper function which possibly converts this using DOS-style short mode.
34162   # If so, the updated path is stored in $new_path.
34163 
34164   input_path="$new_path"
34165   # Check if we need to convert this using DOS-style short mode. If the path
34166   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34167   # take no chances and rewrite it.
34168   # Note: m4 eats our [], so we need to use [ and ] instead.
34169   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34170   if test "x$has_forbidden_chars" != x; then
34171     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34172     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34173     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34174     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34175       # Going to short mode and back again did indeed matter. Since short mode is
34176       # case insensitive, let's make it lowercase to improve readability.
34177       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34178       # Now convert it back to Unix-stile (cygpath)
34179       input_path=`$CYGPATH -u "$shortmode_path"`
34180       new_path="$input_path"
34181     fi
34182   fi
34183 
34184   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34185   if test "x$test_cygdrive_prefix" = x; then
34186     # As a simple fix, exclude /usr/bin since it's not a real path.
34187     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34188       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34189       # a path prefixed by /cygdrive for fixpath to work.
34190       new_path="$CYGWIN_ROOT_PATH$input_path"
34191     fi
34192   fi
34193 
34194 
34195   if test "x$path" != "x$new_path"; then
34196     FREETYPE_INCLUDE_PATH="$new_path"
34197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34198 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34199   fi
34200 
34201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34202 
34203   path="$FREETYPE_INCLUDE_PATH"
34204   has_colon=`$ECHO $path | $GREP ^.:`
34205   new_path="$path"
34206   if test "x$has_colon" = x; then
34207     # Not in mixed or Windows style, start by that.
34208     new_path=`cmd //c echo $path`
34209   fi
34210 
34211 
34212   input_path="$new_path"
34213   # Check if we need to convert this using DOS-style short mode. If the path
34214   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34215   # take no chances and rewrite it.
34216   # Note: m4 eats our [], so we need to use [ and ] instead.
34217   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34218   if test "x$has_forbidden_chars" != x; then
34219     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34220     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34221   fi
34222 
34223 
34224   windows_path="$new_path"
34225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34226     unix_path=`$CYGPATH -u "$windows_path"`
34227     new_path="$unix_path"
34228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34230     new_path="$unix_path"
34231   fi
34232 
34233   if test "x$path" != "x$new_path"; then
34234     FREETYPE_INCLUDE_PATH="$new_path"
34235     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34236 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34237   fi
34238 
34239   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34240   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34241 
34242   else
34243     # We're on a posix platform. Hooray! :)
34244     path="$FREETYPE_INCLUDE_PATH"
34245     has_space=`$ECHO "$path" | $GREP " "`
34246     if test "x$has_space" != x; then
34247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34248 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34249       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34250     fi
34251 
34252     # Use eval to expand a potential ~
34253     eval path="$path"
34254     if test ! -f "$path" && test ! -d "$path"; then
34255       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34256     fi
34257 
34258     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34259   fi
34260 
34261       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34262         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34263       else
34264         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34265       fi
34266     fi
34267 
34268     if test "x$FREETYPE_LIBS" = x; then
34269 
34270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34271 
34272   # Input might be given as Windows format, start by converting to
34273   # unix format.
34274   path="$FREETYPE_LIB_PATH"
34275   new_path=`$CYGPATH -u "$path"`
34276 
34277   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34278   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34279   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34280   # "foo.exe" is OK but "foo" is an error.
34281   #
34282   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34283   # It is also a way to make sure we got the proper file name for the real test later on.
34284   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34285   if test "x$test_shortpath" = x; then
34286     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34287 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34288     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34289   fi
34290 
34291   # Call helper function which possibly converts this using DOS-style short mode.
34292   # If so, the updated path is stored in $new_path.
34293 
34294   input_path="$new_path"
34295   # Check if we need to convert this using DOS-style short mode. If the path
34296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34297   # take no chances and rewrite it.
34298   # Note: m4 eats our [], so we need to use [ and ] instead.
34299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34300   if test "x$has_forbidden_chars" != x; then
34301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34302     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34303     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34304     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34305       # Going to short mode and back again did indeed matter. Since short mode is
34306       # case insensitive, let's make it lowercase to improve readability.
34307       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34308       # Now convert it back to Unix-stile (cygpath)
34309       input_path=`$CYGPATH -u "$shortmode_path"`
34310       new_path="$input_path"
34311     fi
34312   fi
34313 
34314   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34315   if test "x$test_cygdrive_prefix" = x; then
34316     # As a simple fix, exclude /usr/bin since it's not a real path.
34317     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34318       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34319       # a path prefixed by /cygdrive for fixpath to work.
34320       new_path="$CYGWIN_ROOT_PATH$input_path"
34321     fi
34322   fi
34323 
34324 
34325   if test "x$path" != "x$new_path"; then
34326     FREETYPE_LIB_PATH="$new_path"
34327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34328 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34329   fi
34330 
34331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34332 
34333   path="$FREETYPE_LIB_PATH"
34334   has_colon=`$ECHO $path | $GREP ^.:`
34335   new_path="$path"
34336   if test "x$has_colon" = x; then
34337     # Not in mixed or Windows style, start by that.
34338     new_path=`cmd //c echo $path`
34339   fi
34340 
34341 
34342   input_path="$new_path"
34343   # Check if we need to convert this using DOS-style short mode. If the path
34344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34345   # take no chances and rewrite it.
34346   # Note: m4 eats our [], so we need to use [ and ] instead.
34347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34348   if test "x$has_forbidden_chars" != x; then
34349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34350     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34351   fi
34352 
34353 
34354   windows_path="$new_path"
34355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34356     unix_path=`$CYGPATH -u "$windows_path"`
34357     new_path="$unix_path"
34358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34360     new_path="$unix_path"
34361   fi
34362 
34363   if test "x$path" != "x$new_path"; then
34364     FREETYPE_LIB_PATH="$new_path"
34365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34366 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34367   fi
34368 
34369   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34370   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34371 
34372   else
34373     # We're on a posix platform. Hooray! :)
34374     path="$FREETYPE_LIB_PATH"
34375     has_space=`$ECHO "$path" | $GREP " "`
34376     if test "x$has_space" != x; then
34377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34378 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34379       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34380     fi
34381 
34382     # Use eval to expand a potential ~
34383     eval path="$path"
34384     if test ! -f "$path" && test ! -d "$path"; then
34385       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34386     fi
34387 
34388     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34389   fi
34390 
34391       if test "x$OPENJDK_TARGET_OS" = xwindows; then
34392         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34393       else
34394         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34395       fi
34396     fi
34397 
34398     # Try to compile it
34399     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34400 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
34401     ac_ext=cpp
34402 ac_cpp='$CXXCPP $CPPFLAGS'
34403 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34404 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34405 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34406 
34407     PREV_CXXCFLAGS="$CXXFLAGS"
34408     PREV_LIBS="$LIBS"
34409     PREV_CXX="$CXX"
34410     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34411     LIBS="$LIBS $FREETYPE_LIBS"
34412     CXX="$FIXPATH $CXX"
34413     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34414 /* end confdefs.h.  */
34415 
34416           #include<ft2build.h>
34417           #include FT_FREETYPE_H
34418           int main () {
34419             FT_Init_FreeType(NULL);
34420             return 0;
34421           }
34422 
34423 _ACEOF
34424 if ac_fn_cxx_try_link "$LINENO"; then :
34425 
34426           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34427 $as_echo "yes" >&6; }
34428 
34429 else
34430 
34431           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34432 $as_echo "no" >&6; }
34433           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34434 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34435           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34436 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34437 
34438 
34439   # Print a helpful message on how to acquire the necessary build dependency.
34440   # freetype is the help tag: freetype, cups, pulse, alsa etc
34441   MISSING_DEPENDENCY=freetype
34442 
34443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34444     cygwin_help $MISSING_DEPENDENCY
34445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34446     msys_help $MISSING_DEPENDENCY
34447   else
34448     PKGHANDLER_COMMAND=
34449 
34450     case $PKGHANDLER in
34451       apt-get)
34452         apt_help     $MISSING_DEPENDENCY ;;
34453       yum)
34454         yum_help     $MISSING_DEPENDENCY ;;
34455       port)
34456         port_help    $MISSING_DEPENDENCY ;;
34457       pkgutil)
34458         pkgutil_help $MISSING_DEPENDENCY ;;
34459       pkgadd)
34460         pkgadd_help  $MISSING_DEPENDENCY ;;
34461     esac
34462 
34463     if test "x$PKGHANDLER_COMMAND" != x; then
34464       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34465     fi
34466   fi
34467 
34468 
34469           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34470 
34471 
34472 fi
34473 rm -f core conftest.err conftest.$ac_objext \
34474     conftest$ac_exeext conftest.$ac_ext
34475     CXXCFLAGS="$PREV_CXXFLAGS"
34476     LIBS="$PREV_LIBS"
34477     CXX="$PREV_CXX"
34478     ac_ext=cpp
34479 ac_cpp='$CXXCPP $CPPFLAGS'
34480 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34481 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34482 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34483 
34484 
34485     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34486 $as_echo_n "checking if we should bundle freetype... " >&6; }
34487     if test "x$BUNDLE_FREETYPE" = xyes; then
34488       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34489     fi
34490     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34491 $as_echo "$BUNDLE_FREETYPE" >&6; }
34492 
34493   fi # end freetype needed
34494 
34495 
34496 
34497 
34498 
34499 
34500 
34501   ###############################################################################
34502   #
34503   # Check for alsa headers and libraries. Used on Linux/GNU systems.
34504   #
34505 
34506 # Check whether --with-alsa was given.
34507 if test "${with_alsa+set}" = set; then :
34508   withval=$with_alsa;
34509 fi
34510 
34511 
34512 # Check whether --with-alsa-include was given.
34513 if test "${with_alsa_include+set}" = set; then :
34514   withval=$with_alsa_include;
34515 fi
34516 
34517 
34518 # Check whether --with-alsa-lib was given.
34519 if test "${with_alsa_lib+set}" = set; then :
34520   withval=$with_alsa_lib;
34521 fi
34522 
34523 
34524   if test "x$ALSA_NOT_NEEDED" = xyes; then
34525     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34526       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34527 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34528     fi
34529     ALSA_CFLAGS=
34530     ALSA_LIBS=
34531   else
34532     ALSA_FOUND=no
34533 
34534     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34535       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34536     fi
34537 
34538     if test "x${with_alsa}" != x; then
34539       ALSA_LIBS="-L${with_alsa}/lib -lasound"
34540       ALSA_CFLAGS="-I${with_alsa}/include"
34541       ALSA_FOUND=yes
34542     fi
34543     if test "x${with_alsa_include}" != x; then
34544       ALSA_CFLAGS="-I${with_alsa_include}"
34545       ALSA_FOUND=yes
34546     fi
34547     if test "x${with_alsa_lib}" != x; then
34548       ALSA_LIBS="-L${with_alsa_lib} -lasound"
34549       ALSA_FOUND=yes
34550     fi
34551     if test "x$ALSA_FOUND" = xno; then
34552 
34553 
34554   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34555     # Source the builddeps file again, to make sure it uses the latest variables!
34556     . $builddepsfile
34557     # Look for a target and build machine specific resource!
34558     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34559     if test "x$resource" = x; then
34560       # Ok, lets instead look for a target specific resource
34561       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34562     fi
34563     if test "x$resource" = x; then
34564       # Ok, lets instead look for a build specific resource
34565       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34566     fi
34567     if test "x$resource" = x; then
34568       # Ok, lets instead look for a generic resource
34569       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34570       resource=${builddep_alsa}
34571     fi
34572     if test "x$resource" != x; then
34573       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34574 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34575       # If the resource in the builddeps.conf file is an existing directory,
34576       # for example /java/linux/cups
34577       if test -d ${resource}; then
34578         depdir=${resource}
34579       else
34580 
34581   # alsa is for example mymodule
34582   # $resource is for example libs/general/libmymod_1_2_3.zip
34583   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34584   # $with_builddeps_dir is for example /localhome/builddeps
34585   # depdir is the name of the variable into which we store the depdir, eg MYMOD
34586   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34587   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34588   filename=`basename $resource`
34589   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34590   filebase=${filename%%.*}
34591   extension=${filename#*.}
34592   installdir=$with_builddeps_dir/$filebase
34593   if test ! -f $installdir/$filename.unpacked; then
34594     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34595 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34596     if test ! -d $installdir; then
34597       mkdir -p $installdir
34598     fi
34599     if test ! -d $installdir; then
34600       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34601     fi
34602     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34603     touch $tmpfile
34604     if test ! -f $tmpfile; then
34605       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34606     fi
34607 
34608   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34609   # $tmpfile is the local file name for the downloaded file.
34610   VALID_TOOL=no
34611   if test "x$BDEPS_FTP" = xwget; then
34612     VALID_TOOL=yes
34613     wget -O $tmpfile $with_builddeps_server/$resource
34614   fi
34615   if test "x$BDEPS_FTP" = xlftp; then
34616     VALID_TOOL=yes
34617     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34618   fi
34619   if test "x$BDEPS_FTP" = xftp; then
34620     VALID_TOOL=yes
34621     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34622     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34623     FTPUSERPWD=${FTPSERVER%%@*}
34624     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34625       FTPUSER=${userpwd%%:*}
34626       FTPPWD=${userpwd#*@}
34627       FTPSERVER=${FTPSERVER#*@}
34628     else
34629       FTPUSER=ftp
34630       FTPPWD=ftp
34631     fi
34632     # the "pass" command does not work on some
34633     # ftp clients (read ftp.exe) but if it works,
34634     # passive mode is better!
34635     ( \
34636         echo "user $FTPUSER $FTPPWD"        ; \
34637         echo "pass"                         ; \
34638         echo "bin"                          ; \
34639         echo "get $FTPPATH $tmpfile"              ; \
34640     ) | ftp -in $FTPSERVER
34641   fi
34642   if test "x$VALID_TOOL" != xyes; then
34643     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34644   fi
34645 
34646     mv $tmpfile $installdir/$filename
34647     if test ! -s $installdir/$filename; then
34648       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34649     fi
34650     case "$extension" in
34651       zip)  echo "Unzipping $installdir/$filename..."
34652         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34653         ;;
34654       tar.gz) echo "Untaring $installdir/$filename..."
34655         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34656         ;;
34657       tgz) echo "Untaring $installdir/$filename..."
34658         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34659         ;;
34660       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34661         ;;
34662     esac
34663   fi
34664   if test -f $installdir/$filename.unpacked; then
34665     depdir=$installdir
34666   fi
34667 
34668       fi
34669       # Source the builddeps file again, because in the previous command, the depdir
34670       # was updated to point at the current build dependency install directory.
34671       . $builddepsfile
34672       # Now extract variables from the builddeps.conf files.
34673       theroot=${builddep_alsa_ROOT}
34674       thecflags=${builddep_alsa_CFLAGS}
34675       thelibs=${builddep_alsa_LIBS}
34676       if test "x$depdir" = x; then
34677         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34678       fi
34679       ALSA=$depdir
34680       if test "x$theroot" != x; then
34681         ALSA="$theroot"
34682       fi
34683       if test "x$thecflags" != x; then
34684         ALSA_CFLAGS="$thecflags"
34685       fi
34686       if test "x$thelibs" != x; then
34687         ALSA_LIBS="$thelibs"
34688       fi
34689       ALSA_FOUND=yes
34690       else ALSA_FOUND=no
34691 
34692     fi
34693     else ALSA_FOUND=no
34694 
34695   fi
34696 
34697     fi
34698     if test "x$ALSA_FOUND" = xno; then
34699 
34700 pkg_failed=no
34701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34702 $as_echo_n "checking for ALSA... " >&6; }
34703 
34704 if test -n "$ALSA_CFLAGS"; then
34705     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34706  elif test -n "$PKG_CONFIG"; then
34707     if test -n "$PKG_CONFIG" && \
34708     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34709   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34710   ac_status=$?
34711   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34712   test $ac_status = 0; }; then
34713   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34714 else
34715   pkg_failed=yes
34716 fi
34717  else
34718     pkg_failed=untried
34719 fi
34720 if test -n "$ALSA_LIBS"; then
34721     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34722  elif test -n "$PKG_CONFIG"; then
34723     if test -n "$PKG_CONFIG" && \
34724     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34725   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34726   ac_status=$?
34727   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34728   test $ac_status = 0; }; then
34729   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34730 else
34731   pkg_failed=yes
34732 fi
34733  else
34734     pkg_failed=untried
34735 fi
34736 
34737 
34738 
34739 if test $pkg_failed = yes; then
34740 
34741 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34742         _pkg_short_errors_supported=yes
34743 else
34744         _pkg_short_errors_supported=no
34745 fi
34746         if test $_pkg_short_errors_supported = yes; then
34747                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34748         else
34749                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34750         fi
34751         # Put the nasty error message in config.log where it belongs
34752         echo "$ALSA_PKG_ERRORS" >&5
34753 
34754         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34755 $as_echo "no" >&6; }
34756                 ALSA_FOUND=no
34757 elif test $pkg_failed = untried; then
34758         ALSA_FOUND=no
34759 else
34760         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34761         ALSA_LIBS=$pkg_cv_ALSA_LIBS
34762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34763 $as_echo "yes" >&6; }
34764         ALSA_FOUND=yes
34765 fi
34766     fi
34767     if test "x$ALSA_FOUND" = xno; then
34768       for ac_header in alsa/asoundlib.h
34769 do :
34770   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34771 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34772   cat >>confdefs.h <<_ACEOF
34773 #define HAVE_ALSA_ASOUNDLIB_H 1
34774 _ACEOF
34775 
34776             ALSA_FOUND=yes
34777             ALSA_CFLAGS=-Iignoreme
34778             ALSA_LIBS=-lasound
34779             DEFAULT_ALSA=yes
34780 
34781 else
34782   ALSA_FOUND=no
34783 fi
34784 
34785 done
34786 
34787     fi
34788     if test "x$ALSA_FOUND" = xno; then
34789 
34790   # Print a helpful message on how to acquire the necessary build dependency.
34791   # alsa is the help tag: freetype, cups, pulse, alsa etc
34792   MISSING_DEPENDENCY=alsa
34793 
34794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34795     cygwin_help $MISSING_DEPENDENCY
34796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34797     msys_help $MISSING_DEPENDENCY
34798   else
34799     PKGHANDLER_COMMAND=
34800 
34801     case $PKGHANDLER in
34802       apt-get)
34803         apt_help     $MISSING_DEPENDENCY ;;
34804       yum)
34805         yum_help     $MISSING_DEPENDENCY ;;
34806       port)
34807         port_help    $MISSING_DEPENDENCY ;;
34808       pkgutil)
34809         pkgutil_help $MISSING_DEPENDENCY ;;
34810       pkgadd)
34811         pkgadd_help  $MISSING_DEPENDENCY ;;
34812     esac
34813 
34814     if test "x$PKGHANDLER_COMMAND" != x; then
34815       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34816     fi
34817   fi
34818 
34819       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34820     fi
34821   fi
34822 
34823 
34824 
34825 
34826 
34827 
34828   ###############################################################################
34829   #
34830   # Check for the jpeg library
34831   #
34832 
34833   USE_EXTERNAL_LIBJPEG=true
34834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34835 $as_echo_n "checking for main in -ljpeg... " >&6; }
34836 if ${ac_cv_lib_jpeg_main+:} false; then :
34837   $as_echo_n "(cached) " >&6
34838 else
34839   ac_check_lib_save_LIBS=$LIBS
34840 LIBS="-ljpeg  $LIBS"
34841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34842 /* end confdefs.h.  */
34843 
34844 
34845 int
34846 main ()
34847 {
34848 return main ();
34849   ;
34850   return 0;
34851 }
34852 _ACEOF
34853 if ac_fn_cxx_try_link "$LINENO"; then :
34854   ac_cv_lib_jpeg_main=yes
34855 else
34856   ac_cv_lib_jpeg_main=no
34857 fi
34858 rm -f core conftest.err conftest.$ac_objext \
34859     conftest$ac_exeext conftest.$ac_ext
34860 LIBS=$ac_check_lib_save_LIBS
34861 fi
34862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34863 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
34864 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34865   cat >>confdefs.h <<_ACEOF
34866 #define HAVE_LIBJPEG 1
34867 _ACEOF
34868 
34869   LIBS="-ljpeg $LIBS"
34870 
34871 else
34872    USE_EXTERNAL_LIBJPEG=false
34873       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34874 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34875 
34876 fi
34877 
34878 
34879 
34880   ###############################################################################
34881   #
34882   # Check for the gif library
34883   #
34884 
34885 
34886 # Check whether --with-giflib was given.
34887 if test "${with_giflib+set}" = set; then :
34888   withval=$with_giflib;
34889 fi
34890 
34891 
34892 
34893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34894 $as_echo_n "checking for which giflib to use... " >&6; }
34895 
34896   # default is bundled
34897   DEFAULT_GIFLIB=bundled
34898 
34899   #
34900   # if user didn't specify, use DEFAULT_GIFLIB
34901   #
34902   if test "x${with_giflib}" = "x"; then
34903     with_giflib=${DEFAULT_GIFLIB}
34904   fi
34905 
34906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34907 $as_echo "${with_giflib}" >&6; }
34908 
34909   if test "x${with_giflib}" = "xbundled"; then
34910     USE_EXTERNAL_LIBGIF=false
34911   elif test "x${with_giflib}" = "xsystem"; then
34912     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34913 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34914 
34915 else
34916    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34917 fi
34918 
34919 
34920     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34921 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34922 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34923   $as_echo_n "(cached) " >&6
34924 else
34925   ac_check_lib_save_LIBS=$LIBS
34926 LIBS="-lgif  $LIBS"
34927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34928 /* end confdefs.h.  */
34929 
34930 /* Override any GCC internal prototype to avoid an error.
34931    Use char because int might match the return type of a GCC
34932    builtin and then its argument prototype would still apply.  */
34933 #ifdef __cplusplus
34934 extern "C"
34935 #endif
34936 char DGifGetCode ();
34937 int
34938 main ()
34939 {
34940 return DGifGetCode ();
34941   ;
34942   return 0;
34943 }
34944 _ACEOF
34945 if ac_fn_cxx_try_link "$LINENO"; then :
34946   ac_cv_lib_gif_DGifGetCode=yes
34947 else
34948   ac_cv_lib_gif_DGifGetCode=no
34949 fi
34950 rm -f core conftest.err conftest.$ac_objext \
34951     conftest$ac_exeext conftest.$ac_ext
34952 LIBS=$ac_check_lib_save_LIBS
34953 fi
34954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34955 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34956 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34957   cat >>confdefs.h <<_ACEOF
34958 #define HAVE_LIBGIF 1
34959 _ACEOF
34960 
34961   LIBS="-lgif $LIBS"
34962 
34963 else
34964    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34965 fi
34966 
34967 
34968     USE_EXTERNAL_LIBGIF=true
34969   else
34970     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34971   fi
34972 
34973 
34974   ###############################################################################
34975   #
34976   # Check for the zlib library
34977   #
34978 
34979 
34980 # Check whether --with-zlib was given.
34981 if test "${with_zlib+set}" = set; then :
34982   withval=$with_zlib;
34983 fi
34984 
34985 
34986   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34987 $as_echo_n "checking for compress in -lz... " >&6; }
34988 if ${ac_cv_lib_z_compress+:} false; then :
34989   $as_echo_n "(cached) " >&6
34990 else
34991   ac_check_lib_save_LIBS=$LIBS
34992 LIBS="-lz  $LIBS"
34993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34994 /* end confdefs.h.  */
34995 
34996 /* Override any GCC internal prototype to avoid an error.
34997    Use char because int might match the return type of a GCC
34998    builtin and then its argument prototype would still apply.  */
34999 #ifdef __cplusplus
35000 extern "C"
35001 #endif
35002 char compress ();
35003 int
35004 main ()
35005 {
35006 return compress ();
35007   ;
35008   return 0;
35009 }
35010 _ACEOF
35011 if ac_fn_cxx_try_link "$LINENO"; then :
35012   ac_cv_lib_z_compress=yes
35013 else
35014   ac_cv_lib_z_compress=no
35015 fi
35016 rm -f core conftest.err conftest.$ac_objext \
35017     conftest$ac_exeext conftest.$ac_ext
35018 LIBS=$ac_check_lib_save_LIBS
35019 fi
35020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35021 $as_echo "$ac_cv_lib_z_compress" >&6; }
35022 if test "x$ac_cv_lib_z_compress" = xyes; then :
35023    ZLIB_FOUND=yes
35024 else
35025    ZLIB_FOUND=no
35026 fi
35027 
35028 
35029   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35030 $as_echo_n "checking for which zlib to use... " >&6; }
35031 
35032   DEFAULT_ZLIB=bundled
35033   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35034     #
35035     # On macosx default is system...on others default is
35036     #
35037     DEFAULT_ZLIB=system
35038   fi
35039 
35040   if test "x${ZLIB_FOUND}" != "xyes"; then
35041     #
35042     # If we don't find any system...set default to bundled
35043     #
35044     DEFAULT_ZLIB=bundled
35045   fi
35046 
35047   #
35048   # If user didn't specify, use DEFAULT_ZLIB
35049   #
35050   if test "x${with_zlib}" = "x"; then
35051     with_zlib=${DEFAULT_ZLIB}
35052   fi
35053 
35054   if test "x${with_zlib}" = "xbundled"; then
35055     USE_EXTERNAL_LIBZ=false
35056     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35057 $as_echo "bundled" >&6; }
35058   elif test "x${with_zlib}" = "xsystem"; then
35059     if test "x${ZLIB_FOUND}" = "xyes"; then
35060       USE_EXTERNAL_LIBZ=true
35061       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35062 $as_echo "system" >&6; }
35063     else
35064       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35065 $as_echo "system not found" >&6; }
35066       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35067     fi
35068   else
35069     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35070   fi
35071 
35072 
35073 
35074   ###############################################################################
35075   LIBZIP_CAN_USE_MMAP=true
35076 
35077 
35078 
35079   ###############################################################################
35080   #
35081   # Check if altzone exists in time.h
35082   #
35083 
35084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35085 /* end confdefs.h.  */
35086 #include <time.h>
35087 int
35088 main ()
35089 {
35090 return (int)altzone;
35091   ;
35092   return 0;
35093 }
35094 _ACEOF
35095 if ac_fn_cxx_try_link "$LINENO"; then :
35096   has_altzone=yes
35097 else
35098   has_altzone=no
35099 fi
35100 rm -f core conftest.err conftest.$ac_objext \
35101     conftest$ac_exeext conftest.$ac_ext
35102   if test "x$has_altzone" = xyes; then
35103 
35104 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35105 
35106   fi
35107 
35108   ###############################################################################
35109   #
35110   # Check the maths library
35111   #
35112 
35113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35114 $as_echo_n "checking for cos in -lm... " >&6; }
35115 if ${ac_cv_lib_m_cos+:} false; then :
35116   $as_echo_n "(cached) " >&6
35117 else
35118   ac_check_lib_save_LIBS=$LIBS
35119 LIBS="-lm  $LIBS"
35120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35121 /* end confdefs.h.  */
35122 
35123 /* Override any GCC internal prototype to avoid an error.
35124    Use char because int might match the return type of a GCC
35125    builtin and then its argument prototype would still apply.  */
35126 #ifdef __cplusplus
35127 extern "C"
35128 #endif
35129 char cos ();
35130 int
35131 main ()
35132 {
35133 return cos ();
35134   ;
35135   return 0;
35136 }
35137 _ACEOF
35138 if ac_fn_cxx_try_link "$LINENO"; then :
35139   ac_cv_lib_m_cos=yes
35140 else
35141   ac_cv_lib_m_cos=no
35142 fi
35143 rm -f core conftest.err conftest.$ac_objext \
35144     conftest$ac_exeext conftest.$ac_ext
35145 LIBS=$ac_check_lib_save_LIBS
35146 fi
35147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35148 $as_echo "$ac_cv_lib_m_cos" >&6; }
35149 if test "x$ac_cv_lib_m_cos" = xyes; then :
35150   cat >>confdefs.h <<_ACEOF
35151 #define HAVE_LIBM 1
35152 _ACEOF
35153 
35154   LIBS="-lm $LIBS"
35155 
35156 else
35157 
35158         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35159 $as_echo "$as_me: Maths library was not found" >&6;}
35160 
35161 
35162 fi
35163 
35164 
35165 
35166   ###############################################################################
35167   #
35168   # Check for libdl.so
35169 
35170   save_LIBS="$LIBS"
35171   LIBS=""
35172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35173 $as_echo_n "checking for dlopen in -ldl... " >&6; }
35174 if ${ac_cv_lib_dl_dlopen+:} false; then :
35175   $as_echo_n "(cached) " >&6
35176 else
35177   ac_check_lib_save_LIBS=$LIBS
35178 LIBS="-ldl  $LIBS"
35179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35180 /* end confdefs.h.  */
35181 
35182 /* Override any GCC internal prototype to avoid an error.
35183    Use char because int might match the return type of a GCC
35184    builtin and then its argument prototype would still apply.  */
35185 #ifdef __cplusplus
35186 extern "C"
35187 #endif
35188 char dlopen ();
35189 int
35190 main ()
35191 {
35192 return dlopen ();
35193   ;
35194   return 0;
35195 }
35196 _ACEOF
35197 if ac_fn_cxx_try_link "$LINENO"; then :
35198   ac_cv_lib_dl_dlopen=yes
35199 else
35200   ac_cv_lib_dl_dlopen=no
35201 fi
35202 rm -f core conftest.err conftest.$ac_objext \
35203     conftest$ac_exeext conftest.$ac_ext
35204 LIBS=$ac_check_lib_save_LIBS
35205 fi
35206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35207 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35208 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35209   cat >>confdefs.h <<_ACEOF
35210 #define HAVE_LIBDL 1
35211 _ACEOF
35212 
35213   LIBS="-ldl $LIBS"
35214 
35215 fi
35216 
35217   LIBDL="$LIBS"
35218 
35219   LIBS="$save_LIBS"
35220 
35221 
35222   ###############################################################################
35223   #
35224   # statically link libstdc++ before C++ ABI is stablized on Linux unless
35225   # dynamic build is configured on command line.
35226   #
35227 
35228 # Check whether --with-stdc++lib was given.
35229 if test "${with_stdc__lib+set}" = set; then :
35230   withval=$with_stdc__lib;
35231         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35232                 && test "x$with_stdc__lib" != xdefault; then
35233           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35234         fi
35235 
35236 else
35237   with_stdc__lib=default
35238 
35239 fi
35240 
35241 
35242   if test "x$OPENJDK_TARGET_OS" = xlinux; then
35243     # Test if -lstdc++ works.
35244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35245 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35246     ac_ext=cpp
35247 ac_cpp='$CXXCPP $CPPFLAGS'
35248 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35249 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35250 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35251 
35252     OLD_CXXFLAGS="$CXXFLAGS"
35253     CXXFLAGS="$CXXFLAGS -lstdc++"
35254     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35255 /* end confdefs.h.  */
35256 
35257 int
35258 main ()
35259 {
35260 return 0;
35261   ;
35262   return 0;
35263 }
35264 _ACEOF
35265 if ac_fn_cxx_try_link "$LINENO"; then :
35266   has_dynamic_libstdcxx=yes
35267 else
35268   has_dynamic_libstdcxx=no
35269 fi
35270 rm -f core conftest.err conftest.$ac_objext \
35271     conftest$ac_exeext conftest.$ac_ext
35272     CXXFLAGS="$OLD_CXXFLAGS"
35273     ac_ext=cpp
35274 ac_cpp='$CXXCPP $CPPFLAGS'
35275 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35276 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35277 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35278 
35279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35280 $as_echo "$has_dynamic_libstdcxx" >&6; }
35281 
35282     # Test if stdc++ can be linked statically.
35283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35284 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35285     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35286     ac_ext=cpp
35287 ac_cpp='$CXXCPP $CPPFLAGS'
35288 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35289 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35290 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35291 
35292     OLD_LIBS="$LIBS"
35293     OLD_CXX="$CXX"
35294     LIBS="$STATIC_STDCXX_FLAGS"
35295     CXX="$CC"
35296     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35297 /* end confdefs.h.  */
35298 
35299 int
35300 main ()
35301 {
35302 return 0;
35303   ;
35304   return 0;
35305 }
35306 _ACEOF
35307 if ac_fn_cxx_try_link "$LINENO"; then :
35308   has_static_libstdcxx=yes
35309 else
35310   has_static_libstdcxx=no
35311 fi
35312 rm -f core conftest.err conftest.$ac_objext \
35313     conftest$ac_exeext conftest.$ac_ext
35314     LIBS="$OLD_LIBS"
35315     CXX="$OLD_CXX"
35316     ac_ext=cpp
35317 ac_cpp='$CXXCPP $CPPFLAGS'
35318 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35319 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35320 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35321 
35322     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35323 $as_echo "$has_static_libstdcxx" >&6; }
35324 
35325     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35326       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35327     fi
35328 
35329     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35330       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35331     fi
35332 
35333     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35334       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35335     fi
35336 
35337     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35338 $as_echo_n "checking how to link with libstdc++... " >&6; }
35339     # If dynamic was requested, it's available since it would fail above otherwise.
35340     # If dynamic wasn't requested, go with static unless it isn't available.
35341     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35342       LIBCXX="$LIBCXX -lstdc++"
35343       LDCXX="$CXX"
35344       STATIC_CXX_SETTING="STATIC_CXX=false"
35345       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35346 $as_echo "dynamic" >&6; }
35347     else
35348       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35349       LDCXX="$CC"
35350       STATIC_CXX_SETTING="STATIC_CXX=true"
35351       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35352 $as_echo "static" >&6; }
35353     fi
35354   fi
35355 
35356 
35357   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35358     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35359 
35360 pkg_failed=no
35361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35362 $as_echo_n "checking for LIBFFI... " >&6; }
35363 
35364 if test -n "$LIBFFI_CFLAGS"; then
35365     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35366  elif test -n "$PKG_CONFIG"; then
35367     if test -n "$PKG_CONFIG" && \
35368     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35369   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35370   ac_status=$?
35371   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35372   test $ac_status = 0; }; then
35373   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35374 else
35375   pkg_failed=yes
35376 fi
35377  else
35378     pkg_failed=untried
35379 fi
35380 if test -n "$LIBFFI_LIBS"; then
35381     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35382  elif test -n "$PKG_CONFIG"; then
35383     if test -n "$PKG_CONFIG" && \
35384     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35385   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35386   ac_status=$?
35387   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35388   test $ac_status = 0; }; then
35389   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35390 else
35391   pkg_failed=yes
35392 fi
35393  else
35394     pkg_failed=untried
35395 fi
35396 
35397 
35398 
35399 if test $pkg_failed = yes; then
35400 
35401 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35402         _pkg_short_errors_supported=yes
35403 else
35404         _pkg_short_errors_supported=no
35405 fi
35406         if test $_pkg_short_errors_supported = yes; then
35407                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35408         else
35409                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35410         fi
35411         # Put the nasty error message in config.log where it belongs
35412         echo "$LIBFFI_PKG_ERRORS" >&5
35413 
35414         as_fn_error $? "Package requirements (libffi) were not met:
35415 
35416 $LIBFFI_PKG_ERRORS
35417 
35418 Consider adjusting the PKG_CONFIG_PATH environment variable if you
35419 installed software in a non-standard prefix.
35420 
35421 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35422 and LIBFFI_LIBS to avoid the need to call pkg-config.
35423 See the pkg-config man page for more details.
35424 " "$LINENO" 5
35425 elif test $pkg_failed = untried; then
35426         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35427 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35428 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35429 is in your PATH or set the PKG_CONFIG environment variable to the full
35430 path to pkg-config.
35431 
35432 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35433 and LIBFFI_LIBS to avoid the need to call pkg-config.
35434 See the pkg-config man page for more details.
35435 
35436 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35437 See \`config.log' for more details" "$LINENO" 5; }
35438 else
35439         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35440         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35441         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35442 $as_echo "yes" >&6; }
35443         :
35444 fi
35445 
35446   fi
35447 
35448   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35449     # Extract the first word of "llvm-config", so it can be a program name with args.
35450 set dummy llvm-config; ac_word=$2
35451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35452 $as_echo_n "checking for $ac_word... " >&6; }
35453 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35454   $as_echo_n "(cached) " >&6
35455 else
35456   if test -n "$LLVM_CONFIG"; then
35457   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35458 else
35459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35460 for as_dir in $PATH
35461 do
35462   IFS=$as_save_IFS
35463   test -z "$as_dir" && as_dir=.
35464     for ac_exec_ext in '' $ac_executable_extensions; do
35465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35466     ac_cv_prog_LLVM_CONFIG="llvm-config"
35467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35468     break 2
35469   fi
35470 done
35471   done
35472 IFS=$as_save_IFS
35473 
35474 fi
35475 fi
35476 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35477 if test -n "$LLVM_CONFIG"; then
35478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35479 $as_echo "$LLVM_CONFIG" >&6; }
35480 else
35481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35482 $as_echo "no" >&6; }
35483 fi
35484 
35485 
35486 
35487     if test "x$LLVM_CONFIG" != xllvm-config; then
35488       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35489     fi
35490 
35491     llvm_components="jit mcjit engine nativecodegen native"
35492     unset LLVM_CFLAGS
35493     for flag in $("$LLVM_CONFIG" --cxxflags); do
35494       if echo "${flag}" | grep -q '^-[ID]'; then
35495         if test "${flag}" != "-D_DEBUG" ; then
35496           if test "${LLVM_CFLAGS}" != "" ; then
35497             LLVM_CFLAGS="${LLVM_CFLAGS} "
35498           fi
35499           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35500         fi
35501       fi
35502     done
35503     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35504     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35505 
35506     unset LLVM_LDFLAGS
35507     for flag in $("${LLVM_CONFIG}" --ldflags); do
35508       if echo "${flag}" | grep -q '^-L'; then
35509         if test "${LLVM_LDFLAGS}" != ""; then
35510           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35511         fi
35512         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35513       fi
35514     done
35515 
35516     unset LLVM_LIBS
35517     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35518       if echo "${flag}" | grep -q '^-l'; then
35519         if test "${LLVM_LIBS}" != ""; then
35520           LLVM_LIBS="${LLVM_LIBS} "
35521         fi
35522         LLVM_LIBS="${LLVM_LIBS}${flag}"
35523       fi
35524     done
35525 
35526 
35527 
35528 
35529   fi
35530 
35531   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35532   if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35533     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35534   fi
35535 
35536   # TODO better (platform agnostic) test
35537   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35538     LIBCXX="-lstdc++"
35539   fi
35540 
35541 
35542 
35543 
35544 
35545 ###############################################################################
35546 #
35547 # We need to do some final tweaking, when everything else is done.
35548 #
35549 ###############################################################################
35550 
35551 
35552   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35553 
35554 
35555   # The name of the Service Agent jar.
35556   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35557   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35558     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35559   fi
35560 
35561 
35562 
35563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35564 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35565 
35566     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35567       ENABLE_INTREE_EC=yes
35568       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35569 $as_echo "yes" >&6; }
35570     else
35571       ENABLE_INTREE_EC=no
35572       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35573 $as_echo "no" >&6; }
35574     fi
35575 
35576 
35577 
35578 
35579 ###############################################################################
35580 #
35581 # Configure parts of the build that only affect the build performance,
35582 # not the result.
35583 #
35584 ###############################################################################
35585 
35586 
35587   # How many cores do we have on this build system?
35588 
35589 # Check whether --with-num-cores was given.
35590 if test "${with_num_cores+set}" = set; then :
35591   withval=$with_num_cores;
35592 fi
35593 
35594   if test "x$with_num_cores" = x; then
35595     # The number of cores were not specified, try to probe them.
35596 
35597   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35598 $as_echo_n "checking for number of cores... " >&6; }
35599   NUM_CORES=1
35600   FOUND_CORES=no
35601 
35602   if test -f /proc/cpuinfo; then
35603     # Looks like a Linux (or cygwin) system
35604     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35605     FOUND_CORES=yes
35606   elif test -x /usr/sbin/psrinfo; then
35607     # Looks like a Solaris system
35608     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35609     FOUND_CORES=yes
35610   elif test -x /usr/sbin/system_profiler; then
35611     # Looks like a MacOSX system
35612     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35613     FOUND_CORES=yes
35614   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
35615     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
35616     FOUND_CORES=yes
35617   elif test -n "$NUMBER_OF_PROCESSORS"; then
35618     # On windows, look in the env
35619     NUM_CORES=$NUMBER_OF_PROCESSORS
35620     FOUND_CORES=yes
35621   fi
35622 
35623   if test "x$FOUND_CORES" = xyes; then
35624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35625 $as_echo "$NUM_CORES" >&6; }
35626   else
35627     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35628 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
35629     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35630 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35631   fi
35632 
35633   else
35634     NUM_CORES=$with_num_cores
35635   fi
35636 
35637 
35638 
35639   # How much memory do we have on this build system?
35640 
35641 # Check whether --with-memory-size was given.
35642 if test "${with_memory_size+set}" = set; then :
35643   withval=$with_memory_size;
35644 fi
35645 
35646   if test "x$with_memory_size" = x; then
35647     # The memory size was not specified, try to probe it.
35648 
35649   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35650 $as_echo_n "checking for memory size... " >&6; }
35651   # Default to 1024 MB
35652   MEMORY_SIZE=1024
35653   FOUND_MEM=no
35654 
35655   if test -f /proc/meminfo; then
35656     # Looks like a Linux (or cygwin) system
35657     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35658     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35659     FOUND_MEM=yes
35660   elif test -x /usr/sbin/prtconf; then
35661     # Looks like a Solaris or AIX system
35662     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
35663     FOUND_MEM=yes
35664   elif test -x /usr/sbin/system_profiler; then
35665     # Looks like a MacOSX system
35666     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35667     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35668     FOUND_MEM=yes
35669   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35670     # Windows, but without cygwin
35671     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35672     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35673     FOUND_MEM=yes
35674   fi
35675 
35676   if test "x$FOUND_MEM" = xyes; then
35677     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35678 $as_echo "$MEMORY_SIZE MB" >&6; }
35679   else
35680     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35681 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35682     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35683 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35684   fi
35685 
35686   else
35687     MEMORY_SIZE=$with_memory_size
35688   fi
35689 
35690 
35691 
35692   # Provide a decent default number of parallel jobs for make depending on
35693   # number of cores, amount of memory and machine architecture.
35694 
35695 # Check whether --with-jobs was given.
35696 if test "${with_jobs+set}" = set; then :
35697   withval=$with_jobs;
35698 fi
35699 
35700   if test "x$with_jobs" = x; then
35701     # Number of jobs was not specified, calculate.
35702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35703 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35704     # Approximate memory in GB, rounding up a bit.
35705     memory_gb=`expr $MEMORY_SIZE / 1100`
35706     # Pick the lowest of memory in gb and number of cores.
35707     if test "$memory_gb" -lt "$NUM_CORES"; then
35708       JOBS="$memory_gb"
35709     else
35710       JOBS="$NUM_CORES"
35711       # On bigger machines, leave some room for other processes to run
35712       if test "$JOBS" -gt "4"; then
35713         JOBS=`expr $JOBS '*' 90 / 100`
35714       fi
35715     fi
35716     # Cap number of jobs to 16
35717     if test "$JOBS" -gt "16"; then
35718       JOBS=16
35719     fi
35720     if test "$JOBS" -eq "0"; then
35721       JOBS=1
35722     fi
35723     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35724 $as_echo "$JOBS" >&6; }
35725   else
35726     JOBS=$with_jobs
35727   fi
35728 
35729 
35730 
35731 # Setup smart javac (after cores and memory have been setup)
35732 
35733 
35734 # Check whether --with-sjavac-server-java was given.
35735 if test "${with_sjavac_server_java+set}" = set; then :
35736   withval=$with_sjavac_server_java;
35737 fi
35738 
35739 
35740   if test "x$with_sjavac_server_java" != x; then
35741     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35742     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35743     if test "x$FOUND_VERSION" = x; then
35744       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35745     fi
35746   else
35747     SJAVAC_SERVER_JAVA=""
35748     # Hotspot specific options.
35749 
35750   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35751   $ECHO "Command: $JAVA -verbosegc -version" >&5
35752   OUTPUT=`$JAVA -verbosegc -version 2>&1`
35753   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35754   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35755   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35756     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35757     JVM_ARG_OK=true
35758   else
35759     $ECHO "Arg failed:" >&5
35760     $ECHO "$OUTPUT" >&5
35761     JVM_ARG_OK=false
35762   fi
35763 
35764     # JRockit specific options.
35765 
35766   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35767   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35768   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35769   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35770   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35771   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35772     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35773     JVM_ARG_OK=true
35774   else
35775     $ECHO "Arg failed:" >&5
35776     $ECHO "$OUTPUT" >&5
35777     JVM_ARG_OK=false
35778   fi
35779 
35780     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35781   fi
35782 
35783 
35784   if test "$MEMORY_SIZE" -gt "2500"; then
35785 
35786   $ECHO "Check if jvm arg is ok: -d64" >&5
35787   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35788   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -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 -d64"
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     if test "$JVM_ARG_OK" = true; then
35801       JVM_64BIT=true
35802       JVM_ARG_OK=false
35803     fi
35804   fi
35805 
35806   if test "$JVM_64BIT" = true; then
35807     if test "$MEMORY_SIZE" -gt "17000"; then
35808 
35809   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35810   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35811   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35812   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35813   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35814   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35815     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35816     JVM_ARG_OK=true
35817   else
35818     $ECHO "Arg failed:" >&5
35819     $ECHO "$OUTPUT" >&5
35820     JVM_ARG_OK=false
35821   fi
35822 
35823     fi
35824     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35825 
35826   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35827   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35828   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35829   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35830   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35831   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35832     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35833     JVM_ARG_OK=true
35834   else
35835     $ECHO "Arg failed:" >&5
35836     $ECHO "$OUTPUT" >&5
35837     JVM_ARG_OK=false
35838   fi
35839 
35840     fi
35841     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35842 
35843   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35844   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35845   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35846   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35847   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35848   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35849     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35850     JVM_ARG_OK=true
35851   else
35852     $ECHO "Arg failed:" >&5
35853     $ECHO "$OUTPUT" >&5
35854     JVM_ARG_OK=false
35855   fi
35856 
35857     fi
35858     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35859 
35860   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35861   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35862   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35863   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35864   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35865   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35866     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35867     JVM_ARG_OK=true
35868   else
35869     $ECHO "Arg failed:" >&5
35870     $ECHO "$OUTPUT" >&5
35871     JVM_ARG_OK=false
35872   fi
35873 
35874     fi
35875   fi
35876   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35877 
35878   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35879   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35880   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35881   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35882   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35883   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35884     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35885     JVM_ARG_OK=true
35886   else
35887     $ECHO "Arg failed:" >&5
35888     $ECHO "$OUTPUT" >&5
35889     JVM_ARG_OK=false
35890   fi
35891 
35892   fi
35893   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35894 
35895   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35896   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35897   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35898   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35899   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35900   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35901     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35902     JVM_ARG_OK=true
35903   else
35904     $ECHO "Arg failed:" >&5
35905     $ECHO "$OUTPUT" >&5
35906     JVM_ARG_OK=false
35907   fi
35908 
35909   fi
35910   if test "$JVM_ARG_OK" = false; then
35911 
35912   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35913   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35914   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35915   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35916   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35917   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35918     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35919     JVM_ARG_OK=true
35920   else
35921     $ECHO "Arg failed:" >&5
35922     $ECHO "$OUTPUT" >&5
35923     JVM_ARG_OK=false
35924   fi
35925 
35926   fi
35927 
35928   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35929 $as_echo_n "checking whether to use sjavac... " >&6; }
35930   # Check whether --enable-sjavac was given.
35931 if test "${enable_sjavac+set}" = set; then :
35932   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35933 else
35934   ENABLE_SJAVAC='no'
35935 fi
35936 
35937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35938 $as_echo "$ENABLE_SJAVAC" >&6; }
35939 
35940 
35941   if test "x$ENABLE_SJAVAC" = xyes; then
35942     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35943   else
35944     SJAVAC_SERVER_DIR=
35945   fi
35946 
35947 
35948 
35949 # Can the C/C++ compiler use precompiled headers?
35950 
35951 
35952   ###############################################################################
35953   #
35954   # Can the C/C++ compiler use precompiled headers?
35955   #
35956   # Check whether --enable-precompiled-headers was given.
35957 if test "${enable_precompiled_headers+set}" = set; then :
35958   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35959 else
35960   ENABLE_PRECOMPH=yes
35961 fi
35962 
35963 
35964   USE_PRECOMPILED_HEADER=1
35965   if test "x$ENABLE_PRECOMPH" = xno; then
35966     USE_PRECOMPILED_HEADER=0
35967   fi
35968 
35969   if test "x$ENABLE_PRECOMPH" = xyes; then
35970     # Check that the compiler actually supports precomp headers.
35971     if test "x$GCC" = xyes; then
35972       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35973 $as_echo_n "checking that precompiled headers work... " >&6; }
35974       echo "int alfa();" > conftest.h
35975       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35976       if test ! -f conftest.hpp.gch; then
35977         USE_PRECOMPILED_HEADER=0
35978         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35979 $as_echo "no" >&6; }
35980       else
35981         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35982 $as_echo "yes" >&6; }
35983       fi
35984       rm -f conftest.h conftest.hpp.gch
35985     fi
35986   fi
35987 
35988 
35989 
35990 
35991 # Setup use of ccache, if available
35992 
35993   # Check whether --enable-ccache was given.
35994 if test "${enable_ccache+set}" = set; then :
35995   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
35996 else
35997   ENABLE_CCACHE=yes
35998 fi
35999 
36000   if test "x$ENABLE_CCACHE" = xyes; then
36001     OLD_PATH="$PATH"
36002     if test "x$TOOLS_DIR" != x; then
36003       PATH=$TOOLS_DIR:$PATH
36004     fi
36005     # Extract the first word of "ccache", so it can be a program name with args.
36006 set dummy ccache; ac_word=$2
36007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36008 $as_echo_n "checking for $ac_word... " >&6; }
36009 if ${ac_cv_path_CCACHE+:} false; then :
36010   $as_echo_n "(cached) " >&6
36011 else
36012   case $CCACHE in
36013   [\\/]* | ?:[\\/]*)
36014   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
36015   ;;
36016   *)
36017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36018 for as_dir in $PATH
36019 do
36020   IFS=$as_save_IFS
36021   test -z "$as_dir" && as_dir=.
36022     for ac_exec_ext in '' $ac_executable_extensions; do
36023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36024     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36026     break 2
36027   fi
36028 done
36029   done
36030 IFS=$as_save_IFS
36031 
36032   ;;
36033 esac
36034 fi
36035 CCACHE=$ac_cv_path_CCACHE
36036 if test -n "$CCACHE"; then
36037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36038 $as_echo "$CCACHE" >&6; }
36039 else
36040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36041 $as_echo "no" >&6; }
36042 fi
36043 
36044 
36045     PATH="$OLD_PATH"
36046   else
36047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
36048 $as_echo_n "checking for ccache... " >&6; }
36049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
36050 $as_echo "explicitly disabled" >&6; }
36051     CCACHE=
36052   fi
36053 
36054 
36055 
36056 # Check whether --with-ccache-dir was given.
36057 if test "${with_ccache_dir+set}" = set; then :
36058   withval=$with_ccache_dir;
36059 fi
36060 
36061 
36062   if test "x$with_ccache_dir" != x; then
36063     # When using a non home ccache directory, assume the use is to share ccache files
36064     # with other users. Thus change the umask.
36065     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36066   fi
36067   CCACHE_FOUND=""
36068   if test "x$CCACHE" != x; then
36069 
36070   if test "x$CCACHE" != x; then
36071     CCACHE_FOUND="true"
36072     # Only use ccache if it is 3.1.4 or later, which supports
36073     # precompiled headers.
36074     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36075 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36076     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36077     if test "x$HAS_GOOD_CCACHE" = x; then
36078       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36079 $as_echo "no, disabling ccache" >&6; }
36080       CCACHE=
36081     else
36082       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36083 $as_echo "yes" >&6; }
36084       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36085 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36086       PUSHED_FLAGS="$CXXFLAGS"
36087       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36088       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36089 /* end confdefs.h.  */
36090 
36091 int
36092 main ()
36093 {
36094 
36095   ;
36096   return 0;
36097 }
36098 _ACEOF
36099 if ac_fn_cxx_try_compile "$LINENO"; then :
36100   CC_KNOWS_CCACHE_TRICK=yes
36101 else
36102   CC_KNOWS_CCACHE_TRICK=no
36103 fi
36104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36105       CXXFLAGS="$PUSHED_FLAGS"
36106       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36107         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36108 $as_echo "yes" >&6; }
36109       else
36110         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36111 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
36112         CCACHE=
36113       fi
36114     fi
36115   fi
36116 
36117   if test "x$CCACHE" != x; then
36118     CCACHE_SLOPPINESS=time_macros
36119     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36120     CCACHE_FLAGS=-fpch-preprocess
36121 
36122     if test "x$SET_CCACHE_DIR" != x; then
36123       mkdir -p $CCACHE_DIR > /dev/null 2>&1
36124       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36125     fi
36126   fi
36127 
36128   fi
36129 
36130 
36131 ###############################################################################
36132 #
36133 # And now the finish...
36134 #
36135 ###############################################################################
36136 
36137 # Check for some common pitfalls
36138 
36139   if test x"$OPENJDK_BUILD_OS" = xwindows; then
36140     file_to_test="$SRC_ROOT/LICENSE"
36141     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36142       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
36143     fi
36144   fi
36145 
36146 
36147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36148 $as_echo_n "checking if build directory is on local disk... " >&6; }
36149 
36150   # df -l lists only local disks; if the given directory is not found then
36151   # a non-zero exit code is given
36152   if test "x$DF" = x; then
36153     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36154       # msys does not have df; use Windows "net use" instead.
36155       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36156       if test "x$IS_NETWORK_DISK" = x; then
36157         OUTPUT_DIR_IS_LOCAL="yes"
36158       else
36159         OUTPUT_DIR_IS_LOCAL="no"
36160       fi
36161     else
36162       # No df here, say it's local
36163       OUTPUT_DIR_IS_LOCAL="yes"
36164     fi
36165   else
36166     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36167       OUTPUT_DIR_IS_LOCAL="yes"
36168     else
36169       OUTPUT_DIR_IS_LOCAL="no"
36170     fi
36171   fi
36172 
36173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36174 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36175 
36176 
36177 
36178   # Check if the user has any old-style ALT_ variables set.
36179   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36180 
36181   # Before generating output files, test if they exist. If they do, this is a reconfigure.
36182   # Since we can't properly handle the dependencies for this, warn the user about the situation
36183   if test -e $OUTPUT_ROOT/spec.gmk; then
36184     IS_RECONFIGURE=yes
36185   else
36186     IS_RECONFIGURE=no
36187   fi
36188 
36189   if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36190     HIDE_PERFORMANCE_HINTS=yes
36191   else
36192     HIDE_PERFORMANCE_HINTS=no
36193     # Hide it the next time around...
36194     $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36195   fi
36196 
36197 
36198 # At the end, call the custom hook. (Dummy macro if no custom sources available)
36199 
36200 
36201 # We're messing a bit with internal autoconf variables to put the config.status
36202 # in the output directory instead of the current directory.
36203 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36204 
36205 # Create the actual output files. Now the main work of configure is done.
36206 cat >confcache <<\_ACEOF
36207 # This file is a shell script that caches the results of configure
36208 # tests run on this system so they can be shared between configure
36209 # scripts and configure runs, see configure's option --config-cache.
36210 # It is not useful on other systems.  If it contains results you don't
36211 # want to keep, you may remove or edit it.
36212 #
36213 # config.status only pays attention to the cache file if you give it
36214 # the --recheck option to rerun configure.
36215 #
36216 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36217 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36218 # following values.
36219 
36220 _ACEOF
36221 
36222 # The following way of writing the cache mishandles newlines in values,
36223 # but we know of no workaround that is simple, portable, and efficient.
36224 # So, we kill variables containing newlines.
36225 # Ultrix sh set writes to stderr and can't be redirected directly,
36226 # and sets the high bit in the cache file unless we assign to the vars.
36227 (
36228   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36229     eval ac_val=\$$ac_var
36230     case $ac_val in #(
36231     *${as_nl}*)
36232       case $ac_var in #(
36233       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36234 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36235       esac
36236       case $ac_var in #(
36237       _ | IFS | as_nl) ;; #(
36238       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36239       *) { eval $ac_var=; unset $ac_var;} ;;
36240       esac ;;
36241     esac
36242   done
36243 
36244   (set) 2>&1 |
36245     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36246     *${as_nl}ac_space=\ *)
36247       # `set' does not quote correctly, so add quotes: double-quote
36248       # substitution turns \\\\ into \\, and sed turns \\ into \.
36249       sed -n \
36250         "s/'/'\\\\''/g;
36251           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36252       ;; #(
36253     *)
36254       # `set' quotes correctly as required by POSIX, so do not add quotes.
36255       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36256       ;;
36257     esac |
36258     sort
36259 ) |
36260   sed '
36261      /^ac_cv_env_/b end
36262      t clear
36263      :clear
36264      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36265      t end
36266      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36267      :end' >>confcache
36268 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36269   if test -w "$cache_file"; then
36270     if test "x$cache_file" != "x/dev/null"; then
36271       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36272 $as_echo "$as_me: updating cache $cache_file" >&6;}
36273       if test ! -f "$cache_file" || test -h "$cache_file"; then
36274         cat confcache >"$cache_file"
36275       else
36276         case $cache_file in #(
36277         */* | ?:*)
36278           mv -f confcache "$cache_file"$$ &&
36279           mv -f "$cache_file"$$ "$cache_file" ;; #(
36280         *)
36281           mv -f confcache "$cache_file" ;;
36282         esac
36283       fi
36284     fi
36285   else
36286     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36287 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36288   fi
36289 fi
36290 rm -f confcache
36291 
36292 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36293 # Let make expand exec_prefix.
36294 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36295 
36296 DEFS=-DHAVE_CONFIG_H
36297 
36298 ac_libobjs=
36299 ac_ltlibobjs=
36300 U=
36301 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36302   # 1. Remove the extension, and $U if already installed.
36303   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36304   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36305   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36306   #    will be set to the directory where LIBOBJS objects are built.
36307   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36308   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36309 done
36310 LIBOBJS=$ac_libobjs
36311 
36312 LTLIBOBJS=$ac_ltlibobjs
36313 
36314 
36315 
36316 : "${CONFIG_STATUS=./config.status}"
36317 ac_write_fail=0
36318 ac_clean_files_save=$ac_clean_files
36319 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36320 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36321 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36322 as_write_fail=0
36323 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36324 #! $SHELL
36325 # Generated by $as_me.
36326 # Run this file to recreate the current configuration.
36327 # Compiler output produced by configure, useful for debugging
36328 # configure, is in config.log if it exists.
36329 
36330 debug=false
36331 ac_cs_recheck=false
36332 ac_cs_silent=false
36333 
36334 SHELL=\${CONFIG_SHELL-$SHELL}
36335 export SHELL
36336 _ASEOF
36337 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36338 ## -------------------- ##
36339 ## M4sh Initialization. ##
36340 ## -------------------- ##
36341 
36342 # Be more Bourne compatible
36343 DUALCASE=1; export DUALCASE # for MKS sh
36344 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36345   emulate sh
36346   NULLCMD=:
36347   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36348   # is contrary to our usage.  Disable this feature.
36349   alias -g '${1+"$@"}'='"$@"'
36350   setopt NO_GLOB_SUBST
36351 else
36352   case `(set -o) 2>/dev/null` in #(
36353   *posix*) :
36354     set -o posix ;; #(
36355   *) :
36356      ;;
36357 esac
36358 fi
36359 
36360 
36361 as_nl='
36362 '
36363 export as_nl
36364 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36365 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36366 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36367 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36368 # Prefer a ksh shell builtin over an external printf program on Solaris,
36369 # but without wasting forks for bash or zsh.
36370 if test -z "$BASH_VERSION$ZSH_VERSION" \
36371     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36372   as_echo='print -r --'
36373   as_echo_n='print -rn --'
36374 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36375   as_echo='printf %s\n'
36376   as_echo_n='printf %s'
36377 else
36378   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36379     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36380     as_echo_n='/usr/ucb/echo -n'
36381   else
36382     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36383     as_echo_n_body='eval
36384       arg=$1;
36385       case $arg in #(
36386       *"$as_nl"*)
36387         expr "X$arg" : "X\\(.*\\)$as_nl";
36388         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36389       esac;
36390       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36391     '
36392     export as_echo_n_body
36393     as_echo_n='sh -c $as_echo_n_body as_echo'
36394   fi
36395   export as_echo_body
36396   as_echo='sh -c $as_echo_body as_echo'
36397 fi
36398 
36399 # The user is always right.
36400 if test "${PATH_SEPARATOR+set}" != set; then
36401   PATH_SEPARATOR=:
36402   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36403     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36404       PATH_SEPARATOR=';'
36405   }
36406 fi
36407 
36408 
36409 # IFS
36410 # We need space, tab and new line, in precisely that order.  Quoting is
36411 # there to prevent editors from complaining about space-tab.
36412 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36413 # splitting by setting IFS to empty value.)
36414 IFS=" ""        $as_nl"
36415 
36416 # Find who we are.  Look in the path if we contain no directory separator.
36417 as_myself=
36418 case $0 in #((
36419   *[\\/]* ) as_myself=$0 ;;
36420   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36421 for as_dir in $PATH
36422 do
36423   IFS=$as_save_IFS
36424   test -z "$as_dir" && as_dir=.
36425     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36426   done
36427 IFS=$as_save_IFS
36428 
36429      ;;
36430 esac
36431 # We did not find ourselves, most probably we were run as `sh COMMAND'
36432 # in which case we are not to be found in the path.
36433 if test "x$as_myself" = x; then
36434   as_myself=$0
36435 fi
36436 if test ! -f "$as_myself"; then
36437   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36438   exit 1
36439 fi
36440 
36441 # Unset variables that we do not need and which cause bugs (e.g. in
36442 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36443 # suppresses any "Segmentation fault" message there.  '((' could
36444 # trigger a bug in pdksh 5.2.14.
36445 for as_var in BASH_ENV ENV MAIL MAILPATH
36446 do eval test x\${$as_var+set} = xset \
36447   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36448 done
36449 PS1='$ '
36450 PS2='> '
36451 PS4='+ '
36452 
36453 # NLS nuisances.
36454 LC_ALL=C
36455 export LC_ALL
36456 LANGUAGE=C
36457 export LANGUAGE
36458 
36459 # CDPATH.
36460 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36461 
36462 
36463 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36464 # ----------------------------------------
36465 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36466 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36467 # script with STATUS, using 1 if that was 0.
36468 as_fn_error ()
36469 {
36470   as_status=$1; test $as_status -eq 0 && as_status=1
36471   if test "$4"; then
36472     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36473     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36474   fi
36475   $as_echo "$as_me: error: $2" >&2
36476   as_fn_exit $as_status
36477 } # as_fn_error
36478 
36479 
36480 # as_fn_set_status STATUS
36481 # -----------------------
36482 # Set $? to STATUS, without forking.
36483 as_fn_set_status ()
36484 {
36485   return $1
36486 } # as_fn_set_status
36487 
36488 # as_fn_exit STATUS
36489 # -----------------
36490 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36491 as_fn_exit ()
36492 {
36493   set +e
36494   as_fn_set_status $1
36495   exit $1
36496 } # as_fn_exit
36497 
36498 # as_fn_unset VAR
36499 # ---------------
36500 # Portably unset VAR.
36501 as_fn_unset ()
36502 {
36503   { eval $1=; unset $1;}
36504 }
36505 as_unset=as_fn_unset
36506 # as_fn_append VAR VALUE
36507 # ----------------------
36508 # Append the text in VALUE to the end of the definition contained in VAR. Take
36509 # advantage of any shell optimizations that allow amortized linear growth over
36510 # repeated appends, instead of the typical quadratic growth present in naive
36511 # implementations.
36512 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36513   eval 'as_fn_append ()
36514   {
36515     eval $1+=\$2
36516   }'
36517 else
36518   as_fn_append ()
36519   {
36520     eval $1=\$$1\$2
36521   }
36522 fi # as_fn_append
36523 
36524 # as_fn_arith ARG...
36525 # ------------------
36526 # Perform arithmetic evaluation on the ARGs, and store the result in the
36527 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36528 # must be portable across $(()) and expr.
36529 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36530   eval 'as_fn_arith ()
36531   {
36532     as_val=$(( $* ))
36533   }'
36534 else
36535   as_fn_arith ()
36536   {
36537     as_val=`expr "$@" || test $? -eq 1`
36538   }
36539 fi # as_fn_arith
36540 
36541 
36542 if expr a : '\(a\)' >/dev/null 2>&1 &&
36543    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36544   as_expr=expr
36545 else
36546   as_expr=false
36547 fi
36548 
36549 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36550   as_basename=basename
36551 else
36552   as_basename=false
36553 fi
36554 
36555 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36556   as_dirname=dirname
36557 else
36558   as_dirname=false
36559 fi
36560 
36561 as_me=`$as_basename -- "$0" ||
36562 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36563          X"$0" : 'X\(//\)$' \| \
36564          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36565 $as_echo X/"$0" |
36566     sed '/^.*\/\([^/][^/]*\)\/*$/{
36567             s//\1/
36568             q
36569           }
36570           /^X\/\(\/\/\)$/{
36571             s//\1/
36572             q
36573           }
36574           /^X\/\(\/\).*/{
36575             s//\1/
36576             q
36577           }
36578           s/.*/./; q'`
36579 
36580 # Avoid depending upon Character Ranges.
36581 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36582 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36583 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36584 as_cr_digits='0123456789'
36585 as_cr_alnum=$as_cr_Letters$as_cr_digits
36586 
36587 ECHO_C= ECHO_N= ECHO_T=
36588 case `echo -n x` in #(((((
36589 -n*)
36590   case `echo 'xy\c'` in
36591   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
36592   xy)  ECHO_C='\c';;
36593   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36594        ECHO_T=' ';;
36595   esac;;
36596 *)
36597   ECHO_N='-n';;
36598 esac
36599 
36600 rm -f conf$$ conf$$.exe conf$$.file
36601 if test -d conf$$.dir; then
36602   rm -f conf$$.dir/conf$$.file
36603 else
36604   rm -f conf$$.dir
36605   mkdir conf$$.dir 2>/dev/null
36606 fi
36607 if (echo >conf$$.file) 2>/dev/null; then
36608   if ln -s conf$$.file conf$$ 2>/dev/null; then
36609     as_ln_s='ln -s'
36610     # ... but there are two gotchas:
36611     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36612     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36613     # In both cases, we have to default to `cp -pR'.
36614     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36615       as_ln_s='cp -pR'
36616   elif ln conf$$.file conf$$ 2>/dev/null; then
36617     as_ln_s=ln
36618   else
36619     as_ln_s='cp -pR'
36620   fi
36621 else
36622   as_ln_s='cp -pR'
36623 fi
36624 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36625 rmdir conf$$.dir 2>/dev/null
36626 
36627 
36628 # as_fn_mkdir_p
36629 # -------------
36630 # Create "$as_dir" as a directory, including parents if necessary.
36631 as_fn_mkdir_p ()
36632 {
36633 
36634   case $as_dir in #(
36635   -*) as_dir=./$as_dir;;
36636   esac
36637   test -d "$as_dir" || eval $as_mkdir_p || {
36638     as_dirs=
36639     while :; do
36640       case $as_dir in #(
36641       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36642       *) as_qdir=$as_dir;;
36643       esac
36644       as_dirs="'$as_qdir' $as_dirs"
36645       as_dir=`$as_dirname -- "$as_dir" ||
36646 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36647          X"$as_dir" : 'X\(//\)[^/]' \| \
36648          X"$as_dir" : 'X\(//\)$' \| \
36649          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36650 $as_echo X"$as_dir" |
36651     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36652             s//\1/
36653             q
36654           }
36655           /^X\(\/\/\)[^/].*/{
36656             s//\1/
36657             q
36658           }
36659           /^X\(\/\/\)$/{
36660             s//\1/
36661             q
36662           }
36663           /^X\(\/\).*/{
36664             s//\1/
36665             q
36666           }
36667           s/.*/./; q'`
36668       test -d "$as_dir" && break
36669     done
36670     test -z "$as_dirs" || eval "mkdir $as_dirs"
36671   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36672 
36673 
36674 } # as_fn_mkdir_p
36675 if mkdir -p . 2>/dev/null; then
36676   as_mkdir_p='mkdir -p "$as_dir"'
36677 else
36678   test -d ./-p && rmdir ./-p
36679   as_mkdir_p=false
36680 fi
36681 
36682 
36683 # as_fn_executable_p FILE
36684 # -----------------------
36685 # Test if FILE is an executable regular file.
36686 as_fn_executable_p ()
36687 {
36688   test -f "$1" && test -x "$1"
36689 } # as_fn_executable_p
36690 as_test_x='test -x'
36691 as_executable_p=as_fn_executable_p
36692 
36693 # Sed expression to map a string onto a valid CPP name.
36694 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36695 
36696 # Sed expression to map a string onto a valid variable name.
36697 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36698 
36699 
36700 exec 6>&1
36701 ## ----------------------------------- ##
36702 ## Main body of $CONFIG_STATUS script. ##
36703 ## ----------------------------------- ##
36704 _ASEOF
36705 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36706 
36707 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36708 # Save the log message, to keep $0 and so on meaningful, and to
36709 # report actual input values of CONFIG_FILES etc. instead of their
36710 # values after options handling.
36711 ac_log="
36712 This file was extended by OpenJDK $as_me jdk8, which was
36713 generated by GNU Autoconf 2.69.  Invocation command line was
36714 
36715   CONFIG_FILES    = $CONFIG_FILES
36716   CONFIG_HEADERS  = $CONFIG_HEADERS
36717   CONFIG_LINKS    = $CONFIG_LINKS
36718   CONFIG_COMMANDS = $CONFIG_COMMANDS
36719   $ $0 $@
36720 
36721 on `(hostname || uname -n) 2>/dev/null | sed 1q`
36722 "
36723 
36724 _ACEOF
36725 
36726 case $ac_config_files in *"
36727 "*) set x $ac_config_files; shift; ac_config_files=$*;;
36728 esac
36729 
36730 case $ac_config_headers in *"
36731 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36732 esac
36733 
36734 
36735 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36736 # Files that config.status was made for.
36737 config_files="$ac_config_files"
36738 config_headers="$ac_config_headers"
36739 
36740 _ACEOF
36741 
36742 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36743 ac_cs_usage="\
36744 \`$as_me' instantiates files and other configuration actions
36745 from templates according to the current configuration.  Unless the files
36746 and actions are specified as TAGs, all are instantiated by default.
36747 
36748 Usage: $0 [OPTION]... [TAG]...
36749 
36750   -h, --help       print this help, then exit
36751   -V, --version    print version number and configuration settings, then exit
36752       --config     print configuration, then exit
36753   -q, --quiet, --silent
36754                    do not print progress messages
36755   -d, --debug      don't remove temporary files
36756       --recheck    update $as_me by reconfiguring in the same conditions
36757       --file=FILE[:TEMPLATE]
36758                    instantiate the configuration file FILE
36759       --header=FILE[:TEMPLATE]
36760                    instantiate the configuration header FILE
36761 
36762 Configuration files:
36763 $config_files
36764 
36765 Configuration headers:
36766 $config_headers
36767 
36768 Report bugs to <build-dev@openjdk.java.net>.
36769 OpenJDK home page: <http://openjdk.java.net>."
36770 
36771 _ACEOF
36772 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36773 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36774 ac_cs_version="\\
36775 OpenJDK config.status jdk8
36776 configured by $0, generated by GNU Autoconf 2.69,
36777   with options \\"\$ac_cs_config\\"
36778 
36779 Copyright (C) 2012 Free Software Foundation, Inc.
36780 This config.status script is free software; the Free Software Foundation
36781 gives unlimited permission to copy, distribute and modify it."
36782 
36783 ac_pwd='$ac_pwd'
36784 srcdir='$srcdir'
36785 AWK='$AWK'
36786 test -n "\$AWK" || AWK=awk
36787 _ACEOF
36788 
36789 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36790 # The default lists apply if the user does not specify any file.
36791 ac_need_defaults=:
36792 while test $# != 0
36793 do
36794   case $1 in
36795   --*=?*)
36796     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36797     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36798     ac_shift=:
36799     ;;
36800   --*=)
36801     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36802     ac_optarg=
36803     ac_shift=:
36804     ;;
36805   *)
36806     ac_option=$1
36807     ac_optarg=$2
36808     ac_shift=shift
36809     ;;
36810   esac
36811 
36812   case $ac_option in
36813   # Handling of the options.
36814   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36815     ac_cs_recheck=: ;;
36816   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36817     $as_echo "$ac_cs_version"; exit ;;
36818   --config | --confi | --conf | --con | --co | --c )
36819     $as_echo "$ac_cs_config"; exit ;;
36820   --debug | --debu | --deb | --de | --d | -d )
36821     debug=: ;;
36822   --file | --fil | --fi | --f )
36823     $ac_shift
36824     case $ac_optarg in
36825     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36826     '') as_fn_error $? "missing file argument" ;;
36827     esac
36828     as_fn_append CONFIG_FILES " '$ac_optarg'"
36829     ac_need_defaults=false;;
36830   --header | --heade | --head | --hea )
36831     $ac_shift
36832     case $ac_optarg in
36833     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36834     esac
36835     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36836     ac_need_defaults=false;;
36837   --he | --h)
36838     # Conflict between --help and --header
36839     as_fn_error $? "ambiguous option: \`$1'
36840 Try \`$0 --help' for more information.";;
36841   --help | --hel | -h )
36842     $as_echo "$ac_cs_usage"; exit ;;
36843   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36844   | -silent | --silent | --silen | --sile | --sil | --si | --s)
36845     ac_cs_silent=: ;;
36846 
36847   # This is an error.
36848   -*) as_fn_error $? "unrecognized option: \`$1'
36849 Try \`$0 --help' for more information." ;;
36850 
36851   *) as_fn_append ac_config_targets " $1"
36852      ac_need_defaults=false ;;
36853 
36854   esac
36855   shift
36856 done
36857 
36858 ac_configure_extra_args=
36859 
36860 if $ac_cs_silent; then
36861   exec 6>/dev/null
36862   ac_configure_extra_args="$ac_configure_extra_args --silent"
36863 fi
36864 
36865 _ACEOF
36866 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36867 if \$ac_cs_recheck; then
36868   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36869   shift
36870   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36871   CONFIG_SHELL='$SHELL'
36872   export CONFIG_SHELL
36873   exec "\$@"
36874 fi
36875 
36876 _ACEOF
36877 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36878 exec 5>>config.log
36879 {
36880   echo
36881   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36882 ## Running $as_me. ##
36883 _ASBOX
36884   $as_echo "$ac_log"
36885 } >&5
36886 
36887 _ACEOF
36888 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36889 _ACEOF
36890 
36891 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36892 
36893 # Handling of arguments.
36894 for ac_config_target in $ac_config_targets
36895 do
36896   case $ac_config_target in
36897     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36898     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36899     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36900     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36901     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36902     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36903     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36904 
36905   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36906   esac
36907 done
36908 
36909 
36910 # If the user did not use the arguments to specify the items to instantiate,
36911 # then the envvar interface is used.  Set only those that are not.
36912 # We use the long form for the default assignment because of an extremely
36913 # bizarre bug on SunOS 4.1.3.
36914 if $ac_need_defaults; then
36915   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36916   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36917 fi
36918 
36919 # Have a temporary directory for convenience.  Make it in the build tree
36920 # simply because there is no reason against having it here, and in addition,
36921 # creating and moving files from /tmp can sometimes cause problems.
36922 # Hook for its removal unless debugging.
36923 # Note that there is a small window in which the directory will not be cleaned:
36924 # after its creation but before its name has been assigned to `$tmp'.
36925 $debug ||
36926 {
36927   tmp= ac_tmp=
36928   trap 'exit_status=$?
36929   : "${ac_tmp:=$tmp}"
36930   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36931 ' 0
36932   trap 'as_fn_exit 1' 1 2 13 15
36933 }
36934 # Create a (secure) tmp directory for tmp files.
36935 
36936 {
36937   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36938   test -d "$tmp"
36939 }  ||
36940 {
36941   tmp=./conf$$-$RANDOM
36942   (umask 077 && mkdir "$tmp")
36943 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36944 ac_tmp=$tmp
36945 
36946 # Set up the scripts for CONFIG_FILES section.
36947 # No need to generate them if there are no CONFIG_FILES.
36948 # This happens for instance with `./config.status config.h'.
36949 if test -n "$CONFIG_FILES"; then
36950 
36951 
36952 ac_cr=`echo X | tr X '\015'`
36953 # On cygwin, bash can eat \r inside `` if the user requested igncr.
36954 # But we know of no other shell where ac_cr would be empty at this
36955 # point, so we can use a bashism as a fallback.
36956 if test "x$ac_cr" = x; then
36957   eval ac_cr=\$\'\\r\'
36958 fi
36959 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36960 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36961   ac_cs_awk_cr='\\r'
36962 else
36963   ac_cs_awk_cr=$ac_cr
36964 fi
36965 
36966 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36967 _ACEOF
36968 
36969 
36970 {
36971   echo "cat >conf$$subs.awk <<_ACEOF" &&
36972   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36973   echo "_ACEOF"
36974 } >conf$$subs.sh ||
36975   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36976 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36977 ac_delim='%!_!# '
36978 for ac_last_try in false false false false false :; do
36979   . ./conf$$subs.sh ||
36980     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36981 
36982   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36983   if test $ac_delim_n = $ac_delim_num; then
36984     break
36985   elif $ac_last_try; then
36986     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36987   else
36988     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36989   fi
36990 done
36991 rm -f conf$$subs.sh
36992 
36993 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36994 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36995 _ACEOF
36996 sed -n '
36997 h
36998 s/^/S["/; s/!.*/"]=/
36999 p
37000 g
37001 s/^[^!]*!//
37002 :repl
37003 t repl
37004 s/'"$ac_delim"'$//
37005 t delim
37006 :nl
37007 h
37008 s/\(.\{148\}\)..*/\1/
37009 t more1
37010 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37011 p
37012 n
37013 b repl
37014 :more1
37015 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37016 p
37017 g
37018 s/.\{148\}//
37019 t nl
37020 :delim
37021 h
37022 s/\(.\{148\}\)..*/\1/
37023 t more2
37024 s/["\\]/\\&/g; s/^/"/; s/$/"/
37025 p
37026 b
37027 :more2
37028 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37029 p
37030 g
37031 s/.\{148\}//
37032 t delim
37033 ' <conf$$subs.awk | sed '
37034 /^[^""]/{
37035   N
37036   s/\n//
37037 }
37038 ' >>$CONFIG_STATUS || ac_write_fail=1
37039 rm -f conf$$subs.awk
37040 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37041 _ACAWK
37042 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37043   for (key in S) S_is_set[key] = 1
37044   FS = ""
37045 
37046 }
37047 {
37048   line = $ 0
37049   nfields = split(line, field, "@")
37050   substed = 0
37051   len = length(field[1])
37052   for (i = 2; i < nfields; i++) {
37053     key = field[i]
37054     keylen = length(key)
37055     if (S_is_set[key]) {
37056       value = S[key]
37057       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37058       len += length(value) + length(field[++i])
37059       substed = 1
37060     } else
37061       len += 1 + keylen
37062   }
37063 
37064   print line
37065 }
37066 
37067 _ACAWK
37068 _ACEOF
37069 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37070 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37071   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37072 else
37073   cat
37074 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37075   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37076 _ACEOF
37077 
37078 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37079 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37080 # trailing colons and then remove the whole line if VPATH becomes empty
37081 # (actually we leave an empty line to preserve line numbers).
37082 if test "x$srcdir" = x.; then
37083   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37084 h
37085 s///
37086 s/^/:/
37087 s/[      ]*$/:/
37088 s/:\$(srcdir):/:/g
37089 s/:\${srcdir}:/:/g
37090 s/:@srcdir@:/:/g
37091 s/^:*//
37092 s/:*$//
37093 x
37094 s/\(=[   ]*\).*/\1/
37095 G
37096 s/\n//
37097 s/^[^=]*=[       ]*$//
37098 }'
37099 fi
37100 
37101 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37102 fi # test -n "$CONFIG_FILES"
37103 
37104 # Set up the scripts for CONFIG_HEADERS section.
37105 # No need to generate them if there are no CONFIG_HEADERS.
37106 # This happens for instance with `./config.status Makefile'.
37107 if test -n "$CONFIG_HEADERS"; then
37108 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37109 BEGIN {
37110 _ACEOF
37111 
37112 # Transform confdefs.h into an awk script `defines.awk', embedded as
37113 # here-document in config.status, that substitutes the proper values into
37114 # config.h.in to produce config.h.
37115 
37116 # Create a delimiter string that does not exist in confdefs.h, to ease
37117 # handling of long lines.
37118 ac_delim='%!_!# '
37119 for ac_last_try in false false :; do
37120   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37121   if test -z "$ac_tt"; then
37122     break
37123   elif $ac_last_try; then
37124     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37125   else
37126     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37127   fi
37128 done
37129 
37130 # For the awk script, D is an array of macro values keyed by name,
37131 # likewise P contains macro parameters if any.  Preserve backslash
37132 # newline sequences.
37133 
37134 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37135 sed -n '
37136 s/.\{148\}/&'"$ac_delim"'/g
37137 t rset
37138 :rset
37139 s/^[     ]*#[    ]*define[       ][      ]*/ /
37140 t def
37141 d
37142 :def
37143 s/\\$//
37144 t bsnl
37145 s/["\\]/\\&/g
37146 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37147 D["\1"]=" \3"/p
37148 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37149 d
37150 :bsnl
37151 s/["\\]/\\&/g
37152 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37153 D["\1"]=" \3\\\\\\n"\\/p
37154 t cont
37155 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37156 t cont
37157 d
37158 :cont
37159 n
37160 s/.\{148\}/&'"$ac_delim"'/g
37161 t clear
37162 :clear
37163 s/\\$//
37164 t bsnlc
37165 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37166 d
37167 :bsnlc
37168 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37169 b cont
37170 ' <confdefs.h | sed '
37171 s/'"$ac_delim"'/"\\\
37172 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37173 
37174 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37175   for (key in D) D_is_set[key] = 1
37176   FS = ""
37177 }
37178 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37179   line = \$ 0
37180   split(line, arg, " ")
37181   if (arg[1] == "#") {
37182     defundef = arg[2]
37183     mac1 = arg[3]
37184   } else {
37185     defundef = substr(arg[1], 2)
37186     mac1 = arg[2]
37187   }
37188   split(mac1, mac2, "(") #)
37189   macro = mac2[1]
37190   prefix = substr(line, 1, index(line, defundef) - 1)
37191   if (D_is_set[macro]) {
37192     # Preserve the white space surrounding the "#".
37193     print prefix "define", macro P[macro] D[macro]
37194     next
37195   } else {
37196     # Replace #undef with comments.  This is necessary, for example,
37197     # in the case of _POSIX_SOURCE, which is predefined and required
37198     # on some systems where configure will not decide to define it.
37199     if (defundef == "undef") {
37200       print "/*", prefix defundef, macro, "*/"
37201       next
37202     }
37203   }
37204 }
37205 { print }
37206 _ACAWK
37207 _ACEOF
37208 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37209   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37210 fi # test -n "$CONFIG_HEADERS"
37211 
37212 
37213 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37214 shift
37215 for ac_tag
37216 do
37217   case $ac_tag in
37218   :[FHLC]) ac_mode=$ac_tag; continue;;
37219   esac
37220   case $ac_mode$ac_tag in
37221   :[FHL]*:*);;
37222   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37223   :[FH]-) ac_tag=-:-;;
37224   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37225   esac
37226   ac_save_IFS=$IFS
37227   IFS=:
37228   set x $ac_tag
37229   IFS=$ac_save_IFS
37230   shift
37231   ac_file=$1
37232   shift
37233 
37234   case $ac_mode in
37235   :L) ac_source=$1;;
37236   :[FH])
37237     ac_file_inputs=
37238     for ac_f
37239     do
37240       case $ac_f in
37241       -) ac_f="$ac_tmp/stdin";;
37242       *) # Look for the file first in the build tree, then in the source tree
37243          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37244          # because $ac_f cannot contain `:'.
37245          test -f "$ac_f" ||
37246            case $ac_f in
37247            [\\/$]*) false;;
37248            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37249            esac ||
37250            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37251       esac
37252       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37253       as_fn_append ac_file_inputs " '$ac_f'"
37254     done
37255 
37256     # Let's still pretend it is `configure' which instantiates (i.e., don't
37257     # use $as_me), people would be surprised to read:
37258     #    /* config.h.  Generated by config.status.  */
37259     configure_input='Generated from '`
37260           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37261         `' by configure.'
37262     if test x"$ac_file" != x-; then
37263       configure_input="$ac_file.  $configure_input"
37264       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37265 $as_echo "$as_me: creating $ac_file" >&6;}
37266     fi
37267     # Neutralize special characters interpreted by sed in replacement strings.
37268     case $configure_input in #(
37269     *\&* | *\|* | *\\* )
37270        ac_sed_conf_input=`$as_echo "$configure_input" |
37271        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37272     *) ac_sed_conf_input=$configure_input;;
37273     esac
37274 
37275     case $ac_tag in
37276     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37277       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37278     esac
37279     ;;
37280   esac
37281 
37282   ac_dir=`$as_dirname -- "$ac_file" ||
37283 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37284          X"$ac_file" : 'X\(//\)[^/]' \| \
37285          X"$ac_file" : 'X\(//\)$' \| \
37286          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37287 $as_echo X"$ac_file" |
37288     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37289             s//\1/
37290             q
37291           }
37292           /^X\(\/\/\)[^/].*/{
37293             s//\1/
37294             q
37295           }
37296           /^X\(\/\/\)$/{
37297             s//\1/
37298             q
37299           }
37300           /^X\(\/\).*/{
37301             s//\1/
37302             q
37303           }
37304           s/.*/./; q'`
37305   as_dir="$ac_dir"; as_fn_mkdir_p
37306   ac_builddir=.
37307 
37308 case "$ac_dir" in
37309 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37310 *)
37311   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37312   # A ".." for each directory in $ac_dir_suffix.
37313   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37314   case $ac_top_builddir_sub in
37315   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37316   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37317   esac ;;
37318 esac
37319 ac_abs_top_builddir=$ac_pwd
37320 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37321 # for backward compatibility:
37322 ac_top_builddir=$ac_top_build_prefix
37323 
37324 case $srcdir in
37325   .)  # We are building in place.
37326     ac_srcdir=.
37327     ac_top_srcdir=$ac_top_builddir_sub
37328     ac_abs_top_srcdir=$ac_pwd ;;
37329   [\\/]* | ?:[\\/]* )  # Absolute name.
37330     ac_srcdir=$srcdir$ac_dir_suffix;
37331     ac_top_srcdir=$srcdir
37332     ac_abs_top_srcdir=$srcdir ;;
37333   *) # Relative name.
37334     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37335     ac_top_srcdir=$ac_top_build_prefix$srcdir
37336     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37337 esac
37338 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37339 
37340 
37341   case $ac_mode in
37342   :F)
37343   #
37344   # CONFIG_FILE
37345   #
37346 
37347 _ACEOF
37348 
37349 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37350 # If the template does not know about datarootdir, expand it.
37351 # FIXME: This hack should be removed a few years after 2.60.
37352 ac_datarootdir_hack=; ac_datarootdir_seen=
37353 ac_sed_dataroot='
37354 /datarootdir/ {
37355   p
37356   q
37357 }
37358 /@datadir@/p
37359 /@docdir@/p
37360 /@infodir@/p
37361 /@localedir@/p
37362 /@mandir@/p'
37363 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37364 *datarootdir*) ac_datarootdir_seen=yes;;
37365 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37366   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37367 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37368 _ACEOF
37369 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37370   ac_datarootdir_hack='
37371   s&@datadir@&$datadir&g
37372   s&@docdir@&$docdir&g
37373   s&@infodir@&$infodir&g
37374   s&@localedir@&$localedir&g
37375   s&@mandir@&$mandir&g
37376   s&\\\${datarootdir}&$datarootdir&g' ;;
37377 esac
37378 _ACEOF
37379 
37380 # Neutralize VPATH when `$srcdir' = `.'.
37381 # Shell code in configure.ac might set extrasub.
37382 # FIXME: do we really want to maintain this feature?
37383 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37384 ac_sed_extra="$ac_vpsub
37385 $extrasub
37386 _ACEOF
37387 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37388 :t
37389 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37390 s|@configure_input@|$ac_sed_conf_input|;t t
37391 s&@top_builddir@&$ac_top_builddir_sub&;t t
37392 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37393 s&@srcdir@&$ac_srcdir&;t t
37394 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37395 s&@top_srcdir@&$ac_top_srcdir&;t t
37396 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37397 s&@builddir@&$ac_builddir&;t t
37398 s&@abs_builddir@&$ac_abs_builddir&;t t
37399 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37400 $ac_datarootdir_hack
37401 "
37402 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37403   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37404 
37405 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37406   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37407   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37408       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37409   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37410 which seems to be undefined.  Please make sure it is defined" >&5
37411 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37412 which seems to be undefined.  Please make sure it is defined" >&2;}
37413 
37414   rm -f "$ac_tmp/stdin"
37415   case $ac_file in
37416   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37417   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37418   esac \
37419   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37420  ;;
37421   :H)
37422   #
37423   # CONFIG_HEADER
37424   #
37425   if test x"$ac_file" != x-; then
37426     {
37427       $as_echo "/* $configure_input  */" \
37428       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37429     } >"$ac_tmp/config.h" \
37430       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37431     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37432       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37433 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37434     else
37435       rm -f "$ac_file"
37436       mv "$ac_tmp/config.h" "$ac_file" \
37437         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37438     fi
37439   else
37440     $as_echo "/* $configure_input  */" \
37441       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37442       || as_fn_error $? "could not create -" "$LINENO" 5
37443   fi
37444  ;;
37445 
37446 
37447   esac
37448 
37449 done # for ac_tag
37450 
37451 
37452 as_fn_exit 0
37453 _ACEOF
37454 ac_clean_files=$ac_clean_files_save
37455 
37456 test $ac_write_fail = 0 ||
37457   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37458 
37459 
37460 # configure is writing to config.log, and then calls config.status.
37461 # config.status does its own redirection, appending to config.log.
37462 # Unfortunately, on DOS this fails, as config.log is still kept open
37463 # by configure, so config.status won't be able to write to it; its
37464 # output is simply discarded.  So we exec the FD to /dev/null,
37465 # effectively closing config.log, so it can be properly (re)opened and
37466 # appended to by config.status.  When coming back to configure, we
37467 # need to make the FD available again.
37468 if test "$no_create" != yes; then
37469   ac_cs_success=:
37470   ac_config_status_args=
37471   test "$silent" = yes &&
37472     ac_config_status_args="$ac_config_status_args --quiet"
37473   exec 5>/dev/null
37474   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37475   exec 5>>config.log
37476   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37477   # would make configure fail if this is the last instruction.
37478   $ac_cs_success || as_fn_exit 1
37479 fi
37480 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37481   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37482 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37483 fi
37484 
37485 
37486 
37487 # Try to move the config.log file to the output directory.
37488 if test -e ./config.log; then
37489   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37490 fi
37491 
37492 # Make the compare script executable
37493 $CHMOD +x $OUTPUT_ROOT/compare.sh
37494 
37495 # Finally output some useful information to the user
37496 
37497   # Finally output some useful information to the user
37498 
37499   if test "x$CCACHE_FOUND" != x; then
37500     if  test "x$HAS_GOOD_CCACHE" = x; then
37501       CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37502       CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37503     else
37504       CCACHE_STATUS="installed and in use"
37505     fi
37506   else
37507     if test "x$GCC" = xyes; then
37508       CCACHE_STATUS="not installed (consider installing)"
37509       CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37510     else
37511       CCACHE_STATUS="not available for your system"
37512     fi
37513   fi
37514 
37515   printf "\n"
37516   printf "====================================================\n"
37517   printf "A new configuration has been successfully created in\n"
37518   printf "$OUTPUT_ROOT\n"
37519   if test "x$CONFIGURE_COMMAND_LINE" != x; then
37520     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37521   else
37522     printf "using default settings.\n"
37523   fi
37524 
37525   printf "\n"
37526   printf "Configuration summary:\n"
37527   printf "* Debug level:    $DEBUG_LEVEL\n"
37528   printf "* JDK variant:    $JDK_VARIANT\n"
37529   printf "* JVM variants:   $with_jvm_variants\n"
37530   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37531 
37532   printf "\n"
37533   printf "Tools summary:\n"
37534   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37535     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37536   fi
37537   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37538   printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37539   printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37540 
37541   printf "\n"
37542   printf "Build performance summary:\n"
37543   printf "* Cores to use:   $JOBS\n"
37544   printf "* Memory limit:   $MEMORY_SIZE MB\n"
37545   printf "* ccache status:  $CCACHE_STATUS\n"
37546   printf "\n"
37547 
37548   if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37549     printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37550     printf "$CCACHE_HELP_MSG\n"
37551 
37552   # Print a helpful message on how to acquire the necessary build dependency.
37553   # ccache is the help tag: freetype, cups, pulse, alsa etc
37554   MISSING_DEPENDENCY=ccache
37555 
37556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37557     cygwin_help $MISSING_DEPENDENCY
37558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37559     msys_help $MISSING_DEPENDENCY
37560   else
37561     PKGHANDLER_COMMAND=
37562 
37563     case $PKGHANDLER in
37564       apt-get)
37565         apt_help     $MISSING_DEPENDENCY ;;
37566       yum)
37567         yum_help     $MISSING_DEPENDENCY ;;
37568       port)
37569         port_help    $MISSING_DEPENDENCY ;;
37570       pkgutil)
37571         pkgutil_help $MISSING_DEPENDENCY ;;
37572       pkgadd)
37573         pkgadd_help  $MISSING_DEPENDENCY ;;
37574     esac
37575 
37576     if test "x$PKGHANDLER_COMMAND" != x; then
37577       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37578     fi
37579   fi
37580 
37581     printf "$HELP_MSG\n"
37582     printf "\n"
37583   fi
37584 
37585   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37586     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37587     printf "will result in longer build times.\n"
37588     printf "\n"
37589   fi
37590 
37591   if test "x$FOUND_ALT_VARIABLES" != "x"; then
37592     printf "WARNING: You have old-style ALT_ environment variables set.\n"
37593     printf "These are not respected, and will be ignored. It is recommended\n"
37594     printf "that you clean your environment. The following variables are set:\n"
37595     printf "$FOUND_ALT_VARIABLES\n"
37596     printf "\n"
37597   fi
37598 
37599   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37600     printf "WARNING: Your build output directory is not on a local disk.\n"
37601     printf "This will severely degrade build performance!\n"
37602     printf "It is recommended that you create an output directory on a local disk,\n"
37603     printf "and run the configure script again from that directory.\n"
37604     printf "\n"
37605   fi
37606 
37607   if test "x$IS_RECONFIGURE" = "xyes"; then
37608     printf "WARNING: The result of this configuration has overridden an older\n"
37609     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37610     printf "proper build. Failure to do so might result in strange build problems.\n"
37611     printf "\n"
37612   fi
37613