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 NO_LIFETIME_DSE_CFLAG
 683 NO_DELETE_NULL_POINTER_CHECKS_CFLAG
 684 CXXSTD_CXXFLAG
 685 LEGACY_EXTRA_LDFLAGS
 686 LEGACY_EXTRA_CXXFLAGS
 687 LEGACY_EXTRA_CFLAGS
 688 CXX_FLAG_DEPS
 689 C_FLAG_DEPS
 690 CXX_O_FLAG_NONE
 691 CXX_O_FLAG_NORM
 692 CXX_O_FLAG_HI
 693 CXX_O_FLAG_HIGHEST
 694 C_O_FLAG_NONE
 695 C_O_FLAG_NORM
 696 C_O_FLAG_HI
 697 C_O_FLAG_HIGHEST
 698 POST_MCS_CMD
 699 POST_STRIP_CMD
 700 SET_EXECUTABLE_ORIGIN
 701 SET_SHARED_LIBRARY_ORIGIN
 702 CXX_FLAG_REORDER
 703 C_FLAG_REORDER
 704 SET_SHARED_LIBRARY_MAPFILE
 705 SET_SHARED_LIBRARY_NAME
 706 SHARED_LIBRARY_FLAGS
 707 EXE_SUFFIX
 708 STATIC_LIBRARY_SUFFIX
 709 SHARED_LIBRARY_SUFFIX
 710 LIBRARY_PREFIX
 711 STATIC_LIBRARY
 712 SHARED_LIBRARY
 713 OBJ_SUFFIX
 714 COMPILER_NAME
 715 JT_HOME
 716 JTREGEXE
 717 ac_ct_OBJDUMP
 718 OBJDUMP
 719 ac_ct_OBJCOPY
 720 OBJCOPY
 721 OTOOL
 722 MCS
 723 STRIP
 724 GNM
 725 NM
 726 AS
 727 CXXCPP
 728 CPP
 729 COMPILER_TYPE
 730 RC_FLAGS
 731 DUMPBIN
 732 WINAR
 733 HOTSPOT_RC
 734 HOTSPOT_MT
 735 RC
 736 MT
 737 WINLD
 738 HOTSPOT_LD
 739 HOTSPOT_CXX
 740 ARFLAGS
 741 AR
 742 LDEXECXX
 743 LDCXX
 744 LDEXE
 745 LD
 746 ac_ct_OBJC
 747 OBJCFLAGS
 748 OBJC
 749 CXX_VERSION
 750 CC_VERSION
 751 ac_ct_CXX
 752 CXXFLAGS
 753 CXX
 754 ac_ct_PROPER_COMPILER_CXX
 755 PROPER_COMPILER_CXX
 756 POTENTIAL_CXX
 757 TOOLS_DIR_CXX
 758 COMPILER_TARGET_BITS_FLAG
 759 OBJEXT
 760 EXEEXT
 761 ac_ct_CC
 762 CPPFLAGS
 763 LDFLAGS
 764 CFLAGS
 765 CC
 766 ac_ct_PROPER_COMPILER_CC
 767 PROPER_COMPILER_CC
 768 POTENTIAL_CC
 769 TOOLS_DIR_CC
 770 SDKPATH
 771 XCODEBUILD
 772 SET_DEVELOPER_DIR
 773 BUILD_LD
 774 BUILD_CXX
 775 BUILD_CC
 776 MSVCR_DLL
 777 VS_PATH
 778 VS_LIB
 779 VS_INCLUDE
 780 CYGWIN_LINK
 781 AR_OUT_OPTION
 782 LD_OUT_OPTION
 783 EXE_OUT_OPTION
 784 CC_OUT_OPTION
 785 BUILD_HOTSPOT
 786 HOTSPOT_DIST
 787 BUILD_OUTPUT
 788 OVERRIDE_SRC_ROOT
 789 ADD_SRC_ROOT
 790 JDK_TOPDIR
 791 NASHORN_TOPDIR
 792 HOTSPOT_TOPDIR
 793 JAXWS_TOPDIR
 794 JAXP_TOPDIR
 795 CORBA_TOPDIR
 796 LANGTOOLS_TOPDIR
 797 JAVA_FLAGS_SMALL
 798 JAVA_FLAGS_BIG
 799 JAVA_FLAGS
 800 BOOT_JDK_BITS
 801 JAVAC_FLAGS
 802 BOOT_JDK_SOURCETARGET
 803 BOOT_JDK
 804 BOOT_TOOLSJAR
 805 BOOT_RTJAR
 806 JAVA_CHECK
 807 JAVAC_CHECK
 808 COOKED_BUILD_NUMBER
 809 COOKED_JDK_UPDATE_VERSION
 810 JDK_VERSION
 811 COPYRIGHT_YEAR
 812 MACOSX_BUNDLE_ID_BASE
 813 MACOSX_BUNDLE_NAME_BASE
 814 COMPANY_NAME
 815 JDK_RC_PLATFORM_NAME
 816 PRODUCT_SUFFIX
 817 PRODUCT_NAME
 818 LAUNCHER_NAME
 819 MILESTONE
 820 JDK_BUILD_NUMBER
 821 JDK_UPDATE_VERSION
 822 JDK_MICRO_VERSION
 823 JDK_MINOR_VERSION
 824 JDK_MAJOR_VERSION
 825 USER_RELEASE_SUFFIX
 826 COMPRESS_JARS
 827 UNLIMITED_CRYPTO
 828 CACERTS_FILE
 829 TEST_IN_BUILD
 830 BUILD_HEADLESS
 831 SUPPORT_HEADFUL
 832 SUPPORT_HEADLESS
 833 BDEPS_FTP
 834 BDEPS_UNZIP
 835 OS_VERSION_MICRO
 836 OS_VERSION_MINOR
 837 OS_VERSION_MAJOR
 838 PKG_CONFIG
 839 CODESIGN
 840 XATTR
 841 DSYMUTIL
 842 IS_GNU_TIME
 843 TIME
 844 STAT
 845 HG
 846 READELF
 847 LDD
 848 ZIP
 849 UNZIP
 850 FIND_DELETE
 851 MAKE
 852 CHECK_TOOLSDIR_MAKE
 853 CHECK_TOOLSDIR_GMAKE
 854 CHECK_MAKE
 855 CHECK_GMAKE
 856 PKGHANDLER
 857 OUTPUT_ROOT
 858 CONF_NAME
 859 SPEC
 860 BUILD_VARIANT_RELEASE
 861 DEBUG_CLASSFILES
 862 FASTDEBUG
 863 VARIANT
 864 DEBUG_LEVEL
 865 MACOSX_UNIVERSAL
 866 INCLUDE_SA
 867 JVM_VARIANT_CORE
 868 JVM_VARIANT_ZEROSHARK
 869 JVM_VARIANT_ZERO
 870 JVM_VARIANT_KERNEL
 871 JVM_VARIANT_MINIMAL1
 872 JVM_VARIANT_CLIENT
 873 JVM_VARIANT_SERVER
 874 JVM_VARIANTS
 875 JVM_INTERPRETER
 876 JDK_VARIANT
 877 SET_OPENJDK
 878 BUILD_LOG_WRAPPER
 879 BUILD_LOG_PREVIOUS
 880 BUILD_LOG
 881 SYS_ROOT
 882 PATH_SEP
 883 SRC_ROOT
 884 ZERO_ARCHDEF
 885 DEFINE_CROSS_COMPILE_ARCH
 886 LP64
 887 OPENJDK_TARGET_OS_EXPORT_DIR
 888 OPENJDK_TARGET_OS_API_DIR
 889 OPENJDK_TARGET_CPU_JLI_CFLAGS
 890 OPENJDK_TARGET_CPU_OSARCH
 891 OPENJDK_TARGET_CPU_ISADIR
 892 OPENJDK_TARGET_CPU_LIBDIR
 893 OPENJDK_TARGET_CPU_LEGACY_LIB
 894 OPENJDK_TARGET_CPU_LEGACY
 895 REQUIRED_OS_VERSION
 896 REQUIRED_OS_NAME
 897 COMPILE_TYPE
 898 OPENJDK_TARGET_CPU_ENDIAN
 899 OPENJDK_TARGET_CPU_BITS
 900 OPENJDK_TARGET_CPU_ARCH
 901 OPENJDK_TARGET_CPU
 902 OPENJDK_TARGET_OS_API
 903 OPENJDK_TARGET_OS
 904 OPENJDK_BUILD_CPU_ENDIAN
 905 OPENJDK_BUILD_CPU_BITS
 906 OPENJDK_BUILD_CPU_ARCH
 907 OPENJDK_BUILD_CPU
 908 OPENJDK_BUILD_OS_API
 909 OPENJDK_BUILD_OS
 910 OPENJDK_BUILD_AUTOCONF_NAME
 911 OPENJDK_TARGET_AUTOCONF_NAME
 912 target_os
 913 target_vendor
 914 target_cpu
 915 target
 916 host_os
 917 host_vendor
 918 host_cpu
 919 host
 920 build_os
 921 build_vendor
 922 build_cpu
 923 build
 924 SETFILE
 925 DF
 926 READLINK
 927 CYGPATH
 928 NAWK
 929 SED
 930 FGREP
 931 EGREP
 932 GREP
 933 AWK
 934 XARGS
 935 WHICH
 936 WC
 937 UNIQ
 938 UNAME
 939 TR
 940 TOUCH
 941 TEE
 942 TAR
 943 TAIL
 944 SORT
 945 SH
 946 RM
 947 PRINTF
 948 MV
 949 MKTEMP
 950 MKDIR
 951 LS
 952 LN
 953 HEAD
 954 FIND
 955 FILE
 956 EXPR
 957 ECHO
 958 DIRNAME
 959 DIFF
 960 DATE
 961 CUT
 962 CPIO
 963 CP
 964 COMM
 965 CMP
 966 CHMOD
 967 CAT
 968 BASH
 969 BASENAME
 970 DATE_WHEN_CONFIGURED
 971 CONFIGURE_COMMAND_LINE
 972 CUSTOM_MAKE_DIR
 973 target_alias
 974 host_alias
 975 build_alias
 976 LIBS
 977 ECHO_T
 978 ECHO_N
 979 ECHO_C
 980 DEFS
 981 mandir
 982 localedir
 983 libdir
 984 psdir
 985 pdfdir
 986 dvidir
 987 htmldir
 988 infodir
 989 docdir
 990 oldincludedir
 991 includedir
 992 localstatedir
 993 sharedstatedir
 994 sysconfdir
 995 datadir
 996 datarootdir
 997 libexecdir
 998 sbindir
 999 bindir
1000 program_transform_name
1001 prefix
1002 exec_prefix
1003 PACKAGE_URL
1004 PACKAGE_BUGREPORT
1005 PACKAGE_STRING
1006 PACKAGE_VERSION
1007 PACKAGE_TARNAME
1008 PACKAGE_NAME
1009 PATH_SEPARATOR
1010 SHELL'
1011 ac_subst_files=''
1012 ac_user_opts='
1013 enable_option_checking
1014 with_custom_make_dir
1015 with_target_bits
1016 with_sys_root
1017 with_tools_dir
1018 with_xcode_path
1019 with_devkit
1020 enable_openjdk_only
1021 with_jdk_variant
1022 with_jvm_interpreter
1023 with_jvm_variants
1024 enable_debug
1025 with_debug_level
1026 with_conf_name
1027 with_builddeps_conf
1028 with_builddeps_server
1029 with_builddeps_dir
1030 with_builddeps_group
1031 enable_headful
1032 enable_hotspot_test_in_build
1033 with_cacerts_file
1034 enable_unlimited_crypto
1035 with_milestone
1036 with_update_version
1037 with_user_release_suffix
1038 with_build_number
1039 with_copyright_year
1040 with_boot_jdk
1041 with_boot_jdk_jvmargs
1042 with_add_source_root
1043 with_override_source_root
1044 with_adds_and_overrides
1045 with_override_langtools
1046 with_override_corba
1047 with_override_jaxp
1048 with_override_jaxws
1049 with_override_hotspot
1050 with_override_nashorn
1051 with_override_jdk
1052 with_import_hotspot
1053 with_msvcr_dll
1054 with_dxsdk
1055 with_dxsdk_lib
1056 with_dxsdk_include
1057 with_jtreg
1058 with_extra_cflags
1059 with_extra_cxxflags
1060 with_extra_ldflags
1061 enable_debug_symbols
1062 enable_zip_debug_info
1063 enable_macosx_runtime_support
1064 with_x
1065 with_cups
1066 with_cups_include
1067 with_freetype
1068 with_freetype_include
1069 with_freetype_lib
1070 enable_freetype_bundling
1071 with_alsa
1072 with_alsa_include
1073 with_alsa_lib
1074 with_giflib
1075 with_zlib
1076 with_stdc__lib
1077 with_num_cores
1078 with_memory_size
1079 with_jobs
1080 with_sjavac_server_java
1081 enable_sjavac
1082 enable_precompiled_headers
1083 enable_ccache
1084 with_ccache_dir
1085 '
1086       ac_precious_vars='build_alias
1087 host_alias
1088 target_alias
1089 PKG_CONFIG
1090 CC
1091 CFLAGS
1092 LDFLAGS
1093 LIBS
1094 CPPFLAGS
1095 CXX
1096 CXXFLAGS
1097 CCC
1098 OBJC
1099 OBJCFLAGS
1100 CPP
1101 CXXCPP
1102 XMKMF
1103 FREETYPE_CFLAGS
1104 FREETYPE_LIBS
1105 ALSA_CFLAGS
1106 ALSA_LIBS
1107 LIBFFI_CFLAGS
1108 LIBFFI_LIBS'
1109 
1110 
1111 # Initialize some variables set by options.
1112 ac_init_help=
1113 ac_init_version=false
1114 ac_unrecognized_opts=
1115 ac_unrecognized_sep=
1116 # The variables have the same names as the options, with
1117 # dashes changed to underlines.
1118 cache_file=/dev/null
1119 exec_prefix=NONE
1120 no_create=
1121 no_recursion=
1122 prefix=NONE
1123 program_prefix=NONE
1124 program_suffix=NONE
1125 program_transform_name=s,x,x,
1126 silent=
1127 site=
1128 srcdir=
1129 verbose=
1130 x_includes=NONE
1131 x_libraries=NONE
1132 
1133 # Installation directory options.
1134 # These are left unexpanded so users can "make install exec_prefix=/foo"
1135 # and all the variables that are supposed to be based on exec_prefix
1136 # by default will actually change.
1137 # Use braces instead of parens because sh, perl, etc. also accept them.
1138 # (The list follows the same order as the GNU Coding Standards.)
1139 bindir='${exec_prefix}/bin'
1140 sbindir='${exec_prefix}/sbin'
1141 libexecdir='${exec_prefix}/libexec'
1142 datarootdir='${prefix}/share'
1143 datadir='${datarootdir}'
1144 sysconfdir='${prefix}/etc'
1145 sharedstatedir='${prefix}/com'
1146 localstatedir='${prefix}/var'
1147 includedir='${prefix}/include'
1148 oldincludedir='/usr/include'
1149 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1150 infodir='${datarootdir}/info'
1151 htmldir='${docdir}'
1152 dvidir='${docdir}'
1153 pdfdir='${docdir}'
1154 psdir='${docdir}'
1155 libdir='${exec_prefix}/lib'
1156 localedir='${datarootdir}/locale'
1157 mandir='${datarootdir}/man'
1158 
1159 ac_prev=
1160 ac_dashdash=
1161 for ac_option
1162 do
1163   # If the previous option needs an argument, assign it.
1164   if test -n "$ac_prev"; then
1165     eval $ac_prev=\$ac_option
1166     ac_prev=
1167     continue
1168   fi
1169 
1170   case $ac_option in
1171   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1172   *=)   ac_optarg= ;;
1173   *)    ac_optarg=yes ;;
1174   esac
1175 
1176   # Accept the important Cygnus configure options, so we can diagnose typos.
1177 
1178   case $ac_dashdash$ac_option in
1179   --)
1180     ac_dashdash=yes ;;
1181 
1182   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1183     ac_prev=bindir ;;
1184   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1185     bindir=$ac_optarg ;;
1186 
1187   -build | --build | --buil | --bui | --bu)
1188     ac_prev=build_alias ;;
1189   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1190     build_alias=$ac_optarg ;;
1191 
1192   -cache-file | --cache-file | --cache-fil | --cache-fi \
1193   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1194     ac_prev=cache_file ;;
1195   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1196   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1197     cache_file=$ac_optarg ;;
1198 
1199   --config-cache | -C)
1200     cache_file=config.cache ;;
1201 
1202   -datadir | --datadir | --datadi | --datad)
1203     ac_prev=datadir ;;
1204   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1205     datadir=$ac_optarg ;;
1206 
1207   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1208   | --dataroo | --dataro | --datar)
1209     ac_prev=datarootdir ;;
1210   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1211   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1212     datarootdir=$ac_optarg ;;
1213 
1214   -disable-* | --disable-*)
1215     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1216     # Reject names that are not valid shell variable names.
1217     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1218       as_fn_error $? "invalid feature name: $ac_useropt"
1219     ac_useropt_orig=$ac_useropt
1220     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1221     case $ac_user_opts in
1222       *"
1223 "enable_$ac_useropt"
1224 "*) ;;
1225       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1226          ac_unrecognized_sep=', ';;
1227     esac
1228     eval enable_$ac_useropt=no ;;
1229 
1230   -docdir | --docdir | --docdi | --doc | --do)
1231     ac_prev=docdir ;;
1232   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1233     docdir=$ac_optarg ;;
1234 
1235   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1236     ac_prev=dvidir ;;
1237   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1238     dvidir=$ac_optarg ;;
1239 
1240   -enable-* | --enable-*)
1241     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1242     # Reject names that are not valid shell variable names.
1243     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1244       as_fn_error $? "invalid feature name: $ac_useropt"
1245     ac_useropt_orig=$ac_useropt
1246     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1247     case $ac_user_opts in
1248       *"
1249 "enable_$ac_useropt"
1250 "*) ;;
1251       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1252          ac_unrecognized_sep=', ';;
1253     esac
1254     eval enable_$ac_useropt=\$ac_optarg ;;
1255 
1256   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1257   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1258   | --exec | --exe | --ex)
1259     ac_prev=exec_prefix ;;
1260   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1261   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1262   | --exec=* | --exe=* | --ex=*)
1263     exec_prefix=$ac_optarg ;;
1264 
1265   -gas | --gas | --ga | --g)
1266     # Obsolete; use --with-gas.
1267     with_gas=yes ;;
1268 
1269   -help | --help | --hel | --he | -h)
1270     ac_init_help=long ;;
1271   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1272     ac_init_help=recursive ;;
1273   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1274     ac_init_help=short ;;
1275 
1276   -host | --host | --hos | --ho)
1277     ac_prev=host_alias ;;
1278   -host=* | --host=* | --hos=* | --ho=*)
1279     host_alias=$ac_optarg ;;
1280 
1281   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1282     ac_prev=htmldir ;;
1283   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1284   | --ht=*)
1285     htmldir=$ac_optarg ;;
1286 
1287   -includedir | --includedir | --includedi | --included | --include \
1288   | --includ | --inclu | --incl | --inc)
1289     ac_prev=includedir ;;
1290   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1291   | --includ=* | --inclu=* | --incl=* | --inc=*)
1292     includedir=$ac_optarg ;;
1293 
1294   -infodir | --infodir | --infodi | --infod | --info | --inf)
1295     ac_prev=infodir ;;
1296   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1297     infodir=$ac_optarg ;;
1298 
1299   -libdir | --libdir | --libdi | --libd)
1300     ac_prev=libdir ;;
1301   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1302     libdir=$ac_optarg ;;
1303 
1304   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1305   | --libexe | --libex | --libe)
1306     ac_prev=libexecdir ;;
1307   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1308   | --libexe=* | --libex=* | --libe=*)
1309     libexecdir=$ac_optarg ;;
1310 
1311   -localedir | --localedir | --localedi | --localed | --locale)
1312     ac_prev=localedir ;;
1313   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1314     localedir=$ac_optarg ;;
1315 
1316   -localstatedir | --localstatedir | --localstatedi | --localstated \
1317   | --localstate | --localstat | --localsta | --localst | --locals)
1318     ac_prev=localstatedir ;;
1319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1320   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1321     localstatedir=$ac_optarg ;;
1322 
1323   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1324     ac_prev=mandir ;;
1325   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1326     mandir=$ac_optarg ;;
1327 
1328   -nfp | --nfp | --nf)
1329     # Obsolete; use --without-fp.
1330     with_fp=no ;;
1331 
1332   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1333   | --no-cr | --no-c | -n)
1334     no_create=yes ;;
1335 
1336   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1337   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1338     no_recursion=yes ;;
1339 
1340   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1341   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1342   | --oldin | --oldi | --old | --ol | --o)
1343     ac_prev=oldincludedir ;;
1344   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1345   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1346   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1347     oldincludedir=$ac_optarg ;;
1348 
1349   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1350     ac_prev=prefix ;;
1351   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1352     prefix=$ac_optarg ;;
1353 
1354   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1355   | --program-pre | --program-pr | --program-p)
1356     ac_prev=program_prefix ;;
1357   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1358   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1359     program_prefix=$ac_optarg ;;
1360 
1361   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1362   | --program-suf | --program-su | --program-s)
1363     ac_prev=program_suffix ;;
1364   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1365   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1366     program_suffix=$ac_optarg ;;
1367 
1368   -program-transform-name | --program-transform-name \
1369   | --program-transform-nam | --program-transform-na \
1370   | --program-transform-n | --program-transform- \
1371   | --program-transform | --program-transfor \
1372   | --program-transfo | --program-transf \
1373   | --program-trans | --program-tran \
1374   | --progr-tra | --program-tr | --program-t)
1375     ac_prev=program_transform_name ;;
1376   -program-transform-name=* | --program-transform-name=* \
1377   | --program-transform-nam=* | --program-transform-na=* \
1378   | --program-transform-n=* | --program-transform-=* \
1379   | --program-transform=* | --program-transfor=* \
1380   | --program-transfo=* | --program-transf=* \
1381   | --program-trans=* | --program-tran=* \
1382   | --progr-tra=* | --program-tr=* | --program-t=*)
1383     program_transform_name=$ac_optarg ;;
1384 
1385   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1386     ac_prev=pdfdir ;;
1387   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1388     pdfdir=$ac_optarg ;;
1389 
1390   -psdir | --psdir | --psdi | --psd | --ps)
1391     ac_prev=psdir ;;
1392   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1393     psdir=$ac_optarg ;;
1394 
1395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1396   | -silent | --silent | --silen | --sile | --sil)
1397     silent=yes ;;
1398 
1399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1400     ac_prev=sbindir ;;
1401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1402   | --sbi=* | --sb=*)
1403     sbindir=$ac_optarg ;;
1404 
1405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1407   | --sharedst | --shareds | --shared | --share | --shar \
1408   | --sha | --sh)
1409     ac_prev=sharedstatedir ;;
1410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1413   | --sha=* | --sh=*)
1414     sharedstatedir=$ac_optarg ;;
1415 
1416   -site | --site | --sit)
1417     ac_prev=site ;;
1418   -site=* | --site=* | --sit=*)
1419     site=$ac_optarg ;;
1420 
1421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1422     ac_prev=srcdir ;;
1423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1424     srcdir=$ac_optarg ;;
1425 
1426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1427   | --syscon | --sysco | --sysc | --sys | --sy)
1428     ac_prev=sysconfdir ;;
1429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1431     sysconfdir=$ac_optarg ;;
1432 
1433   -target | --target | --targe | --targ | --tar | --ta | --t)
1434     ac_prev=target_alias ;;
1435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1436     target_alias=$ac_optarg ;;
1437 
1438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1439     verbose=yes ;;
1440 
1441   -version | --version | --versio | --versi | --vers | -V)
1442     ac_init_version=: ;;
1443 
1444   -with-* | --with-*)
1445     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1446     # Reject names that are not valid shell variable names.
1447     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1448       as_fn_error $? "invalid package name: $ac_useropt"
1449     ac_useropt_orig=$ac_useropt
1450     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1451     case $ac_user_opts in
1452       *"
1453 "with_$ac_useropt"
1454 "*) ;;
1455       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1456          ac_unrecognized_sep=', ';;
1457     esac
1458     eval with_$ac_useropt=\$ac_optarg ;;
1459 
1460   -without-* | --without-*)
1461     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1462     # Reject names that are not valid shell variable names.
1463     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1464       as_fn_error $? "invalid package name: $ac_useropt"
1465     ac_useropt_orig=$ac_useropt
1466     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467     case $ac_user_opts in
1468       *"
1469 "with_$ac_useropt"
1470 "*) ;;
1471       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1472          ac_unrecognized_sep=', ';;
1473     esac
1474     eval with_$ac_useropt=no ;;
1475 
1476   --x)
1477     # Obsolete; use --with-x.
1478     with_x=yes ;;
1479 
1480   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1481   | --x-incl | --x-inc | --x-in | --x-i)
1482     ac_prev=x_includes ;;
1483   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1484   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1485     x_includes=$ac_optarg ;;
1486 
1487   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1488   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1489     ac_prev=x_libraries ;;
1490   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1491   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1492     x_libraries=$ac_optarg ;;
1493 
1494   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1495 Try \`$0 --help' for more information"
1496     ;;
1497 
1498   *=*)
1499     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1500     # Reject names that are not valid shell variable names.
1501     case $ac_envvar in #(
1502       '' | [0-9]* | *[!_$as_cr_alnum]* )
1503       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1504     esac
1505     eval $ac_envvar=\$ac_optarg
1506     export $ac_envvar ;;
1507 
1508   *)
1509     # FIXME: should be removed in autoconf 3.0.
1510     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1511     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1512       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1513     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1514     ;;
1515 
1516   esac
1517 done
1518 
1519 if test -n "$ac_prev"; then
1520   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1521   as_fn_error $? "missing argument to $ac_option"
1522 fi
1523 
1524 if test -n "$ac_unrecognized_opts"; then
1525   case $enable_option_checking in
1526     no) ;;
1527     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1528     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1529   esac
1530 fi
1531 
1532 # Check all directory arguments for consistency.
1533 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1534                 datadir sysconfdir sharedstatedir localstatedir includedir \
1535                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1536                 libdir localedir mandir
1537 do
1538   eval ac_val=\$$ac_var
1539   # Remove trailing slashes.
1540   case $ac_val in
1541     */ )
1542       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1543       eval $ac_var=\$ac_val;;
1544   esac
1545   # Be sure to have absolute directory names.
1546   case $ac_val in
1547     [\\/$]* | ?:[\\/]* )  continue;;
1548     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1549   esac
1550   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1551 done
1552 
1553 # There might be people who depend on the old broken behavior: `$host'
1554 # used to hold the argument of --host etc.
1555 # FIXME: To remove some day.
1556 build=$build_alias
1557 host=$host_alias
1558 target=$target_alias
1559 
1560 # FIXME: To remove some day.
1561 if test "x$host_alias" != x; then
1562   if test "x$build_alias" = x; then
1563     cross_compiling=maybe
1564   elif test "x$build_alias" != "x$host_alias"; then
1565     cross_compiling=yes
1566   fi
1567 fi
1568 
1569 ac_tool_prefix=
1570 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1571 
1572 test "$silent" = yes && exec 6>/dev/null
1573 
1574 
1575 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1576 ac_ls_di=`ls -di .` &&
1577 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1578   as_fn_error $? "working directory cannot be determined"
1579 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1580   as_fn_error $? "pwd does not report name of working directory"
1581 
1582 
1583 # Find the source files, if location was not specified.
1584 if test -z "$srcdir"; then
1585   ac_srcdir_defaulted=yes
1586   # Try the directory containing this script, then the parent directory.
1587   ac_confdir=`$as_dirname -- "$as_myself" ||
1588 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1589          X"$as_myself" : 'X\(//\)[^/]' \| \
1590          X"$as_myself" : 'X\(//\)$' \| \
1591          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1592 $as_echo X"$as_myself" |
1593     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1594             s//\1/
1595             q
1596           }
1597           /^X\(\/\/\)[^/].*/{
1598             s//\1/
1599             q
1600           }
1601           /^X\(\/\/\)$/{
1602             s//\1/
1603             q
1604           }
1605           /^X\(\/\).*/{
1606             s//\1/
1607             q
1608           }
1609           s/.*/./; q'`
1610   srcdir=$ac_confdir
1611   if test ! -r "$srcdir/$ac_unique_file"; then
1612     srcdir=..
1613   fi
1614 else
1615   ac_srcdir_defaulted=no
1616 fi
1617 if test ! -r "$srcdir/$ac_unique_file"; then
1618   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1619   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1620 fi
1621 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1622 ac_abs_confdir=`(
1623         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1624         pwd)`
1625 # When building in place, set srcdir=.
1626 if test "$ac_abs_confdir" = "$ac_pwd"; then
1627   srcdir=.
1628 fi
1629 # Remove unnecessary trailing slashes from srcdir.
1630 # Double slashes in file names in object file debugging info
1631 # mess up M-x gdb in Emacs.
1632 case $srcdir in
1633 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1634 esac
1635 for ac_var in $ac_precious_vars; do
1636   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1637   eval ac_env_${ac_var}_value=\$${ac_var}
1638   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1639   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1640 done
1641 
1642 #
1643 # Report the --help message.
1644 #
1645 if test "$ac_init_help" = "long"; then
1646   # Omit some internal or obsolete options to make the list less imposing.
1647   # This message is too long to be a string in the A/UX 3.1 sh.
1648   cat <<_ACEOF
1649 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1650 
1651 Usage: $0 [OPTION]... [VAR=VALUE]...
1652 
1653 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1654 VAR=VALUE.  See below for descriptions of some of the useful variables.
1655 
1656 Defaults for the options are specified in brackets.
1657 
1658 Configuration:
1659   -h, --help              display this help and exit
1660       --help=short        display options specific to this package
1661       --help=recursive    display the short help of all the included packages
1662   -V, --version           display version information and exit
1663   -q, --quiet, --silent   do not print \`checking ...' messages
1664       --cache-file=FILE   cache test results in FILE [disabled]
1665   -C, --config-cache      alias for \`--cache-file=config.cache'
1666   -n, --no-create         do not create output files
1667       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1668 
1669 Installation directories:
1670   --prefix=PREFIX         install architecture-independent files in PREFIX
1671                           [$ac_default_prefix]
1672   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1673                           [PREFIX]
1674 
1675 By default, \`make install' will install all the files in
1676 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1677 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1678 for instance \`--prefix=\$HOME'.
1679 
1680 For better control, use the options below.
1681 
1682 Fine tuning of the installation directories:
1683   --bindir=DIR            user executables [EPREFIX/bin]
1684   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1685   --libexecdir=DIR        program executables [EPREFIX/libexec]
1686   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1687   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1688   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1689   --libdir=DIR            object code libraries [EPREFIX/lib]
1690   --includedir=DIR        C header files [PREFIX/include]
1691   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1692   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1693   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1694   --infodir=DIR           info documentation [DATAROOTDIR/info]
1695   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1696   --mandir=DIR            man documentation [DATAROOTDIR/man]
1697   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1698   --htmldir=DIR           html documentation [DOCDIR]
1699   --dvidir=DIR            dvi documentation [DOCDIR]
1700   --pdfdir=DIR            pdf documentation [DOCDIR]
1701   --psdir=DIR             ps documentation [DOCDIR]
1702 _ACEOF
1703 
1704   cat <<\_ACEOF
1705 
1706 X features:
1707   --x-includes=DIR    X include files are in DIR
1708   --x-libraries=DIR   X library files are in DIR
1709 
1710 System types:
1711   --build=BUILD     configure for building on BUILD [guessed]
1712   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1713   --target=TARGET   configure for building compilers for TARGET [HOST]
1714 _ACEOF
1715 fi
1716 
1717 if test -n "$ac_init_help"; then
1718   case $ac_init_help in
1719      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1720    esac
1721   cat <<\_ACEOF
1722 
1723 Optional Features:
1724   --disable-option-checking  ignore unrecognized --enable/--with options
1725   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1726   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1727   --enable-openjdk-only   suppress building custom source even if present
1728                           [disabled]
1729   --enable-debug          set the debug level to fastdebug (shorthand for
1730                           --with-debug-level=fastdebug) [disabled]
1731   --disable-headful       disable building headful support (graphical UI
1732                           support) [enabled]
1733   --enable-hotspot-test-in-build
1734                           run the Queens test after Hotspot build [disabled]
1735   --enable-unlimited-crypto
1736                           Enable unlimited crypto policy [disabled]
1737   --disable-debug-symbols disable generation of debug symbols [enabled]
1738   --disable-zip-debug-info
1739                           disable zipping of debug-info files [enabled]
1740   --enable-macosx-runtime-support
1741                           Deprecated. Option is kept for backwards
1742                           compatibility and is ignored
1743   --disable-freetype-bundling
1744                           disable bundling of the freetype library with the
1745                           build result [enabled on Windows or when using
1746                           --with-freetype, disabled otherwise]
1747   --enable-sjavac         use sjavac to do fast incremental compiles
1748                           [disabled]
1749   --disable-precompiled-headers
1750                           disable using precompiled headers when compiling C++
1751                           [enabled]
1752   --enable-ccache         enable using ccache to speed up recompilations
1753                           [disabled]
1754 
1755 Optional Packages:
1756   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1757   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1758   --with-custom-make-dir  use this directory for custom build/make files
1759   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1760                           support it), e.g. --with-target-bits=32 [guessed]
1761   --with-sys-root         pass this sys-root to the compilers and tools (for
1762                           cross-compiling)
1763   --with-tools-dir        search this directory for compilers and tools (for
1764                           cross-compiling)
1765   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1766                           10.9 and later)
1767   --with-devkit           use this directory as base for tools-dir and
1768                           sys-root (for cross-compiling)
1769   --with-jdk-variant      JDK variant to build (normal) [normal]
1770   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1771   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1772                           client, minimal1, kernel, zero, zeroshark, core)
1773                           [server]
1774   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1775                           [release]
1776   --with-conf-name        use this as the name of the configuration [generated
1777                           from important configuration options]
1778   --with-builddeps-conf   use this configuration file for the builddeps
1779   --with-builddeps-server download and use build dependencies from this server
1780                           url
1781   --with-builddeps-dir    store downloaded build dependencies here
1782                           [/localhome/builddeps]
1783   --with-builddeps-group  chgrp the downloaded build dependencies to this
1784                           group
1785   --with-cacerts-file     specify alternative cacerts file
1786   --with-milestone        Set milestone value for build [internal]
1787   --with-update-version   Set update version value for build [b00]
1788   --with-user-release-suffix
1789                           Add a custom string to the version string if build
1790                           number isn't set.[username_builddateb00]
1791   --with-build-number     Set build number value for build [b00]
1792   --with-copyright-year   Set copyright year value for build [current year]
1793   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1794   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1795                           invocations of the Boot JDK, overriding the default
1796                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1797                           -enableassertions"
1798   --with-add-source-root  for each and every source directory, look in this
1799                           additional source root for the same directory; if it
1800                           exists and have files in it, include it in the build
1801   --with-override-source-root
1802                           for each and every source directory, look in this
1803                           override source root for the same directory; if it
1804                           exists, use that directory instead and ignore the
1805                           directory in the original source root
1806   --with-adds-and-overrides
1807                           use the subdirs 'adds' and 'overrides' in the
1808                           specified directory as add-source-root and
1809                           override-source-root
1810   --with-override-langtools
1811                           use this langtools dir for the build
1812   --with-override-corba   use this corba dir for the build
1813   --with-override-jaxp    use this jaxp dir for the build
1814   --with-override-jaxws   use this jaxws dir for the build
1815   --with-override-hotspot use this hotspot dir for the build
1816   --with-override-nashorn use this nashorn dir for the build
1817   --with-override-jdk     use this jdk dir for the build
1818   --with-import-hotspot   import hotspot binaries from this jdk image or
1819                           hotspot build dist dir instead of building from
1820                           source
1821   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1822                           only) [probed]
1823   --with-dxsdk            Deprecated. Option is kept for backwards
1824                           compatibility and is ignored
1825   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1826                           compatibility and is ignored
1827   --with-dxsdk-include    Deprecated. Option is kept for backwards
1828                           compatibility and is ignored
1829   --with-jtreg            Regression Test Harness [probed]
1830   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1831   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1832   --with-extra-ldflags    extra flags to be used when linking jdk
1833   --with-x                use the X Window System
1834   --with-cups             specify prefix directory for the cups package
1835                           (expecting the headers under PATH/include)
1836   --with-cups-include     specify directory for the cups include files
1837   --with-freetype         specify prefix directory for the freetype package
1838                           (expecting the libraries under PATH/lib and the
1839                           headers under PATH/include)
1840   --with-freetype-include specify directory for the freetype include files
1841   --with-freetype-lib     specify directory for the freetype library
1842   --with-alsa             specify prefix directory for the alsa package
1843                           (expecting the libraries under PATH/lib and the
1844                           headers under PATH/include)
1845   --with-alsa-include     specify directory for the alsa include files
1846   --with-alsa-lib         specify directory for the alsa library
1847   --with-giflib           use giflib from build system or OpenJDK source
1848                           (system, bundled) [bundled]
1849   --with-zlib             use zlib from build system or OpenJDK source
1850                           (system, bundled) [bundled]
1851   --with-stdc++lib=<static>,<dynamic>,<default>
1852                           force linking of the C++ runtime on Linux to either
1853                           static or dynamic, default is static with dynamic as
1854                           fallback
1855   --with-num-cores        number of cores in the build system, e.g.
1856                           --with-num-cores=8 [probed]
1857   --with-memory-size      memory (in MB) available in the build system, e.g.
1858                           --with-memory-size=1024 [probed]
1859   --with-jobs             number of parallel jobs to let make run [calculated
1860                           based on cores and memory]
1861   --with-sjavac-server-java
1862                           use this java binary for running the sjavac
1863                           background server [Boot JDK java]
1864   --with-ccache-dir       where to store ccache files [~/.ccache]
1865 
1866 Some influential environment variables:
1867   PKG_CONFIG  path to pkg-config utility
1868   CC          C compiler command
1869   CFLAGS      C compiler flags
1870   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1871               nonstandard directory <lib dir>
1872   LIBS        libraries to pass to the linker, e.g. -l<library>
1873   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1874               you have headers in a nonstandard directory <include dir>
1875   CXX         C++ compiler command
1876   CXXFLAGS    C++ compiler flags
1877   OBJC        Objective C compiler command
1878   OBJCFLAGS   Objective C compiler flags
1879   CPP         C preprocessor
1880   CXXCPP      C++ preprocessor
1881   XMKMF       Path to xmkmf, Makefile generator for X Window System
1882   FREETYPE_CFLAGS
1883               C compiler flags for FREETYPE, overriding pkg-config
1884   FREETYPE_LIBS
1885               linker flags for FREETYPE, overriding pkg-config
1886   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1887   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1888   LIBFFI_CFLAGS
1889               C compiler flags for LIBFFI, overriding pkg-config
1890   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1891 
1892 Use these variables to override the choices made by `configure' or to help
1893 it to find libraries and programs with nonstandard names/locations.
1894 
1895 Report bugs to <build-dev@openjdk.java.net>.
1896 OpenJDK home page: <http://openjdk.java.net>.
1897 _ACEOF
1898 ac_status=$?
1899 fi
1900 
1901 if test "$ac_init_help" = "recursive"; then
1902   # If there are subdirs, report their specific --help.
1903   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1904     test -d "$ac_dir" ||
1905       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1906       continue
1907     ac_builddir=.
1908 
1909 case "$ac_dir" in
1910 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1911 *)
1912   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1913   # A ".." for each directory in $ac_dir_suffix.
1914   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1915   case $ac_top_builddir_sub in
1916   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1917   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1918   esac ;;
1919 esac
1920 ac_abs_top_builddir=$ac_pwd
1921 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1922 # for backward compatibility:
1923 ac_top_builddir=$ac_top_build_prefix
1924 
1925 case $srcdir in
1926   .)  # We are building in place.
1927     ac_srcdir=.
1928     ac_top_srcdir=$ac_top_builddir_sub
1929     ac_abs_top_srcdir=$ac_pwd ;;
1930   [\\/]* | ?:[\\/]* )  # Absolute name.
1931     ac_srcdir=$srcdir$ac_dir_suffix;
1932     ac_top_srcdir=$srcdir
1933     ac_abs_top_srcdir=$srcdir ;;
1934   *) # Relative name.
1935     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1936     ac_top_srcdir=$ac_top_build_prefix$srcdir
1937     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1938 esac
1939 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1940 
1941     cd "$ac_dir" || { ac_status=$?; continue; }
1942     # Check for guested configure.
1943     if test -f "$ac_srcdir/configure.gnu"; then
1944       echo &&
1945       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1946     elif test -f "$ac_srcdir/configure"; then
1947       echo &&
1948       $SHELL "$ac_srcdir/configure" --help=recursive
1949     else
1950       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1951     fi || ac_status=$?
1952     cd "$ac_pwd" || { ac_status=$?; break; }
1953   done
1954 fi
1955 
1956 test -n "$ac_init_help" && exit $ac_status
1957 if $ac_init_version; then
1958   cat <<\_ACEOF
1959 OpenJDK configure jdk8
1960 generated by GNU Autoconf 2.69
1961 
1962 Copyright (C) 2012 Free Software Foundation, Inc.
1963 This configure script is free software; the Free Software Foundation
1964 gives unlimited permission to copy, distribute and modify it.
1965 _ACEOF
1966   exit
1967 fi
1968 
1969 ## ------------------------ ##
1970 ## Autoconf initialization. ##
1971 ## ------------------------ ##
1972 
1973 # ac_fn_c_try_compile LINENO
1974 # --------------------------
1975 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1976 ac_fn_c_try_compile ()
1977 {
1978   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979   rm -f conftest.$ac_objext
1980   if { { ac_try="$ac_compile"
1981 case "(($ac_try" in
1982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1983   *) ac_try_echo=$ac_try;;
1984 esac
1985 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1986 $as_echo "$ac_try_echo"; } >&5
1987   (eval "$ac_compile") 2>conftest.err
1988   ac_status=$?
1989   if test -s conftest.err; then
1990     grep -v '^ *+' conftest.err >conftest.er1
1991     cat conftest.er1 >&5
1992     mv -f conftest.er1 conftest.err
1993   fi
1994   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1995   test $ac_status = 0; } && {
1996          test -z "$ac_c_werror_flag" ||
1997          test ! -s conftest.err
1998        } && test -s conftest.$ac_objext; then :
1999   ac_retval=0
2000 else
2001   $as_echo "$as_me: failed program was:" >&5
2002 sed 's/^/| /' conftest.$ac_ext >&5
2003 
2004         ac_retval=1
2005 fi
2006   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2007   as_fn_set_status $ac_retval
2008 
2009 } # ac_fn_c_try_compile
2010 
2011 # ac_fn_cxx_try_compile LINENO
2012 # ----------------------------
2013 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2014 ac_fn_cxx_try_compile ()
2015 {
2016   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2017   rm -f conftest.$ac_objext
2018   if { { ac_try="$ac_compile"
2019 case "(($ac_try" in
2020   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2021   *) ac_try_echo=$ac_try;;
2022 esac
2023 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2024 $as_echo "$ac_try_echo"; } >&5
2025   (eval "$ac_compile") 2>conftest.err
2026   ac_status=$?
2027   if test -s conftest.err; then
2028     grep -v '^ *+' conftest.err >conftest.er1
2029     cat conftest.er1 >&5
2030     mv -f conftest.er1 conftest.err
2031   fi
2032   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2033   test $ac_status = 0; } && {
2034          test -z "$ac_cxx_werror_flag" ||
2035          test ! -s conftest.err
2036        } && test -s conftest.$ac_objext; then :
2037   ac_retval=0
2038 else
2039   $as_echo "$as_me: failed program was:" >&5
2040 sed 's/^/| /' conftest.$ac_ext >&5
2041 
2042         ac_retval=1
2043 fi
2044   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2045   as_fn_set_status $ac_retval
2046 
2047 } # ac_fn_cxx_try_compile
2048 
2049 # ac_fn_objc_try_compile LINENO
2050 # -----------------------------
2051 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2052 ac_fn_objc_try_compile ()
2053 {
2054   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055   rm -f conftest.$ac_objext
2056   if { { ac_try="$ac_compile"
2057 case "(($ac_try" in
2058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2059   *) ac_try_echo=$ac_try;;
2060 esac
2061 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2062 $as_echo "$ac_try_echo"; } >&5
2063   (eval "$ac_compile") 2>conftest.err
2064   ac_status=$?
2065   if test -s conftest.err; then
2066     grep -v '^ *+' conftest.err >conftest.er1
2067     cat conftest.er1 >&5
2068     mv -f conftest.er1 conftest.err
2069   fi
2070   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2071   test $ac_status = 0; } && {
2072          test -z "$ac_objc_werror_flag" ||
2073          test ! -s conftest.err
2074        } && test -s conftest.$ac_objext; then :
2075   ac_retval=0
2076 else
2077   $as_echo "$as_me: failed program was:" >&5
2078 sed 's/^/| /' conftest.$ac_ext >&5
2079 
2080         ac_retval=1
2081 fi
2082   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2083   as_fn_set_status $ac_retval
2084 
2085 } # ac_fn_objc_try_compile
2086 
2087 # ac_fn_c_try_cpp LINENO
2088 # ----------------------
2089 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2090 ac_fn_c_try_cpp ()
2091 {
2092   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093   if { { ac_try="$ac_cpp conftest.$ac_ext"
2094 case "(($ac_try" in
2095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2096   *) ac_try_echo=$ac_try;;
2097 esac
2098 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2099 $as_echo "$ac_try_echo"; } >&5
2100   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2101   ac_status=$?
2102   if test -s conftest.err; then
2103     grep -v '^ *+' conftest.err >conftest.er1
2104     cat conftest.er1 >&5
2105     mv -f conftest.er1 conftest.err
2106   fi
2107   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2108   test $ac_status = 0; } > conftest.i && {
2109          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2110          test ! -s conftest.err
2111        }; then :
2112   ac_retval=0
2113 else
2114   $as_echo "$as_me: failed program was:" >&5
2115 sed 's/^/| /' conftest.$ac_ext >&5
2116 
2117     ac_retval=1
2118 fi
2119   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2120   as_fn_set_status $ac_retval
2121 
2122 } # ac_fn_c_try_cpp
2123 
2124 # ac_fn_cxx_try_cpp LINENO
2125 # ------------------------
2126 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2127 ac_fn_cxx_try_cpp ()
2128 {
2129   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2130   if { { ac_try="$ac_cpp conftest.$ac_ext"
2131 case "(($ac_try" in
2132   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2133   *) ac_try_echo=$ac_try;;
2134 esac
2135 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2136 $as_echo "$ac_try_echo"; } >&5
2137   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2138   ac_status=$?
2139   if test -s conftest.err; then
2140     grep -v '^ *+' conftest.err >conftest.er1
2141     cat conftest.er1 >&5
2142     mv -f conftest.er1 conftest.err
2143   fi
2144   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2145   test $ac_status = 0; } > conftest.i && {
2146          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2147          test ! -s conftest.err
2148        }; then :
2149   ac_retval=0
2150 else
2151   $as_echo "$as_me: failed program was:" >&5
2152 sed 's/^/| /' conftest.$ac_ext >&5
2153 
2154     ac_retval=1
2155 fi
2156   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2157   as_fn_set_status $ac_retval
2158 
2159 } # ac_fn_cxx_try_cpp
2160 
2161 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2162 # ---------------------------------------------------------
2163 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2164 # the include files in INCLUDES and setting the cache variable VAR
2165 # accordingly.
2166 ac_fn_cxx_check_header_mongrel ()
2167 {
2168   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2169   if eval \${$3+:} false; then :
2170   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2171 $as_echo_n "checking for $2... " >&6; }
2172 if eval \${$3+:} false; then :
2173   $as_echo_n "(cached) " >&6
2174 fi
2175 eval ac_res=\$$3
2176                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2177 $as_echo "$ac_res" >&6; }
2178 else
2179   # Is the header compilable?
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2181 $as_echo_n "checking $2 usability... " >&6; }
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h.  */
2184 $4
2185 #include <$2>
2186 _ACEOF
2187 if ac_fn_cxx_try_compile "$LINENO"; then :
2188   ac_header_compiler=yes
2189 else
2190   ac_header_compiler=no
2191 fi
2192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2194 $as_echo "$ac_header_compiler" >&6; }
2195 
2196 # Is the header present?
2197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2198 $as_echo_n "checking $2 presence... " >&6; }
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200 /* end confdefs.h.  */
2201 #include <$2>
2202 _ACEOF
2203 if ac_fn_cxx_try_cpp "$LINENO"; then :
2204   ac_header_preproc=yes
2205 else
2206   ac_header_preproc=no
2207 fi
2208 rm -f conftest.err conftest.i conftest.$ac_ext
2209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2210 $as_echo "$ac_header_preproc" >&6; }
2211 
2212 # So?  What about this header?
2213 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2214   yes:no: )
2215     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2216 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2217     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2218 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2219     ;;
2220   no:yes:* )
2221     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2222 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2223     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2224 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2225     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2226 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2227     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2228 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2229     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2230 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2231 ( $as_echo "## ----------------------------------------- ##
2232 ## Report this to build-dev@openjdk.java.net ##
2233 ## ----------------------------------------- ##"
2234      ) | sed "s/^/$as_me: WARNING:     /" >&2
2235     ;;
2236 esac
2237   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2238 $as_echo_n "checking for $2... " >&6; }
2239 if eval \${$3+:} false; then :
2240   $as_echo_n "(cached) " >&6
2241 else
2242   eval "$3=\$ac_header_compiler"
2243 fi
2244 eval ac_res=\$$3
2245                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2246 $as_echo "$ac_res" >&6; }
2247 fi
2248   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2249 
2250 } # ac_fn_cxx_check_header_mongrel
2251 
2252 # ac_fn_cxx_try_run LINENO
2253 # ------------------------
2254 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2255 # that executables *can* be run.
2256 ac_fn_cxx_try_run ()
2257 {
2258   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259   if { { ac_try="$ac_link"
2260 case "(($ac_try" in
2261   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2262   *) ac_try_echo=$ac_try;;
2263 esac
2264 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2265 $as_echo "$ac_try_echo"; } >&5
2266   (eval "$ac_link") 2>&5
2267   ac_status=$?
2268   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2269   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2270   { { case "(($ac_try" in
2271   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2272   *) ac_try_echo=$ac_try;;
2273 esac
2274 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2275 $as_echo "$ac_try_echo"; } >&5
2276   (eval "$ac_try") 2>&5
2277   ac_status=$?
2278   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2279   test $ac_status = 0; }; }; then :
2280   ac_retval=0
2281 else
2282   $as_echo "$as_me: program exited with status $ac_status" >&5
2283        $as_echo "$as_me: failed program was:" >&5
2284 sed 's/^/| /' conftest.$ac_ext >&5
2285 
2286        ac_retval=$ac_status
2287 fi
2288   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2289   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290   as_fn_set_status $ac_retval
2291 
2292 } # ac_fn_cxx_try_run
2293 
2294 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2295 # ---------------------------------------------------------
2296 # Tests whether HEADER exists and can be compiled using the include files in
2297 # INCLUDES, setting the cache variable VAR accordingly.
2298 ac_fn_cxx_check_header_compile ()
2299 {
2300   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2302 $as_echo_n "checking for $2... " >&6; }
2303 if eval \${$3+:} false; then :
2304   $as_echo_n "(cached) " >&6
2305 else
2306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307 /* end confdefs.h.  */
2308 $4
2309 #include <$2>
2310 _ACEOF
2311 if ac_fn_cxx_try_compile "$LINENO"; then :
2312   eval "$3=yes"
2313 else
2314   eval "$3=no"
2315 fi
2316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2317 fi
2318 eval ac_res=\$$3
2319                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2320 $as_echo "$ac_res" >&6; }
2321   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2322 
2323 } # ac_fn_cxx_check_header_compile
2324 
2325 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2326 # ----------------------------------------------
2327 # Tries to find the compile-time value of EXPR in a program that includes
2328 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2329 # computed
2330 ac_fn_cxx_compute_int ()
2331 {
2332   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2333   if test "$cross_compiling" = yes; then
2334     # Depending upon the size, compute the lo and hi bounds.
2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336 /* end confdefs.h.  */
2337 $4
2338 int
2339 main ()
2340 {
2341 static int test_array [1 - 2 * !(($2) >= 0)];
2342 test_array [0] = 0;
2343 return test_array [0];
2344 
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 if ac_fn_cxx_try_compile "$LINENO"; then :
2350   ac_lo=0 ac_mid=0
2351   while :; do
2352     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353 /* end confdefs.h.  */
2354 $4
2355 int
2356 main ()
2357 {
2358 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2359 test_array [0] = 0;
2360 return test_array [0];
2361 
2362   ;
2363   return 0;
2364 }
2365 _ACEOF
2366 if ac_fn_cxx_try_compile "$LINENO"; then :
2367   ac_hi=$ac_mid; break
2368 else
2369   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2370                         if test $ac_lo -le $ac_mid; then
2371                           ac_lo= ac_hi=
2372                           break
2373                         fi
2374                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2375 fi
2376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2377   done
2378 else
2379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2380 /* end confdefs.h.  */
2381 $4
2382 int
2383 main ()
2384 {
2385 static int test_array [1 - 2 * !(($2) < 0)];
2386 test_array [0] = 0;
2387 return test_array [0];
2388 
2389   ;
2390   return 0;
2391 }
2392 _ACEOF
2393 if ac_fn_cxx_try_compile "$LINENO"; then :
2394   ac_hi=-1 ac_mid=-1
2395   while :; do
2396     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2397 /* end confdefs.h.  */
2398 $4
2399 int
2400 main ()
2401 {
2402 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2403 test_array [0] = 0;
2404 return test_array [0];
2405 
2406   ;
2407   return 0;
2408 }
2409 _ACEOF
2410 if ac_fn_cxx_try_compile "$LINENO"; then :
2411   ac_lo=$ac_mid; break
2412 else
2413   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2414                         if test $ac_mid -le $ac_hi; then
2415                           ac_lo= ac_hi=
2416                           break
2417                         fi
2418                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2419 fi
2420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421   done
2422 else
2423   ac_lo= ac_hi=
2424 fi
2425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426 fi
2427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428 # Binary search between lo and hi bounds.
2429 while test "x$ac_lo" != "x$ac_hi"; do
2430   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432 /* end confdefs.h.  */
2433 $4
2434 int
2435 main ()
2436 {
2437 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2438 test_array [0] = 0;
2439 return test_array [0];
2440 
2441   ;
2442   return 0;
2443 }
2444 _ACEOF
2445 if ac_fn_cxx_try_compile "$LINENO"; then :
2446   ac_hi=$ac_mid
2447 else
2448   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2449 fi
2450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451 done
2452 case $ac_lo in #((
2453 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2454 '') ac_retval=1 ;;
2455 esac
2456   else
2457     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2458 /* end confdefs.h.  */
2459 $4
2460 static long int longval () { return $2; }
2461 static unsigned long int ulongval () { return $2; }
2462 #include <stdio.h>
2463 #include <stdlib.h>
2464 int
2465 main ()
2466 {
2467 
2468   FILE *f = fopen ("conftest.val", "w");
2469   if (! f)
2470     return 1;
2471   if (($2) < 0)
2472     {
2473       long int i = longval ();
2474       if (i != ($2))
2475         return 1;
2476       fprintf (f, "%ld", i);
2477     }
2478   else
2479     {
2480       unsigned long int i = ulongval ();
2481       if (i != ($2))
2482         return 1;
2483       fprintf (f, "%lu", i);
2484     }
2485   /* Do not output a trailing newline, as this causes \r\n confusion
2486      on some platforms.  */
2487   return ferror (f) || fclose (f) != 0;
2488 
2489   ;
2490   return 0;
2491 }
2492 _ACEOF
2493 if ac_fn_cxx_try_run "$LINENO"; then :
2494   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2495 else
2496   ac_retval=1
2497 fi
2498 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2499   conftest.$ac_objext conftest.beam conftest.$ac_ext
2500 rm -f conftest.val
2501 
2502   fi
2503   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2504   as_fn_set_status $ac_retval
2505 
2506 } # ac_fn_cxx_compute_int
2507 
2508 # ac_fn_cxx_try_link LINENO
2509 # -------------------------
2510 # Try to link conftest.$ac_ext, and return whether this succeeded.
2511 ac_fn_cxx_try_link ()
2512 {
2513   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514   rm -f conftest.$ac_objext conftest$ac_exeext
2515   if { { ac_try="$ac_link"
2516 case "(($ac_try" in
2517   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2518   *) ac_try_echo=$ac_try;;
2519 esac
2520 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2521 $as_echo "$ac_try_echo"; } >&5
2522   (eval "$ac_link") 2>conftest.err
2523   ac_status=$?
2524   if test -s conftest.err; then
2525     grep -v '^ *+' conftest.err >conftest.er1
2526     cat conftest.er1 >&5
2527     mv -f conftest.er1 conftest.err
2528   fi
2529   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2530   test $ac_status = 0; } && {
2531          test -z "$ac_cxx_werror_flag" ||
2532          test ! -s conftest.err
2533        } && test -s conftest$ac_exeext && {
2534          test "$cross_compiling" = yes ||
2535          test -x conftest$ac_exeext
2536        }; then :
2537   ac_retval=0
2538 else
2539   $as_echo "$as_me: failed program was:" >&5
2540 sed 's/^/| /' conftest.$ac_ext >&5
2541 
2542         ac_retval=1
2543 fi
2544   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2545   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2546   # interfere with the next link command; also delete a directory that is
2547   # left behind by Apple's compiler.  We do this before executing the actions.
2548   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2549   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2550   as_fn_set_status $ac_retval
2551 
2552 } # ac_fn_cxx_try_link
2553 
2554 # ac_fn_cxx_check_func LINENO FUNC VAR
2555 # ------------------------------------
2556 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2557 ac_fn_cxx_check_func ()
2558 {
2559   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2560   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2561 $as_echo_n "checking for $2... " >&6; }
2562 if eval \${$3+:} false; then :
2563   $as_echo_n "(cached) " >&6
2564 else
2565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2566 /* end confdefs.h.  */
2567 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2568    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2569 #define $2 innocuous_$2
2570 
2571 /* System header to define __stub macros and hopefully few prototypes,
2572     which can conflict with char $2 (); below.
2573     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2574     <limits.h> exists even on freestanding compilers.  */
2575 
2576 #ifdef __STDC__
2577 # include <limits.h>
2578 #else
2579 # include <assert.h>
2580 #endif
2581 
2582 #undef $2
2583 
2584 /* Override any GCC internal prototype to avoid an error.
2585    Use char because int might match the return type of a GCC
2586    builtin and then its argument prototype would still apply.  */
2587 #ifdef __cplusplus
2588 extern "C"
2589 #endif
2590 char $2 ();
2591 /* The GNU C library defines this for functions which it implements
2592     to always fail with ENOSYS.  Some functions are actually named
2593     something starting with __ and the normal name is an alias.  */
2594 #if defined __stub_$2 || defined __stub___$2
2595 choke me
2596 #endif
2597 
2598 int
2599 main ()
2600 {
2601 return $2 ();
2602   ;
2603   return 0;
2604 }
2605 _ACEOF
2606 if ac_fn_cxx_try_link "$LINENO"; then :
2607   eval "$3=yes"
2608 else
2609   eval "$3=no"
2610 fi
2611 rm -f core conftest.err conftest.$ac_objext \
2612     conftest$ac_exeext conftest.$ac_ext
2613 fi
2614 eval ac_res=\$$3
2615                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2616 $as_echo "$ac_res" >&6; }
2617   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2618 
2619 } # ac_fn_cxx_check_func
2620 
2621 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2622 # -------------------------------------------------------
2623 # Tests whether HEADER exists and can be compiled using the include files in
2624 # INCLUDES, setting the cache variable VAR accordingly.
2625 ac_fn_c_check_header_compile ()
2626 {
2627   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2629 $as_echo_n "checking for $2... " >&6; }
2630 if eval \${$3+:} false; then :
2631   $as_echo_n "(cached) " >&6
2632 else
2633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634 /* end confdefs.h.  */
2635 $4
2636 #include <$2>
2637 _ACEOF
2638 if ac_fn_c_try_compile "$LINENO"; then :
2639   eval "$3=yes"
2640 else
2641   eval "$3=no"
2642 fi
2643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2644 fi
2645 eval ac_res=\$$3
2646                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2647 $as_echo "$ac_res" >&6; }
2648   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2649 
2650 } # ac_fn_c_check_header_compile
2651 cat >config.log <<_ACEOF
2652 This file contains any messages produced by compilers while
2653 running configure, to aid debugging if configure makes a mistake.
2654 
2655 It was created by OpenJDK $as_me jdk8, which was
2656 generated by GNU Autoconf 2.69.  Invocation command line was
2657 
2658   $ $0 $@
2659 
2660 _ACEOF
2661 exec 5>>config.log
2662 {
2663 cat <<_ASUNAME
2664 ## --------- ##
2665 ## Platform. ##
2666 ## --------- ##
2667 
2668 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2669 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2670 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2671 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2672 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2673 
2674 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2675 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2676 
2677 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2678 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2679 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2680 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2681 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2682 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2683 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2684 
2685 _ASUNAME
2686 
2687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2688 for as_dir in $PATH
2689 do
2690   IFS=$as_save_IFS
2691   test -z "$as_dir" && as_dir=.
2692     $as_echo "PATH: $as_dir"
2693   done
2694 IFS=$as_save_IFS
2695 
2696 } >&5
2697 
2698 cat >&5 <<_ACEOF
2699 
2700 
2701 ## ----------- ##
2702 ## Core tests. ##
2703 ## ----------- ##
2704 
2705 _ACEOF
2706 
2707 
2708 # Keep a trace of the command line.
2709 # Strip out --no-create and --no-recursion so they do not pile up.
2710 # Strip out --silent because we don't want to record it for future runs.
2711 # Also quote any args containing shell meta-characters.
2712 # Make two passes to allow for proper duplicate-argument suppression.
2713 ac_configure_args=
2714 ac_configure_args0=
2715 ac_configure_args1=
2716 ac_must_keep_next=false
2717 for ac_pass in 1 2
2718 do
2719   for ac_arg
2720   do
2721     case $ac_arg in
2722     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2723     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2724     | -silent | --silent | --silen | --sile | --sil)
2725       continue ;;
2726     *\'*)
2727       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2728     esac
2729     case $ac_pass in
2730     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2731     2)
2732       as_fn_append ac_configure_args1 " '$ac_arg'"
2733       if test $ac_must_keep_next = true; then
2734         ac_must_keep_next=false # Got value, back to normal.
2735       else
2736         case $ac_arg in
2737           *=* | --config-cache | -C | -disable-* | --disable-* \
2738           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2739           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2740           | -with-* | --with-* | -without-* | --without-* | --x)
2741             case "$ac_configure_args0 " in
2742               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2743             esac
2744             ;;
2745           -* ) ac_must_keep_next=true ;;
2746         esac
2747       fi
2748       as_fn_append ac_configure_args " '$ac_arg'"
2749       ;;
2750     esac
2751   done
2752 done
2753 { ac_configure_args0=; unset ac_configure_args0;}
2754 { ac_configure_args1=; unset ac_configure_args1;}
2755 
2756 # When interrupted or exit'd, cleanup temporary files, and complete
2757 # config.log.  We remove comments because anyway the quotes in there
2758 # would cause problems or look ugly.
2759 # WARNING: Use '\'' to represent an apostrophe within the trap.
2760 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2761 trap 'exit_status=$?
2762   # Save into config.log some information that might help in debugging.
2763   {
2764     echo
2765 
2766     $as_echo "## ---------------- ##
2767 ## Cache variables. ##
2768 ## ---------------- ##"
2769     echo
2770     # The following way of writing the cache mishandles newlines in values,
2771 (
2772   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2773     eval ac_val=\$$ac_var
2774     case $ac_val in #(
2775     *${as_nl}*)
2776       case $ac_var in #(
2777       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2778 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2779       esac
2780       case $ac_var in #(
2781       _ | IFS | as_nl) ;; #(
2782       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2783       *) { eval $ac_var=; unset $ac_var;} ;;
2784       esac ;;
2785     esac
2786   done
2787   (set) 2>&1 |
2788     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2789     *${as_nl}ac_space=\ *)
2790       sed -n \
2791         "s/'\''/'\''\\\\'\'''\''/g;
2792           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2793       ;; #(
2794     *)
2795       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2796       ;;
2797     esac |
2798     sort
2799 )
2800     echo
2801 
2802     $as_echo "## ----------------- ##
2803 ## Output variables. ##
2804 ## ----------------- ##"
2805     echo
2806     for ac_var in $ac_subst_vars
2807     do
2808       eval ac_val=\$$ac_var
2809       case $ac_val in
2810       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2811       esac
2812       $as_echo "$ac_var='\''$ac_val'\''"
2813     done | sort
2814     echo
2815 
2816     if test -n "$ac_subst_files"; then
2817       $as_echo "## ------------------- ##
2818 ## File substitutions. ##
2819 ## ------------------- ##"
2820       echo
2821       for ac_var in $ac_subst_files
2822       do
2823         eval ac_val=\$$ac_var
2824         case $ac_val in
2825         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2826         esac
2827         $as_echo "$ac_var='\''$ac_val'\''"
2828       done | sort
2829       echo
2830     fi
2831 
2832     if test -s confdefs.h; then
2833       $as_echo "## ----------- ##
2834 ## confdefs.h. ##
2835 ## ----------- ##"
2836       echo
2837       cat confdefs.h
2838       echo
2839     fi
2840     test "$ac_signal" != 0 &&
2841       $as_echo "$as_me: caught signal $ac_signal"
2842     $as_echo "$as_me: exit $exit_status"
2843   } >&5
2844   rm -f core *.core core.conftest.* &&
2845     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2846     exit $exit_status
2847 ' 0
2848 for ac_signal in 1 2 13 15; do
2849   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2850 done
2851 ac_signal=0
2852 
2853 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2854 rm -f -r conftest* confdefs.h
2855 
2856 $as_echo "/* confdefs.h */" > confdefs.h
2857 
2858 # Predefined preprocessor variables.
2859 
2860 cat >>confdefs.h <<_ACEOF
2861 #define PACKAGE_NAME "$PACKAGE_NAME"
2862 _ACEOF
2863 
2864 cat >>confdefs.h <<_ACEOF
2865 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2866 _ACEOF
2867 
2868 cat >>confdefs.h <<_ACEOF
2869 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2870 _ACEOF
2871 
2872 cat >>confdefs.h <<_ACEOF
2873 #define PACKAGE_STRING "$PACKAGE_STRING"
2874 _ACEOF
2875 
2876 cat >>confdefs.h <<_ACEOF
2877 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2878 _ACEOF
2879 
2880 cat >>confdefs.h <<_ACEOF
2881 #define PACKAGE_URL "$PACKAGE_URL"
2882 _ACEOF
2883 
2884 
2885 # Let the site file select an alternate cache file if it wants to.
2886 # Prefer an explicitly selected file to automatically selected ones.
2887 ac_site_file1=NONE
2888 ac_site_file2=NONE
2889 if test -n "$CONFIG_SITE"; then
2890   # We do not want a PATH search for config.site.
2891   case $CONFIG_SITE in #((
2892     -*)  ac_site_file1=./$CONFIG_SITE;;
2893     */*) ac_site_file1=$CONFIG_SITE;;
2894     *)   ac_site_file1=./$CONFIG_SITE;;
2895   esac
2896 elif test "x$prefix" != xNONE; then
2897   ac_site_file1=$prefix/share/config.site
2898   ac_site_file2=$prefix/etc/config.site
2899 else
2900   ac_site_file1=$ac_default_prefix/share/config.site
2901   ac_site_file2=$ac_default_prefix/etc/config.site
2902 fi
2903 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2904 do
2905   test "x$ac_site_file" = xNONE && continue
2906   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2907     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2908 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2909     sed 's/^/| /' "$ac_site_file" >&5
2910     . "$ac_site_file" \
2911       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2912 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2913 as_fn_error $? "failed to load site script $ac_site_file
2914 See \`config.log' for more details" "$LINENO" 5; }
2915   fi
2916 done
2917 
2918 if test -r "$cache_file"; then
2919   # Some versions of bash will fail to source /dev/null (special files
2920   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2921   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2922     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2923 $as_echo "$as_me: loading cache $cache_file" >&6;}
2924     case $cache_file in
2925       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2926       *)                      . "./$cache_file";;
2927     esac
2928   fi
2929 else
2930   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2931 $as_echo "$as_me: creating cache $cache_file" >&6;}
2932   >$cache_file
2933 fi
2934 
2935 # Check that the precious variables saved in the cache have kept the same
2936 # value.
2937 ac_cache_corrupted=false
2938 for ac_var in $ac_precious_vars; do
2939   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2940   eval ac_new_set=\$ac_env_${ac_var}_set
2941   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2942   eval ac_new_val=\$ac_env_${ac_var}_value
2943   case $ac_old_set,$ac_new_set in
2944     set,)
2945       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2946 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2947       ac_cache_corrupted=: ;;
2948     ,set)
2949       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2950 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2951       ac_cache_corrupted=: ;;
2952     ,);;
2953     *)
2954       if test "x$ac_old_val" != "x$ac_new_val"; then
2955         # differences in whitespace do not lead to failure.
2956         ac_old_val_w=`echo x $ac_old_val`
2957         ac_new_val_w=`echo x $ac_new_val`
2958         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2959           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2960 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2961           ac_cache_corrupted=:
2962         else
2963           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2964 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2965           eval $ac_var=\$ac_old_val
2966         fi
2967         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2968 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2969         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2970 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2971       fi;;
2972   esac
2973   # Pass precious variables to config.status.
2974   if test "$ac_new_set" = set; then
2975     case $ac_new_val in
2976     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2977     *) ac_arg=$ac_var=$ac_new_val ;;
2978     esac
2979     case " $ac_configure_args " in
2980       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2981       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2982     esac
2983   fi
2984 done
2985 if $ac_cache_corrupted; then
2986   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2987 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2988   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2989 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2990   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2991 fi
2992 ## -------------------- ##
2993 ## Main body of script. ##
2994 ## -------------------- ##
2995 
2996 ac_ext=c
2997 ac_cpp='$CPP $CPPFLAGS'
2998 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2999 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3000 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3001 
3002 
3003 
3004 ac_aux_dir=
3005 for ac_dir in build-aux "$srcdir"/build-aux; do
3006   if test -f "$ac_dir/install-sh"; then
3007     ac_aux_dir=$ac_dir
3008     ac_install_sh="$ac_aux_dir/install-sh -c"
3009     break
3010   elif test -f "$ac_dir/install.sh"; then
3011     ac_aux_dir=$ac_dir
3012     ac_install_sh="$ac_aux_dir/install.sh -c"
3013     break
3014   elif test -f "$ac_dir/shtool"; then
3015     ac_aux_dir=$ac_dir
3016     ac_install_sh="$ac_aux_dir/shtool install -c"
3017     break
3018   fi
3019 done
3020 if test -z "$ac_aux_dir"; then
3021   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3022 fi
3023 
3024 # These three variables are undocumented and unsupported,
3025 # and are intended to be withdrawn in a future Autoconf release.
3026 # They can cause serious problems if a builder's source tree is in a directory
3027 # whose full name contains unusual characters.
3028 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3029 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3030 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3031 
3032 
3033 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3034 
3035 #
3036 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3037 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3038 #
3039 # This code is free software; you can redistribute it and/or modify it
3040 # under the terms of the GNU General Public License version 2 only, as
3041 # published by the Free Software Foundation.  Oracle designates this
3042 # particular file as subject to the "Classpath" exception as provided
3043 # by Oracle in the LICENSE file that accompanied this code.
3044 #
3045 # This code is distributed in the hope that it will be useful, but WITHOUT
3046 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3047 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3048 # version 2 for more details (a copy is included in the LICENSE file that
3049 # accompanied this code).
3050 #
3051 # You should have received a copy of the GNU General Public License version
3052 # 2 along with this work; if not, write to the Free Software Foundation,
3053 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3054 #
3055 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3056 # or visit www.oracle.com if you need additional information or have any
3057 # questions.
3058 #
3059 
3060 #
3061 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3062 #
3063 # This program is free software; you can redistribute it and/or modify
3064 # it under the terms of the GNU General Public License as published by
3065 # the Free Software Foundation; either version 2 of the License, or
3066 # (at your option) any later version.
3067 #
3068 # This program is distributed in the hope that it will be useful, but
3069 # WITHOUT ANY WARRANTY; without even the implied warranty of
3070 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3071 # General Public License for more details.
3072 #
3073 # You should have received a copy of the GNU General Public License
3074 # along with this program; if not, write to the Free Software
3075 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3076 #
3077 # As a special exception to the GNU General Public License, if you
3078 # distribute this file as part of a program that contains a
3079 # configuration script generated by Autoconf, you may include it under
3080 # the same distribution terms that you use for the rest of that program.
3081 
3082 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3083 # ----------------------------------
3084 # PKG_PROG_PKG_CONFIG
3085 
3086 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3087 #
3088 # Check to see whether a particular set of modules exists.  Similar
3089 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3090 #
3091 #
3092 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3093 # this or PKG_CHECK_MODULES is called, or make sure to call
3094 # PKG_CHECK_EXISTS manually
3095 # --------------------------------------------------------------
3096 
3097 
3098 
3099 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3100 # ---------------------------------------------
3101 # _PKG_CONFIG
3102 
3103 # _PKG_SHORT_ERRORS_SUPPORTED
3104 # -----------------------------
3105 # _PKG_SHORT_ERRORS_SUPPORTED
3106 
3107 
3108 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3109 # [ACTION-IF-NOT-FOUND])
3110 #
3111 #
3112 # Note that if there is a possibility the first call to
3113 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3114 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3115 #
3116 #
3117 # --------------------------------------------------------------
3118 # PKG_CHECK_MODULES
3119 
3120 
3121 # Include these first...
3122 #
3123 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3124 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3125 #
3126 # This code is free software; you can redistribute it and/or modify it
3127 # under the terms of the GNU General Public License version 2 only, as
3128 # published by the Free Software Foundation.  Oracle designates this
3129 # particular file as subject to the "Classpath" exception as provided
3130 # by Oracle in the LICENSE file that accompanied this code.
3131 #
3132 # This code is distributed in the hope that it will be useful, but WITHOUT
3133 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3134 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3135 # version 2 for more details (a copy is included in the LICENSE file that
3136 # accompanied this code).
3137 #
3138 # You should have received a copy of the GNU General Public License version
3139 # 2 along with this work; if not, write to the Free Software Foundation,
3140 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3141 #
3142 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3143 # or visit www.oracle.com if you need additional information or have any
3144 # questions.
3145 #
3146 
3147 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3148 # If so, then append $1 to $2 \
3149 # Also set JVM_ARG_OK to true/false depending on outcome.
3150 
3151 
3152 # Appends a string to a path variable, only adding the : when needed.
3153 
3154 
3155 # This will make sure the given variable points to a full and proper
3156 # path. This means:
3157 # 1) There will be no spaces in the path. On posix platforms,
3158 #    spaces in the path will result in an error. On Windows,
3159 #    the path will be rewritten using short-style to be space-free.
3160 # 2) The path will be absolute, and it will be in unix-style (on
3161 #     cygwin).
3162 # $1: The name of the variable to fix
3163 
3164 
3165 # This will make sure the given variable points to a executable
3166 # with a full and proper path. This means:
3167 # 1) There will be no spaces in the path. On posix platforms,
3168 #    spaces in the path will result in an error. On Windows,
3169 #    the path will be rewritten using short-style to be space-free.
3170 # 2) The path will be absolute, and it will be in unix-style (on
3171 #     cygwin).
3172 # Any arguments given to the executable is preserved.
3173 # If the input variable does not have a directory specification, then
3174 # it need to be in the PATH.
3175 # $1: The name of the variable to fix
3176 
3177 
3178 
3179 
3180 # Register a --with argument but mark it as deprecated
3181 # $1: The name of the with argument to deprecate, not including --with-
3182 
3183 
3184 # Register a --enable argument but mark it as deprecated
3185 # $1: The name of the with argument to deprecate, not including --enable-
3186 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3187 
3188 
3189 
3190 
3191 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3192 # $1: variable to check
3193 # $2: executable name to print in warning (optional)
3194 
3195 
3196 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3197 # Arguments as AC_PATH_PROG:
3198 # $1: variable to set
3199 # $2: executable name to look for
3200 
3201 
3202 # Setup the most fundamental tools that relies on not much else to set up,
3203 # but is used by much of the early bootstrap code.
3204 
3205 
3206 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3207 
3208 
3209 
3210 
3211 
3212 
3213 
3214 #%%% Simple tools %%%
3215 
3216 # Check if we have found a usable version of make
3217 # $1: the path to a potential make binary (or empty)
3218 # $2: the description on how we found this
3219 
3220 
3221 # Goes looking for a usable version of GNU make.
3222 
3223 
3224 
3225 
3226 
3227 
3228 # Check if build directory is on local disk. If not possible to determine,
3229 # we prefer to claim it's local.
3230 # Argument 1: directory to test
3231 # Argument 2: what to do if it is on local disk
3232 # Argument 3: what to do otherwise (remote disk or failure)
3233 
3234 
3235 # Check that source files have basic read permissions set. This might
3236 # not be the case in cygwin in certain conditions.
3237 
3238 
3239 
3240 
3241 #
3242 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3243 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3244 #
3245 # This code is free software; you can redistribute it and/or modify it
3246 # under the terms of the GNU General Public License version 2 only, as
3247 # published by the Free Software Foundation.  Oracle designates this
3248 # particular file as subject to the "Classpath" exception as provided
3249 # by Oracle in the LICENSE file that accompanied this code.
3250 #
3251 # This code is distributed in the hope that it will be useful, but WITHOUT
3252 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3253 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3254 # version 2 for more details (a copy is included in the LICENSE file that
3255 # accompanied this code).
3256 #
3257 # You should have received a copy of the GNU General Public License version
3258 # 2 along with this work; if not, write to the Free Software Foundation,
3259 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3260 #
3261 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3262 # or visit www.oracle.com if you need additional information or have any
3263 # questions.
3264 #
3265 
3266 
3267 
3268 
3269 
3270 # Helper function which possibly converts a path using DOS-style short mode.
3271 # If so, the updated path is stored in $new_path.
3272 # $1: The path to check
3273 
3274 
3275 # Helper function which possibly converts a path using DOS-style short mode.
3276 # If so, the updated path is stored in $new_path.
3277 # $1: The path to check
3278 
3279 
3280 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3281 # and could probably be heavily simplified. However, all changes in this
3282 # area tend to need lot of testing in different scenarios, and in lack of
3283 # proper unit testing, cleaning this up has not been deemed worth the effort
3284 # at the moment.
3285 
3286 
3287 
3288 
3289 
3290 
3291 
3292 
3293 
3294 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3295 
3296 
3297 
3298 
3299 #
3300 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3301 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3302 #
3303 # This code is free software; you can redistribute it and/or modify it
3304 # under the terms of the GNU General Public License version 2 only, as
3305 # published by the Free Software Foundation.  Oracle designates this
3306 # particular file as subject to the "Classpath" exception as provided
3307 # by Oracle in the LICENSE file that accompanied this code.
3308 #
3309 # This code is distributed in the hope that it will be useful, but WITHOUT
3310 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3311 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3312 # version 2 for more details (a copy is included in the LICENSE file that
3313 # accompanied this code).
3314 #
3315 # You should have received a copy of the GNU General Public License version
3316 # 2 along with this work; if not, write to the Free Software Foundation,
3317 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3318 #
3319 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3320 # or visit www.oracle.com if you need additional information or have any
3321 # questions.
3322 #
3323 
3324 
3325 
3326 
3327 
3328 
3329 
3330 
3331 
3332 
3333 
3334 # ... then the rest
3335 #
3336 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3337 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3338 #
3339 # This code is free software; you can redistribute it and/or modify it
3340 # under the terms of the GNU General Public License version 2 only, as
3341 # published by the Free Software Foundation.  Oracle designates this
3342 # particular file as subject to the "Classpath" exception as provided
3343 # by Oracle in the LICENSE file that accompanied this code.
3344 #
3345 # This code is distributed in the hope that it will be useful, but WITHOUT
3346 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3347 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3348 # version 2 for more details (a copy is included in the LICENSE file that
3349 # accompanied this code).
3350 #
3351 # You should have received a copy of the GNU General Public License version
3352 # 2 along with this work; if not, write to the Free Software Foundation,
3353 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3354 #
3355 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3356 # or visit www.oracle.com if you need additional information or have any
3357 # questions.
3358 #
3359 
3360 # Execute the check given as argument, and verify the result
3361 # If the Boot JDK was previously found, do nothing
3362 # $1 A command line (typically autoconf macro) to execute
3363 
3364 
3365 # Test: Is bootjdk explicitely set by command line arguments?
3366 
3367 
3368 # Test: Is bootjdk available from builddeps?
3369 
3370 
3371 # Test: Is $JAVA_HOME set?
3372 
3373 
3374 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3375 
3376 
3377 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3378 
3379 
3380 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3381 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3382 # $1 = Path to directory containing jdk installations.
3383 # $2 = String to append to the found JDK directory to get the proper JDK home
3384 
3385 
3386 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3387 # environmental variable as base for where to look.
3388 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3389 
3390 
3391 # Test: Is there a JDK installed in default, well-known locations?
3392 
3393 
3394 # Check that a command-line tool in the Boot JDK is correct
3395 # $1 = name of variable to assign
3396 # $2 = name of binary
3397 
3398 
3399 ###############################################################################
3400 #
3401 # We need a Boot JDK to bootstrap the build.
3402 #
3403 
3404 
3405 
3406 
3407 
3408 #
3409 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3410 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3411 #
3412 # This code is free software; you can redistribute it and/or modify it
3413 # under the terms of the GNU General Public License version 2 only, as
3414 # published by the Free Software Foundation.  Oracle designates this
3415 # particular file as subject to the "Classpath" exception as provided
3416 # by Oracle in the LICENSE file that accompanied this code.
3417 #
3418 # This code is distributed in the hope that it will be useful, but WITHOUT
3419 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3420 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3421 # version 2 for more details (a copy is included in the LICENSE file that
3422 # accompanied this code).
3423 #
3424 # You should have received a copy of the GNU General Public License version
3425 # 2 along with this work; if not, write to the Free Software Foundation,
3426 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3427 #
3428 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3429 # or visit www.oracle.com if you need additional information or have any
3430 # questions.
3431 #
3432 
3433 
3434 
3435 
3436 
3437 
3438 
3439 
3440 
3441 
3442 
3443 
3444 
3445 
3446 
3447 
3448 
3449 
3450 
3451 
3452 #
3453 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3454 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3455 #
3456 # This code is free software; you can redistribute it and/or modify it
3457 # under the terms of the GNU General Public License version 2 only, as
3458 # published by the Free Software Foundation.  Oracle designates this
3459 # particular file as subject to the "Classpath" exception as provided
3460 # by Oracle in the LICENSE file that accompanied this code.
3461 #
3462 # This code is distributed in the hope that it will be useful, but WITHOUT
3463 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3464 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3465 # version 2 for more details (a copy is included in the LICENSE file that
3466 # accompanied this code).
3467 #
3468 # You should have received a copy of the GNU General Public License version
3469 # 2 along with this work; if not, write to the Free Software Foundation,
3470 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3471 #
3472 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3473 # or visit www.oracle.com if you need additional information or have any
3474 # questions.
3475 #
3476 
3477 
3478 
3479 
3480 
3481 cygwin_help() {
3482   case $1 in
3483     unzip)
3484       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3485       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3486       ;;
3487     zip)
3488       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3489       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3490       ;;
3491     make)
3492       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3493       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3494       ;;
3495     freetype)
3496       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3497         HELP_MSG="To install freetype, run:
3498 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3499 chmod +x /tmp/freetype-setup.exe
3500 /tmp/freetype-setup.exe
3501 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3502 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3503       else
3504         HELP_MSG="You need to build a 64-bit version of freetype.
3505 This is not readily available.
3506 You can find source code and build instructions on
3507 http://www.freetype.org/
3508 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3509       fi
3510       ;;
3511   esac
3512 }
3513 
3514 msys_help() {
3515   PKGHANDLER_COMMAND=""
3516 }
3517 
3518 apt_help() {
3519   case $1 in
3520     devkit)
3521       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3522     openjdk)
3523       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3524     alsa)
3525       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3526     cups)
3527       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3528     freetype)
3529       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3530     pulse)
3531       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3532     x11)
3533       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3534     ccache)
3535       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3536   esac
3537 }
3538 
3539 yum_help() {
3540   case $1 in
3541     devkit)
3542       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3543     openjdk)
3544       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3545     alsa)
3546       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3547     cups)
3548       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3549     freetype)
3550       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3551     pulse)
3552       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3553     x11)
3554       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3555     ccache)
3556       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3557   esac
3558 }
3559 
3560 port_help() {
3561   PKGHANDLER_COMMAND=""
3562 }
3563 
3564 pkgutil_help() {
3565   PKGHANDLER_COMMAND=""
3566 }
3567 
3568 pkgadd_help() {
3569   PKGHANDLER_COMMAND=""
3570 }
3571 
3572 
3573 
3574 #
3575 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3576 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3577 #
3578 # This code is free software; you can redistribute it and/or modify it
3579 # under the terms of the GNU General Public License version 2 only, as
3580 # published by the Free Software Foundation.  Oracle designates this
3581 # particular file as subject to the "Classpath" exception as provided
3582 # by Oracle in the LICENSE file that accompanied this code.
3583 #
3584 # This code is distributed in the hope that it will be useful, but WITHOUT
3585 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3586 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3587 # version 2 for more details (a copy is included in the LICENSE file that
3588 # accompanied this code).
3589 #
3590 # You should have received a copy of the GNU General Public License version
3591 # 2 along with this work; if not, write to the Free Software Foundation,
3592 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3593 #
3594 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3595 # or visit www.oracle.com if you need additional information or have any
3596 # questions.
3597 #
3598 
3599 
3600 
3601 
3602 
3603 
3604 
3605 
3606 
3607 
3608 ###############################################################################
3609 #
3610 # Should we build only OpenJDK even if closed sources are present?
3611 #
3612 
3613 
3614 
3615 
3616 ###############################################################################
3617 #
3618 # Setup version numbers
3619 #
3620 
3621 
3622 
3623 
3624 
3625 
3626 # Support for customization of the build process. Some build files
3627 # will include counterparts from this location, if they exist. This allows
3628 # for a degree of customization of the build targets and the rules/recipes
3629 # to create them
3630 
3631 # Check whether --with-custom-make-dir was given.
3632 if test "${with_custom_make_dir+set}" = set; then :
3633   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3634 fi
3635 
3636 
3637 
3638 #
3639 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3640 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3641 #
3642 # This code is free software; you can redistribute it and/or modify it
3643 # under the terms of the GNU General Public License version 2 only, as
3644 # published by the Free Software Foundation.  Oracle designates this
3645 # particular file as subject to the "Classpath" exception as provided
3646 # by Oracle in the LICENSE file that accompanied this code.
3647 #
3648 # This code is distributed in the hope that it will be useful, but WITHOUT
3649 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3650 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3651 # version 2 for more details (a copy is included in the LICENSE file that
3652 # accompanied this code).
3653 #
3654 # You should have received a copy of the GNU General Public License version
3655 # 2 along with this work; if not, write to the Free Software Foundation,
3656 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3657 #
3658 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3659 # or visit www.oracle.com if you need additional information or have any
3660 # questions.
3661 #
3662 
3663 
3664 
3665 
3666 
3667 
3668 
3669 
3670 
3671 
3672 
3673 
3674 
3675 
3676 
3677 
3678 
3679 #
3680 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3681 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3682 #
3683 # This code is free software; you can redistribute it and/or modify it
3684 # under the terms of the GNU General Public License version 2 only, as
3685 # published by the Free Software Foundation.  Oracle designates this
3686 # particular file as subject to the "Classpath" exception as provided
3687 # by Oracle in the LICENSE file that accompanied this code.
3688 #
3689 # This code is distributed in the hope that it will be useful, but WITHOUT
3690 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3691 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3692 # version 2 for more details (a copy is included in the LICENSE file that
3693 # accompanied this code).
3694 #
3695 # You should have received a copy of the GNU General Public License version
3696 # 2 along with this work; if not, write to the Free Software Foundation,
3697 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3698 #
3699 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3700 # or visit www.oracle.com if you need additional information or have any
3701 # questions.
3702 #
3703 
3704 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3705 # Converts autoconf style CPU name to OpenJDK style, into
3706 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3707 
3708 
3709 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3710 # Converts autoconf style OS name to OpenJDK style, into
3711 # VAR_OS and VAR_OS_API.
3712 
3713 
3714 # Expects $host_os $host_cpu $build_os and $build_cpu
3715 # and $with_target_bits to have been setup!
3716 #
3717 # Translate the standard triplet(quadruplet) definition
3718 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3719 # OPENJDK_BUILD_OS, etc.
3720 
3721 
3722 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3723 # accordingly. Must be done after setting up build and target system, but before
3724 # doing anything else with these values.
3725 
3726 
3727 # Setup the legacy variables, for controlling the old makefiles.
3728 #
3729 
3730 
3731 
3732 
3733 #%%% Build and target systems %%%
3734 
3735 
3736 
3737 
3738 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3739 # Add -mX to various FLAGS variables.
3740 
3741 
3742 
3743 
3744 
3745 
3746 #
3747 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3748 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3749 #
3750 # This code is free software; you can redistribute it and/or modify it
3751 # under the terms of the GNU General Public License version 2 only, as
3752 # published by the Free Software Foundation.  Oracle designates this
3753 # particular file as subject to the "Classpath" exception as provided
3754 # by Oracle in the LICENSE file that accompanied this code.
3755 #
3756 # This code is distributed in the hope that it will be useful, but WITHOUT
3757 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3758 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3759 # version 2 for more details (a copy is included in the LICENSE file that
3760 # accompanied this code).
3761 #
3762 # You should have received a copy of the GNU General Public License version
3763 # 2 along with this work; if not, write to the Free Software Foundation,
3764 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3765 #
3766 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3767 # or visit www.oracle.com if you need additional information or have any
3768 # questions.
3769 #
3770 
3771 
3772 
3773 
3774 
3775 
3776 
3777 
3778 #
3779 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3780 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3781 #
3782 # This code is free software; you can redistribute it and/or modify it
3783 # under the terms of the GNU General Public License version 2 only, as
3784 # published by the Free Software Foundation.  Oracle designates this
3785 # particular file as subject to the "Classpath" exception as provided
3786 # by Oracle in the LICENSE file that accompanied this code.
3787 #
3788 # This code is distributed in the hope that it will be useful, but WITHOUT
3789 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3790 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3791 # version 2 for more details (a copy is included in the LICENSE file that
3792 # accompanied this code).
3793 #
3794 # You should have received a copy of the GNU General Public License version
3795 # 2 along with this work; if not, write to the Free Software Foundation,
3796 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3797 #
3798 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3799 # or visit www.oracle.com if you need additional information or have any
3800 # questions.
3801 #
3802 
3803 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
3804 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
3805 
3806 
3807 # Check if the configured compiler (C and C++) is of a specific version or
3808 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
3809 #
3810 # Arguments:
3811 #   $1:   The version string to check against the found version
3812 #   $2:   block to run if the compiler is at least this version (>=)
3813 #   $3:   block to run if the compiler is older than this version (<)
3814 
3815 
3816 # $1 = compiler to test (CC or CXX)
3817 # $2 = human readable name of compiler (C or C++)
3818 
3819 
3820 
3821 
3822 
3823 # $1 = compiler to test (CC or CXX)
3824 # $2 = human readable name of compiler (C or C++)
3825 # $3 = list of compiler names to search for
3826 
3827 
3828 
3829 
3830 
3831 
3832 
3833 
3834 
3835 
3836 
3837 
3838 
3839 # TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3840 #                                      [RUN-IF-FALSE])
3841 # ------------------------------------------------------------
3842 # Check that the C compiler supports an argument
3843 
3844 
3845 # TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3846 #                                        [RUN-IF-FALSE])
3847 # ------------------------------------------------------------
3848 # Check that the C++ compiler supports an argument
3849 
3850 
3851 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3852 #                                    [RUN-IF-FALSE])
3853 # ------------------------------------------------------------
3854 # Check that the C and C++ compilers support an argument
3855 
3856 
3857 
3858 
3859 # Setup the JTREG paths
3860 
3861 
3862 
3863 
3864 #
3865 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3866 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3867 #
3868 # This code is free software; you can redistribute it and/or modify it
3869 # under the terms of the GNU General Public License version 2 only, as
3870 # published by the Free Software Foundation.  Oracle designates this
3871 # particular file as subject to the "Classpath" exception as provided
3872 # by Oracle in the LICENSE file that accompanied this code.
3873 #
3874 # This code is distributed in the hope that it will be useful, but WITHOUT
3875 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3876 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3877 # version 2 for more details (a copy is included in the LICENSE file that
3878 # accompanied this code).
3879 #
3880 # You should have received a copy of the GNU General Public License version
3881 # 2 along with this work; if not, write to the Free Software Foundation,
3882 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3883 #
3884 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3885 # or visit www.oracle.com if you need additional information or have any
3886 # questions.
3887 #
3888 
3889 
3890 
3891 
3892 
3893 
3894 
3895 # Check if the VS env variables were setup prior to running configure.
3896 # If not, then find vcvarsall.bat and run it automatically, and integrate
3897 # the set env variables into the spec file.
3898 
3899 
3900 
3901 
3902 
3903 
3904 
3905 
3906 
3907 
3908 
3909 # This line needs to be here, verbatim, after all includes and the dummy hook
3910 # definitions. It is replaced with custom functionality when building
3911 # custom sources.
3912 #CUSTOM_AUTOCONF_INCLUDE
3913 
3914 # Do not change or remove the following line, it is needed for consistency checks:
3915 DATE_WHEN_GENERATED=1521218818
3916 
3917 ###############################################################################
3918 #
3919 # Initialization / Boot-strapping
3920 #
3921 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3922 # thus it jumps back and forth, each time gaining something needed later on.
3923 #
3924 ###############################################################################
3925 
3926 # Basic initialization that must happen first of all
3927 
3928   # Save the original command line. This is passed to us by the wrapper configure script.
3929 
3930   DATE_WHEN_CONFIGURED=`LANG=C date`
3931 
3932   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3933 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3934   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3935 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3936 
3937 
3938 
3939   # Start with tools that do not need have cross compilation support
3940   # and can be expected to be found in the default PATH. These tools are
3941   # used by configure. Nor are these tools expected to be found in the
3942   # devkit from the builddeps server either, since they are
3943   # needed to download the devkit.
3944 
3945   # First are all the simple required tools.
3946 
3947   for ac_prog in basename
3948 do
3949   # Extract the first word of "$ac_prog", so it can be a program name with args.
3950 set dummy $ac_prog; ac_word=$2
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3952 $as_echo_n "checking for $ac_word... " >&6; }
3953 if ${ac_cv_path_BASENAME+:} false; then :
3954   $as_echo_n "(cached) " >&6
3955 else
3956   case $BASENAME in
3957   [\\/]* | ?:[\\/]*)
3958   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3959   ;;
3960   *)
3961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3962 for as_dir in $PATH
3963 do
3964   IFS=$as_save_IFS
3965   test -z "$as_dir" && as_dir=.
3966     for ac_exec_ext in '' $ac_executable_extensions; do
3967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3968     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3970     break 2
3971   fi
3972 done
3973   done
3974 IFS=$as_save_IFS
3975 
3976   ;;
3977 esac
3978 fi
3979 BASENAME=$ac_cv_path_BASENAME
3980 if test -n "$BASENAME"; then
3981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3982 $as_echo "$BASENAME" >&6; }
3983 else
3984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3985 $as_echo "no" >&6; }
3986 fi
3987 
3988 
3989   test -n "$BASENAME" && break
3990 done
3991 
3992 
3993   if test "x$BASENAME" = x; then
3994     if test "xbasename" = x; then
3995       PROG_NAME=basename
3996     else
3997       PROG_NAME=basename
3998     fi
3999     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4000 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4001     as_fn_error $? "Cannot continue" "$LINENO" 5
4002   fi
4003 
4004 
4005 
4006   for ac_prog in bash
4007 do
4008   # Extract the first word of "$ac_prog", so it can be a program name with args.
4009 set dummy $ac_prog; ac_word=$2
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4011 $as_echo_n "checking for $ac_word... " >&6; }
4012 if ${ac_cv_path_BASH+:} false; then :
4013   $as_echo_n "(cached) " >&6
4014 else
4015   case $BASH in
4016   [\\/]* | ?:[\\/]*)
4017   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4018   ;;
4019   *)
4020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021 for as_dir in $PATH
4022 do
4023   IFS=$as_save_IFS
4024   test -z "$as_dir" && as_dir=.
4025     for ac_exec_ext in '' $ac_executable_extensions; do
4026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4027     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4029     break 2
4030   fi
4031 done
4032   done
4033 IFS=$as_save_IFS
4034 
4035   ;;
4036 esac
4037 fi
4038 BASH=$ac_cv_path_BASH
4039 if test -n "$BASH"; then
4040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4041 $as_echo "$BASH" >&6; }
4042 else
4043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4044 $as_echo "no" >&6; }
4045 fi
4046 
4047 
4048   test -n "$BASH" && break
4049 done
4050 
4051 
4052   if test "x$BASH" = x; then
4053     if test "xbash" = x; then
4054       PROG_NAME=bash
4055     else
4056       PROG_NAME=bash
4057     fi
4058     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4059 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4060     as_fn_error $? "Cannot continue" "$LINENO" 5
4061   fi
4062 
4063 
4064 
4065   for ac_prog in cat
4066 do
4067   # Extract the first word of "$ac_prog", so it can be a program name with args.
4068 set dummy $ac_prog; ac_word=$2
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070 $as_echo_n "checking for $ac_word... " >&6; }
4071 if ${ac_cv_path_CAT+:} false; then :
4072   $as_echo_n "(cached) " >&6
4073 else
4074   case $CAT in
4075   [\\/]* | ?:[\\/]*)
4076   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4077   ;;
4078   *)
4079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080 for as_dir in $PATH
4081 do
4082   IFS=$as_save_IFS
4083   test -z "$as_dir" && as_dir=.
4084     for ac_exec_ext in '' $ac_executable_extensions; do
4085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4086     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4088     break 2
4089   fi
4090 done
4091   done
4092 IFS=$as_save_IFS
4093 
4094   ;;
4095 esac
4096 fi
4097 CAT=$ac_cv_path_CAT
4098 if test -n "$CAT"; then
4099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4100 $as_echo "$CAT" >&6; }
4101 else
4102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103 $as_echo "no" >&6; }
4104 fi
4105 
4106 
4107   test -n "$CAT" && break
4108 done
4109 
4110 
4111   if test "x$CAT" = x; then
4112     if test "xcat" = x; then
4113       PROG_NAME=cat
4114     else
4115       PROG_NAME=cat
4116     fi
4117     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4118 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4119     as_fn_error $? "Cannot continue" "$LINENO" 5
4120   fi
4121 
4122 
4123 
4124   for ac_prog in chmod
4125 do
4126   # Extract the first word of "$ac_prog", so it can be a program name with args.
4127 set dummy $ac_prog; ac_word=$2
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4129 $as_echo_n "checking for $ac_word... " >&6; }
4130 if ${ac_cv_path_CHMOD+:} false; then :
4131   $as_echo_n "(cached) " >&6
4132 else
4133   case $CHMOD in
4134   [\\/]* | ?:[\\/]*)
4135   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4136   ;;
4137   *)
4138   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4139 for as_dir in $PATH
4140 do
4141   IFS=$as_save_IFS
4142   test -z "$as_dir" && as_dir=.
4143     for ac_exec_ext in '' $ac_executable_extensions; do
4144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4145     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4147     break 2
4148   fi
4149 done
4150   done
4151 IFS=$as_save_IFS
4152 
4153   ;;
4154 esac
4155 fi
4156 CHMOD=$ac_cv_path_CHMOD
4157 if test -n "$CHMOD"; then
4158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4159 $as_echo "$CHMOD" >&6; }
4160 else
4161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4162 $as_echo "no" >&6; }
4163 fi
4164 
4165 
4166   test -n "$CHMOD" && break
4167 done
4168 
4169 
4170   if test "x$CHMOD" = x; then
4171     if test "xchmod" = x; then
4172       PROG_NAME=chmod
4173     else
4174       PROG_NAME=chmod
4175     fi
4176     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4177 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4178     as_fn_error $? "Cannot continue" "$LINENO" 5
4179   fi
4180 
4181 
4182 
4183   for ac_prog in cmp
4184 do
4185   # Extract the first word of "$ac_prog", so it can be a program name with args.
4186 set dummy $ac_prog; ac_word=$2
4187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4188 $as_echo_n "checking for $ac_word... " >&6; }
4189 if ${ac_cv_path_CMP+:} false; then :
4190   $as_echo_n "(cached) " >&6
4191 else
4192   case $CMP in
4193   [\\/]* | ?:[\\/]*)
4194   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4195   ;;
4196   *)
4197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4198 for as_dir in $PATH
4199 do
4200   IFS=$as_save_IFS
4201   test -z "$as_dir" && as_dir=.
4202     for ac_exec_ext in '' $ac_executable_extensions; do
4203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4204     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4206     break 2
4207   fi
4208 done
4209   done
4210 IFS=$as_save_IFS
4211 
4212   ;;
4213 esac
4214 fi
4215 CMP=$ac_cv_path_CMP
4216 if test -n "$CMP"; then
4217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4218 $as_echo "$CMP" >&6; }
4219 else
4220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4221 $as_echo "no" >&6; }
4222 fi
4223 
4224 
4225   test -n "$CMP" && break
4226 done
4227 
4228 
4229   if test "x$CMP" = x; then
4230     if test "xcmp" = x; then
4231       PROG_NAME=cmp
4232     else
4233       PROG_NAME=cmp
4234     fi
4235     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4236 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4237     as_fn_error $? "Cannot continue" "$LINENO" 5
4238   fi
4239 
4240 
4241 
4242   for ac_prog in comm
4243 do
4244   # Extract the first word of "$ac_prog", so it can be a program name with args.
4245 set dummy $ac_prog; ac_word=$2
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4247 $as_echo_n "checking for $ac_word... " >&6; }
4248 if ${ac_cv_path_COMM+:} false; then :
4249   $as_echo_n "(cached) " >&6
4250 else
4251   case $COMM in
4252   [\\/]* | ?:[\\/]*)
4253   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4254   ;;
4255   *)
4256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4257 for as_dir in $PATH
4258 do
4259   IFS=$as_save_IFS
4260   test -z "$as_dir" && as_dir=.
4261     for ac_exec_ext in '' $ac_executable_extensions; do
4262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4263     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4265     break 2
4266   fi
4267 done
4268   done
4269 IFS=$as_save_IFS
4270 
4271   ;;
4272 esac
4273 fi
4274 COMM=$ac_cv_path_COMM
4275 if test -n "$COMM"; then
4276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4277 $as_echo "$COMM" >&6; }
4278 else
4279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4280 $as_echo "no" >&6; }
4281 fi
4282 
4283 
4284   test -n "$COMM" && break
4285 done
4286 
4287 
4288   if test "x$COMM" = x; then
4289     if test "xcomm" = x; then
4290       PROG_NAME=comm
4291     else
4292       PROG_NAME=comm
4293     fi
4294     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4295 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4296     as_fn_error $? "Cannot continue" "$LINENO" 5
4297   fi
4298 
4299 
4300 
4301   for ac_prog in cp
4302 do
4303   # Extract the first word of "$ac_prog", so it can be a program name with args.
4304 set dummy $ac_prog; ac_word=$2
4305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4306 $as_echo_n "checking for $ac_word... " >&6; }
4307 if ${ac_cv_path_CP+:} false; then :
4308   $as_echo_n "(cached) " >&6
4309 else
4310   case $CP in
4311   [\\/]* | ?:[\\/]*)
4312   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4313   ;;
4314   *)
4315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316 for as_dir in $PATH
4317 do
4318   IFS=$as_save_IFS
4319   test -z "$as_dir" && as_dir=.
4320     for ac_exec_ext in '' $ac_executable_extensions; do
4321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4322     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4324     break 2
4325   fi
4326 done
4327   done
4328 IFS=$as_save_IFS
4329 
4330   ;;
4331 esac
4332 fi
4333 CP=$ac_cv_path_CP
4334 if test -n "$CP"; then
4335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4336 $as_echo "$CP" >&6; }
4337 else
4338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4339 $as_echo "no" >&6; }
4340 fi
4341 
4342 
4343   test -n "$CP" && break
4344 done
4345 
4346 
4347   if test "x$CP" = x; then
4348     if test "xcp" = x; then
4349       PROG_NAME=cp
4350     else
4351       PROG_NAME=cp
4352     fi
4353     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4354 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4355     as_fn_error $? "Cannot continue" "$LINENO" 5
4356   fi
4357 
4358 
4359 
4360   for ac_prog in cpio
4361 do
4362   # Extract the first word of "$ac_prog", so it can be a program name with args.
4363 set dummy $ac_prog; ac_word=$2
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4365 $as_echo_n "checking for $ac_word... " >&6; }
4366 if ${ac_cv_path_CPIO+:} false; then :
4367   $as_echo_n "(cached) " >&6
4368 else
4369   case $CPIO in
4370   [\\/]* | ?:[\\/]*)
4371   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4372   ;;
4373   *)
4374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375 for as_dir in $PATH
4376 do
4377   IFS=$as_save_IFS
4378   test -z "$as_dir" && as_dir=.
4379     for ac_exec_ext in '' $ac_executable_extensions; do
4380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4381     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4383     break 2
4384   fi
4385 done
4386   done
4387 IFS=$as_save_IFS
4388 
4389   ;;
4390 esac
4391 fi
4392 CPIO=$ac_cv_path_CPIO
4393 if test -n "$CPIO"; then
4394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4395 $as_echo "$CPIO" >&6; }
4396 else
4397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4398 $as_echo "no" >&6; }
4399 fi
4400 
4401 
4402   test -n "$CPIO" && break
4403 done
4404 
4405 
4406   if test "x$CPIO" = x; then
4407     if test "xcpio" = x; then
4408       PROG_NAME=cpio
4409     else
4410       PROG_NAME=cpio
4411     fi
4412     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4413 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4414     as_fn_error $? "Cannot continue" "$LINENO" 5
4415   fi
4416 
4417 
4418 
4419   for ac_prog in cut
4420 do
4421   # Extract the first word of "$ac_prog", so it can be a program name with args.
4422 set dummy $ac_prog; ac_word=$2
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4424 $as_echo_n "checking for $ac_word... " >&6; }
4425 if ${ac_cv_path_CUT+:} false; then :
4426   $as_echo_n "(cached) " >&6
4427 else
4428   case $CUT in
4429   [\\/]* | ?:[\\/]*)
4430   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4431   ;;
4432   *)
4433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4434 for as_dir in $PATH
4435 do
4436   IFS=$as_save_IFS
4437   test -z "$as_dir" && as_dir=.
4438     for ac_exec_ext in '' $ac_executable_extensions; do
4439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4440     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4442     break 2
4443   fi
4444 done
4445   done
4446 IFS=$as_save_IFS
4447 
4448   ;;
4449 esac
4450 fi
4451 CUT=$ac_cv_path_CUT
4452 if test -n "$CUT"; then
4453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4454 $as_echo "$CUT" >&6; }
4455 else
4456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4457 $as_echo "no" >&6; }
4458 fi
4459 
4460 
4461   test -n "$CUT" && break
4462 done
4463 
4464 
4465   if test "x$CUT" = x; then
4466     if test "xcut" = x; then
4467       PROG_NAME=cut
4468     else
4469       PROG_NAME=cut
4470     fi
4471     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4472 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4473     as_fn_error $? "Cannot continue" "$LINENO" 5
4474   fi
4475 
4476 
4477 
4478   for ac_prog in date
4479 do
4480   # Extract the first word of "$ac_prog", so it can be a program name with args.
4481 set dummy $ac_prog; ac_word=$2
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4483 $as_echo_n "checking for $ac_word... " >&6; }
4484 if ${ac_cv_path_DATE+:} false; then :
4485   $as_echo_n "(cached) " >&6
4486 else
4487   case $DATE in
4488   [\\/]* | ?:[\\/]*)
4489   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4490   ;;
4491   *)
4492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493 for as_dir in $PATH
4494 do
4495   IFS=$as_save_IFS
4496   test -z "$as_dir" && as_dir=.
4497     for ac_exec_ext in '' $ac_executable_extensions; do
4498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4499     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4501     break 2
4502   fi
4503 done
4504   done
4505 IFS=$as_save_IFS
4506 
4507   ;;
4508 esac
4509 fi
4510 DATE=$ac_cv_path_DATE
4511 if test -n "$DATE"; then
4512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4513 $as_echo "$DATE" >&6; }
4514 else
4515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4516 $as_echo "no" >&6; }
4517 fi
4518 
4519 
4520   test -n "$DATE" && break
4521 done
4522 
4523 
4524   if test "x$DATE" = x; then
4525     if test "xdate" = x; then
4526       PROG_NAME=date
4527     else
4528       PROG_NAME=date
4529     fi
4530     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4531 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4532     as_fn_error $? "Cannot continue" "$LINENO" 5
4533   fi
4534 
4535 
4536 
4537   for ac_prog in gdiff diff
4538 do
4539   # Extract the first word of "$ac_prog", so it can be a program name with args.
4540 set dummy $ac_prog; ac_word=$2
4541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542 $as_echo_n "checking for $ac_word... " >&6; }
4543 if ${ac_cv_path_DIFF+:} false; then :
4544   $as_echo_n "(cached) " >&6
4545 else
4546   case $DIFF in
4547   [\\/]* | ?:[\\/]*)
4548   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4549   ;;
4550   *)
4551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552 for as_dir in $PATH
4553 do
4554   IFS=$as_save_IFS
4555   test -z "$as_dir" && as_dir=.
4556     for ac_exec_ext in '' $ac_executable_extensions; do
4557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4558     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4560     break 2
4561   fi
4562 done
4563   done
4564 IFS=$as_save_IFS
4565 
4566   ;;
4567 esac
4568 fi
4569 DIFF=$ac_cv_path_DIFF
4570 if test -n "$DIFF"; then
4571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4572 $as_echo "$DIFF" >&6; }
4573 else
4574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575 $as_echo "no" >&6; }
4576 fi
4577 
4578 
4579   test -n "$DIFF" && break
4580 done
4581 
4582 
4583   if test "x$DIFF" = x; then
4584     if test "xgdiff diff" = x; then
4585       PROG_NAME=diff
4586     else
4587       PROG_NAME=gdiff diff
4588     fi
4589     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4590 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4591     as_fn_error $? "Cannot continue" "$LINENO" 5
4592   fi
4593 
4594 
4595 
4596   for ac_prog in dirname
4597 do
4598   # Extract the first word of "$ac_prog", so it can be a program name with args.
4599 set dummy $ac_prog; ac_word=$2
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4601 $as_echo_n "checking for $ac_word... " >&6; }
4602 if ${ac_cv_path_DIRNAME+:} false; then :
4603   $as_echo_n "(cached) " >&6
4604 else
4605   case $DIRNAME in
4606   [\\/]* | ?:[\\/]*)
4607   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4608   ;;
4609   *)
4610   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4611 for as_dir in $PATH
4612 do
4613   IFS=$as_save_IFS
4614   test -z "$as_dir" && as_dir=.
4615     for ac_exec_ext in '' $ac_executable_extensions; do
4616   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4617     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4618     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4619     break 2
4620   fi
4621 done
4622   done
4623 IFS=$as_save_IFS
4624 
4625   ;;
4626 esac
4627 fi
4628 DIRNAME=$ac_cv_path_DIRNAME
4629 if test -n "$DIRNAME"; then
4630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4631 $as_echo "$DIRNAME" >&6; }
4632 else
4633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4634 $as_echo "no" >&6; }
4635 fi
4636 
4637 
4638   test -n "$DIRNAME" && break
4639 done
4640 
4641 
4642   if test "x$DIRNAME" = x; then
4643     if test "xdirname" = x; then
4644       PROG_NAME=dirname
4645     else
4646       PROG_NAME=dirname
4647     fi
4648     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4649 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4650     as_fn_error $? "Cannot continue" "$LINENO" 5
4651   fi
4652 
4653 
4654 
4655   for ac_prog in echo
4656 do
4657   # Extract the first word of "$ac_prog", so it can be a program name with args.
4658 set dummy $ac_prog; ac_word=$2
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660 $as_echo_n "checking for $ac_word... " >&6; }
4661 if ${ac_cv_path_ECHO+:} false; then :
4662   $as_echo_n "(cached) " >&6
4663 else
4664   case $ECHO in
4665   [\\/]* | ?:[\\/]*)
4666   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4667   ;;
4668   *)
4669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670 for as_dir in $PATH
4671 do
4672   IFS=$as_save_IFS
4673   test -z "$as_dir" && as_dir=.
4674     for ac_exec_ext in '' $ac_executable_extensions; do
4675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4676     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4678     break 2
4679   fi
4680 done
4681   done
4682 IFS=$as_save_IFS
4683 
4684   ;;
4685 esac
4686 fi
4687 ECHO=$ac_cv_path_ECHO
4688 if test -n "$ECHO"; then
4689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4690 $as_echo "$ECHO" >&6; }
4691 else
4692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693 $as_echo "no" >&6; }
4694 fi
4695 
4696 
4697   test -n "$ECHO" && break
4698 done
4699 
4700 
4701   if test "x$ECHO" = x; then
4702     if test "xecho" = x; then
4703       PROG_NAME=echo
4704     else
4705       PROG_NAME=echo
4706     fi
4707     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4708 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4709     as_fn_error $? "Cannot continue" "$LINENO" 5
4710   fi
4711 
4712 
4713 
4714   for ac_prog in expr
4715 do
4716   # Extract the first word of "$ac_prog", so it can be a program name with args.
4717 set dummy $ac_prog; ac_word=$2
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719 $as_echo_n "checking for $ac_word... " >&6; }
4720 if ${ac_cv_path_EXPR+:} false; then :
4721   $as_echo_n "(cached) " >&6
4722 else
4723   case $EXPR in
4724   [\\/]* | ?:[\\/]*)
4725   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4726   ;;
4727   *)
4728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729 for as_dir in $PATH
4730 do
4731   IFS=$as_save_IFS
4732   test -z "$as_dir" && as_dir=.
4733     for ac_exec_ext in '' $ac_executable_extensions; do
4734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4735     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737     break 2
4738   fi
4739 done
4740   done
4741 IFS=$as_save_IFS
4742 
4743   ;;
4744 esac
4745 fi
4746 EXPR=$ac_cv_path_EXPR
4747 if test -n "$EXPR"; then
4748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4749 $as_echo "$EXPR" >&6; }
4750 else
4751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752 $as_echo "no" >&6; }
4753 fi
4754 
4755 
4756   test -n "$EXPR" && break
4757 done
4758 
4759 
4760   if test "x$EXPR" = x; then
4761     if test "xexpr" = x; then
4762       PROG_NAME=expr
4763     else
4764       PROG_NAME=expr
4765     fi
4766     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4767 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4768     as_fn_error $? "Cannot continue" "$LINENO" 5
4769   fi
4770 
4771 
4772 
4773   for ac_prog in file
4774 do
4775   # Extract the first word of "$ac_prog", so it can be a program name with args.
4776 set dummy $ac_prog; ac_word=$2
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778 $as_echo_n "checking for $ac_word... " >&6; }
4779 if ${ac_cv_path_FILE+:} false; then :
4780   $as_echo_n "(cached) " >&6
4781 else
4782   case $FILE in
4783   [\\/]* | ?:[\\/]*)
4784   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4785   ;;
4786   *)
4787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788 for as_dir in $PATH
4789 do
4790   IFS=$as_save_IFS
4791   test -z "$as_dir" && as_dir=.
4792     for ac_exec_ext in '' $ac_executable_extensions; do
4793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4794     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796     break 2
4797   fi
4798 done
4799   done
4800 IFS=$as_save_IFS
4801 
4802   ;;
4803 esac
4804 fi
4805 FILE=$ac_cv_path_FILE
4806 if test -n "$FILE"; then
4807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4808 $as_echo "$FILE" >&6; }
4809 else
4810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811 $as_echo "no" >&6; }
4812 fi
4813 
4814 
4815   test -n "$FILE" && break
4816 done
4817 
4818 
4819   if test "x$FILE" = x; then
4820     if test "xfile" = x; then
4821       PROG_NAME=file
4822     else
4823       PROG_NAME=file
4824     fi
4825     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4826 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4827     as_fn_error $? "Cannot continue" "$LINENO" 5
4828   fi
4829 
4830 
4831 
4832   for ac_prog in find
4833 do
4834   # Extract the first word of "$ac_prog", so it can be a program name with args.
4835 set dummy $ac_prog; ac_word=$2
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837 $as_echo_n "checking for $ac_word... " >&6; }
4838 if ${ac_cv_path_FIND+:} false; then :
4839   $as_echo_n "(cached) " >&6
4840 else
4841   case $FIND in
4842   [\\/]* | ?:[\\/]*)
4843   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4844   ;;
4845   *)
4846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847 for as_dir in $PATH
4848 do
4849   IFS=$as_save_IFS
4850   test -z "$as_dir" && as_dir=.
4851     for ac_exec_ext in '' $ac_executable_extensions; do
4852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4853     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855     break 2
4856   fi
4857 done
4858   done
4859 IFS=$as_save_IFS
4860 
4861   ;;
4862 esac
4863 fi
4864 FIND=$ac_cv_path_FIND
4865 if test -n "$FIND"; then
4866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4867 $as_echo "$FIND" >&6; }
4868 else
4869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870 $as_echo "no" >&6; }
4871 fi
4872 
4873 
4874   test -n "$FIND" && break
4875 done
4876 
4877 
4878   if test "x$FIND" = x; then
4879     if test "xfind" = x; then
4880       PROG_NAME=find
4881     else
4882       PROG_NAME=find
4883     fi
4884     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4885 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4886     as_fn_error $? "Cannot continue" "$LINENO" 5
4887   fi
4888 
4889 
4890 
4891   for ac_prog in head
4892 do
4893   # Extract the first word of "$ac_prog", so it can be a program name with args.
4894 set dummy $ac_prog; ac_word=$2
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4896 $as_echo_n "checking for $ac_word... " >&6; }
4897 if ${ac_cv_path_HEAD+:} false; then :
4898   $as_echo_n "(cached) " >&6
4899 else
4900   case $HEAD in
4901   [\\/]* | ?:[\\/]*)
4902   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4903   ;;
4904   *)
4905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906 for as_dir in $PATH
4907 do
4908   IFS=$as_save_IFS
4909   test -z "$as_dir" && as_dir=.
4910     for ac_exec_ext in '' $ac_executable_extensions; do
4911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4912     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914     break 2
4915   fi
4916 done
4917   done
4918 IFS=$as_save_IFS
4919 
4920   ;;
4921 esac
4922 fi
4923 HEAD=$ac_cv_path_HEAD
4924 if test -n "$HEAD"; then
4925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4926 $as_echo "$HEAD" >&6; }
4927 else
4928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4929 $as_echo "no" >&6; }
4930 fi
4931 
4932 
4933   test -n "$HEAD" && break
4934 done
4935 
4936 
4937   if test "x$HEAD" = x; then
4938     if test "xhead" = x; then
4939       PROG_NAME=head
4940     else
4941       PROG_NAME=head
4942     fi
4943     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4944 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4945     as_fn_error $? "Cannot continue" "$LINENO" 5
4946   fi
4947 
4948 
4949 
4950   for ac_prog in ln
4951 do
4952   # Extract the first word of "$ac_prog", so it can be a program name with args.
4953 set dummy $ac_prog; ac_word=$2
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4955 $as_echo_n "checking for $ac_word... " >&6; }
4956 if ${ac_cv_path_LN+:} false; then :
4957   $as_echo_n "(cached) " >&6
4958 else
4959   case $LN in
4960   [\\/]* | ?:[\\/]*)
4961   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4962   ;;
4963   *)
4964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4965 for as_dir in $PATH
4966 do
4967   IFS=$as_save_IFS
4968   test -z "$as_dir" && as_dir=.
4969     for ac_exec_ext in '' $ac_executable_extensions; do
4970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4971     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4973     break 2
4974   fi
4975 done
4976   done
4977 IFS=$as_save_IFS
4978 
4979   ;;
4980 esac
4981 fi
4982 LN=$ac_cv_path_LN
4983 if test -n "$LN"; then
4984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4985 $as_echo "$LN" >&6; }
4986 else
4987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4988 $as_echo "no" >&6; }
4989 fi
4990 
4991 
4992   test -n "$LN" && break
4993 done
4994 
4995 
4996   if test "x$LN" = x; then
4997     if test "xln" = x; then
4998       PROG_NAME=ln
4999     else
5000       PROG_NAME=ln
5001     fi
5002     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5003 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5004     as_fn_error $? "Cannot continue" "$LINENO" 5
5005   fi
5006 
5007 
5008 
5009   for ac_prog in ls
5010 do
5011   # Extract the first word of "$ac_prog", so it can be a program name with args.
5012 set dummy $ac_prog; ac_word=$2
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014 $as_echo_n "checking for $ac_word... " >&6; }
5015 if ${ac_cv_path_LS+:} false; then :
5016   $as_echo_n "(cached) " >&6
5017 else
5018   case $LS in
5019   [\\/]* | ?:[\\/]*)
5020   ac_cv_path_LS="$LS" # Let the user override the test with a path.
5021   ;;
5022   *)
5023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024 for as_dir in $PATH
5025 do
5026   IFS=$as_save_IFS
5027   test -z "$as_dir" && as_dir=.
5028     for ac_exec_ext in '' $ac_executable_extensions; do
5029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5030     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
5031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5032     break 2
5033   fi
5034 done
5035   done
5036 IFS=$as_save_IFS
5037 
5038   ;;
5039 esac
5040 fi
5041 LS=$ac_cv_path_LS
5042 if test -n "$LS"; then
5043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5044 $as_echo "$LS" >&6; }
5045 else
5046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047 $as_echo "no" >&6; }
5048 fi
5049 
5050 
5051   test -n "$LS" && break
5052 done
5053 
5054 
5055   if test "x$LS" = x; then
5056     if test "xls" = x; then
5057       PROG_NAME=ls
5058     else
5059       PROG_NAME=ls
5060     fi
5061     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5062 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5063     as_fn_error $? "Cannot continue" "$LINENO" 5
5064   fi
5065 
5066 
5067 
5068   for ac_prog in mkdir
5069 do
5070   # Extract the first word of "$ac_prog", so it can be a program name with args.
5071 set dummy $ac_prog; ac_word=$2
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073 $as_echo_n "checking for $ac_word... " >&6; }
5074 if ${ac_cv_path_MKDIR+:} false; then :
5075   $as_echo_n "(cached) " >&6
5076 else
5077   case $MKDIR in
5078   [\\/]* | ?:[\\/]*)
5079   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5080   ;;
5081   *)
5082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083 for as_dir in $PATH
5084 do
5085   IFS=$as_save_IFS
5086   test -z "$as_dir" && as_dir=.
5087     for ac_exec_ext in '' $ac_executable_extensions; do
5088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5089     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091     break 2
5092   fi
5093 done
5094   done
5095 IFS=$as_save_IFS
5096 
5097   ;;
5098 esac
5099 fi
5100 MKDIR=$ac_cv_path_MKDIR
5101 if test -n "$MKDIR"; then
5102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5103 $as_echo "$MKDIR" >&6; }
5104 else
5105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106 $as_echo "no" >&6; }
5107 fi
5108 
5109 
5110   test -n "$MKDIR" && break
5111 done
5112 
5113 
5114   if test "x$MKDIR" = x; then
5115     if test "xmkdir" = x; then
5116       PROG_NAME=mkdir
5117     else
5118       PROG_NAME=mkdir
5119     fi
5120     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5121 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5122     as_fn_error $? "Cannot continue" "$LINENO" 5
5123   fi
5124 
5125 
5126 
5127   for ac_prog in mktemp
5128 do
5129   # Extract the first word of "$ac_prog", so it can be a program name with args.
5130 set dummy $ac_prog; ac_word=$2
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5132 $as_echo_n "checking for $ac_word... " >&6; }
5133 if ${ac_cv_path_MKTEMP+:} false; then :
5134   $as_echo_n "(cached) " >&6
5135 else
5136   case $MKTEMP in
5137   [\\/]* | ?:[\\/]*)
5138   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5139   ;;
5140   *)
5141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142 for as_dir in $PATH
5143 do
5144   IFS=$as_save_IFS
5145   test -z "$as_dir" && as_dir=.
5146     for ac_exec_ext in '' $ac_executable_extensions; do
5147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5148     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5150     break 2
5151   fi
5152 done
5153   done
5154 IFS=$as_save_IFS
5155 
5156   ;;
5157 esac
5158 fi
5159 MKTEMP=$ac_cv_path_MKTEMP
5160 if test -n "$MKTEMP"; then
5161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5162 $as_echo "$MKTEMP" >&6; }
5163 else
5164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5165 $as_echo "no" >&6; }
5166 fi
5167 
5168 
5169   test -n "$MKTEMP" && break
5170 done
5171 
5172 
5173   if test "x$MKTEMP" = x; then
5174     if test "xmktemp" = x; then
5175       PROG_NAME=mktemp
5176     else
5177       PROG_NAME=mktemp
5178     fi
5179     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5180 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5181     as_fn_error $? "Cannot continue" "$LINENO" 5
5182   fi
5183 
5184 
5185 
5186   for ac_prog in mv
5187 do
5188   # Extract the first word of "$ac_prog", so it can be a program name with args.
5189 set dummy $ac_prog; ac_word=$2
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191 $as_echo_n "checking for $ac_word... " >&6; }
5192 if ${ac_cv_path_MV+:} false; then :
5193   $as_echo_n "(cached) " >&6
5194 else
5195   case $MV in
5196   [\\/]* | ?:[\\/]*)
5197   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5198   ;;
5199   *)
5200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5201 for as_dir in $PATH
5202 do
5203   IFS=$as_save_IFS
5204   test -z "$as_dir" && as_dir=.
5205     for ac_exec_ext in '' $ac_executable_extensions; do
5206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5207     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5209     break 2
5210   fi
5211 done
5212   done
5213 IFS=$as_save_IFS
5214 
5215   ;;
5216 esac
5217 fi
5218 MV=$ac_cv_path_MV
5219 if test -n "$MV"; then
5220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5221 $as_echo "$MV" >&6; }
5222 else
5223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224 $as_echo "no" >&6; }
5225 fi
5226 
5227 
5228   test -n "$MV" && break
5229 done
5230 
5231 
5232   if test "x$MV" = x; then
5233     if test "xmv" = x; then
5234       PROG_NAME=mv
5235     else
5236       PROG_NAME=mv
5237     fi
5238     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5239 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5240     as_fn_error $? "Cannot continue" "$LINENO" 5
5241   fi
5242 
5243 
5244 
5245   for ac_prog in printf
5246 do
5247   # Extract the first word of "$ac_prog", so it can be a program name with args.
5248 set dummy $ac_prog; ac_word=$2
5249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250 $as_echo_n "checking for $ac_word... " >&6; }
5251 if ${ac_cv_path_PRINTF+:} false; then :
5252   $as_echo_n "(cached) " >&6
5253 else
5254   case $PRINTF in
5255   [\\/]* | ?:[\\/]*)
5256   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5257   ;;
5258   *)
5259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260 for as_dir in $PATH
5261 do
5262   IFS=$as_save_IFS
5263   test -z "$as_dir" && as_dir=.
5264     for ac_exec_ext in '' $ac_executable_extensions; do
5265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5266     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268     break 2
5269   fi
5270 done
5271   done
5272 IFS=$as_save_IFS
5273 
5274   ;;
5275 esac
5276 fi
5277 PRINTF=$ac_cv_path_PRINTF
5278 if test -n "$PRINTF"; then
5279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5280 $as_echo "$PRINTF" >&6; }
5281 else
5282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283 $as_echo "no" >&6; }
5284 fi
5285 
5286 
5287   test -n "$PRINTF" && break
5288 done
5289 
5290 
5291   if test "x$PRINTF" = x; then
5292     if test "xprintf" = x; then
5293       PROG_NAME=printf
5294     else
5295       PROG_NAME=printf
5296     fi
5297     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5298 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5299     as_fn_error $? "Cannot continue" "$LINENO" 5
5300   fi
5301 
5302 
5303 
5304   for ac_prog in rm
5305 do
5306   # Extract the first word of "$ac_prog", so it can be a program name with args.
5307 set dummy $ac_prog; ac_word=$2
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5309 $as_echo_n "checking for $ac_word... " >&6; }
5310 if ${ac_cv_path_RM+:} false; then :
5311   $as_echo_n "(cached) " >&6
5312 else
5313   case $RM in
5314   [\\/]* | ?:[\\/]*)
5315   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5316   ;;
5317   *)
5318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319 for as_dir in $PATH
5320 do
5321   IFS=$as_save_IFS
5322   test -z "$as_dir" && as_dir=.
5323     for ac_exec_ext in '' $ac_executable_extensions; do
5324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5325     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327     break 2
5328   fi
5329 done
5330   done
5331 IFS=$as_save_IFS
5332 
5333   ;;
5334 esac
5335 fi
5336 RM=$ac_cv_path_RM
5337 if test -n "$RM"; then
5338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5339 $as_echo "$RM" >&6; }
5340 else
5341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342 $as_echo "no" >&6; }
5343 fi
5344 
5345 
5346   test -n "$RM" && break
5347 done
5348 
5349 
5350   if test "x$RM" = x; then
5351     if test "xrm" = x; then
5352       PROG_NAME=rm
5353     else
5354       PROG_NAME=rm
5355     fi
5356     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5357 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5358     as_fn_error $? "Cannot continue" "$LINENO" 5
5359   fi
5360 
5361 
5362 
5363   for ac_prog in sh
5364 do
5365   # Extract the first word of "$ac_prog", so it can be a program name with args.
5366 set dummy $ac_prog; ac_word=$2
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5368 $as_echo_n "checking for $ac_word... " >&6; }
5369 if ${ac_cv_path_SH+:} false; then :
5370   $as_echo_n "(cached) " >&6
5371 else
5372   case $SH in
5373   [\\/]* | ?:[\\/]*)
5374   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5375   ;;
5376   *)
5377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5378 for as_dir in $PATH
5379 do
5380   IFS=$as_save_IFS
5381   test -z "$as_dir" && as_dir=.
5382     for ac_exec_ext in '' $ac_executable_extensions; do
5383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5384     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5386     break 2
5387   fi
5388 done
5389   done
5390 IFS=$as_save_IFS
5391 
5392   ;;
5393 esac
5394 fi
5395 SH=$ac_cv_path_SH
5396 if test -n "$SH"; then
5397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5398 $as_echo "$SH" >&6; }
5399 else
5400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5401 $as_echo "no" >&6; }
5402 fi
5403 
5404 
5405   test -n "$SH" && break
5406 done
5407 
5408 
5409   if test "x$SH" = x; then
5410     if test "xsh" = x; then
5411       PROG_NAME=sh
5412     else
5413       PROG_NAME=sh
5414     fi
5415     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5416 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5417     as_fn_error $? "Cannot continue" "$LINENO" 5
5418   fi
5419 
5420 
5421 
5422   for ac_prog in sort
5423 do
5424   # Extract the first word of "$ac_prog", so it can be a program name with args.
5425 set dummy $ac_prog; ac_word=$2
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5427 $as_echo_n "checking for $ac_word... " >&6; }
5428 if ${ac_cv_path_SORT+:} false; then :
5429   $as_echo_n "(cached) " >&6
5430 else
5431   case $SORT in
5432   [\\/]* | ?:[\\/]*)
5433   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5434   ;;
5435   *)
5436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5437 for as_dir in $PATH
5438 do
5439   IFS=$as_save_IFS
5440   test -z "$as_dir" && as_dir=.
5441     for ac_exec_ext in '' $ac_executable_extensions; do
5442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5443     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5445     break 2
5446   fi
5447 done
5448   done
5449 IFS=$as_save_IFS
5450 
5451   ;;
5452 esac
5453 fi
5454 SORT=$ac_cv_path_SORT
5455 if test -n "$SORT"; then
5456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5457 $as_echo "$SORT" >&6; }
5458 else
5459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5460 $as_echo "no" >&6; }
5461 fi
5462 
5463 
5464   test -n "$SORT" && break
5465 done
5466 
5467 
5468   if test "x$SORT" = x; then
5469     if test "xsort" = x; then
5470       PROG_NAME=sort
5471     else
5472       PROG_NAME=sort
5473     fi
5474     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5475 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5476     as_fn_error $? "Cannot continue" "$LINENO" 5
5477   fi
5478 
5479 
5480 
5481   for ac_prog in tail
5482 do
5483   # Extract the first word of "$ac_prog", so it can be a program name with args.
5484 set dummy $ac_prog; ac_word=$2
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5486 $as_echo_n "checking for $ac_word... " >&6; }
5487 if ${ac_cv_path_TAIL+:} false; then :
5488   $as_echo_n "(cached) " >&6
5489 else
5490   case $TAIL in
5491   [\\/]* | ?:[\\/]*)
5492   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5493   ;;
5494   *)
5495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496 for as_dir in $PATH
5497 do
5498   IFS=$as_save_IFS
5499   test -z "$as_dir" && as_dir=.
5500     for ac_exec_ext in '' $ac_executable_extensions; do
5501   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5502     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5504     break 2
5505   fi
5506 done
5507   done
5508 IFS=$as_save_IFS
5509 
5510   ;;
5511 esac
5512 fi
5513 TAIL=$ac_cv_path_TAIL
5514 if test -n "$TAIL"; then
5515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5516 $as_echo "$TAIL" >&6; }
5517 else
5518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5519 $as_echo "no" >&6; }
5520 fi
5521 
5522 
5523   test -n "$TAIL" && break
5524 done
5525 
5526 
5527   if test "x$TAIL" = x; then
5528     if test "xtail" = x; then
5529       PROG_NAME=tail
5530     else
5531       PROG_NAME=tail
5532     fi
5533     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5534 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5535     as_fn_error $? "Cannot continue" "$LINENO" 5
5536   fi
5537 
5538 
5539 
5540   for ac_prog in tar
5541 do
5542   # Extract the first word of "$ac_prog", so it can be a program name with args.
5543 set dummy $ac_prog; ac_word=$2
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5545 $as_echo_n "checking for $ac_word... " >&6; }
5546 if ${ac_cv_path_TAR+:} false; then :
5547   $as_echo_n "(cached) " >&6
5548 else
5549   case $TAR in
5550   [\\/]* | ?:[\\/]*)
5551   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5552   ;;
5553   *)
5554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555 for as_dir in $PATH
5556 do
5557   IFS=$as_save_IFS
5558   test -z "$as_dir" && as_dir=.
5559     for ac_exec_ext in '' $ac_executable_extensions; do
5560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5561     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5563     break 2
5564   fi
5565 done
5566   done
5567 IFS=$as_save_IFS
5568 
5569   ;;
5570 esac
5571 fi
5572 TAR=$ac_cv_path_TAR
5573 if test -n "$TAR"; then
5574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5575 $as_echo "$TAR" >&6; }
5576 else
5577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578 $as_echo "no" >&6; }
5579 fi
5580 
5581 
5582   test -n "$TAR" && break
5583 done
5584 
5585 
5586   if test "x$TAR" = x; then
5587     if test "xtar" = x; then
5588       PROG_NAME=tar
5589     else
5590       PROG_NAME=tar
5591     fi
5592     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5593 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5594     as_fn_error $? "Cannot continue" "$LINENO" 5
5595   fi
5596 
5597 
5598 
5599   for ac_prog in tee
5600 do
5601   # Extract the first word of "$ac_prog", so it can be a program name with args.
5602 set dummy $ac_prog; ac_word=$2
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5604 $as_echo_n "checking for $ac_word... " >&6; }
5605 if ${ac_cv_path_TEE+:} false; then :
5606   $as_echo_n "(cached) " >&6
5607 else
5608   case $TEE in
5609   [\\/]* | ?:[\\/]*)
5610   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5611   ;;
5612   *)
5613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5614 for as_dir in $PATH
5615 do
5616   IFS=$as_save_IFS
5617   test -z "$as_dir" && as_dir=.
5618     for ac_exec_ext in '' $ac_executable_extensions; do
5619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5620     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5622     break 2
5623   fi
5624 done
5625   done
5626 IFS=$as_save_IFS
5627 
5628   ;;
5629 esac
5630 fi
5631 TEE=$ac_cv_path_TEE
5632 if test -n "$TEE"; then
5633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5634 $as_echo "$TEE" >&6; }
5635 else
5636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5637 $as_echo "no" >&6; }
5638 fi
5639 
5640 
5641   test -n "$TEE" && break
5642 done
5643 
5644 
5645   if test "x$TEE" = x; then
5646     if test "xtee" = x; then
5647       PROG_NAME=tee
5648     else
5649       PROG_NAME=tee
5650     fi
5651     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5652 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5653     as_fn_error $? "Cannot continue" "$LINENO" 5
5654   fi
5655 
5656 
5657 
5658   for ac_prog in touch
5659 do
5660   # Extract the first word of "$ac_prog", so it can be a program name with args.
5661 set dummy $ac_prog; ac_word=$2
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663 $as_echo_n "checking for $ac_word... " >&6; }
5664 if ${ac_cv_path_TOUCH+:} false; then :
5665   $as_echo_n "(cached) " >&6
5666 else
5667   case $TOUCH in
5668   [\\/]* | ?:[\\/]*)
5669   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5670   ;;
5671   *)
5672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673 for as_dir in $PATH
5674 do
5675   IFS=$as_save_IFS
5676   test -z "$as_dir" && as_dir=.
5677     for ac_exec_ext in '' $ac_executable_extensions; do
5678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681     break 2
5682   fi
5683 done
5684   done
5685 IFS=$as_save_IFS
5686 
5687   ;;
5688 esac
5689 fi
5690 TOUCH=$ac_cv_path_TOUCH
5691 if test -n "$TOUCH"; then
5692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5693 $as_echo "$TOUCH" >&6; }
5694 else
5695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696 $as_echo "no" >&6; }
5697 fi
5698 
5699 
5700   test -n "$TOUCH" && break
5701 done
5702 
5703 
5704   if test "x$TOUCH" = x; then
5705     if test "xtouch" = x; then
5706       PROG_NAME=touch
5707     else
5708       PROG_NAME=touch
5709     fi
5710     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5711 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5712     as_fn_error $? "Cannot continue" "$LINENO" 5
5713   fi
5714 
5715 
5716 
5717   for ac_prog in tr
5718 do
5719   # Extract the first word of "$ac_prog", so it can be a program name with args.
5720 set dummy $ac_prog; ac_word=$2
5721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5722 $as_echo_n "checking for $ac_word... " >&6; }
5723 if ${ac_cv_path_TR+:} false; then :
5724   $as_echo_n "(cached) " >&6
5725 else
5726   case $TR in
5727   [\\/]* | ?:[\\/]*)
5728   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5729   ;;
5730   *)
5731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5732 for as_dir in $PATH
5733 do
5734   IFS=$as_save_IFS
5735   test -z "$as_dir" && as_dir=.
5736     for ac_exec_ext in '' $ac_executable_extensions; do
5737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5738     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5740     break 2
5741   fi
5742 done
5743   done
5744 IFS=$as_save_IFS
5745 
5746   ;;
5747 esac
5748 fi
5749 TR=$ac_cv_path_TR
5750 if test -n "$TR"; then
5751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5752 $as_echo "$TR" >&6; }
5753 else
5754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5755 $as_echo "no" >&6; }
5756 fi
5757 
5758 
5759   test -n "$TR" && break
5760 done
5761 
5762 
5763   if test "x$TR" = x; then
5764     if test "xtr" = x; then
5765       PROG_NAME=tr
5766     else
5767       PROG_NAME=tr
5768     fi
5769     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5770 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5771     as_fn_error $? "Cannot continue" "$LINENO" 5
5772   fi
5773 
5774 
5775 
5776   for ac_prog in uname
5777 do
5778   # Extract the first word of "$ac_prog", so it can be a program name with args.
5779 set dummy $ac_prog; ac_word=$2
5780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781 $as_echo_n "checking for $ac_word... " >&6; }
5782 if ${ac_cv_path_UNAME+:} false; then :
5783   $as_echo_n "(cached) " >&6
5784 else
5785   case $UNAME in
5786   [\\/]* | ?:[\\/]*)
5787   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5788   ;;
5789   *)
5790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791 for as_dir in $PATH
5792 do
5793   IFS=$as_save_IFS
5794   test -z "$as_dir" && as_dir=.
5795     for ac_exec_ext in '' $ac_executable_extensions; do
5796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799     break 2
5800   fi
5801 done
5802   done
5803 IFS=$as_save_IFS
5804 
5805   ;;
5806 esac
5807 fi
5808 UNAME=$ac_cv_path_UNAME
5809 if test -n "$UNAME"; then
5810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5811 $as_echo "$UNAME" >&6; }
5812 else
5813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814 $as_echo "no" >&6; }
5815 fi
5816 
5817 
5818   test -n "$UNAME" && break
5819 done
5820 
5821 
5822   if test "x$UNAME" = x; then
5823     if test "xuname" = x; then
5824       PROG_NAME=uname
5825     else
5826       PROG_NAME=uname
5827     fi
5828     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5829 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5830     as_fn_error $? "Cannot continue" "$LINENO" 5
5831   fi
5832 
5833 
5834 
5835   for ac_prog in uniq
5836 do
5837   # Extract the first word of "$ac_prog", so it can be a program name with args.
5838 set dummy $ac_prog; ac_word=$2
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840 $as_echo_n "checking for $ac_word... " >&6; }
5841 if ${ac_cv_path_UNIQ+:} false; then :
5842   $as_echo_n "(cached) " >&6
5843 else
5844   case $UNIQ in
5845   [\\/]* | ?:[\\/]*)
5846   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5847   ;;
5848   *)
5849   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850 for as_dir in $PATH
5851 do
5852   IFS=$as_save_IFS
5853   test -z "$as_dir" && as_dir=.
5854     for ac_exec_ext in '' $ac_executable_extensions; do
5855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5856     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858     break 2
5859   fi
5860 done
5861   done
5862 IFS=$as_save_IFS
5863 
5864   ;;
5865 esac
5866 fi
5867 UNIQ=$ac_cv_path_UNIQ
5868 if test -n "$UNIQ"; then
5869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5870 $as_echo "$UNIQ" >&6; }
5871 else
5872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873 $as_echo "no" >&6; }
5874 fi
5875 
5876 
5877   test -n "$UNIQ" && break
5878 done
5879 
5880 
5881   if test "x$UNIQ" = x; then
5882     if test "xuniq" = x; then
5883       PROG_NAME=uniq
5884     else
5885       PROG_NAME=uniq
5886     fi
5887     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5888 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5889     as_fn_error $? "Cannot continue" "$LINENO" 5
5890   fi
5891 
5892 
5893 
5894   for ac_prog in wc
5895 do
5896   # Extract the first word of "$ac_prog", so it can be a program name with args.
5897 set dummy $ac_prog; ac_word=$2
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899 $as_echo_n "checking for $ac_word... " >&6; }
5900 if ${ac_cv_path_WC+:} false; then :
5901   $as_echo_n "(cached) " >&6
5902 else
5903   case $WC in
5904   [\\/]* | ?:[\\/]*)
5905   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5906   ;;
5907   *)
5908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909 for as_dir in $PATH
5910 do
5911   IFS=$as_save_IFS
5912   test -z "$as_dir" && as_dir=.
5913     for ac_exec_ext in '' $ac_executable_extensions; do
5914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917     break 2
5918   fi
5919 done
5920   done
5921 IFS=$as_save_IFS
5922 
5923   ;;
5924 esac
5925 fi
5926 WC=$ac_cv_path_WC
5927 if test -n "$WC"; then
5928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5929 $as_echo "$WC" >&6; }
5930 else
5931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932 $as_echo "no" >&6; }
5933 fi
5934 
5935 
5936   test -n "$WC" && break
5937 done
5938 
5939 
5940   if test "x$WC" = x; then
5941     if test "xwc" = x; then
5942       PROG_NAME=wc
5943     else
5944       PROG_NAME=wc
5945     fi
5946     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5947 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5948     as_fn_error $? "Cannot continue" "$LINENO" 5
5949   fi
5950 
5951 
5952 
5953   for ac_prog in which
5954 do
5955   # Extract the first word of "$ac_prog", so it can be a program name with args.
5956 set dummy $ac_prog; ac_word=$2
5957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958 $as_echo_n "checking for $ac_word... " >&6; }
5959 if ${ac_cv_path_WHICH+:} false; then :
5960   $as_echo_n "(cached) " >&6
5961 else
5962   case $WHICH in
5963   [\\/]* | ?:[\\/]*)
5964   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5965   ;;
5966   *)
5967   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5968 for as_dir in $PATH
5969 do
5970   IFS=$as_save_IFS
5971   test -z "$as_dir" && as_dir=.
5972     for ac_exec_ext in '' $ac_executable_extensions; do
5973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5974     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5976     break 2
5977   fi
5978 done
5979   done
5980 IFS=$as_save_IFS
5981 
5982   ;;
5983 esac
5984 fi
5985 WHICH=$ac_cv_path_WHICH
5986 if test -n "$WHICH"; then
5987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5988 $as_echo "$WHICH" >&6; }
5989 else
5990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991 $as_echo "no" >&6; }
5992 fi
5993 
5994 
5995   test -n "$WHICH" && break
5996 done
5997 
5998 
5999   if test "x$WHICH" = x; then
6000     if test "xwhich" = x; then
6001       PROG_NAME=which
6002     else
6003       PROG_NAME=which
6004     fi
6005     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6006 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6007     as_fn_error $? "Cannot continue" "$LINENO" 5
6008   fi
6009 
6010 
6011 
6012   for ac_prog in xargs
6013 do
6014   # Extract the first word of "$ac_prog", so it can be a program name with args.
6015 set dummy $ac_prog; ac_word=$2
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6017 $as_echo_n "checking for $ac_word... " >&6; }
6018 if ${ac_cv_path_XARGS+:} false; then :
6019   $as_echo_n "(cached) " >&6
6020 else
6021   case $XARGS in
6022   [\\/]* | ?:[\\/]*)
6023   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
6024   ;;
6025   *)
6026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027 for as_dir in $PATH
6028 do
6029   IFS=$as_save_IFS
6030   test -z "$as_dir" && as_dir=.
6031     for ac_exec_ext in '' $ac_executable_extensions; do
6032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6033     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
6034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6035     break 2
6036   fi
6037 done
6038   done
6039 IFS=$as_save_IFS
6040 
6041   ;;
6042 esac
6043 fi
6044 XARGS=$ac_cv_path_XARGS
6045 if test -n "$XARGS"; then
6046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6047 $as_echo "$XARGS" >&6; }
6048 else
6049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6050 $as_echo "no" >&6; }
6051 fi
6052 
6053 
6054   test -n "$XARGS" && break
6055 done
6056 
6057 
6058   if test "x$XARGS" = x; then
6059     if test "xxargs" = x; then
6060       PROG_NAME=xargs
6061     else
6062       PROG_NAME=xargs
6063     fi
6064     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6065 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6066     as_fn_error $? "Cannot continue" "$LINENO" 5
6067   fi
6068 
6069 
6070 
6071   # Then required tools that require some special treatment.
6072   for ac_prog in gawk mawk nawk awk
6073 do
6074   # Extract the first word of "$ac_prog", so it can be a program name with args.
6075 set dummy $ac_prog; ac_word=$2
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6077 $as_echo_n "checking for $ac_word... " >&6; }
6078 if ${ac_cv_prog_AWK+:} false; then :
6079   $as_echo_n "(cached) " >&6
6080 else
6081   if test -n "$AWK"; then
6082   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6083 else
6084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6085 for as_dir in $PATH
6086 do
6087   IFS=$as_save_IFS
6088   test -z "$as_dir" && as_dir=.
6089     for ac_exec_ext in '' $ac_executable_extensions; do
6090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6091     ac_cv_prog_AWK="$ac_prog"
6092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6093     break 2
6094   fi
6095 done
6096   done
6097 IFS=$as_save_IFS
6098 
6099 fi
6100 fi
6101 AWK=$ac_cv_prog_AWK
6102 if test -n "$AWK"; then
6103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6104 $as_echo "$AWK" >&6; }
6105 else
6106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6107 $as_echo "no" >&6; }
6108 fi
6109 
6110 
6111   test -n "$AWK" && break
6112 done
6113 
6114 
6115   if test "x$AWK" = x; then
6116     if test "x" = x; then
6117       PROG_NAME=awk
6118     else
6119       PROG_NAME=
6120     fi
6121     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6122 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6123     as_fn_error $? "Cannot continue" "$LINENO" 5
6124   fi
6125 
6126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6127 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6128 if ${ac_cv_path_GREP+:} false; then :
6129   $as_echo_n "(cached) " >&6
6130 else
6131   if test -z "$GREP"; then
6132   ac_path_GREP_found=false
6133   # Loop through the user's path and test for each of PROGNAME-LIST
6134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6136 do
6137   IFS=$as_save_IFS
6138   test -z "$as_dir" && as_dir=.
6139     for ac_prog in grep ggrep; do
6140     for ac_exec_ext in '' $ac_executable_extensions; do
6141       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6142       as_fn_executable_p "$ac_path_GREP" || continue
6143 # Check for GNU ac_path_GREP and select it if it is found.
6144   # Check for GNU $ac_path_GREP
6145 case `"$ac_path_GREP" --version 2>&1` in
6146 *GNU*)
6147   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6148 *)
6149   ac_count=0
6150   $as_echo_n 0123456789 >"conftest.in"
6151   while :
6152   do
6153     cat "conftest.in" "conftest.in" >"conftest.tmp"
6154     mv "conftest.tmp" "conftest.in"
6155     cp "conftest.in" "conftest.nl"
6156     $as_echo 'GREP' >> "conftest.nl"
6157     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6158     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6159     as_fn_arith $ac_count + 1 && ac_count=$as_val
6160     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6161       # Best one so far, save it but keep looking for a better one
6162       ac_cv_path_GREP="$ac_path_GREP"
6163       ac_path_GREP_max=$ac_count
6164     fi
6165     # 10*(2^10) chars as input seems more than enough
6166     test $ac_count -gt 10 && break
6167   done
6168   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6169 esac
6170 
6171       $ac_path_GREP_found && break 3
6172     done
6173   done
6174   done
6175 IFS=$as_save_IFS
6176   if test -z "$ac_cv_path_GREP"; then
6177     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6178   fi
6179 else
6180   ac_cv_path_GREP=$GREP
6181 fi
6182 
6183 fi
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6185 $as_echo "$ac_cv_path_GREP" >&6; }
6186  GREP="$ac_cv_path_GREP"
6187 
6188 
6189 
6190   if test "x$GREP" = x; then
6191     if test "x" = x; then
6192       PROG_NAME=grep
6193     else
6194       PROG_NAME=
6195     fi
6196     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6197 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6198     as_fn_error $? "Cannot continue" "$LINENO" 5
6199   fi
6200 
6201   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6202 $as_echo_n "checking for egrep... " >&6; }
6203 if ${ac_cv_path_EGREP+:} false; then :
6204   $as_echo_n "(cached) " >&6
6205 else
6206   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6207    then ac_cv_path_EGREP="$GREP -E"
6208    else
6209      if test -z "$EGREP"; then
6210   ac_path_EGREP_found=false
6211   # Loop through the user's path and test for each of PROGNAME-LIST
6212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6213 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6214 do
6215   IFS=$as_save_IFS
6216   test -z "$as_dir" && as_dir=.
6217     for ac_prog in egrep; do
6218     for ac_exec_ext in '' $ac_executable_extensions; do
6219       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6220       as_fn_executable_p "$ac_path_EGREP" || continue
6221 # Check for GNU ac_path_EGREP and select it if it is found.
6222   # Check for GNU $ac_path_EGREP
6223 case `"$ac_path_EGREP" --version 2>&1` in
6224 *GNU*)
6225   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6226 *)
6227   ac_count=0
6228   $as_echo_n 0123456789 >"conftest.in"
6229   while :
6230   do
6231     cat "conftest.in" "conftest.in" >"conftest.tmp"
6232     mv "conftest.tmp" "conftest.in"
6233     cp "conftest.in" "conftest.nl"
6234     $as_echo 'EGREP' >> "conftest.nl"
6235     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6236     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6237     as_fn_arith $ac_count + 1 && ac_count=$as_val
6238     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6239       # Best one so far, save it but keep looking for a better one
6240       ac_cv_path_EGREP="$ac_path_EGREP"
6241       ac_path_EGREP_max=$ac_count
6242     fi
6243     # 10*(2^10) chars as input seems more than enough
6244     test $ac_count -gt 10 && break
6245   done
6246   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6247 esac
6248 
6249       $ac_path_EGREP_found && break 3
6250     done
6251   done
6252   done
6253 IFS=$as_save_IFS
6254   if test -z "$ac_cv_path_EGREP"; then
6255     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6256   fi
6257 else
6258   ac_cv_path_EGREP=$EGREP
6259 fi
6260 
6261    fi
6262 fi
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6264 $as_echo "$ac_cv_path_EGREP" >&6; }
6265  EGREP="$ac_cv_path_EGREP"
6266 
6267 
6268 
6269   if test "x$EGREP" = x; then
6270     if test "x" = x; then
6271       PROG_NAME=egrep
6272     else
6273       PROG_NAME=
6274     fi
6275     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6276 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6277     as_fn_error $? "Cannot continue" "$LINENO" 5
6278   fi
6279 
6280   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6281 $as_echo_n "checking for fgrep... " >&6; }
6282 if ${ac_cv_path_FGREP+:} false; then :
6283   $as_echo_n "(cached) " >&6
6284 else
6285   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6286    then ac_cv_path_FGREP="$GREP -F"
6287    else
6288      if test -z "$FGREP"; then
6289   ac_path_FGREP_found=false
6290   # Loop through the user's path and test for each of PROGNAME-LIST
6291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6292 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6293 do
6294   IFS=$as_save_IFS
6295   test -z "$as_dir" && as_dir=.
6296     for ac_prog in fgrep; do
6297     for ac_exec_ext in '' $ac_executable_extensions; do
6298       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6299       as_fn_executable_p "$ac_path_FGREP" || continue
6300 # Check for GNU ac_path_FGREP and select it if it is found.
6301   # Check for GNU $ac_path_FGREP
6302 case `"$ac_path_FGREP" --version 2>&1` in
6303 *GNU*)
6304   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6305 *)
6306   ac_count=0
6307   $as_echo_n 0123456789 >"conftest.in"
6308   while :
6309   do
6310     cat "conftest.in" "conftest.in" >"conftest.tmp"
6311     mv "conftest.tmp" "conftest.in"
6312     cp "conftest.in" "conftest.nl"
6313     $as_echo 'FGREP' >> "conftest.nl"
6314     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6315     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6316     as_fn_arith $ac_count + 1 && ac_count=$as_val
6317     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6318       # Best one so far, save it but keep looking for a better one
6319       ac_cv_path_FGREP="$ac_path_FGREP"
6320       ac_path_FGREP_max=$ac_count
6321     fi
6322     # 10*(2^10) chars as input seems more than enough
6323     test $ac_count -gt 10 && break
6324   done
6325   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6326 esac
6327 
6328       $ac_path_FGREP_found && break 3
6329     done
6330   done
6331   done
6332 IFS=$as_save_IFS
6333   if test -z "$ac_cv_path_FGREP"; then
6334     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6335   fi
6336 else
6337   ac_cv_path_FGREP=$FGREP
6338 fi
6339 
6340    fi
6341 fi
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6343 $as_echo "$ac_cv_path_FGREP" >&6; }
6344  FGREP="$ac_cv_path_FGREP"
6345 
6346 
6347 
6348   if test "x$FGREP" = x; then
6349     if test "x" = x; then
6350       PROG_NAME=fgrep
6351     else
6352       PROG_NAME=
6353     fi
6354     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6355 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6356     as_fn_error $? "Cannot continue" "$LINENO" 5
6357   fi
6358 
6359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6360 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6361 if ${ac_cv_path_SED+:} false; then :
6362   $as_echo_n "(cached) " >&6
6363 else
6364             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6365      for ac_i in 1 2 3 4 5 6 7; do
6366        ac_script="$ac_script$as_nl$ac_script"
6367      done
6368      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6369      { ac_script=; unset ac_script;}
6370      if test -z "$SED"; then
6371   ac_path_SED_found=false
6372   # Loop through the user's path and test for each of PROGNAME-LIST
6373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6374 for as_dir in $PATH
6375 do
6376   IFS=$as_save_IFS
6377   test -z "$as_dir" && as_dir=.
6378     for ac_prog in sed gsed; do
6379     for ac_exec_ext in '' $ac_executable_extensions; do
6380       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6381       as_fn_executable_p "$ac_path_SED" || continue
6382 # Check for GNU ac_path_SED and select it if it is found.
6383   # Check for GNU $ac_path_SED
6384 case `"$ac_path_SED" --version 2>&1` in
6385 *GNU*)
6386   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6387 *)
6388   ac_count=0
6389   $as_echo_n 0123456789 >"conftest.in"
6390   while :
6391   do
6392     cat "conftest.in" "conftest.in" >"conftest.tmp"
6393     mv "conftest.tmp" "conftest.in"
6394     cp "conftest.in" "conftest.nl"
6395     $as_echo '' >> "conftest.nl"
6396     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6397     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6398     as_fn_arith $ac_count + 1 && ac_count=$as_val
6399     if test $ac_count -gt ${ac_path_SED_max-0}; then
6400       # Best one so far, save it but keep looking for a better one
6401       ac_cv_path_SED="$ac_path_SED"
6402       ac_path_SED_max=$ac_count
6403     fi
6404     # 10*(2^10) chars as input seems more than enough
6405     test $ac_count -gt 10 && break
6406   done
6407   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6408 esac
6409 
6410       $ac_path_SED_found && break 3
6411     done
6412   done
6413   done
6414 IFS=$as_save_IFS
6415   if test -z "$ac_cv_path_SED"; then
6416     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6417   fi
6418 else
6419   ac_cv_path_SED=$SED
6420 fi
6421 
6422 fi
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6424 $as_echo "$ac_cv_path_SED" >&6; }
6425  SED="$ac_cv_path_SED"
6426   rm -f conftest.sed
6427 
6428 
6429   if test "x$SED" = x; then
6430     if test "x" = x; then
6431       PROG_NAME=sed
6432     else
6433       PROG_NAME=
6434     fi
6435     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6436 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6437     as_fn_error $? "Cannot continue" "$LINENO" 5
6438   fi
6439 
6440 
6441   for ac_prog in nawk gawk awk
6442 do
6443   # Extract the first word of "$ac_prog", so it can be a program name with args.
6444 set dummy $ac_prog; ac_word=$2
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446 $as_echo_n "checking for $ac_word... " >&6; }
6447 if ${ac_cv_path_NAWK+:} false; then :
6448   $as_echo_n "(cached) " >&6
6449 else
6450   case $NAWK in
6451   [\\/]* | ?:[\\/]*)
6452   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6453   ;;
6454   *)
6455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6456 for as_dir in $PATH
6457 do
6458   IFS=$as_save_IFS
6459   test -z "$as_dir" && as_dir=.
6460     for ac_exec_ext in '' $ac_executable_extensions; do
6461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6462     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6464     break 2
6465   fi
6466 done
6467   done
6468 IFS=$as_save_IFS
6469 
6470   ;;
6471 esac
6472 fi
6473 NAWK=$ac_cv_path_NAWK
6474 if test -n "$NAWK"; then
6475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6476 $as_echo "$NAWK" >&6; }
6477 else
6478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479 $as_echo "no" >&6; }
6480 fi
6481 
6482 
6483   test -n "$NAWK" && break
6484 done
6485 
6486 
6487   if test "x$NAWK" = x; then
6488     if test "x" = x; then
6489       PROG_NAME=nawk
6490     else
6491       PROG_NAME=
6492     fi
6493     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6494 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6495     as_fn_error $? "Cannot continue" "$LINENO" 5
6496   fi
6497 
6498 
6499   # Always force rm.
6500   RM="$RM -f"
6501 
6502   # pwd behaves differently on various platforms and some don't support the -L flag.
6503   # Always use the bash builtin pwd to get uniform behavior.
6504   THEPWDCMD=pwd
6505 
6506   # These are not required on all platforms
6507   # Extract the first word of "cygpath", so it can be a program name with args.
6508 set dummy cygpath; ac_word=$2
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510 $as_echo_n "checking for $ac_word... " >&6; }
6511 if ${ac_cv_path_CYGPATH+:} false; then :
6512   $as_echo_n "(cached) " >&6
6513 else
6514   case $CYGPATH in
6515   [\\/]* | ?:[\\/]*)
6516   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6517   ;;
6518   *)
6519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6520 for as_dir in $PATH
6521 do
6522   IFS=$as_save_IFS
6523   test -z "$as_dir" && as_dir=.
6524     for ac_exec_ext in '' $ac_executable_extensions; do
6525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6526     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6528     break 2
6529   fi
6530 done
6531   done
6532 IFS=$as_save_IFS
6533 
6534   ;;
6535 esac
6536 fi
6537 CYGPATH=$ac_cv_path_CYGPATH
6538 if test -n "$CYGPATH"; then
6539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6540 $as_echo "$CYGPATH" >&6; }
6541 else
6542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543 $as_echo "no" >&6; }
6544 fi
6545 
6546 
6547   # Extract the first word of "readlink", so it can be a program name with args.
6548 set dummy readlink; ac_word=$2
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6550 $as_echo_n "checking for $ac_word... " >&6; }
6551 if ${ac_cv_path_READLINK+:} false; then :
6552   $as_echo_n "(cached) " >&6
6553 else
6554   case $READLINK in
6555   [\\/]* | ?:[\\/]*)
6556   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6557   ;;
6558   *)
6559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6560 for as_dir in $PATH
6561 do
6562   IFS=$as_save_IFS
6563   test -z "$as_dir" && as_dir=.
6564     for ac_exec_ext in '' $ac_executable_extensions; do
6565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6566     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6568     break 2
6569   fi
6570 done
6571   done
6572 IFS=$as_save_IFS
6573 
6574   ;;
6575 esac
6576 fi
6577 READLINK=$ac_cv_path_READLINK
6578 if test -n "$READLINK"; then
6579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6580 $as_echo "$READLINK" >&6; }
6581 else
6582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583 $as_echo "no" >&6; }
6584 fi
6585 
6586 
6587   # Extract the first word of "df", so it can be a program name with args.
6588 set dummy df; ac_word=$2
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590 $as_echo_n "checking for $ac_word... " >&6; }
6591 if ${ac_cv_path_DF+:} false; then :
6592   $as_echo_n "(cached) " >&6
6593 else
6594   case $DF in
6595   [\\/]* | ?:[\\/]*)
6596   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6597   ;;
6598   *)
6599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600 for as_dir in $PATH
6601 do
6602   IFS=$as_save_IFS
6603   test -z "$as_dir" && as_dir=.
6604     for ac_exec_ext in '' $ac_executable_extensions; do
6605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608     break 2
6609   fi
6610 done
6611   done
6612 IFS=$as_save_IFS
6613 
6614   ;;
6615 esac
6616 fi
6617 DF=$ac_cv_path_DF
6618 if test -n "$DF"; then
6619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6620 $as_echo "$DF" >&6; }
6621 else
6622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623 $as_echo "no" >&6; }
6624 fi
6625 
6626 
6627   # Extract the first word of "SetFile", so it can be a program name with args.
6628 set dummy SetFile; ac_word=$2
6629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6630 $as_echo_n "checking for $ac_word... " >&6; }
6631 if ${ac_cv_path_SETFILE+:} false; then :
6632   $as_echo_n "(cached) " >&6
6633 else
6634   case $SETFILE in
6635   [\\/]* | ?:[\\/]*)
6636   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6637   ;;
6638   *)
6639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640 for as_dir in $PATH
6641 do
6642   IFS=$as_save_IFS
6643   test -z "$as_dir" && as_dir=.
6644     for ac_exec_ext in '' $ac_executable_extensions; do
6645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6646     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6648     break 2
6649   fi
6650 done
6651   done
6652 IFS=$as_save_IFS
6653 
6654   ;;
6655 esac
6656 fi
6657 SETFILE=$ac_cv_path_SETFILE
6658 if test -n "$SETFILE"; then
6659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6660 $as_echo "$SETFILE" >&6; }
6661 else
6662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663 $as_echo "no" >&6; }
6664 fi
6665 
6666 
6667 
6668 
6669 # Now we can determine OpenJDK build and target platforms. This is required to
6670 # have early on.
6671 # Make sure we can run config.sub.
6672 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6673   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6674 
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6676 $as_echo_n "checking build system type... " >&6; }
6677 if ${ac_cv_build+:} false; then :
6678   $as_echo_n "(cached) " >&6
6679 else
6680   ac_build_alias=$build_alias
6681 test "x$ac_build_alias" = x &&
6682   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6683 test "x$ac_build_alias" = x &&
6684   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6685 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6686   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6687 
6688 fi
6689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6690 $as_echo "$ac_cv_build" >&6; }
6691 case $ac_cv_build in
6692 *-*-*) ;;
6693 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6694 esac
6695 build=$ac_cv_build
6696 ac_save_IFS=$IFS; IFS='-'
6697 set x $ac_cv_build
6698 shift
6699 build_cpu=$1
6700 build_vendor=$2
6701 shift; shift
6702 # Remember, the first character of IFS is used to create $*,
6703 # except with old shells:
6704 build_os=$*
6705 IFS=$ac_save_IFS
6706 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6707 
6708 
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6710 $as_echo_n "checking host system type... " >&6; }
6711 if ${ac_cv_host+:} false; then :
6712   $as_echo_n "(cached) " >&6
6713 else
6714   if test "x$host_alias" = x; then
6715   ac_cv_host=$ac_cv_build
6716 else
6717   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6718     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6719 fi
6720 
6721 fi
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6723 $as_echo "$ac_cv_host" >&6; }
6724 case $ac_cv_host in
6725 *-*-*) ;;
6726 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6727 esac
6728 host=$ac_cv_host
6729 ac_save_IFS=$IFS; IFS='-'
6730 set x $ac_cv_host
6731 shift
6732 host_cpu=$1
6733 host_vendor=$2
6734 shift; shift
6735 # Remember, the first character of IFS is used to create $*,
6736 # except with old shells:
6737 host_os=$*
6738 IFS=$ac_save_IFS
6739 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6740 
6741 
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6743 $as_echo_n "checking target system type... " >&6; }
6744 if ${ac_cv_target+:} false; then :
6745   $as_echo_n "(cached) " >&6
6746 else
6747   if test "x$target_alias" = x; then
6748   ac_cv_target=$ac_cv_host
6749 else
6750   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6751     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6752 fi
6753 
6754 fi
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6756 $as_echo "$ac_cv_target" >&6; }
6757 case $ac_cv_target in
6758 *-*-*) ;;
6759 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6760 esac
6761 target=$ac_cv_target
6762 ac_save_IFS=$IFS; IFS='-'
6763 set x $ac_cv_target
6764 shift
6765 target_cpu=$1
6766 target_vendor=$2
6767 shift; shift
6768 # Remember, the first character of IFS is used to create $*,
6769 # except with old shells:
6770 target_os=$*
6771 IFS=$ac_save_IFS
6772 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6773 
6774 
6775 # The aliases save the names the user supplied, while $host etc.
6776 # will get canonicalized.
6777 test -n "$target_alias" &&
6778   test "$program_prefix$program_suffix$program_transform_name" = \
6779     NONENONEs,x,x, &&
6780   program_prefix=${target_alias}-
6781 
6782   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6783   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6784   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6785   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6786   # to use the configure naming style.
6787 
6788 
6789 
6790 
6791 
6792   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6793   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6794   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6795   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6796   OPENJDK_TARGET_AUTOCONF_NAME="$host"
6797   OPENJDK_BUILD_AUTOCONF_NAME="$build"
6798 
6799 
6800 
6801   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6802 
6803   case "$build_os" in
6804     *linux*)
6805       VAR_OS=linux
6806       VAR_OS_API=posix
6807       VAR_OS_ENV=linux
6808       ;;
6809     *solaris*)
6810       VAR_OS=solaris
6811       VAR_OS_API=posix
6812       VAR_OS_ENV=solaris
6813       ;;
6814     *darwin*)
6815       VAR_OS=macosx
6816       VAR_OS_API=posix
6817       VAR_OS_ENV=macosx
6818       ;;
6819     *bsd*)
6820       VAR_OS=bsd
6821       VAR_OS_API=posix
6822       VAR_OS_ENV=bsd
6823       ;;
6824     *cygwin*)
6825       VAR_OS=windows
6826       VAR_OS_API=winapi
6827       VAR_OS_ENV=windows.cygwin
6828       ;;
6829     *mingw*)
6830       VAR_OS=windows
6831       VAR_OS_API=winapi
6832       VAR_OS_ENV=windows.msys
6833       ;;
6834     *aix*)
6835       VAR_OS=aix
6836       VAR_OS_API=posix
6837       VAR_OS_ENV=aix
6838       ;;
6839     *)
6840       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6841       ;;
6842   esac
6843 
6844 
6845   # First argument is the cpu name from the trip/quad
6846   case "$build_cpu" in
6847     x86_64)
6848       VAR_CPU=x86_64
6849       VAR_CPU_ARCH=x86
6850       VAR_CPU_BITS=64
6851       VAR_CPU_ENDIAN=little
6852       ;;
6853     i?86)
6854       VAR_CPU=x86
6855       VAR_CPU_ARCH=x86
6856       VAR_CPU_BITS=32
6857       VAR_CPU_ENDIAN=little
6858       ;;
6859     arm*)
6860       VAR_CPU=arm
6861       VAR_CPU_ARCH=arm
6862       VAR_CPU_BITS=32
6863       VAR_CPU_ENDIAN=little
6864       ;;
6865     aarch64)
6866       VAR_CPU=aarch64
6867       VAR_CPU_ARCH=aarch64
6868       VAR_CPU_BITS=64
6869       VAR_CPU_ENDIAN=little
6870       ;;
6871     powerpc)
6872       VAR_CPU=ppc
6873       VAR_CPU_ARCH=ppc
6874       VAR_CPU_BITS=32
6875       VAR_CPU_ENDIAN=big
6876       ;;
6877     powerpc64)
6878       VAR_CPU=ppc64
6879       VAR_CPU_ARCH=ppc
6880       VAR_CPU_BITS=64
6881       VAR_CPU_ENDIAN=big
6882       ;;
6883     powerpc64le)
6884       VAR_CPU=ppc64
6885       VAR_CPU_ARCH=ppc
6886       VAR_CPU_BITS=64
6887       VAR_CPU_ENDIAN=little
6888       ;;
6889     s390)
6890       VAR_CPU=s390
6891       VAR_CPU_ARCH=s390
6892       VAR_CPU_BITS=32
6893       VAR_CPU_ENDIAN=big
6894       ;;
6895     s390x)
6896       VAR_CPU=s390x
6897       VAR_CPU_ARCH=s390
6898       VAR_CPU_BITS=64
6899       VAR_CPU_ENDIAN=big
6900       ;;
6901     sparc)
6902       VAR_CPU=sparc
6903       VAR_CPU_ARCH=sparc
6904       VAR_CPU_BITS=32
6905       VAR_CPU_ENDIAN=big
6906       ;;
6907     sparcv9|sparc64)
6908       VAR_CPU=sparcv9
6909       VAR_CPU_ARCH=sparc
6910       VAR_CPU_BITS=64
6911       VAR_CPU_ENDIAN=big
6912       ;;
6913     *)
6914       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6915       ;;
6916   esac
6917 
6918   # ..and setup our own variables. (Do this explicitely to facilitate searching)
6919   OPENJDK_BUILD_OS="$VAR_OS"
6920   OPENJDK_BUILD_OS_API="$VAR_OS_API"
6921   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6922   OPENJDK_BUILD_CPU="$VAR_CPU"
6923   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6924   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6925   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6926 
6927 
6928 
6929 
6930 
6931 
6932 
6933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6934 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6936 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6937 
6938   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6939 
6940   case "$host_os" in
6941     *linux*)
6942       VAR_OS=linux
6943       VAR_OS_API=posix
6944       VAR_OS_ENV=linux
6945       ;;
6946     *solaris*)
6947       VAR_OS=solaris
6948       VAR_OS_API=posix
6949       VAR_OS_ENV=solaris
6950       ;;
6951     *darwin*)
6952       VAR_OS=macosx
6953       VAR_OS_API=posix
6954       VAR_OS_ENV=macosx
6955       ;;
6956     *bsd*)
6957       VAR_OS=bsd
6958       VAR_OS_API=posix
6959       VAR_OS_ENV=bsd
6960       ;;
6961     *cygwin*)
6962       VAR_OS=windows
6963       VAR_OS_API=winapi
6964       VAR_OS_ENV=windows.cygwin
6965       ;;
6966     *mingw*)
6967       VAR_OS=windows
6968       VAR_OS_API=winapi
6969       VAR_OS_ENV=windows.msys
6970       ;;
6971     *aix*)
6972       VAR_OS=aix
6973       VAR_OS_API=posix
6974       VAR_OS_ENV=aix
6975       ;;
6976     *)
6977       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6978       ;;
6979   esac
6980 
6981 
6982   # First argument is the cpu name from the trip/quad
6983   case "$host_cpu" in
6984     x86_64)
6985       VAR_CPU=x86_64
6986       VAR_CPU_ARCH=x86
6987       VAR_CPU_BITS=64
6988       VAR_CPU_ENDIAN=little
6989       ;;
6990     i?86)
6991       VAR_CPU=x86
6992       VAR_CPU_ARCH=x86
6993       VAR_CPU_BITS=32
6994       VAR_CPU_ENDIAN=little
6995       ;;
6996     arm*)
6997       VAR_CPU=arm
6998       VAR_CPU_ARCH=arm
6999       VAR_CPU_BITS=32
7000       VAR_CPU_ENDIAN=little
7001       ;;
7002     aarch64)
7003       VAR_CPU=aarch64
7004       VAR_CPU_ARCH=aarch64
7005       VAR_CPU_BITS=64
7006       VAR_CPU_ENDIAN=little
7007       ;;
7008     powerpc)
7009       VAR_CPU=ppc
7010       VAR_CPU_ARCH=ppc
7011       VAR_CPU_BITS=32
7012       VAR_CPU_ENDIAN=big
7013       ;;
7014     powerpc64)
7015       VAR_CPU=ppc64
7016       VAR_CPU_ARCH=ppc
7017       VAR_CPU_BITS=64
7018       VAR_CPU_ENDIAN=big
7019       ;;
7020     powerpc64le)
7021       VAR_CPU=ppc64
7022       VAR_CPU_ARCH=ppc
7023       VAR_CPU_BITS=64
7024       VAR_CPU_ENDIAN=little
7025       ;;
7026     s390)
7027       VAR_CPU=s390
7028       VAR_CPU_ARCH=s390
7029       VAR_CPU_BITS=32
7030       VAR_CPU_ENDIAN=big
7031       ;;
7032     s390x)
7033       VAR_CPU=s390x
7034       VAR_CPU_ARCH=s390
7035       VAR_CPU_BITS=64
7036       VAR_CPU_ENDIAN=big
7037       ;;
7038     sparc)
7039       VAR_CPU=sparc
7040       VAR_CPU_ARCH=sparc
7041       VAR_CPU_BITS=32
7042       VAR_CPU_ENDIAN=big
7043       ;;
7044     sparcv9|sparc64)
7045       VAR_CPU=sparcv9
7046       VAR_CPU_ARCH=sparc
7047       VAR_CPU_BITS=64
7048       VAR_CPU_ENDIAN=big
7049       ;;
7050     *)
7051       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
7052       ;;
7053   esac
7054 
7055   # ... and setup our own variables. (Do this explicitely to facilitate searching)
7056   OPENJDK_TARGET_OS="$VAR_OS"
7057   OPENJDK_TARGET_OS_API="$VAR_OS_API"
7058   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
7059   OPENJDK_TARGET_CPU="$VAR_CPU"
7060   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
7061   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
7062   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
7063 
7064 
7065 
7066 
7067 
7068 
7069 
7070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7071 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
7072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7073 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7074 
7075 
7076 
7077 # Check whether --with-target-bits was given.
7078 if test "${with_target_bits+set}" = set; then :
7079   withval=$with_target_bits;
7080 fi
7081 
7082 
7083   # We have three types of compiles:
7084   # native  == normal compilation, target system == build system
7085   # cross   == traditional cross compilation, target system != build system; special toolchain needed
7086   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7087   #
7088   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7089     # We're doing a proper cross-compilation
7090     COMPILE_TYPE="cross"
7091   else
7092     COMPILE_TYPE="native"
7093   fi
7094 
7095   if test "x$with_target_bits" != x; then
7096     if test "x$COMPILE_TYPE" = "xcross"; then
7097       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7098     fi
7099 
7100     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7101       # A reduced build is requested
7102       COMPILE_TYPE="reduced"
7103       OPENJDK_TARGET_CPU_BITS=32
7104       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7105         OPENJDK_TARGET_CPU=x86
7106       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7107         OPENJDK_TARGET_CPU=sparc
7108       else
7109         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7110       fi
7111     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7112       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
7113     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7114       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7115 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7116     else
7117       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7118     fi
7119   fi
7120 
7121 
7122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7123 $as_echo_n "checking compilation type... " >&6; }
7124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7125 $as_echo "$COMPILE_TYPE" >&6; }
7126 
7127 
7128   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7129     REQUIRED_OS_NAME=SunOS
7130     REQUIRED_OS_VERSION=5.10
7131   fi
7132   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7133     REQUIRED_OS_NAME=Linux
7134     REQUIRED_OS_VERSION=2.6
7135   fi
7136   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7137     REQUIRED_OS_NAME=Windows
7138     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7139       REQUIRED_OS_VERSION=5.2
7140     else
7141       REQUIRED_OS_VERSION=5.1
7142     fi
7143   fi
7144   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7145     REQUIRED_OS_NAME=Darwin
7146     REQUIRED_OS_VERSION=11.2
7147   fi
7148 
7149 
7150 
7151 
7152 
7153   # Also store the legacy naming of the cpu.
7154   # Ie i586 and amd64 instead of x86 and x86_64
7155   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7156   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7157     OPENJDK_TARGET_CPU_LEGACY="i586"
7158   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7159     # On all platforms except MacOSX replace x86_64 with amd64.
7160     OPENJDK_TARGET_CPU_LEGACY="amd64"
7161   fi
7162 
7163 
7164   # And the second legacy naming of the cpu.
7165   # Ie i386 and amd64 instead of x86 and x86_64.
7166   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7167   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7168     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7169   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7170     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7171   fi
7172 
7173 
7174   # This is the name of the cpu (but using i386 and amd64 instead of
7175   # x86 and x86_64, respectively), preceeded by a /, to be used when
7176   # locating libraries. On macosx, it's empty, though.
7177   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7178   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7179     OPENJDK_TARGET_CPU_LIBDIR=""
7180   fi
7181 
7182 
7183   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7184   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7185   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7186   OPENJDK_TARGET_CPU_ISADIR=""
7187   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7188     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7189       OPENJDK_TARGET_CPU_ISADIR="/amd64"
7190     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7191       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7192     fi
7193   fi
7194 
7195 
7196   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7197   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7198   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7199     # On linux only, we replace x86 with i386.
7200     OPENJDK_TARGET_CPU_OSARCH="i386"
7201   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7202     # On all platforms except macosx, we replace x86_64 with amd64.
7203     OPENJDK_TARGET_CPU_OSARCH="amd64"
7204   fi
7205 
7206 
7207   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7208   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7209     OPENJDK_TARGET_CPU_JLI="i386"
7210   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7211     # On all platforms except macosx, we replace x86_64 with amd64.
7212     OPENJDK_TARGET_CPU_JLI="amd64"
7213   fi
7214   # Now setup the -D flags for building libjli.
7215   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7216   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7217     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7218       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7219     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7220       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7221     fi
7222   fi
7223 
7224 
7225   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7226   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7227     OPENJDK_TARGET_OS_API_DIR="solaris"
7228   fi
7229   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7230     OPENJDK_TARGET_OS_API_DIR="windows"
7231   fi
7232 
7233 
7234   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7235       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7236   else
7237       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7238   fi
7239 
7240 
7241   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7242     A_LP64="LP64:="
7243     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7244     # unpack200.exe
7245     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7246       ADD_LP64="-D_LP64=1"
7247     fi
7248   fi
7249   LP64=$A_LP64
7250 
7251 
7252   if test "x$COMPILE_TYPE" = "xcross"; then
7253     # FIXME: ... or should this include reduced builds..?
7254     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7255   else
7256     DEFINE_CROSS_COMPILE_ARCH=""
7257   fi
7258 
7259 
7260   # ZERO_ARCHDEF is used to enable architecture-specific code
7261   case "${OPENJDK_TARGET_CPU}" in
7262     ppc)     ZERO_ARCHDEF=PPC32 ;;
7263     ppc64)   ZERO_ARCHDEF=PPC64 ;;
7264     s390*)   ZERO_ARCHDEF=S390  ;;
7265     sparc*)  ZERO_ARCHDEF=SPARC ;;
7266     x86_64*) ZERO_ARCHDEF=AMD64 ;;
7267     x86)     ZERO_ARCHDEF=IA32  ;;
7268     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7269   esac
7270 
7271 
7272 
7273 
7274 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7275 
7276   # Locate the directory of this script.
7277   SCRIPT="$0"
7278   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7279 
7280   # Where is the source? It is located two levels above the configure script.
7281   CURDIR="$PWD"
7282   cd "$AUTOCONF_DIR/../.."
7283   SRC_ROOT="`$THEPWDCMD -L`"
7284 
7285   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7286     PATH_SEP=";"
7287 
7288   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7289   if test $SRC_ROOT_LENGTH -gt 100; then
7290     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7291   fi
7292 
7293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7295 $as_echo_n "checking cygwin release... " >&6; }
7296     CYGWIN_VERSION=`$UNAME -r`
7297     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7298 $as_echo "$CYGWIN_VERSION" >&6; }
7299     WINDOWS_ENV_VENDOR='cygwin'
7300     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7301 
7302     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
7303     if test "x$CYGWIN_VERSION_OLD" != x; then
7304       { $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
7305 $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;}
7306       as_fn_error $? "Cannot continue" "$LINENO" 5
7307     fi
7308     if test "x$CYGPATH" = x; then
7309       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7310     fi
7311     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7312 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7313     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7314     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7315     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7316     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7317     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7318 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7319     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7320     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7321     if test "x$test_cygdrive_prefix" = x; then
7322       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7323     fi
7324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7325     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7326 $as_echo_n "checking msys release... " >&6; }
7327     MSYS_VERSION=`$UNAME -r`
7328     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7329 $as_echo "$MSYS_VERSION" >&6; }
7330 
7331     WINDOWS_ENV_VENDOR='msys'
7332     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7333 
7334     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7335 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7336     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7337     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7338 
7339   windows_path="$MSYS_ROOT_PATH"
7340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7341     unix_path=`$CYGPATH -u "$windows_path"`
7342     MSYS_ROOT_PATH="$unix_path"
7343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7345     MSYS_ROOT_PATH="$unix_path"
7346   fi
7347 
7348     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7349 $as_echo "$MSYS_ROOT_PATH" >&6; }
7350     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7351   else
7352     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7353   fi
7354 
7355   # Test if windows or unix (cygwin/msys) find is first in path.
7356   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7357 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7358   FIND_BINARY_OUTPUT=`find --version 2>&1`
7359   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7360     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7361 $as_echo "unix style" >&6; }
7362   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7363     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7364 $as_echo "Windows" >&6; }
7365     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7366 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7367     { $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
7368 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7369     as_fn_error $? "Cannot continue" "$LINENO" 5
7370   else
7371     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7372 $as_echo "unknown" >&6; }
7373     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7374 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7375   fi
7376 
7377   else
7378     PATH_SEP=":"
7379   fi
7380 
7381 
7382 
7383   cd "$CURDIR"
7384 
7385 
7386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7387 
7388   # Input might be given as Windows format, start by converting to
7389   # unix format.
7390   path="$SRC_ROOT"
7391   new_path=`$CYGPATH -u "$path"`
7392 
7393   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7394   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7395   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7396   # "foo.exe" is OK but "foo" is an error.
7397   #
7398   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7399   # It is also a way to make sure we got the proper file name for the real test later on.
7400   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7401   if test "x$test_shortpath" = x; then
7402     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7403 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7404     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7405   fi
7406 
7407   # Call helper function which possibly converts this using DOS-style short mode.
7408   # If so, the updated path is stored in $new_path.
7409 
7410   input_path="$new_path"
7411   # Check if we need to convert this using DOS-style short mode. If the path
7412   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7413   # take no chances and rewrite it.
7414   # Note: m4 eats our [], so we need to use [ and ] instead.
7415   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7416   if test "x$has_forbidden_chars" != x; then
7417     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7418     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7419     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7420     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7421       # Going to short mode and back again did indeed matter. Since short mode is
7422       # case insensitive, let's make it lowercase to improve readability.
7423       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7424       # Now convert it back to Unix-stile (cygpath)
7425       input_path=`$CYGPATH -u "$shortmode_path"`
7426       new_path="$input_path"
7427     fi
7428   fi
7429 
7430   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7431   if test "x$test_cygdrive_prefix" = x; then
7432     # As a simple fix, exclude /usr/bin since it's not a real path.
7433     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7434       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7435       # a path prefixed by /cygdrive for fixpath to work.
7436       new_path="$CYGWIN_ROOT_PATH$input_path"
7437     fi
7438   fi
7439 
7440 
7441   if test "x$path" != "x$new_path"; then
7442     SRC_ROOT="$new_path"
7443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7444 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7445   fi
7446 
7447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7448 
7449   path="$SRC_ROOT"
7450   has_colon=`$ECHO $path | $GREP ^.:`
7451   new_path="$path"
7452   if test "x$has_colon" = x; then
7453     # Not in mixed or Windows style, start by that.
7454     new_path=`cmd //c echo $path`
7455   fi
7456 
7457 
7458   input_path="$new_path"
7459   # Check if we need to convert this using DOS-style short mode. If the path
7460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7461   # take no chances and rewrite it.
7462   # Note: m4 eats our [], so we need to use [ and ] instead.
7463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7464   if test "x$has_forbidden_chars" != x; then
7465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7466     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7467   fi
7468 
7469 
7470   windows_path="$new_path"
7471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7472     unix_path=`$CYGPATH -u "$windows_path"`
7473     new_path="$unix_path"
7474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7476     new_path="$unix_path"
7477   fi
7478 
7479   if test "x$path" != "x$new_path"; then
7480     SRC_ROOT="$new_path"
7481     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7482 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7483   fi
7484 
7485   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7486   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7487 
7488   else
7489     # We're on a posix platform. Hooray! :)
7490     path="$SRC_ROOT"
7491     has_space=`$ECHO "$path" | $GREP " "`
7492     if test "x$has_space" != x; then
7493       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7494 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7495       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7496     fi
7497 
7498     # Use eval to expand a potential ~
7499     eval path="$path"
7500     if test ! -f "$path" && test ! -d "$path"; then
7501       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7502     fi
7503 
7504     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7505   fi
7506 
7507 
7508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7509 
7510   # Input might be given as Windows format, start by converting to
7511   # unix format.
7512   path="$CURDIR"
7513   new_path=`$CYGPATH -u "$path"`
7514 
7515   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7516   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7517   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7518   # "foo.exe" is OK but "foo" is an error.
7519   #
7520   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7521   # It is also a way to make sure we got the proper file name for the real test later on.
7522   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7523   if test "x$test_shortpath" = x; then
7524     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7525 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7526     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7527   fi
7528 
7529   # Call helper function which possibly converts this using DOS-style short mode.
7530   # If so, the updated path is stored in $new_path.
7531 
7532   input_path="$new_path"
7533   # Check if we need to convert this using DOS-style short mode. If the path
7534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7535   # take no chances and rewrite it.
7536   # Note: m4 eats our [], so we need to use [ and ] instead.
7537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7538   if test "x$has_forbidden_chars" != x; then
7539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7540     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7541     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7542     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7543       # Going to short mode and back again did indeed matter. Since short mode is
7544       # case insensitive, let's make it lowercase to improve readability.
7545       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7546       # Now convert it back to Unix-stile (cygpath)
7547       input_path=`$CYGPATH -u "$shortmode_path"`
7548       new_path="$input_path"
7549     fi
7550   fi
7551 
7552   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7553   if test "x$test_cygdrive_prefix" = x; then
7554     # As a simple fix, exclude /usr/bin since it's not a real path.
7555     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7556       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7557       # a path prefixed by /cygdrive for fixpath to work.
7558       new_path="$CYGWIN_ROOT_PATH$input_path"
7559     fi
7560   fi
7561 
7562 
7563   if test "x$path" != "x$new_path"; then
7564     CURDIR="$new_path"
7565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7566 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7567   fi
7568 
7569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7570 
7571   path="$CURDIR"
7572   has_colon=`$ECHO $path | $GREP ^.:`
7573   new_path="$path"
7574   if test "x$has_colon" = x; then
7575     # Not in mixed or Windows style, start by that.
7576     new_path=`cmd //c echo $path`
7577   fi
7578 
7579 
7580   input_path="$new_path"
7581   # Check if we need to convert this using DOS-style short mode. If the path
7582   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7583   # take no chances and rewrite it.
7584   # Note: m4 eats our [], so we need to use [ and ] instead.
7585   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7586   if test "x$has_forbidden_chars" != x; then
7587     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7588     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7589   fi
7590 
7591 
7592   windows_path="$new_path"
7593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7594     unix_path=`$CYGPATH -u "$windows_path"`
7595     new_path="$unix_path"
7596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7598     new_path="$unix_path"
7599   fi
7600 
7601   if test "x$path" != "x$new_path"; then
7602     CURDIR="$new_path"
7603     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7604 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7605   fi
7606 
7607   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7608   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7609 
7610   else
7611     # We're on a posix platform. Hooray! :)
7612     path="$CURDIR"
7613     has_space=`$ECHO "$path" | $GREP " "`
7614     if test "x$has_space" != x; then
7615       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7616 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7617       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7618     fi
7619 
7620     # Use eval to expand a potential ~
7621     eval path="$path"
7622     if test ! -f "$path" && test ! -d "$path"; then
7623       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7624     fi
7625 
7626     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7627   fi
7628 
7629 
7630   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7631     # Add extra search paths on solaris for utilities like ar and as etc...
7632     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7633   fi
7634 
7635   # You can force the sys-root if the sys-root encoded into the cross compiler tools
7636   # is not correct.
7637 
7638 # Check whether --with-sys-root was given.
7639 if test "${with_sys_root+set}" = set; then :
7640   withval=$with_sys_root;
7641 fi
7642 
7643 
7644   if test "x$with_sys_root" != x; then
7645     SYS_ROOT=$with_sys_root
7646   else
7647     SYS_ROOT=/
7648   fi
7649 
7650 
7651 
7652 # Check whether --with-tools-dir was given.
7653 if test "${with_tools_dir+set}" = set; then :
7654   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7655 
7656 fi
7657 
7658 
7659   # Xcode version will be validated later
7660 
7661 # Check whether --with-xcode-path was given.
7662 if test "${with_xcode_path+set}" = set; then :
7663   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
7664 
7665 fi
7666 
7667 
7668 
7669 # Check whether --with-devkit was given.
7670 if test "${with_devkit+set}" = set; then :
7671   withval=$with_devkit;
7672         if test "x$with_sys_root" != x; then
7673           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7674         fi
7675 
7676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7677 
7678   # Input might be given as Windows format, start by converting to
7679   # unix format.
7680   path="$with_devkit"
7681   new_path=`$CYGPATH -u "$path"`
7682 
7683   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7684   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7685   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7686   # "foo.exe" is OK but "foo" is an error.
7687   #
7688   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7689   # It is also a way to make sure we got the proper file name for the real test later on.
7690   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7691   if test "x$test_shortpath" = x; then
7692     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7693 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7694     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7695   fi
7696 
7697   # Call helper function which possibly converts this using DOS-style short mode.
7698   # If so, the updated path is stored in $new_path.
7699 
7700   input_path="$new_path"
7701   # Check if we need to convert this using DOS-style short mode. If the path
7702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7703   # take no chances and rewrite it.
7704   # Note: m4 eats our [], so we need to use [ and ] instead.
7705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7706   if test "x$has_forbidden_chars" != x; then
7707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7708     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7709     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7710     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7711       # Going to short mode and back again did indeed matter. Since short mode is
7712       # case insensitive, let's make it lowercase to improve readability.
7713       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7714       # Now convert it back to Unix-stile (cygpath)
7715       input_path=`$CYGPATH -u "$shortmode_path"`
7716       new_path="$input_path"
7717     fi
7718   fi
7719 
7720   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7721   if test "x$test_cygdrive_prefix" = x; then
7722     # As a simple fix, exclude /usr/bin since it's not a real path.
7723     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7724       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7725       # a path prefixed by /cygdrive for fixpath to work.
7726       new_path="$CYGWIN_ROOT_PATH$input_path"
7727     fi
7728   fi
7729 
7730 
7731   if test "x$path" != "x$new_path"; then
7732     with_devkit="$new_path"
7733     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7734 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7735   fi
7736 
7737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7738 
7739   path="$with_devkit"
7740   has_colon=`$ECHO $path | $GREP ^.:`
7741   new_path="$path"
7742   if test "x$has_colon" = x; then
7743     # Not in mixed or Windows style, start by that.
7744     new_path=`cmd //c echo $path`
7745   fi
7746 
7747 
7748   input_path="$new_path"
7749   # Check if we need to convert this using DOS-style short mode. If the path
7750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7751   # take no chances and rewrite it.
7752   # Note: m4 eats our [], so we need to use [ and ] instead.
7753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7754   if test "x$has_forbidden_chars" != x; then
7755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7756     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7757   fi
7758 
7759 
7760   windows_path="$new_path"
7761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7762     unix_path=`$CYGPATH -u "$windows_path"`
7763     new_path="$unix_path"
7764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7766     new_path="$unix_path"
7767   fi
7768 
7769   if test "x$path" != "x$new_path"; then
7770     with_devkit="$new_path"
7771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7772 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7773   fi
7774 
7775   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7776   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7777 
7778   else
7779     # We're on a posix platform. Hooray! :)
7780     path="$with_devkit"
7781     has_space=`$ECHO "$path" | $GREP " "`
7782     if test "x$has_space" != x; then
7783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7784 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7785       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7786     fi
7787 
7788     # Use eval to expand a potential ~
7789     eval path="$path"
7790     if test ! -f "$path" && test ! -d "$path"; then
7791       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7792     fi
7793 
7794     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7795   fi
7796 
7797 
7798   if test "x$TOOLS_DIR" = x; then
7799     TOOLS_DIR="$with_devkit/bin"
7800   else
7801     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7802   fi
7803 
7804         if test -d "$with_devkit/$host_alias/libc"; then
7805           SYS_ROOT=$with_devkit/$host_alias/libc
7806         elif test -d "$with_devkit/$host/sys-root"; then
7807           SYS_ROOT=$with_devkit/$host/sys-root
7808         fi
7809 
7810 fi
7811 
7812 
7813 
7814   # Setup default logging of stdout and stderr to build.log in the output root.
7815   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7816   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7817   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7818 
7819 
7820 
7821 
7822 
7823 # Check if it's a pure open build or if custom sources are to be used.
7824 
7825   # Check whether --enable-openjdk-only was given.
7826 if test "${enable_openjdk_only+set}" = set; then :
7827   enableval=$enable_openjdk_only;
7828 else
7829   enable_openjdk_only="no"
7830 fi
7831 
7832 
7833   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7834 $as_echo_n "checking for presence of closed sources... " >&6; }
7835   if test -d "$SRC_ROOT/jdk/src/closed"; then
7836     CLOSED_SOURCE_PRESENT=yes
7837   else
7838     CLOSED_SOURCE_PRESENT=no
7839   fi
7840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7841 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7842 
7843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7844 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7845   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7847 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7848 
7849   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7850     OPENJDK=true
7851     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7852       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7853 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7854     fi
7855   else
7856     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7857       OPENJDK=true
7858     else
7859       OPENJDK=false
7860     fi
7861   fi
7862 
7863   if test "x$OPENJDK" = "xtrue"; then
7864     SET_OPENJDK="OPENJDK=true"
7865   fi
7866 
7867 
7868 
7869 
7870 # These are needed to be able to create a configuration name (and thus the output directory)
7871 
7872   ###############################################################################
7873   #
7874   # Check which variant of the JDK that we want to build.
7875   # Currently we have:
7876   #    normal:   standard edition
7877   # but the custom make system may add other variants
7878   #
7879   # Effectively the JDK variant gives a name to a specific set of
7880   # modules to compile into the JDK. In the future, these modules
7881   # might even be Jigsaw modules.
7882   #
7883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7884 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7885 
7886 # Check whether --with-jdk-variant was given.
7887 if test "${with_jdk_variant+set}" = set; then :
7888   withval=$with_jdk_variant;
7889 fi
7890 
7891 
7892   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7893     JDK_VARIANT="normal"
7894   else
7895     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7896   fi
7897 
7898 
7899 
7900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7901 $as_echo "$JDK_VARIANT" >&6; }
7902 
7903 
7904 ###############################################################################
7905 #
7906 # Check which interpreter of the JVM we want to build.
7907 # Currently we have:
7908 #    template: Template interpreter (the default)
7909 #    cpp     : C++ interpreter
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7911 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7912 
7913 # Check whether --with-jvm-interpreter was given.
7914 if test "${with_jvm_interpreter+set}" = set; then :
7915   withval=$with_jvm_interpreter;
7916 fi
7917 
7918 
7919 if test "x$with_jvm_interpreter" = x; then
7920      with_jvm_interpreter="template"
7921 fi
7922 
7923 JVM_INTERPRETER="$with_jvm_interpreter"
7924 
7925 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7926    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7927 fi
7928 
7929 
7930 
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7932 $as_echo "$with_jvm_interpreter" >&6; }
7933 
7934 
7935 
7936   ###############################################################################
7937   #
7938   # Check which variants of the JVM that we want to build.
7939   # Currently we have:
7940   #    server: normal interpreter and a tiered C1/C2 compiler
7941   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7942   #    minimal1: reduced form of client with optional VM services and features stripped out
7943   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7944   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7945   #    zero: no machine code interpreter, no compiler
7946   #    zeroshark: zero interpreter and shark/llvm compiler backend
7947 #    core: interpreter only, no compiler (only works on some platforms)
7948   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7949 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7950 
7951 # Check whether --with-jvm-variants was given.
7952 if test "${with_jvm_variants+set}" = set; then :
7953   withval=$with_jvm_variants;
7954 fi
7955 
7956 
7957   if test "x$with_jvm_variants" = x; then
7958     with_jvm_variants="server"
7959   fi
7960 
7961   JVM_VARIANTS=",$with_jvm_variants,"
7962   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,//'`
7963 
7964   if test "x$TEST_VARIANTS" != "x,"; then
7965      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7966   fi
7967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7968 $as_echo "$with_jvm_variants" >&6; }
7969 
7970   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7971   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7972   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7973   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7974   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7975   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7976   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7977 
7978   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7979     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7980       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7981     fi
7982   fi
7983   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7984     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7985       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7986     fi
7987   fi
7988   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7989     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7990       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7991     fi
7992   fi
7993 
7994   # Replace the commas with AND for use in the build directory name.
7995   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
7996   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/'`
7997   if test "x$COUNT_VARIANTS" != "x,1"; then
7998     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7999   else
8000     BUILDING_MULTIPLE_JVM_VARIANTS=no
8001   fi
8002 
8003 
8004 
8005 
8006 
8007 
8008 
8009 
8010 
8011 
8012   INCLUDE_SA=true
8013   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
8014     INCLUDE_SA=false
8015   fi
8016   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
8017     INCLUDE_SA=false
8018   fi
8019   if test "x$VAR_CPU" = xppc64 ; then
8020     INCLUDE_SA=false
8021   fi
8022   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
8023     INCLUDE_SA=false
8024   fi
8025 
8026 
8027   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
8028     MACOSX_UNIVERSAL="false"
8029   fi
8030 
8031 
8032 
8033 
8034   ###############################################################################
8035   #
8036   # Set the debug level
8037   #    release: no debug information, all optimizations, no asserts.
8038   #    fastdebug: debug information (-g), all optimizations, all asserts
8039   #    slowdebug: debug information (-g), no optimizations, all asserts
8040   #
8041   DEBUG_LEVEL="release"
8042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
8043 $as_echo_n "checking which debug level to use... " >&6; }
8044   # Check whether --enable-debug was given.
8045 if test "${enable_debug+set}" = set; then :
8046   enableval=$enable_debug;
8047         ENABLE_DEBUG="${enableval}"
8048         DEBUG_LEVEL="fastdebug"
8049 
8050 else
8051   ENABLE_DEBUG="no"
8052 fi
8053 
8054 
8055 
8056 # Check whether --with-debug-level was given.
8057 if test "${with_debug_level+set}" = set; then :
8058   withval=$with_debug_level;
8059         DEBUG_LEVEL="${withval}"
8060         if test "x$ENABLE_DEBUG" = xyes; then
8061           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
8062         fi
8063 
8064 fi
8065 
8066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8067 $as_echo "$DEBUG_LEVEL" >&6; }
8068 
8069   if test "x$DEBUG_LEVEL" != xrelease && \
8070       test "x$DEBUG_LEVEL" != xfastdebug && \
8071       test "x$DEBUG_LEVEL" != xslowdebug; then
8072     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8073   fi
8074 
8075 
8076   ###############################################################################
8077   #
8078   # Setup legacy vars/targets and new vars to deal with different debug levels.
8079   #
8080 
8081   case $DEBUG_LEVEL in
8082     release )
8083       VARIANT="OPT"
8084       FASTDEBUG="false"
8085       DEBUG_CLASSFILES="false"
8086       BUILD_VARIANT_RELEASE=""
8087       HOTSPOT_DEBUG_LEVEL="product"
8088       HOTSPOT_EXPORT="product"
8089       ;;
8090     fastdebug )
8091       VARIANT="DBG"
8092       FASTDEBUG="true"
8093       DEBUG_CLASSFILES="true"
8094       BUILD_VARIANT_RELEASE="-fastdebug"
8095       HOTSPOT_DEBUG_LEVEL="fastdebug"
8096       HOTSPOT_EXPORT="fastdebug"
8097       ;;
8098     slowdebug )
8099       VARIANT="DBG"
8100       FASTDEBUG="false"
8101       DEBUG_CLASSFILES="true"
8102       BUILD_VARIANT_RELEASE="-debug"
8103       HOTSPOT_DEBUG_LEVEL="jvmg"
8104       HOTSPOT_EXPORT="debug"
8105       ;;
8106   esac
8107 
8108   #####
8109   # Generate the legacy makefile targets for hotspot.
8110   # The hotspot api for selecting the build artifacts, really, needs to be improved.
8111   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8112   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8113   # But until then ...
8114   HOTSPOT_TARGET=""
8115 
8116   if test "x$JVM_VARIANT_SERVER" = xtrue; then
8117     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8118   fi
8119 
8120   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8121     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8122   fi
8123 
8124   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8125     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8126   fi
8127 
8128   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8129     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8130   fi
8131 
8132   if test "x$JVM_VARIANT_ZERO" = xtrue; then
8133     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8134   fi
8135 
8136   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8137     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8138   fi
8139 
8140   if test "x$JVM_VARIANT_CORE" = xtrue; then
8141     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8142   fi
8143 
8144   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8145 
8146   # On Macosx universal binaries are produced, but they only contain
8147   # 64 bit intel. This invalidates control of which jvms are built
8148   # from configure, but only server is valid anyway. Fix this
8149   # when hotspot makefiles are rewritten.
8150   if test "x$MACOSX_UNIVERSAL" = xtrue; then
8151     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8152   fi
8153 
8154   #####
8155 
8156 
8157 
8158 
8159 
8160 
8161 
8162 
8163 # With basic setup done, call the custom early hook.
8164 
8165 
8166 # To properly create a configuration name, we need to have the OpenJDK target
8167 # and options (variants and debug level) parsed.
8168 
8169 
8170 
8171 # Check whether --with-conf-name was given.
8172 if test "${with_conf_name+set}" = set; then :
8173   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8174 fi
8175 
8176 
8177   # Test from where we are running configure, in or outside of src root.
8178   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8179       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8180       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8181     # We are running configure from the src root.
8182     # Create a default ./build/target-variant-debuglevel output root.
8183     if test "x${CONF_NAME}" = x; then
8184       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8185     fi
8186     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8187     $MKDIR -p "$OUTPUT_ROOT"
8188     if test ! -d "$OUTPUT_ROOT"; then
8189       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8190     fi
8191   else
8192     # We are running configure from outside of the src dir.
8193     # Then use the current directory as output dir!
8194     # If configuration is situated in normal build directory, just use the build
8195     # directory name as configuration name, otherwise use the complete path.
8196     if test "x${CONF_NAME}" = x; then
8197       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8198     fi
8199     OUTPUT_ROOT="$CURDIR"
8200 
8201     # WARNING: This might be a bad thing to do. You need to be sure you want to
8202     # have a configuration in this directory. Do some sanity checks!
8203 
8204     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8205       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8206       # other files
8207       files_present=`$LS $OUTPUT_ROOT`
8208       # Configure has already touched config.log and confdefs.h in the current dir when this check
8209       # is performed.
8210       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8211       | $TR -d '\n'`
8212       if test "x$filtered_files" != x; then
8213         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8214 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8215         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8216 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8217         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8218 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8219         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8220 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8221         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8222 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8223         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8224 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8225         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8226 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8227         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8228       fi
8229     fi
8230   fi
8231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8232 $as_echo_n "checking what configuration name to use... " >&6; }
8233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8234 $as_echo "$CONF_NAME" >&6; }
8235 
8236 
8237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8238 
8239   # Input might be given as Windows format, start by converting to
8240   # unix format.
8241   path="$OUTPUT_ROOT"
8242   new_path=`$CYGPATH -u "$path"`
8243 
8244   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8245   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8246   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8247   # "foo.exe" is OK but "foo" is an error.
8248   #
8249   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8250   # It is also a way to make sure we got the proper file name for the real test later on.
8251   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8252   if test "x$test_shortpath" = x; then
8253     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8254 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8255     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8256   fi
8257 
8258   # Call helper function which possibly converts this using DOS-style short mode.
8259   # If so, the updated path is stored in $new_path.
8260 
8261   input_path="$new_path"
8262   # Check if we need to convert this using DOS-style short mode. If the path
8263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8264   # take no chances and rewrite it.
8265   # Note: m4 eats our [], so we need to use [ and ] instead.
8266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8267   if test "x$has_forbidden_chars" != x; then
8268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8272       # Going to short mode and back again did indeed matter. Since short mode is
8273       # case insensitive, let's make it lowercase to improve readability.
8274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8275       # Now convert it back to Unix-stile (cygpath)
8276       input_path=`$CYGPATH -u "$shortmode_path"`
8277       new_path="$input_path"
8278     fi
8279   fi
8280 
8281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8282   if test "x$test_cygdrive_prefix" = x; then
8283     # As a simple fix, exclude /usr/bin since it's not a real path.
8284     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8286       # a path prefixed by /cygdrive for fixpath to work.
8287       new_path="$CYGWIN_ROOT_PATH$input_path"
8288     fi
8289   fi
8290 
8291 
8292   if test "x$path" != "x$new_path"; then
8293     OUTPUT_ROOT="$new_path"
8294     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8295 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8296   fi
8297 
8298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8299 
8300   path="$OUTPUT_ROOT"
8301   has_colon=`$ECHO $path | $GREP ^.:`
8302   new_path="$path"
8303   if test "x$has_colon" = x; then
8304     # Not in mixed or Windows style, start by that.
8305     new_path=`cmd //c echo $path`
8306   fi
8307 
8308 
8309   input_path="$new_path"
8310   # Check if we need to convert this using DOS-style short mode. If the path
8311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8312   # take no chances and rewrite it.
8313   # Note: m4 eats our [], so we need to use [ and ] instead.
8314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8315   if test "x$has_forbidden_chars" != x; then
8316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8317     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8318   fi
8319 
8320 
8321   windows_path="$new_path"
8322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8323     unix_path=`$CYGPATH -u "$windows_path"`
8324     new_path="$unix_path"
8325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8327     new_path="$unix_path"
8328   fi
8329 
8330   if test "x$path" != "x$new_path"; then
8331     OUTPUT_ROOT="$new_path"
8332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8333 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8334   fi
8335 
8336   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8337   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8338 
8339   else
8340     # We're on a posix platform. Hooray! :)
8341     path="$OUTPUT_ROOT"
8342     has_space=`$ECHO "$path" | $GREP " "`
8343     if test "x$has_space" != x; then
8344       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8345 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8346       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8347     fi
8348 
8349     # Use eval to expand a potential ~
8350     eval path="$path"
8351     if test ! -f "$path" && test ! -d "$path"; then
8352       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8353     fi
8354 
8355     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8356   fi
8357 
8358 
8359   SPEC=$OUTPUT_ROOT/spec.gmk
8360 
8361   CONF_NAME=$CONF_NAME
8362 
8363   OUTPUT_ROOT=$OUTPUT_ROOT
8364 
8365 
8366   # Most of the probed defines are put into config.h
8367   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8368 
8369   # The spec.gmk file contains all variables for the make system.
8370   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8371 
8372   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8373   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8374 
8375   # The bootcycle-spec.gmk file contains support for boot cycle builds.
8376   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8377 
8378   # The compare.sh is used to compare the build output to other builds.
8379   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8380 
8381   # Spec.sh is currently used by compare-objects.sh
8382   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8383 
8384   # The generated Makefile knows where the spec.gmk is and where the source is.
8385   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8386   # which will look for generated configurations
8387   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8388 
8389 
8390   # Save the arguments given to us
8391   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8392 
8393 
8394 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8395 
8396   for ac_prog in apt-get yum port pkgutil pkgadd
8397 do
8398   # Extract the first word of "$ac_prog", so it can be a program name with args.
8399 set dummy $ac_prog; ac_word=$2
8400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8401 $as_echo_n "checking for $ac_word... " >&6; }
8402 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8403   $as_echo_n "(cached) " >&6
8404 else
8405   if test -n "$PKGHANDLER"; then
8406   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8407 else
8408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8409 for as_dir in $PATH
8410 do
8411   IFS=$as_save_IFS
8412   test -z "$as_dir" && as_dir=.
8413     for ac_exec_ext in '' $ac_executable_extensions; do
8414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8415     ac_cv_prog_PKGHANDLER="$ac_prog"
8416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8417     break 2
8418   fi
8419 done
8420   done
8421 IFS=$as_save_IFS
8422 
8423 fi
8424 fi
8425 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8426 if test -n "$PKGHANDLER"; then
8427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8428 $as_echo "$PKGHANDLER" >&6; }
8429 else
8430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8431 $as_echo "no" >&6; }
8432 fi
8433 
8434 
8435   test -n "$PKGHANDLER" && break
8436 done
8437 
8438 
8439 
8440 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8441 
8442 
8443   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8444   if test "x$MAKE" != x; then
8445     # User has supplied a make, test it.
8446     if test ! -f "$MAKE"; then
8447       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8448     fi
8449 
8450   MAKE_CANDIDATE=""$MAKE""
8451   DESCRIPTION="user supplied MAKE=$MAKE"
8452   if test "x$MAKE_CANDIDATE" != x; then
8453     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8454 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8455     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8456     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8457     if test "x$IS_GNU_MAKE" = x; then
8458       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8459 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8460     else
8461       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8462       if test "x$IS_MODERN_MAKE" = x; then
8463         { $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
8464 $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;}
8465       else
8466         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8467           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8468             MAKE_EXPECTED_ENV='cygwin'
8469           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8470             MAKE_EXPECTED_ENV='msys'
8471           else
8472             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8473           fi
8474           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8475           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8476         else
8477           # Not relevant for non-Windows
8478           IS_MAKE_CORRECT_ENV=true
8479         fi
8480         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8481           { $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
8482 $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;}
8483         else
8484           FOUND_MAKE=$MAKE_CANDIDATE
8485 
8486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8487 
8488   # First separate the path from the arguments. This will split at the first
8489   # space.
8490   complete="$FOUND_MAKE"
8491   path="${complete%% *}"
8492   tmp="$complete EOL"
8493   arguments="${tmp#* }"
8494 
8495   # Input might be given as Windows format, start by converting to
8496   # unix format.
8497   new_path=`$CYGPATH -u "$path"`
8498 
8499   # Now try to locate executable using which
8500   new_path=`$WHICH "$new_path" 2> /dev/null`
8501   # bat and cmd files are not always considered executable in cygwin causing which
8502   # to not find them
8503   if test "x$new_path" = x \
8504       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8505       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8506     new_path=`$CYGPATH -u "$path"`
8507   fi
8508   if test "x$new_path" = x; then
8509     # Oops. Which didn't find the executable.
8510     # The splitting of arguments from the executable at a space might have been incorrect,
8511     # since paths with space are more likely in Windows. Give it another try with the whole
8512     # argument.
8513     path="$complete"
8514     arguments="EOL"
8515     new_path=`$CYGPATH -u "$path"`
8516     new_path=`$WHICH "$new_path" 2> /dev/null`
8517     # bat and cmd files are not always considered executable in cygwin causing which
8518     # to not find them
8519     if test "x$new_path" = x \
8520         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8521         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8522       new_path=`$CYGPATH -u "$path"`
8523     fi
8524     if test "x$new_path" = x; then
8525       # It's still not found. Now this is an unrecoverable error.
8526       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8527 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8528       has_space=`$ECHO "$complete" | $GREP " "`
8529       if test "x$has_space" != x; then
8530         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8531 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8532       fi
8533       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8534     fi
8535   fi
8536 
8537   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8538   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8539   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8540   # "foo.exe" is OK but "foo" is an error.
8541   #
8542   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8543   # It is also a way to make sure we got the proper file name for the real test later on.
8544   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8545   if test "x$test_shortpath" = x; then
8546     # Short path failed, file does not exist as specified.
8547     # Try adding .exe or .cmd
8548     if test -f "${new_path}.exe"; then
8549       input_to_shortpath="${new_path}.exe"
8550     elif test -f "${new_path}.cmd"; then
8551       input_to_shortpath="${new_path}.cmd"
8552     else
8553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8554 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8555       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8556 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8557       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8558     fi
8559   else
8560     input_to_shortpath="$new_path"
8561   fi
8562 
8563   # Call helper function which possibly converts this using DOS-style short mode.
8564   # If so, the updated path is stored in $new_path.
8565   new_path="$input_to_shortpath"
8566 
8567   input_path="$input_to_shortpath"
8568   # Check if we need to convert this using DOS-style short mode. If the path
8569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8570   # take no chances and rewrite it.
8571   # Note: m4 eats our [], so we need to use [ and ] instead.
8572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8573   if test "x$has_forbidden_chars" != x; then
8574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8575     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8576     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8577     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8578       # Going to short mode and back again did indeed matter. Since short mode is
8579       # case insensitive, let's make it lowercase to improve readability.
8580       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8581       # Now convert it back to Unix-stile (cygpath)
8582       input_path=`$CYGPATH -u "$shortmode_path"`
8583       new_path="$input_path"
8584     fi
8585   fi
8586 
8587   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8588   if test "x$test_cygdrive_prefix" = x; then
8589     # As a simple fix, exclude /usr/bin since it's not a real path.
8590     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8591       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8592       # a path prefixed by /cygdrive for fixpath to work.
8593       new_path="$CYGWIN_ROOT_PATH$input_path"
8594     fi
8595   fi
8596 
8597   # remove trailing .exe if any
8598   new_path="${new_path/%.exe/}"
8599 
8600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8601 
8602   # First separate the path from the arguments. This will split at the first
8603   # space.
8604   complete="$FOUND_MAKE"
8605   path="${complete%% *}"
8606   tmp="$complete EOL"
8607   arguments="${tmp#* }"
8608 
8609   # Input might be given as Windows format, start by converting to
8610   # unix format.
8611   new_path="$path"
8612 
8613   windows_path="$new_path"
8614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8615     unix_path=`$CYGPATH -u "$windows_path"`
8616     new_path="$unix_path"
8617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8619     new_path="$unix_path"
8620   fi
8621 
8622 
8623   # Now try to locate executable using which
8624   new_path=`$WHICH "$new_path" 2> /dev/null`
8625 
8626   if test "x$new_path" = x; then
8627     # Oops. Which didn't find the executable.
8628     # The splitting of arguments from the executable at a space might have been incorrect,
8629     # since paths with space are more likely in Windows. Give it another try with the whole
8630     # argument.
8631     path="$complete"
8632     arguments="EOL"
8633     new_path="$path"
8634 
8635   windows_path="$new_path"
8636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8637     unix_path=`$CYGPATH -u "$windows_path"`
8638     new_path="$unix_path"
8639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8640     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8641     new_path="$unix_path"
8642   fi
8643 
8644 
8645     new_path=`$WHICH "$new_path" 2> /dev/null`
8646 
8647     if test "x$new_path" = x; then
8648       # It's still not found. Now this is an unrecoverable error.
8649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8650 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8651       has_space=`$ECHO "$complete" | $GREP " "`
8652       if test "x$has_space" != x; then
8653         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8654 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8655       fi
8656       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8657     fi
8658   fi
8659 
8660   # Now new_path has a complete unix path to the binary
8661   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8662     # Keep paths in /bin as-is, but remove trailing .exe if any
8663     new_path="${new_path/%.exe/}"
8664     # Do not save /bin paths to all_fixpath_prefixes!
8665   else
8666     # Not in mixed or Windows style, start by that.
8667     new_path=`cmd //c echo $new_path`
8668 
8669   input_path="$new_path"
8670   # Check if we need to convert this using DOS-style short mode. If the path
8671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8672   # take no chances and rewrite it.
8673   # Note: m4 eats our [], so we need to use [ and ] instead.
8674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8675   if test "x$has_forbidden_chars" != x; then
8676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8678   fi
8679 
8680     # Output is in $new_path
8681 
8682   windows_path="$new_path"
8683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8684     unix_path=`$CYGPATH -u "$windows_path"`
8685     new_path="$unix_path"
8686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8688     new_path="$unix_path"
8689   fi
8690 
8691     # remove trailing .exe if any
8692     new_path="${new_path/%.exe/}"
8693 
8694     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8695     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8696   fi
8697 
8698   else
8699     # We're on a posix platform. Hooray! :)
8700     # First separate the path from the arguments. This will split at the first
8701     # space.
8702     complete="$FOUND_MAKE"
8703     path="${complete%% *}"
8704     tmp="$complete EOL"
8705     arguments="${tmp#* }"
8706 
8707     # Cannot rely on the command "which" here since it doesn't always work.
8708     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8709     if test -z "$is_absolute_path"; then
8710       # Path to executable is not absolute. Find it.
8711       IFS_save="$IFS"
8712       IFS=:
8713       for p in $PATH; do
8714         if test -f "$p/$path" && test -x "$p/$path"; then
8715           new_path="$p/$path"
8716           break
8717         fi
8718       done
8719       IFS="$IFS_save"
8720     else
8721       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8722 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8723       new_path="$path"
8724     fi
8725 
8726     if test "x$new_path" = x; then
8727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8728 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8729       has_space=`$ECHO "$complete" | $GREP " "`
8730       if test "x$has_space" != x; then
8731         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8732 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8733       fi
8734       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8735     fi
8736   fi
8737 
8738   # Now join together the path and the arguments once again
8739   if test "x$arguments" != xEOL; then
8740     new_complete="$new_path ${arguments% *}"
8741   else
8742     new_complete="$new_path"
8743   fi
8744 
8745   if test "x$complete" != "x$new_complete"; then
8746     FOUND_MAKE="$new_complete"
8747     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8748 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8749   fi
8750 
8751         fi
8752       fi
8753     fi
8754   fi
8755 
8756     if test "x$FOUND_MAKE" = x; then
8757       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8758     fi
8759   else
8760     # Try our hardest to locate a correct version of GNU make
8761     for ac_prog in gmake
8762 do
8763   # Extract the first word of "$ac_prog", so it can be a program name with args.
8764 set dummy $ac_prog; ac_word=$2
8765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8766 $as_echo_n "checking for $ac_word... " >&6; }
8767 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8768   $as_echo_n "(cached) " >&6
8769 else
8770   case $CHECK_GMAKE in
8771   [\\/]* | ?:[\\/]*)
8772   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8773   ;;
8774   *)
8775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8776 for as_dir in $PATH
8777 do
8778   IFS=$as_save_IFS
8779   test -z "$as_dir" && as_dir=.
8780     for ac_exec_ext in '' $ac_executable_extensions; do
8781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8782     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8784     break 2
8785   fi
8786 done
8787   done
8788 IFS=$as_save_IFS
8789 
8790   ;;
8791 esac
8792 fi
8793 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8794 if test -n "$CHECK_GMAKE"; then
8795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8796 $as_echo "$CHECK_GMAKE" >&6; }
8797 else
8798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8799 $as_echo "no" >&6; }
8800 fi
8801 
8802 
8803   test -n "$CHECK_GMAKE" && break
8804 done
8805 
8806 
8807   MAKE_CANDIDATE=""$CHECK_GMAKE""
8808   DESCRIPTION="gmake in PATH"
8809   if test "x$MAKE_CANDIDATE" != x; then
8810     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8811 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8812     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8813     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8814     if test "x$IS_GNU_MAKE" = x; then
8815       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8816 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8817     else
8818       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8819       if test "x$IS_MODERN_MAKE" = x; then
8820         { $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
8821 $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;}
8822       else
8823         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8824           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8825             MAKE_EXPECTED_ENV='cygwin'
8826           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8827             MAKE_EXPECTED_ENV='msys'
8828           else
8829             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8830           fi
8831           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8832           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8833         else
8834           # Not relevant for non-Windows
8835           IS_MAKE_CORRECT_ENV=true
8836         fi
8837         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8838           { $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
8839 $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;}
8840         else
8841           FOUND_MAKE=$MAKE_CANDIDATE
8842 
8843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8844 
8845   # First separate the path from the arguments. This will split at the first
8846   # space.
8847   complete="$FOUND_MAKE"
8848   path="${complete%% *}"
8849   tmp="$complete EOL"
8850   arguments="${tmp#* }"
8851 
8852   # Input might be given as Windows format, start by converting to
8853   # unix format.
8854   new_path=`$CYGPATH -u "$path"`
8855 
8856   # Now try to locate executable using which
8857   new_path=`$WHICH "$new_path" 2> /dev/null`
8858   # bat and cmd files are not always considered executable in cygwin causing which
8859   # to not find them
8860   if test "x$new_path" = x \
8861       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8862       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8863     new_path=`$CYGPATH -u "$path"`
8864   fi
8865   if test "x$new_path" = x; then
8866     # Oops. Which didn't find the executable.
8867     # The splitting of arguments from the executable at a space might have been incorrect,
8868     # since paths with space are more likely in Windows. Give it another try with the whole
8869     # argument.
8870     path="$complete"
8871     arguments="EOL"
8872     new_path=`$CYGPATH -u "$path"`
8873     new_path=`$WHICH "$new_path" 2> /dev/null`
8874     # bat and cmd files are not always considered executable in cygwin causing which
8875     # to not find them
8876     if test "x$new_path" = x \
8877         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8878         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8879       new_path=`$CYGPATH -u "$path"`
8880     fi
8881     if test "x$new_path" = x; then
8882       # It's still not found. Now this is an unrecoverable error.
8883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8884 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8885       has_space=`$ECHO "$complete" | $GREP " "`
8886       if test "x$has_space" != x; then
8887         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8888 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8889       fi
8890       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8891     fi
8892   fi
8893 
8894   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8895   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8896   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8897   # "foo.exe" is OK but "foo" is an error.
8898   #
8899   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8900   # It is also a way to make sure we got the proper file name for the real test later on.
8901   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8902   if test "x$test_shortpath" = x; then
8903     # Short path failed, file does not exist as specified.
8904     # Try adding .exe or .cmd
8905     if test -f "${new_path}.exe"; then
8906       input_to_shortpath="${new_path}.exe"
8907     elif test -f "${new_path}.cmd"; then
8908       input_to_shortpath="${new_path}.cmd"
8909     else
8910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8911 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8912       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8913 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8914       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8915     fi
8916   else
8917     input_to_shortpath="$new_path"
8918   fi
8919 
8920   # Call helper function which possibly converts this using DOS-style short mode.
8921   # If so, the updated path is stored in $new_path.
8922   new_path="$input_to_shortpath"
8923 
8924   input_path="$input_to_shortpath"
8925   # Check if we need to convert this using DOS-style short mode. If the path
8926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8927   # take no chances and rewrite it.
8928   # Note: m4 eats our [], so we need to use [ and ] instead.
8929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8930   if test "x$has_forbidden_chars" != x; then
8931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8932     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8933     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8934     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8935       # Going to short mode and back again did indeed matter. Since short mode is
8936       # case insensitive, let's make it lowercase to improve readability.
8937       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8938       # Now convert it back to Unix-stile (cygpath)
8939       input_path=`$CYGPATH -u "$shortmode_path"`
8940       new_path="$input_path"
8941     fi
8942   fi
8943 
8944   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8945   if test "x$test_cygdrive_prefix" = x; then
8946     # As a simple fix, exclude /usr/bin since it's not a real path.
8947     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8948       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8949       # a path prefixed by /cygdrive for fixpath to work.
8950       new_path="$CYGWIN_ROOT_PATH$input_path"
8951     fi
8952   fi
8953 
8954   # remove trailing .exe if any
8955   new_path="${new_path/%.exe/}"
8956 
8957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8958 
8959   # First separate the path from the arguments. This will split at the first
8960   # space.
8961   complete="$FOUND_MAKE"
8962   path="${complete%% *}"
8963   tmp="$complete EOL"
8964   arguments="${tmp#* }"
8965 
8966   # Input might be given as Windows format, start by converting to
8967   # unix format.
8968   new_path="$path"
8969 
8970   windows_path="$new_path"
8971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8972     unix_path=`$CYGPATH -u "$windows_path"`
8973     new_path="$unix_path"
8974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8976     new_path="$unix_path"
8977   fi
8978 
8979 
8980   # Now try to locate executable using which
8981   new_path=`$WHICH "$new_path" 2> /dev/null`
8982 
8983   if test "x$new_path" = x; then
8984     # Oops. Which didn't find the executable.
8985     # The splitting of arguments from the executable at a space might have been incorrect,
8986     # since paths with space are more likely in Windows. Give it another try with the whole
8987     # argument.
8988     path="$complete"
8989     arguments="EOL"
8990     new_path="$path"
8991 
8992   windows_path="$new_path"
8993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8994     unix_path=`$CYGPATH -u "$windows_path"`
8995     new_path="$unix_path"
8996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8998     new_path="$unix_path"
8999   fi
9000 
9001 
9002     new_path=`$WHICH "$new_path" 2> /dev/null`
9003 
9004     if test "x$new_path" = x; then
9005       # It's still not found. Now this is an unrecoverable error.
9006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9007 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9008       has_space=`$ECHO "$complete" | $GREP " "`
9009       if test "x$has_space" != x; then
9010         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9011 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9012       fi
9013       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9014     fi
9015   fi
9016 
9017   # Now new_path has a complete unix path to the binary
9018   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9019     # Keep paths in /bin as-is, but remove trailing .exe if any
9020     new_path="${new_path/%.exe/}"
9021     # Do not save /bin paths to all_fixpath_prefixes!
9022   else
9023     # Not in mixed or Windows style, start by that.
9024     new_path=`cmd //c echo $new_path`
9025 
9026   input_path="$new_path"
9027   # Check if we need to convert this using DOS-style short mode. If the path
9028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9029   # take no chances and rewrite it.
9030   # Note: m4 eats our [], so we need to use [ and ] instead.
9031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9032   if test "x$has_forbidden_chars" != x; then
9033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9034     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9035   fi
9036 
9037     # Output is in $new_path
9038 
9039   windows_path="$new_path"
9040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9041     unix_path=`$CYGPATH -u "$windows_path"`
9042     new_path="$unix_path"
9043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9044     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9045     new_path="$unix_path"
9046   fi
9047 
9048     # remove trailing .exe if any
9049     new_path="${new_path/%.exe/}"
9050 
9051     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9052     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9053   fi
9054 
9055   else
9056     # We're on a posix platform. Hooray! :)
9057     # First separate the path from the arguments. This will split at the first
9058     # space.
9059     complete="$FOUND_MAKE"
9060     path="${complete%% *}"
9061     tmp="$complete EOL"
9062     arguments="${tmp#* }"
9063 
9064     # Cannot rely on the command "which" here since it doesn't always work.
9065     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9066     if test -z "$is_absolute_path"; then
9067       # Path to executable is not absolute. Find it.
9068       IFS_save="$IFS"
9069       IFS=:
9070       for p in $PATH; do
9071         if test -f "$p/$path" && test -x "$p/$path"; then
9072           new_path="$p/$path"
9073           break
9074         fi
9075       done
9076       IFS="$IFS_save"
9077     else
9078       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9079 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9080       new_path="$path"
9081     fi
9082 
9083     if test "x$new_path" = x; then
9084       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9085 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9086       has_space=`$ECHO "$complete" | $GREP " "`
9087       if test "x$has_space" != x; then
9088         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9089 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9090       fi
9091       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9092     fi
9093   fi
9094 
9095   # Now join together the path and the arguments once again
9096   if test "x$arguments" != xEOL; then
9097     new_complete="$new_path ${arguments% *}"
9098   else
9099     new_complete="$new_path"
9100   fi
9101 
9102   if test "x$complete" != "x$new_complete"; then
9103     FOUND_MAKE="$new_complete"
9104     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9105 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9106   fi
9107 
9108         fi
9109       fi
9110     fi
9111   fi
9112 
9113 
9114     if test "x$FOUND_MAKE" = x; then
9115       for ac_prog in make
9116 do
9117   # Extract the first word of "$ac_prog", so it can be a program name with args.
9118 set dummy $ac_prog; ac_word=$2
9119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120 $as_echo_n "checking for $ac_word... " >&6; }
9121 if ${ac_cv_path_CHECK_MAKE+:} false; then :
9122   $as_echo_n "(cached) " >&6
9123 else
9124   case $CHECK_MAKE in
9125   [\\/]* | ?:[\\/]*)
9126   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9127   ;;
9128   *)
9129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130 for as_dir in $PATH
9131 do
9132   IFS=$as_save_IFS
9133   test -z "$as_dir" && as_dir=.
9134     for ac_exec_ext in '' $ac_executable_extensions; do
9135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138     break 2
9139   fi
9140 done
9141   done
9142 IFS=$as_save_IFS
9143 
9144   ;;
9145 esac
9146 fi
9147 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9148 if test -n "$CHECK_MAKE"; then
9149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9150 $as_echo "$CHECK_MAKE" >&6; }
9151 else
9152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153 $as_echo "no" >&6; }
9154 fi
9155 
9156 
9157   test -n "$CHECK_MAKE" && break
9158 done
9159 
9160 
9161   MAKE_CANDIDATE=""$CHECK_MAKE""
9162   DESCRIPTION="make in PATH"
9163   if test "x$MAKE_CANDIDATE" != x; then
9164     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9165 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9166     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9167     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9168     if test "x$IS_GNU_MAKE" = x; then
9169       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9170 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9171     else
9172       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9173       if test "x$IS_MODERN_MAKE" = x; then
9174         { $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
9175 $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;}
9176       else
9177         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9178           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9179             MAKE_EXPECTED_ENV='cygwin'
9180           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9181             MAKE_EXPECTED_ENV='msys'
9182           else
9183             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9184           fi
9185           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9186           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9187         else
9188           # Not relevant for non-Windows
9189           IS_MAKE_CORRECT_ENV=true
9190         fi
9191         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9192           { $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
9193 $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;}
9194         else
9195           FOUND_MAKE=$MAKE_CANDIDATE
9196 
9197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9198 
9199   # First separate the path from the arguments. This will split at the first
9200   # space.
9201   complete="$FOUND_MAKE"
9202   path="${complete%% *}"
9203   tmp="$complete EOL"
9204   arguments="${tmp#* }"
9205 
9206   # Input might be given as Windows format, start by converting to
9207   # unix format.
9208   new_path=`$CYGPATH -u "$path"`
9209 
9210   # Now try to locate executable using which
9211   new_path=`$WHICH "$new_path" 2> /dev/null`
9212   # bat and cmd files are not always considered executable in cygwin causing which
9213   # to not find them
9214   if test "x$new_path" = x \
9215       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9216       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9217     new_path=`$CYGPATH -u "$path"`
9218   fi
9219   if test "x$new_path" = x; then
9220     # Oops. Which didn't find the executable.
9221     # The splitting of arguments from the executable at a space might have been incorrect,
9222     # since paths with space are more likely in Windows. Give it another try with the whole
9223     # argument.
9224     path="$complete"
9225     arguments="EOL"
9226     new_path=`$CYGPATH -u "$path"`
9227     new_path=`$WHICH "$new_path" 2> /dev/null`
9228     # bat and cmd files are not always considered executable in cygwin causing which
9229     # to not find them
9230     if test "x$new_path" = x \
9231         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9232         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9233       new_path=`$CYGPATH -u "$path"`
9234     fi
9235     if test "x$new_path" = x; then
9236       # It's still not found. Now this is an unrecoverable error.
9237       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9238 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9239       has_space=`$ECHO "$complete" | $GREP " "`
9240       if test "x$has_space" != x; then
9241         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9242 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9243       fi
9244       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9245     fi
9246   fi
9247 
9248   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9249   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9250   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9251   # "foo.exe" is OK but "foo" is an error.
9252   #
9253   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9254   # It is also a way to make sure we got the proper file name for the real test later on.
9255   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9256   if test "x$test_shortpath" = x; then
9257     # Short path failed, file does not exist as specified.
9258     # Try adding .exe or .cmd
9259     if test -f "${new_path}.exe"; then
9260       input_to_shortpath="${new_path}.exe"
9261     elif test -f "${new_path}.cmd"; then
9262       input_to_shortpath="${new_path}.cmd"
9263     else
9264       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9265 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9266       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9267 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9268       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9269     fi
9270   else
9271     input_to_shortpath="$new_path"
9272   fi
9273 
9274   # Call helper function which possibly converts this using DOS-style short mode.
9275   # If so, the updated path is stored in $new_path.
9276   new_path="$input_to_shortpath"
9277 
9278   input_path="$input_to_shortpath"
9279   # Check if we need to convert this using DOS-style short mode. If the path
9280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9281   # take no chances and rewrite it.
9282   # Note: m4 eats our [], so we need to use [ and ] instead.
9283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9284   if test "x$has_forbidden_chars" != x; then
9285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9286     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9287     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9288     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9289       # Going to short mode and back again did indeed matter. Since short mode is
9290       # case insensitive, let's make it lowercase to improve readability.
9291       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9292       # Now convert it back to Unix-stile (cygpath)
9293       input_path=`$CYGPATH -u "$shortmode_path"`
9294       new_path="$input_path"
9295     fi
9296   fi
9297 
9298   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9299   if test "x$test_cygdrive_prefix" = x; then
9300     # As a simple fix, exclude /usr/bin since it's not a real path.
9301     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9302       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9303       # a path prefixed by /cygdrive for fixpath to work.
9304       new_path="$CYGWIN_ROOT_PATH$input_path"
9305     fi
9306   fi
9307 
9308   # remove trailing .exe if any
9309   new_path="${new_path/%.exe/}"
9310 
9311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9312 
9313   # First separate the path from the arguments. This will split at the first
9314   # space.
9315   complete="$FOUND_MAKE"
9316   path="${complete%% *}"
9317   tmp="$complete EOL"
9318   arguments="${tmp#* }"
9319 
9320   # Input might be given as Windows format, start by converting to
9321   # unix format.
9322   new_path="$path"
9323 
9324   windows_path="$new_path"
9325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9326     unix_path=`$CYGPATH -u "$windows_path"`
9327     new_path="$unix_path"
9328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9330     new_path="$unix_path"
9331   fi
9332 
9333 
9334   # Now try to locate executable using which
9335   new_path=`$WHICH "$new_path" 2> /dev/null`
9336 
9337   if test "x$new_path" = x; then
9338     # Oops. Which didn't find the executable.
9339     # The splitting of arguments from the executable at a space might have been incorrect,
9340     # since paths with space are more likely in Windows. Give it another try with the whole
9341     # argument.
9342     path="$complete"
9343     arguments="EOL"
9344     new_path="$path"
9345 
9346   windows_path="$new_path"
9347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9348     unix_path=`$CYGPATH -u "$windows_path"`
9349     new_path="$unix_path"
9350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9352     new_path="$unix_path"
9353   fi
9354 
9355 
9356     new_path=`$WHICH "$new_path" 2> /dev/null`
9357 
9358     if test "x$new_path" = x; then
9359       # It's still not found. Now this is an unrecoverable error.
9360       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9361 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9362       has_space=`$ECHO "$complete" | $GREP " "`
9363       if test "x$has_space" != x; then
9364         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9365 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9366       fi
9367       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9368     fi
9369   fi
9370 
9371   # Now new_path has a complete unix path to the binary
9372   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9373     # Keep paths in /bin as-is, but remove trailing .exe if any
9374     new_path="${new_path/%.exe/}"
9375     # Do not save /bin paths to all_fixpath_prefixes!
9376   else
9377     # Not in mixed or Windows style, start by that.
9378     new_path=`cmd //c echo $new_path`
9379 
9380   input_path="$new_path"
9381   # Check if we need to convert this using DOS-style short mode. If the path
9382   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9383   # take no chances and rewrite it.
9384   # Note: m4 eats our [], so we need to use [ and ] instead.
9385   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9386   if test "x$has_forbidden_chars" != x; then
9387     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9388     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9389   fi
9390 
9391     # Output is in $new_path
9392 
9393   windows_path="$new_path"
9394   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9395     unix_path=`$CYGPATH -u "$windows_path"`
9396     new_path="$unix_path"
9397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9398     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9399     new_path="$unix_path"
9400   fi
9401 
9402     # remove trailing .exe if any
9403     new_path="${new_path/%.exe/}"
9404 
9405     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9406     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9407   fi
9408 
9409   else
9410     # We're on a posix platform. Hooray! :)
9411     # First separate the path from the arguments. This will split at the first
9412     # space.
9413     complete="$FOUND_MAKE"
9414     path="${complete%% *}"
9415     tmp="$complete EOL"
9416     arguments="${tmp#* }"
9417 
9418     # Cannot rely on the command "which" here since it doesn't always work.
9419     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9420     if test -z "$is_absolute_path"; then
9421       # Path to executable is not absolute. Find it.
9422       IFS_save="$IFS"
9423       IFS=:
9424       for p in $PATH; do
9425         if test -f "$p/$path" && test -x "$p/$path"; then
9426           new_path="$p/$path"
9427           break
9428         fi
9429       done
9430       IFS="$IFS_save"
9431     else
9432       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9433 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9434       new_path="$path"
9435     fi
9436 
9437     if test "x$new_path" = x; then
9438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9439 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9440       has_space=`$ECHO "$complete" | $GREP " "`
9441       if test "x$has_space" != x; then
9442         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9443 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9444       fi
9445       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9446     fi
9447   fi
9448 
9449   # Now join together the path and the arguments once again
9450   if test "x$arguments" != xEOL; then
9451     new_complete="$new_path ${arguments% *}"
9452   else
9453     new_complete="$new_path"
9454   fi
9455 
9456   if test "x$complete" != "x$new_complete"; then
9457     FOUND_MAKE="$new_complete"
9458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9459 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9460   fi
9461 
9462         fi
9463       fi
9464     fi
9465   fi
9466 
9467     fi
9468 
9469     if test "x$FOUND_MAKE" = x; then
9470       if test "x$TOOLS_DIR" != x; then
9471         # We have a tools-dir, check that as well before giving up.
9472         OLD_PATH=$PATH
9473         PATH=$TOOLS_DIR:$PATH
9474         for ac_prog in gmake
9475 do
9476   # Extract the first word of "$ac_prog", so it can be a program name with args.
9477 set dummy $ac_prog; ac_word=$2
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9479 $as_echo_n "checking for $ac_word... " >&6; }
9480 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9481   $as_echo_n "(cached) " >&6
9482 else
9483   case $CHECK_TOOLSDIR_GMAKE in
9484   [\\/]* | ?:[\\/]*)
9485   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9486   ;;
9487   *)
9488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9489 for as_dir in $PATH
9490 do
9491   IFS=$as_save_IFS
9492   test -z "$as_dir" && as_dir=.
9493     for ac_exec_ext in '' $ac_executable_extensions; do
9494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9495     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9497     break 2
9498   fi
9499 done
9500   done
9501 IFS=$as_save_IFS
9502 
9503   ;;
9504 esac
9505 fi
9506 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9507 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9509 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9510 else
9511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512 $as_echo "no" >&6; }
9513 fi
9514 
9515 
9516   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9517 done
9518 
9519 
9520   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9521   DESCRIPTION="gmake in tools-dir"
9522   if test "x$MAKE_CANDIDATE" != x; then
9523     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9524 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9525     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9526     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9527     if test "x$IS_GNU_MAKE" = x; then
9528       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9529 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9530     else
9531       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9532       if test "x$IS_MODERN_MAKE" = x; then
9533         { $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
9534 $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;}
9535       else
9536         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9537           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9538             MAKE_EXPECTED_ENV='cygwin'
9539           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9540             MAKE_EXPECTED_ENV='msys'
9541           else
9542             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9543           fi
9544           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9545           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9546         else
9547           # Not relevant for non-Windows
9548           IS_MAKE_CORRECT_ENV=true
9549         fi
9550         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9551           { $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
9552 $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;}
9553         else
9554           FOUND_MAKE=$MAKE_CANDIDATE
9555 
9556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9557 
9558   # First separate the path from the arguments. This will split at the first
9559   # space.
9560   complete="$FOUND_MAKE"
9561   path="${complete%% *}"
9562   tmp="$complete EOL"
9563   arguments="${tmp#* }"
9564 
9565   # Input might be given as Windows format, start by converting to
9566   # unix format.
9567   new_path=`$CYGPATH -u "$path"`
9568 
9569   # Now try to locate executable using which
9570   new_path=`$WHICH "$new_path" 2> /dev/null`
9571   # bat and cmd files are not always considered executable in cygwin causing which
9572   # to not find them
9573   if test "x$new_path" = x \
9574       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9575       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9576     new_path=`$CYGPATH -u "$path"`
9577   fi
9578   if test "x$new_path" = x; then
9579     # Oops. Which didn't find the executable.
9580     # The splitting of arguments from the executable at a space might have been incorrect,
9581     # since paths with space are more likely in Windows. Give it another try with the whole
9582     # argument.
9583     path="$complete"
9584     arguments="EOL"
9585     new_path=`$CYGPATH -u "$path"`
9586     new_path=`$WHICH "$new_path" 2> /dev/null`
9587     # bat and cmd files are not always considered executable in cygwin causing which
9588     # to not find them
9589     if test "x$new_path" = x \
9590         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9591         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9592       new_path=`$CYGPATH -u "$path"`
9593     fi
9594     if test "x$new_path" = x; then
9595       # It's still not found. Now this is an unrecoverable error.
9596       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9597 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9598       has_space=`$ECHO "$complete" | $GREP " "`
9599       if test "x$has_space" != x; then
9600         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9601 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9602       fi
9603       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9604     fi
9605   fi
9606 
9607   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9608   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9609   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9610   # "foo.exe" is OK but "foo" is an error.
9611   #
9612   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9613   # It is also a way to make sure we got the proper file name for the real test later on.
9614   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9615   if test "x$test_shortpath" = x; then
9616     # Short path failed, file does not exist as specified.
9617     # Try adding .exe or .cmd
9618     if test -f "${new_path}.exe"; then
9619       input_to_shortpath="${new_path}.exe"
9620     elif test -f "${new_path}.cmd"; then
9621       input_to_shortpath="${new_path}.cmd"
9622     else
9623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9624 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9625       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9626 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9627       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9628     fi
9629   else
9630     input_to_shortpath="$new_path"
9631   fi
9632 
9633   # Call helper function which possibly converts this using DOS-style short mode.
9634   # If so, the updated path is stored in $new_path.
9635   new_path="$input_to_shortpath"
9636 
9637   input_path="$input_to_shortpath"
9638   # Check if we need to convert this using DOS-style short mode. If the path
9639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9640   # take no chances and rewrite it.
9641   # Note: m4 eats our [], so we need to use [ and ] instead.
9642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9643   if test "x$has_forbidden_chars" != x; then
9644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9648       # Going to short mode and back again did indeed matter. Since short mode is
9649       # case insensitive, let's make it lowercase to improve readability.
9650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9651       # Now convert it back to Unix-stile (cygpath)
9652       input_path=`$CYGPATH -u "$shortmode_path"`
9653       new_path="$input_path"
9654     fi
9655   fi
9656 
9657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9658   if test "x$test_cygdrive_prefix" = x; then
9659     # As a simple fix, exclude /usr/bin since it's not a real path.
9660     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9662       # a path prefixed by /cygdrive for fixpath to work.
9663       new_path="$CYGWIN_ROOT_PATH$input_path"
9664     fi
9665   fi
9666 
9667   # remove trailing .exe if any
9668   new_path="${new_path/%.exe/}"
9669 
9670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9671 
9672   # First separate the path from the arguments. This will split at the first
9673   # space.
9674   complete="$FOUND_MAKE"
9675   path="${complete%% *}"
9676   tmp="$complete EOL"
9677   arguments="${tmp#* }"
9678 
9679   # Input might be given as Windows format, start by converting to
9680   # unix format.
9681   new_path="$path"
9682 
9683   windows_path="$new_path"
9684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9685     unix_path=`$CYGPATH -u "$windows_path"`
9686     new_path="$unix_path"
9687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9689     new_path="$unix_path"
9690   fi
9691 
9692 
9693   # Now try to locate executable using which
9694   new_path=`$WHICH "$new_path" 2> /dev/null`
9695 
9696   if test "x$new_path" = x; then
9697     # Oops. Which didn't find the executable.
9698     # The splitting of arguments from the executable at a space might have been incorrect,
9699     # since paths with space are more likely in Windows. Give it another try with the whole
9700     # argument.
9701     path="$complete"
9702     arguments="EOL"
9703     new_path="$path"
9704 
9705   windows_path="$new_path"
9706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9707     unix_path=`$CYGPATH -u "$windows_path"`
9708     new_path="$unix_path"
9709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9711     new_path="$unix_path"
9712   fi
9713 
9714 
9715     new_path=`$WHICH "$new_path" 2> /dev/null`
9716 
9717     if test "x$new_path" = x; then
9718       # It's still not found. Now this is an unrecoverable error.
9719       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9720 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9721       has_space=`$ECHO "$complete" | $GREP " "`
9722       if test "x$has_space" != x; then
9723         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9724 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9725       fi
9726       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9727     fi
9728   fi
9729 
9730   # Now new_path has a complete unix path to the binary
9731   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9732     # Keep paths in /bin as-is, but remove trailing .exe if any
9733     new_path="${new_path/%.exe/}"
9734     # Do not save /bin paths to all_fixpath_prefixes!
9735   else
9736     # Not in mixed or Windows style, start by that.
9737     new_path=`cmd //c echo $new_path`
9738 
9739   input_path="$new_path"
9740   # Check if we need to convert this using DOS-style short mode. If the path
9741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9742   # take no chances and rewrite it.
9743   # Note: m4 eats our [], so we need to use [ and ] instead.
9744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9745   if test "x$has_forbidden_chars" != x; then
9746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9747     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9748   fi
9749 
9750     # Output is in $new_path
9751 
9752   windows_path="$new_path"
9753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9754     unix_path=`$CYGPATH -u "$windows_path"`
9755     new_path="$unix_path"
9756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9758     new_path="$unix_path"
9759   fi
9760 
9761     # remove trailing .exe if any
9762     new_path="${new_path/%.exe/}"
9763 
9764     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9765     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9766   fi
9767 
9768   else
9769     # We're on a posix platform. Hooray! :)
9770     # First separate the path from the arguments. This will split at the first
9771     # space.
9772     complete="$FOUND_MAKE"
9773     path="${complete%% *}"
9774     tmp="$complete EOL"
9775     arguments="${tmp#* }"
9776 
9777     # Cannot rely on the command "which" here since it doesn't always work.
9778     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9779     if test -z "$is_absolute_path"; then
9780       # Path to executable is not absolute. Find it.
9781       IFS_save="$IFS"
9782       IFS=:
9783       for p in $PATH; do
9784         if test -f "$p/$path" && test -x "$p/$path"; then
9785           new_path="$p/$path"
9786           break
9787         fi
9788       done
9789       IFS="$IFS_save"
9790     else
9791       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9792 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9793       new_path="$path"
9794     fi
9795 
9796     if test "x$new_path" = x; then
9797       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9798 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9799       has_space=`$ECHO "$complete" | $GREP " "`
9800       if test "x$has_space" != x; then
9801         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9802 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9803       fi
9804       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9805     fi
9806   fi
9807 
9808   # Now join together the path and the arguments once again
9809   if test "x$arguments" != xEOL; then
9810     new_complete="$new_path ${arguments% *}"
9811   else
9812     new_complete="$new_path"
9813   fi
9814 
9815   if test "x$complete" != "x$new_complete"; then
9816     FOUND_MAKE="$new_complete"
9817     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9818 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9819   fi
9820 
9821         fi
9822       fi
9823     fi
9824   fi
9825 
9826         if test "x$FOUND_MAKE" = x; then
9827           for ac_prog in make
9828 do
9829   # Extract the first word of "$ac_prog", so it can be a program name with args.
9830 set dummy $ac_prog; ac_word=$2
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832 $as_echo_n "checking for $ac_word... " >&6; }
9833 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9834   $as_echo_n "(cached) " >&6
9835 else
9836   case $CHECK_TOOLSDIR_MAKE in
9837   [\\/]* | ?:[\\/]*)
9838   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9839   ;;
9840   *)
9841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842 for as_dir in $PATH
9843 do
9844   IFS=$as_save_IFS
9845   test -z "$as_dir" && as_dir=.
9846     for ac_exec_ext in '' $ac_executable_extensions; do
9847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850     break 2
9851   fi
9852 done
9853   done
9854 IFS=$as_save_IFS
9855 
9856   ;;
9857 esac
9858 fi
9859 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9860 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9862 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9863 else
9864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865 $as_echo "no" >&6; }
9866 fi
9867 
9868 
9869   test -n "$CHECK_TOOLSDIR_MAKE" && break
9870 done
9871 
9872 
9873   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9874   DESCRIPTION="make in tools-dir"
9875   if test "x$MAKE_CANDIDATE" != x; then
9876     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9877 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9878     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9879     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9880     if test "x$IS_GNU_MAKE" = x; then
9881       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9882 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9883     else
9884       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9885       if test "x$IS_MODERN_MAKE" = x; then
9886         { $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
9887 $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;}
9888       else
9889         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9890           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9891             MAKE_EXPECTED_ENV='cygwin'
9892           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9893             MAKE_EXPECTED_ENV='msys'
9894           else
9895             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9896           fi
9897           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9898           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9899         else
9900           # Not relevant for non-Windows
9901           IS_MAKE_CORRECT_ENV=true
9902         fi
9903         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9904           { $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
9905 $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;}
9906         else
9907           FOUND_MAKE=$MAKE_CANDIDATE
9908 
9909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9910 
9911   # First separate the path from the arguments. This will split at the first
9912   # space.
9913   complete="$FOUND_MAKE"
9914   path="${complete%% *}"
9915   tmp="$complete EOL"
9916   arguments="${tmp#* }"
9917 
9918   # Input might be given as Windows format, start by converting to
9919   # unix format.
9920   new_path=`$CYGPATH -u "$path"`
9921 
9922   # Now try to locate executable using which
9923   new_path=`$WHICH "$new_path" 2> /dev/null`
9924   # bat and cmd files are not always considered executable in cygwin causing which
9925   # to not find them
9926   if test "x$new_path" = x \
9927       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9928       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9929     new_path=`$CYGPATH -u "$path"`
9930   fi
9931   if test "x$new_path" = x; then
9932     # Oops. Which didn't find the executable.
9933     # The splitting of arguments from the executable at a space might have been incorrect,
9934     # since paths with space are more likely in Windows. Give it another try with the whole
9935     # argument.
9936     path="$complete"
9937     arguments="EOL"
9938     new_path=`$CYGPATH -u "$path"`
9939     new_path=`$WHICH "$new_path" 2> /dev/null`
9940     # bat and cmd files are not always considered executable in cygwin causing which
9941     # to not find them
9942     if test "x$new_path" = x \
9943         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9944         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9945       new_path=`$CYGPATH -u "$path"`
9946     fi
9947     if test "x$new_path" = x; then
9948       # It's still not found. Now this is an unrecoverable error.
9949       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9950 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9951       has_space=`$ECHO "$complete" | $GREP " "`
9952       if test "x$has_space" != x; then
9953         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9954 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9955       fi
9956       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9957     fi
9958   fi
9959 
9960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9963   # "foo.exe" is OK but "foo" is an error.
9964   #
9965   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9966   # It is also a way to make sure we got the proper file name for the real test later on.
9967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9968   if test "x$test_shortpath" = x; then
9969     # Short path failed, file does not exist as specified.
9970     # Try adding .exe or .cmd
9971     if test -f "${new_path}.exe"; then
9972       input_to_shortpath="${new_path}.exe"
9973     elif test -f "${new_path}.cmd"; then
9974       input_to_shortpath="${new_path}.cmd"
9975     else
9976       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9977 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9978       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9979 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9980       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9981     fi
9982   else
9983     input_to_shortpath="$new_path"
9984   fi
9985 
9986   # Call helper function which possibly converts this using DOS-style short mode.
9987   # If so, the updated path is stored in $new_path.
9988   new_path="$input_to_shortpath"
9989 
9990   input_path="$input_to_shortpath"
9991   # Check if we need to convert this using DOS-style short mode. If the path
9992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9993   # take no chances and rewrite it.
9994   # Note: m4 eats our [], so we need to use [ and ] instead.
9995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9996   if test "x$has_forbidden_chars" != x; then
9997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10001       # Going to short mode and back again did indeed matter. Since short mode is
10002       # case insensitive, let's make it lowercase to improve readability.
10003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10004       # Now convert it back to Unix-stile (cygpath)
10005       input_path=`$CYGPATH -u "$shortmode_path"`
10006       new_path="$input_path"
10007     fi
10008   fi
10009 
10010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10011   if test "x$test_cygdrive_prefix" = x; then
10012     # As a simple fix, exclude /usr/bin since it's not a real path.
10013     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
10014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10015       # a path prefixed by /cygdrive for fixpath to work.
10016       new_path="$CYGWIN_ROOT_PATH$input_path"
10017     fi
10018   fi
10019 
10020   # remove trailing .exe if any
10021   new_path="${new_path/%.exe/}"
10022 
10023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10024 
10025   # First separate the path from the arguments. This will split at the first
10026   # space.
10027   complete="$FOUND_MAKE"
10028   path="${complete%% *}"
10029   tmp="$complete EOL"
10030   arguments="${tmp#* }"
10031 
10032   # Input might be given as Windows format, start by converting to
10033   # unix format.
10034   new_path="$path"
10035 
10036   windows_path="$new_path"
10037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10038     unix_path=`$CYGPATH -u "$windows_path"`
10039     new_path="$unix_path"
10040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10042     new_path="$unix_path"
10043   fi
10044 
10045 
10046   # Now try to locate executable using which
10047   new_path=`$WHICH "$new_path" 2> /dev/null`
10048 
10049   if test "x$new_path" = x; then
10050     # Oops. Which didn't find the executable.
10051     # The splitting of arguments from the executable at a space might have been incorrect,
10052     # since paths with space are more likely in Windows. Give it another try with the whole
10053     # argument.
10054     path="$complete"
10055     arguments="EOL"
10056     new_path="$path"
10057 
10058   windows_path="$new_path"
10059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10060     unix_path=`$CYGPATH -u "$windows_path"`
10061     new_path="$unix_path"
10062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10064     new_path="$unix_path"
10065   fi
10066 
10067 
10068     new_path=`$WHICH "$new_path" 2> /dev/null`
10069 
10070     if test "x$new_path" = x; then
10071       # It's still not found. Now this is an unrecoverable error.
10072       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10073 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10074       has_space=`$ECHO "$complete" | $GREP " "`
10075       if test "x$has_space" != x; then
10076         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10077 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10078       fi
10079       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10080     fi
10081   fi
10082 
10083   # Now new_path has a complete unix path to the binary
10084   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10085     # Keep paths in /bin as-is, but remove trailing .exe if any
10086     new_path="${new_path/%.exe/}"
10087     # Do not save /bin paths to all_fixpath_prefixes!
10088   else
10089     # Not in mixed or Windows style, start by that.
10090     new_path=`cmd //c echo $new_path`
10091 
10092   input_path="$new_path"
10093   # Check if we need to convert this using DOS-style short mode. If the path
10094   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10095   # take no chances and rewrite it.
10096   # Note: m4 eats our [], so we need to use [ and ] instead.
10097   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10098   if test "x$has_forbidden_chars" != x; then
10099     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10100     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10101   fi
10102 
10103     # Output is in $new_path
10104 
10105   windows_path="$new_path"
10106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10107     unix_path=`$CYGPATH -u "$windows_path"`
10108     new_path="$unix_path"
10109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10111     new_path="$unix_path"
10112   fi
10113 
10114     # remove trailing .exe if any
10115     new_path="${new_path/%.exe/}"
10116 
10117     # Save the first 10 bytes of this path to the storage, so fixpath can work.
10118     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10119   fi
10120 
10121   else
10122     # We're on a posix platform. Hooray! :)
10123     # First separate the path from the arguments. This will split at the first
10124     # space.
10125     complete="$FOUND_MAKE"
10126     path="${complete%% *}"
10127     tmp="$complete EOL"
10128     arguments="${tmp#* }"
10129 
10130     # Cannot rely on the command "which" here since it doesn't always work.
10131     is_absolute_path=`$ECHO "$path" | $GREP ^/`
10132     if test -z "$is_absolute_path"; then
10133       # Path to executable is not absolute. Find it.
10134       IFS_save="$IFS"
10135       IFS=:
10136       for p in $PATH; do
10137         if test -f "$p/$path" && test -x "$p/$path"; then
10138           new_path="$p/$path"
10139           break
10140         fi
10141       done
10142       IFS="$IFS_save"
10143     else
10144       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10145 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10146       new_path="$path"
10147     fi
10148 
10149     if test "x$new_path" = x; then
10150       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10151 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10152       has_space=`$ECHO "$complete" | $GREP " "`
10153       if test "x$has_space" != x; then
10154         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10155 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10156       fi
10157       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10158     fi
10159   fi
10160 
10161   # Now join together the path and the arguments once again
10162   if test "x$arguments" != xEOL; then
10163     new_complete="$new_path ${arguments% *}"
10164   else
10165     new_complete="$new_path"
10166   fi
10167 
10168   if test "x$complete" != "x$new_complete"; then
10169     FOUND_MAKE="$new_complete"
10170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10171 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10172   fi
10173 
10174         fi
10175       fi
10176     fi
10177   fi
10178 
10179         fi
10180         PATH=$OLD_PATH
10181       fi
10182     fi
10183 
10184     if test "x$FOUND_MAKE" = x; then
10185       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
10186     fi
10187   fi
10188 
10189   MAKE=$FOUND_MAKE
10190 
10191   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10192 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10193 
10194 
10195 
10196   # Test if find supports -delete
10197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10198 $as_echo_n "checking if find supports -delete... " >&6; }
10199   FIND_DELETE="-delete"
10200 
10201   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10202 
10203   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10204 
10205   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10206   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10207     # No, it does not.
10208     rm $DELETEDIR/TestIfFindSupportsDelete
10209     FIND_DELETE="-exec rm \{\} \+"
10210     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10211 $as_echo "no" >&6; }
10212   else
10213     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10214 $as_echo "yes" >&6; }
10215   fi
10216   rmdir $DELETEDIR
10217 
10218 
10219 
10220   # These tools might not be installed by default,
10221   # need hint on how to install them.
10222 
10223   for ac_prog in unzip
10224 do
10225   # Extract the first word of "$ac_prog", so it can be a program name with args.
10226 set dummy $ac_prog; ac_word=$2
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10228 $as_echo_n "checking for $ac_word... " >&6; }
10229 if ${ac_cv_path_UNZIP+:} false; then :
10230   $as_echo_n "(cached) " >&6
10231 else
10232   case $UNZIP in
10233   [\\/]* | ?:[\\/]*)
10234   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10235   ;;
10236   *)
10237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10238 for as_dir in $PATH
10239 do
10240   IFS=$as_save_IFS
10241   test -z "$as_dir" && as_dir=.
10242     for ac_exec_ext in '' $ac_executable_extensions; do
10243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10244     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10246     break 2
10247   fi
10248 done
10249   done
10250 IFS=$as_save_IFS
10251 
10252   ;;
10253 esac
10254 fi
10255 UNZIP=$ac_cv_path_UNZIP
10256 if test -n "$UNZIP"; then
10257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10258 $as_echo "$UNZIP" >&6; }
10259 else
10260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10261 $as_echo "no" >&6; }
10262 fi
10263 
10264 
10265   test -n "$UNZIP" && break
10266 done
10267 
10268 
10269   if test "x$UNZIP" = x; then
10270     if test "xunzip" = x; then
10271       PROG_NAME=unzip
10272     else
10273       PROG_NAME=unzip
10274     fi
10275     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10276 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10277     as_fn_error $? "Cannot continue" "$LINENO" 5
10278   fi
10279 
10280 
10281 
10282   for ac_prog in zip
10283 do
10284   # Extract the first word of "$ac_prog", so it can be a program name with args.
10285 set dummy $ac_prog; ac_word=$2
10286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10287 $as_echo_n "checking for $ac_word... " >&6; }
10288 if ${ac_cv_path_ZIP+:} false; then :
10289   $as_echo_n "(cached) " >&6
10290 else
10291   case $ZIP in
10292   [\\/]* | ?:[\\/]*)
10293   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10294   ;;
10295   *)
10296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10297 for as_dir in $PATH
10298 do
10299   IFS=$as_save_IFS
10300   test -z "$as_dir" && as_dir=.
10301     for ac_exec_ext in '' $ac_executable_extensions; do
10302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10303     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10305     break 2
10306   fi
10307 done
10308   done
10309 IFS=$as_save_IFS
10310 
10311   ;;
10312 esac
10313 fi
10314 ZIP=$ac_cv_path_ZIP
10315 if test -n "$ZIP"; then
10316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10317 $as_echo "$ZIP" >&6; }
10318 else
10319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10320 $as_echo "no" >&6; }
10321 fi
10322 
10323 
10324   test -n "$ZIP" && break
10325 done
10326 
10327 
10328   if test "x$ZIP" = x; then
10329     if test "xzip" = x; then
10330       PROG_NAME=zip
10331     else
10332       PROG_NAME=zip
10333     fi
10334     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10335 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10336     as_fn_error $? "Cannot continue" "$LINENO" 5
10337   fi
10338 
10339 
10340 
10341   # Non-required basic tools
10342 
10343   # Extract the first word of "ldd", so it can be a program name with args.
10344 set dummy ldd; ac_word=$2
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10346 $as_echo_n "checking for $ac_word... " >&6; }
10347 if ${ac_cv_path_LDD+:} false; then :
10348   $as_echo_n "(cached) " >&6
10349 else
10350   case $LDD in
10351   [\\/]* | ?:[\\/]*)
10352   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10353   ;;
10354   *)
10355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10356 for as_dir in $PATH
10357 do
10358   IFS=$as_save_IFS
10359   test -z "$as_dir" && as_dir=.
10360     for ac_exec_ext in '' $ac_executable_extensions; do
10361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10362     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10364     break 2
10365   fi
10366 done
10367   done
10368 IFS=$as_save_IFS
10369 
10370   ;;
10371 esac
10372 fi
10373 LDD=$ac_cv_path_LDD
10374 if test -n "$LDD"; then
10375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10376 $as_echo "$LDD" >&6; }
10377 else
10378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10379 $as_echo "no" >&6; }
10380 fi
10381 
10382 
10383   if test "x$LDD" = "x"; then
10384     # List shared lib dependencies is used for
10385     # debug output and checking for forbidden dependencies.
10386     # We can build without it.
10387     LDD="true"
10388   fi
10389   for ac_prog in readelf greadelf
10390 do
10391   # Extract the first word of "$ac_prog", so it can be a program name with args.
10392 set dummy $ac_prog; ac_word=$2
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10394 $as_echo_n "checking for $ac_word... " >&6; }
10395 if ${ac_cv_path_READELF+:} false; then :
10396   $as_echo_n "(cached) " >&6
10397 else
10398   case $READELF in
10399   [\\/]* | ?:[\\/]*)
10400   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10401   ;;
10402   *)
10403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404 for as_dir in $PATH
10405 do
10406   IFS=$as_save_IFS
10407   test -z "$as_dir" && as_dir=.
10408     for ac_exec_ext in '' $ac_executable_extensions; do
10409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10410     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10412     break 2
10413   fi
10414 done
10415   done
10416 IFS=$as_save_IFS
10417 
10418   ;;
10419 esac
10420 fi
10421 READELF=$ac_cv_path_READELF
10422 if test -n "$READELF"; then
10423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10424 $as_echo "$READELF" >&6; }
10425 else
10426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427 $as_echo "no" >&6; }
10428 fi
10429 
10430 
10431   test -n "$READELF" && break
10432 done
10433 
10434   # Extract the first word of "hg", so it can be a program name with args.
10435 set dummy hg; ac_word=$2
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10437 $as_echo_n "checking for $ac_word... " >&6; }
10438 if ${ac_cv_path_HG+:} false; then :
10439   $as_echo_n "(cached) " >&6
10440 else
10441   case $HG in
10442   [\\/]* | ?:[\\/]*)
10443   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10444   ;;
10445   *)
10446   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10447 for as_dir in $PATH
10448 do
10449   IFS=$as_save_IFS
10450   test -z "$as_dir" && as_dir=.
10451     for ac_exec_ext in '' $ac_executable_extensions; do
10452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10453     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10455     break 2
10456   fi
10457 done
10458   done
10459 IFS=$as_save_IFS
10460 
10461   ;;
10462 esac
10463 fi
10464 HG=$ac_cv_path_HG
10465 if test -n "$HG"; then
10466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10467 $as_echo "$HG" >&6; }
10468 else
10469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10470 $as_echo "no" >&6; }
10471 fi
10472 
10473 
10474   # Extract the first word of "stat", so it can be a program name with args.
10475 set dummy stat; ac_word=$2
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10477 $as_echo_n "checking for $ac_word... " >&6; }
10478 if ${ac_cv_path_STAT+:} false; then :
10479   $as_echo_n "(cached) " >&6
10480 else
10481   case $STAT in
10482   [\\/]* | ?:[\\/]*)
10483   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10484   ;;
10485   *)
10486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10487 for as_dir in $PATH
10488 do
10489   IFS=$as_save_IFS
10490   test -z "$as_dir" && as_dir=.
10491     for ac_exec_ext in '' $ac_executable_extensions; do
10492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10493     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10495     break 2
10496   fi
10497 done
10498   done
10499 IFS=$as_save_IFS
10500 
10501   ;;
10502 esac
10503 fi
10504 STAT=$ac_cv_path_STAT
10505 if test -n "$STAT"; then
10506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10507 $as_echo "$STAT" >&6; }
10508 else
10509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10510 $as_echo "no" >&6; }
10511 fi
10512 
10513 
10514   # Extract the first word of "time", so it can be a program name with args.
10515 set dummy time; ac_word=$2
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10517 $as_echo_n "checking for $ac_word... " >&6; }
10518 if ${ac_cv_path_TIME+:} false; then :
10519   $as_echo_n "(cached) " >&6
10520 else
10521   case $TIME in
10522   [\\/]* | ?:[\\/]*)
10523   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10524   ;;
10525   *)
10526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10527 for as_dir in $PATH
10528 do
10529   IFS=$as_save_IFS
10530   test -z "$as_dir" && as_dir=.
10531     for ac_exec_ext in '' $ac_executable_extensions; do
10532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10533     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10535     break 2
10536   fi
10537 done
10538   done
10539 IFS=$as_save_IFS
10540 
10541   ;;
10542 esac
10543 fi
10544 TIME=$ac_cv_path_TIME
10545 if test -n "$TIME"; then
10546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10547 $as_echo "$TIME" >&6; }
10548 else
10549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550 $as_echo "no" >&6; }
10551 fi
10552 
10553 
10554   # Check if it's GNU time
10555   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10556   if test "x$IS_GNU_TIME" != x; then
10557     IS_GNU_TIME=yes
10558   else
10559     IS_GNU_TIME=no
10560   fi
10561 
10562 
10563   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10564 
10565   for ac_prog in comm
10566 do
10567   # Extract the first word of "$ac_prog", so it can be a program name with args.
10568 set dummy $ac_prog; ac_word=$2
10569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10570 $as_echo_n "checking for $ac_word... " >&6; }
10571 if ${ac_cv_path_COMM+:} false; then :
10572   $as_echo_n "(cached) " >&6
10573 else
10574   case $COMM in
10575   [\\/]* | ?:[\\/]*)
10576   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10577   ;;
10578   *)
10579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10580 for as_dir in $PATH
10581 do
10582   IFS=$as_save_IFS
10583   test -z "$as_dir" && as_dir=.
10584     for ac_exec_ext in '' $ac_executable_extensions; do
10585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10586     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10588     break 2
10589   fi
10590 done
10591   done
10592 IFS=$as_save_IFS
10593 
10594   ;;
10595 esac
10596 fi
10597 COMM=$ac_cv_path_COMM
10598 if test -n "$COMM"; then
10599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10600 $as_echo "$COMM" >&6; }
10601 else
10602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10603 $as_echo "no" >&6; }
10604 fi
10605 
10606 
10607   test -n "$COMM" && break
10608 done
10609 
10610 
10611   if test "x$COMM" = x; then
10612     if test "xcomm" = x; then
10613       PROG_NAME=comm
10614     else
10615       PROG_NAME=comm
10616     fi
10617     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10618 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10619     as_fn_error $? "Cannot continue" "$LINENO" 5
10620   fi
10621 
10622 
10623   fi
10624 
10625   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10626 
10627   for ac_prog in dsymutil
10628 do
10629   # Extract the first word of "$ac_prog", so it can be a program name with args.
10630 set dummy $ac_prog; ac_word=$2
10631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10632 $as_echo_n "checking for $ac_word... " >&6; }
10633 if ${ac_cv_path_DSYMUTIL+:} false; then :
10634   $as_echo_n "(cached) " >&6
10635 else
10636   case $DSYMUTIL in
10637   [\\/]* | ?:[\\/]*)
10638   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10639   ;;
10640   *)
10641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10642 for as_dir in $PATH
10643 do
10644   IFS=$as_save_IFS
10645   test -z "$as_dir" && as_dir=.
10646     for ac_exec_ext in '' $ac_executable_extensions; do
10647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10648     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10650     break 2
10651   fi
10652 done
10653   done
10654 IFS=$as_save_IFS
10655 
10656   ;;
10657 esac
10658 fi
10659 DSYMUTIL=$ac_cv_path_DSYMUTIL
10660 if test -n "$DSYMUTIL"; then
10661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10662 $as_echo "$DSYMUTIL" >&6; }
10663 else
10664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10665 $as_echo "no" >&6; }
10666 fi
10667 
10668 
10669   test -n "$DSYMUTIL" && break
10670 done
10671 
10672 
10673   if test "x$DSYMUTIL" = x; then
10674     if test "xdsymutil" = x; then
10675       PROG_NAME=dsymutil
10676     else
10677       PROG_NAME=dsymutil
10678     fi
10679     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10680 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10681     as_fn_error $? "Cannot continue" "$LINENO" 5
10682   fi
10683 
10684 
10685 
10686   for ac_prog in xattr
10687 do
10688   # Extract the first word of "$ac_prog", so it can be a program name with args.
10689 set dummy $ac_prog; ac_word=$2
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10691 $as_echo_n "checking for $ac_word... " >&6; }
10692 if ${ac_cv_path_XATTR+:} false; then :
10693   $as_echo_n "(cached) " >&6
10694 else
10695   case $XATTR in
10696   [\\/]* | ?:[\\/]*)
10697   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10698   ;;
10699   *)
10700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10701 for as_dir in $PATH
10702 do
10703   IFS=$as_save_IFS
10704   test -z "$as_dir" && as_dir=.
10705     for ac_exec_ext in '' $ac_executable_extensions; do
10706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10707     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10709     break 2
10710   fi
10711 done
10712   done
10713 IFS=$as_save_IFS
10714 
10715   ;;
10716 esac
10717 fi
10718 XATTR=$ac_cv_path_XATTR
10719 if test -n "$XATTR"; then
10720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10721 $as_echo "$XATTR" >&6; }
10722 else
10723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10724 $as_echo "no" >&6; }
10725 fi
10726 
10727 
10728   test -n "$XATTR" && break
10729 done
10730 
10731 
10732   if test "x$XATTR" = x; then
10733     if test "xxattr" = x; then
10734       PROG_NAME=xattr
10735     else
10736       PROG_NAME=xattr
10737     fi
10738     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10739 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10740     as_fn_error $? "Cannot continue" "$LINENO" 5
10741   fi
10742 
10743 
10744     # Extract the first word of "codesign", so it can be a program name with args.
10745 set dummy codesign; ac_word=$2
10746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10747 $as_echo_n "checking for $ac_word... " >&6; }
10748 if ${ac_cv_path_CODESIGN+:} false; then :
10749   $as_echo_n "(cached) " >&6
10750 else
10751   case $CODESIGN in
10752   [\\/]* | ?:[\\/]*)
10753   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10754   ;;
10755   *)
10756   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10757 for as_dir in $PATH
10758 do
10759   IFS=$as_save_IFS
10760   test -z "$as_dir" && as_dir=.
10761     for ac_exec_ext in '' $ac_executable_extensions; do
10762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10763     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10765     break 2
10766   fi
10767 done
10768   done
10769 IFS=$as_save_IFS
10770 
10771   ;;
10772 esac
10773 fi
10774 CODESIGN=$ac_cv_path_CODESIGN
10775 if test -n "$CODESIGN"; then
10776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10777 $as_echo "$CODESIGN" >&6; }
10778 else
10779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10780 $as_echo "no" >&6; }
10781 fi
10782 
10783 
10784     if test "x$CODESIGN" != "x"; then
10785       # Verify that the openjdk_codesign certificate is present
10786       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10787 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10788       rm -f codesign-testfile
10789       touch codesign-testfile
10790       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10791       rm -f codesign-testfile
10792       if test "x$CODESIGN" = x; then
10793         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10794 $as_echo "no" >&6; }
10795       else
10796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10797 $as_echo "yes" >&6; }
10798       fi
10799     fi
10800   fi
10801 
10802 
10803 # Check if pkg-config is available.
10804 
10805 
10806 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10807         if test -n "$ac_tool_prefix"; then
10808   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10809 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10811 $as_echo_n "checking for $ac_word... " >&6; }
10812 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10813   $as_echo_n "(cached) " >&6
10814 else
10815   case $PKG_CONFIG in
10816   [\\/]* | ?:[\\/]*)
10817   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10818   ;;
10819   *)
10820   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10821 for as_dir in $PATH
10822 do
10823   IFS=$as_save_IFS
10824   test -z "$as_dir" && as_dir=.
10825     for ac_exec_ext in '' $ac_executable_extensions; do
10826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10827     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10829     break 2
10830   fi
10831 done
10832   done
10833 IFS=$as_save_IFS
10834 
10835   ;;
10836 esac
10837 fi
10838 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10839 if test -n "$PKG_CONFIG"; then
10840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10841 $as_echo "$PKG_CONFIG" >&6; }
10842 else
10843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10844 $as_echo "no" >&6; }
10845 fi
10846 
10847 
10848 fi
10849 if test -z "$ac_cv_path_PKG_CONFIG"; then
10850   ac_pt_PKG_CONFIG=$PKG_CONFIG
10851   # Extract the first word of "pkg-config", so it can be a program name with args.
10852 set dummy pkg-config; ac_word=$2
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10854 $as_echo_n "checking for $ac_word... " >&6; }
10855 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10856   $as_echo_n "(cached) " >&6
10857 else
10858   case $ac_pt_PKG_CONFIG in
10859   [\\/]* | ?:[\\/]*)
10860   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10861   ;;
10862   *)
10863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10864 for as_dir in $PATH
10865 do
10866   IFS=$as_save_IFS
10867   test -z "$as_dir" && as_dir=.
10868     for ac_exec_ext in '' $ac_executable_extensions; do
10869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10870     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10872     break 2
10873   fi
10874 done
10875   done
10876 IFS=$as_save_IFS
10877 
10878   ;;
10879 esac
10880 fi
10881 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10882 if test -n "$ac_pt_PKG_CONFIG"; then
10883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10884 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10885 else
10886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10887 $as_echo "no" >&6; }
10888 fi
10889 
10890   if test "x$ac_pt_PKG_CONFIG" = x; then
10891     PKG_CONFIG=""
10892   else
10893     case $cross_compiling:$ac_tool_warned in
10894 yes:)
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10896 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10897 ac_tool_warned=yes ;;
10898 esac
10899     PKG_CONFIG=$ac_pt_PKG_CONFIG
10900   fi
10901 else
10902   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10903 fi
10904 
10905 fi
10906 if test -n "$PKG_CONFIG"; then
10907         _pkg_min_version=0.9.0
10908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10909 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10910         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10911                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10912 $as_echo "yes" >&6; }
10913         else
10914                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10915 $as_echo "no" >&6; }
10916                 PKG_CONFIG=""
10917         fi
10918 
10919 fi
10920 
10921 # After basic tools have been setup, we can check build os specific details.
10922 
10923   ###############################################################################
10924 
10925   # Note that this is the build platform OS version!
10926 
10927   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10928   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10929   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10930   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10931 
10932 
10933 
10934 
10935 
10936 # Setup builddeps, for automatic downloading of tools we need.
10937 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10938 # boot-jdk setup, but we need to have basic tools setup first.
10939 
10940 
10941 # Check whether --with-builddeps-conf was given.
10942 if test "${with_builddeps_conf+set}" = set; then :
10943   withval=$with_builddeps_conf;
10944 fi
10945 
10946 
10947 
10948 # Check whether --with-builddeps-server was given.
10949 if test "${with_builddeps_server+set}" = set; then :
10950   withval=$with_builddeps_server;
10951 fi
10952 
10953 
10954 
10955 # Check whether --with-builddeps-dir was given.
10956 if test "${with_builddeps_dir+set}" = set; then :
10957   withval=$with_builddeps_dir;
10958 else
10959   with_builddeps_dir=/localhome/builddeps
10960 fi
10961 
10962 
10963 
10964 # Check whether --with-builddeps-group was given.
10965 if test "${with_builddeps_group+set}" = set; then :
10966   withval=$with_builddeps_group;
10967 fi
10968 
10969 
10970 
10971 
10972   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10973     if test "x$with_builddeps_conf" != x; then
10974       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10975 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10976       builddepsfile=$with_builddeps_conf
10977       if test -s $builddepsfile; then
10978         . $builddepsfile
10979         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10980 $as_echo "loaded!" >&6; }
10981       else
10982         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10983       fi
10984     else
10985       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10986 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10987       builddepsfile=`mktemp`
10988       touch $builddepsfile
10989       # Put all found confs into a single file.
10990       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10991       # Source the file to acquire the variables
10992       if test -s $builddepsfile; then
10993         . $builddepsfile
10994         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10995 $as_echo "found at least one!" >&6; }
10996       else
10997         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10998       fi
10999     fi
11000     # Create build and target names that use _ instead of "-" and ".".
11001     # This is necessary to use them in variable names.
11002     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
11003     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
11004     # Extract rewrite information for build and target
11005     eval rewritten_build=\${REWRITE_${build_var}}
11006     if test "x$rewritten_build" = x; then
11007       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
11008       echo Build stays the same $rewritten_build
11009     else
11010       echo Rewriting build for builddeps into $rewritten_build
11011     fi
11012     eval rewritten_target=\${REWRITE_${target_var}}
11013     if test "x$rewritten_target" = x; then
11014       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
11015       echo Target stays the same $rewritten_target
11016     else
11017       echo Rewriting target for builddeps into $rewritten_target
11018     fi
11019     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
11020     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
11021   fi
11022   for ac_prog in 7z unzip
11023 do
11024   # Extract the first word of "$ac_prog", so it can be a program name with args.
11025 set dummy $ac_prog; ac_word=$2
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11027 $as_echo_n "checking for $ac_word... " >&6; }
11028 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
11029   $as_echo_n "(cached) " >&6
11030 else
11031   if test -n "$BDEPS_UNZIP"; then
11032   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
11033 else
11034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11035 for as_dir in $PATH
11036 do
11037   IFS=$as_save_IFS
11038   test -z "$as_dir" && as_dir=.
11039     for ac_exec_ext in '' $ac_executable_extensions; do
11040   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11041     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
11042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11043     break 2
11044   fi
11045 done
11046   done
11047 IFS=$as_save_IFS
11048 
11049 fi
11050 fi
11051 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11052 if test -n "$BDEPS_UNZIP"; then
11053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11054 $as_echo "$BDEPS_UNZIP" >&6; }
11055 else
11056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11057 $as_echo "no" >&6; }
11058 fi
11059 
11060 
11061   test -n "$BDEPS_UNZIP" && break
11062 done
11063 
11064   if test "x$BDEPS_UNZIP" = x7z; then
11065     BDEPS_UNZIP="7z x"
11066   fi
11067 
11068   for ac_prog in wget lftp ftp
11069 do
11070   # Extract the first word of "$ac_prog", so it can be a program name with args.
11071 set dummy $ac_prog; ac_word=$2
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11073 $as_echo_n "checking for $ac_word... " >&6; }
11074 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11075   $as_echo_n "(cached) " >&6
11076 else
11077   if test -n "$BDEPS_FTP"; then
11078   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11079 else
11080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11081 for as_dir in $PATH
11082 do
11083   IFS=$as_save_IFS
11084   test -z "$as_dir" && as_dir=.
11085     for ac_exec_ext in '' $ac_executable_extensions; do
11086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11087     ac_cv_prog_BDEPS_FTP="$ac_prog"
11088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11089     break 2
11090   fi
11091 done
11092   done
11093 IFS=$as_save_IFS
11094 
11095 fi
11096 fi
11097 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11098 if test -n "$BDEPS_FTP"; then
11099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11100 $as_echo "$BDEPS_FTP" >&6; }
11101 else
11102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11103 $as_echo "no" >&6; }
11104 fi
11105 
11106 
11107   test -n "$BDEPS_FTP" && break
11108 done
11109 
11110 
11111 
11112 ###############################################################################
11113 #
11114 # Determine OpenJDK variants, options and version numbers.
11115 #
11116 ###############################################################################
11117 
11118 # We need build & target for this.
11119 
11120 
11121   ###############################################################################
11122   #
11123   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11124   # We always build headless support.
11125   #
11126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11127 $as_echo_n "checking headful support... " >&6; }
11128   # Check whether --enable-headful was given.
11129 if test "${enable_headful+set}" = set; then :
11130   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11131 else
11132   SUPPORT_HEADFUL=yes
11133 fi
11134 
11135 
11136   SUPPORT_HEADLESS=yes
11137   BUILD_HEADLESS="BUILD_HEADLESS:=true"
11138 
11139   if test "x$SUPPORT_HEADFUL" = xyes; then
11140     # We are building both headful and headless.
11141     headful_msg="include support for both headful and headless"
11142   fi
11143 
11144   if test "x$SUPPORT_HEADFUL" = xno; then
11145     # Thus we are building headless only.
11146     BUILD_HEADLESS="BUILD_HEADLESS:=true"
11147     headful_msg="headless only"
11148   fi
11149 
11150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11151 $as_echo "$headful_msg" >&6; }
11152 
11153 
11154 
11155 
11156 
11157   # Control wether Hotspot runs Queens test after build.
11158   # Check whether --enable-hotspot-test-in-build was given.
11159 if test "${enable_hotspot_test_in_build+set}" = set; then :
11160   enableval=$enable_hotspot_test_in_build;
11161 else
11162   enable_hotspot_test_in_build=no
11163 fi
11164 
11165   if test "x$enable_hotspot_test_in_build" = "xyes"; then
11166     TEST_IN_BUILD=true
11167   else
11168     TEST_IN_BUILD=false
11169   fi
11170 
11171 
11172   ###############################################################################
11173   #
11174   # Choose cacerts source file
11175   #
11176 
11177 # Check whether --with-cacerts-file was given.
11178 if test "${with_cacerts_file+set}" = set; then :
11179   withval=$with_cacerts_file;
11180 fi
11181 
11182   if test "x$with_cacerts_file" != x; then
11183     CACERTS_FILE=$with_cacerts_file
11184   else
11185     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11186   fi
11187 
11188 
11189   ###############################################################################
11190   #
11191   # Enable or disable unlimited crypto
11192   #
11193   # Check whether --enable-unlimited-crypto was given.
11194 if test "${enable_unlimited_crypto+set}" = set; then :
11195   enableval=$enable_unlimited_crypto;
11196 else
11197   enable_unlimited_crypto=no
11198 fi
11199 
11200   if test "x$enable_unlimited_crypto" = "xyes"; then
11201     UNLIMITED_CRYPTO=true
11202   else
11203     UNLIMITED_CRYPTO=false
11204   fi
11205 
11206 
11207   ###############################################################################
11208   #
11209   # Enable or disable the elliptic curve crypto implementation
11210   #
11211 
11212 
11213   ###############################################################################
11214   #
11215   # Compress jars
11216   #
11217   COMPRESS_JARS=false
11218 
11219 
11220 
11221 
11222   # Source the version numbers
11223   . $AUTOCONF_DIR/version-numbers
11224 
11225   # Get the settings from parameters
11226 
11227 # Check whether --with-milestone was given.
11228 if test "${with_milestone+set}" = set; then :
11229   withval=$with_milestone;
11230 fi
11231 
11232   if test "x$with_milestone" = xyes; then
11233     as_fn_error $? "Milestone must have a value" "$LINENO" 5
11234   elif test "x$with_milestone" != x; then
11235     MILESTONE="$with_milestone"
11236   fi
11237   if test "x$MILESTONE" = x; then
11238     MILESTONE=internal
11239   fi
11240 
11241 
11242 # Check whether --with-update-version was given.
11243 if test "${with_update_version+set}" = set; then :
11244   withval=$with_update_version;
11245 fi
11246 
11247   if test "x$with_update_version" = xyes; then
11248     as_fn_error $? "Update version must have a value" "$LINENO" 5
11249   elif test "x$with_update_version" != x; then
11250     JDK_UPDATE_VERSION="$with_update_version"
11251     # On macosx 10.7, it's not possible to set --with-update-version=0X due
11252     # to a bug in expr (which reduces it to just X). To work around this, we
11253     # always add a 0 to one digit update versions.
11254     if test "${#JDK_UPDATE_VERSION}" = "1"; then
11255       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11256     fi
11257   fi
11258 
11259 
11260 # Check whether --with-user-release-suffix was given.
11261 if test "${with_user_release_suffix+set}" = set; then :
11262   withval=$with_user_release_suffix;
11263 fi
11264 
11265   if test "x$with_user_release_suffix" = xyes; then
11266     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11267   elif test "x$with_user_release_suffix" != x; then
11268     USER_RELEASE_SUFFIX="$with_user_release_suffix"
11269   fi
11270 
11271 
11272 # Check whether --with-build-number was given.
11273 if test "${with_build_number+set}" = set; then :
11274   withval=$with_build_number;
11275 fi
11276 
11277   if test "x$with_build_number" = xyes; then
11278     as_fn_error $? "Build number must have a value" "$LINENO" 5
11279   elif test "x$with_build_number" != x; then
11280     JDK_BUILD_NUMBER="$with_build_number"
11281   fi
11282   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11283   if test "x$JDK_BUILD_NUMBER" = x; then
11284     JDK_BUILD_NUMBER=b00
11285     if test "x$USER_RELEASE_SUFFIX" = x; then
11286       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11287       # Avoid [:alnum:] since it depends on the locale.
11288       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11289       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11290     fi
11291   fi
11292 
11293   # Now set the JDK version, milestone, build number etc.
11294 
11295 
11296 
11297 
11298 
11299 
11300 
11301 
11302 
11303 
11304 
11305 
11306 
11307 
11308 
11309 
11310 # Check whether --with-copyright-year was given.
11311 if test "${with_copyright_year+set}" = set; then :
11312   withval=$with_copyright_year;
11313 fi
11314 
11315   if test "x$with_copyright_year" = xyes; then
11316     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
11317   elif test "x$with_copyright_year" != x; then
11318     COPYRIGHT_YEAR="$with_copyright_year"
11319   else
11320     COPYRIGHT_YEAR=`date +'%Y'`
11321   fi
11322 
11323 
11324   if test "x$JDK_UPDATE_VERSION" != x; then
11325     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11326   else
11327     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11328   fi
11329 
11330 
11331   # The cooked update version used to encode trailing letters in the update
11332   # version into a trailing number. That is no longer needed, but need to
11333   # keep the format in 8u for compatibility.
11334   COOKED_JDK_UPDATE_VERSION="${JDK_UPDATE_VERSION}0"
11335 
11336 
11337   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11338 
11339 
11340 
11341 ###############################################################################
11342 #
11343 # Setup BootJDK, used to bootstrap the build.
11344 #
11345 ###############################################################################
11346 
11347 
11348   BOOT_JDK_FOUND=no
11349 
11350 # Check whether --with-boot-jdk was given.
11351 if test "${with_boot_jdk+set}" = set; then :
11352   withval=$with_boot_jdk;
11353 fi
11354 
11355 
11356   # We look for the Boot JDK through various means, going from more certain to
11357   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11358   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11359   # must check if this is indeed valid; otherwise we'll continue looking.
11360 
11361   # Test: Is bootjdk explicitely set by command line arguments?
11362 
11363   if test "x$BOOT_JDK_FOUND" = xno; then
11364     # Now execute the test
11365 
11366   if test "x$with_boot_jdk" != x; then
11367     BOOT_JDK=$with_boot_jdk
11368     BOOT_JDK_FOUND=maybe
11369     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11370 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11371   fi
11372 
11373 
11374     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11375     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11376       # Do we have a bin/java?
11377       if test ! -x "$BOOT_JDK/bin/java"; then
11378         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11379 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11380         BOOT_JDK_FOUND=no
11381       else
11382         # Do we have a bin/javac?
11383         if test ! -x "$BOOT_JDK/bin/javac"; then
11384           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11385 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11386           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11387 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11388           BOOT_JDK_FOUND=no
11389         else
11390           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11391           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11392             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11393 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11394             BOOT_JDK_FOUND=no
11395           else
11396             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11397             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11398 
11399             # Extra M4 quote needed to protect [] in grep expression.
11400             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11401             if test "x$FOUND_VERSION_78" = x; then
11402               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11403 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11404               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11405 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11406               BOOT_JDK_FOUND=no
11407             else
11408               # We're done! :-)
11409               BOOT_JDK_FOUND=yes
11410 
11411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11412 
11413   # Input might be given as Windows format, start by converting to
11414   # unix format.
11415   path="$BOOT_JDK"
11416   new_path=`$CYGPATH -u "$path"`
11417 
11418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11421   # "foo.exe" is OK but "foo" is an error.
11422   #
11423   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11424   # It is also a way to make sure we got the proper file name for the real test later on.
11425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11426   if test "x$test_shortpath" = x; then
11427     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11428 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11429     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11430   fi
11431 
11432   # Call helper function which possibly converts this using DOS-style short mode.
11433   # If so, the updated path is stored in $new_path.
11434 
11435   input_path="$new_path"
11436   # Check if we need to convert this using DOS-style short mode. If the path
11437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11438   # take no chances and rewrite it.
11439   # Note: m4 eats our [], so we need to use [ and ] instead.
11440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11441   if test "x$has_forbidden_chars" != x; then
11442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11446       # Going to short mode and back again did indeed matter. Since short mode is
11447       # case insensitive, let's make it lowercase to improve readability.
11448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11449       # Now convert it back to Unix-stile (cygpath)
11450       input_path=`$CYGPATH -u "$shortmode_path"`
11451       new_path="$input_path"
11452     fi
11453   fi
11454 
11455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11456   if test "x$test_cygdrive_prefix" = x; then
11457     # As a simple fix, exclude /usr/bin since it's not a real path.
11458     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11460       # a path prefixed by /cygdrive for fixpath to work.
11461       new_path="$CYGWIN_ROOT_PATH$input_path"
11462     fi
11463   fi
11464 
11465 
11466   if test "x$path" != "x$new_path"; then
11467     BOOT_JDK="$new_path"
11468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11469 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11470   fi
11471 
11472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11473 
11474   path="$BOOT_JDK"
11475   has_colon=`$ECHO $path | $GREP ^.:`
11476   new_path="$path"
11477   if test "x$has_colon" = x; then
11478     # Not in mixed or Windows style, start by that.
11479     new_path=`cmd //c echo $path`
11480   fi
11481 
11482 
11483   input_path="$new_path"
11484   # Check if we need to convert this using DOS-style short mode. If the path
11485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11486   # take no chances and rewrite it.
11487   # Note: m4 eats our [], so we need to use [ and ] instead.
11488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11489   if test "x$has_forbidden_chars" != x; then
11490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11492   fi
11493 
11494 
11495   windows_path="$new_path"
11496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11497     unix_path=`$CYGPATH -u "$windows_path"`
11498     new_path="$unix_path"
11499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11501     new_path="$unix_path"
11502   fi
11503 
11504   if test "x$path" != "x$new_path"; then
11505     BOOT_JDK="$new_path"
11506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11507 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11508   fi
11509 
11510   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11511   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11512 
11513   else
11514     # We're on a posix platform. Hooray! :)
11515     path="$BOOT_JDK"
11516     has_space=`$ECHO "$path" | $GREP " "`
11517     if test "x$has_space" != x; then
11518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11519 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11520       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11521     fi
11522 
11523     # Use eval to expand a potential ~
11524     eval path="$path"
11525     if test ! -f "$path" && test ! -d "$path"; then
11526       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11527     fi
11528 
11529     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11530   fi
11531 
11532               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11533 $as_echo_n "checking for Boot JDK... " >&6; }
11534               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11535 $as_echo "$BOOT_JDK" >&6; }
11536               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11537 $as_echo_n "checking Boot JDK version... " >&6; }
11538               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11539               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11540 $as_echo "$BOOT_JDK_VERSION" >&6; }
11541             fi # end check jdk version
11542           fi # end check rt.jar
11543         fi # end check javac
11544       fi # end check java
11545     fi # end check boot jdk found
11546   fi
11547 
11548   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11549     # Having specified an argument which is incorrect will produce an instant failure;
11550     # we should not go on looking
11551     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11552   fi
11553 
11554   # Test: Is bootjdk available from builddeps?
11555 
11556   if test "x$BOOT_JDK_FOUND" = xno; then
11557     # Now execute the test
11558 
11559 
11560 
11561   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11562     # Source the builddeps file again, to make sure it uses the latest variables!
11563     . $builddepsfile
11564     # Look for a target and build machine specific resource!
11565     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11566     if test "x$resource" = x; then
11567       # Ok, lets instead look for a target specific resource
11568       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11569     fi
11570     if test "x$resource" = x; then
11571       # Ok, lets instead look for a build specific resource
11572       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11573     fi
11574     if test "x$resource" = x; then
11575       # Ok, lets instead look for a generic resource
11576       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11577       resource=${builddep_bootjdk}
11578     fi
11579     if test "x$resource" != x; then
11580       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11581 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11582       # If the resource in the builddeps.conf file is an existing directory,
11583       # for example /java/linux/cups
11584       if test -d ${resource}; then
11585         depdir=${resource}
11586       else
11587 
11588   # bootjdk is for example mymodule
11589   # $resource is for example libs/general/libmymod_1_2_3.zip
11590   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11591   # $with_builddeps_dir is for example /localhome/builddeps
11592   # depdir is the name of the variable into which we store the depdir, eg MYMOD
11593   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11594   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11595   filename=`basename $resource`
11596   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11597   filebase=${filename%%.*}
11598   extension=${filename#*.}
11599   installdir=$with_builddeps_dir/$filebase
11600   if test ! -f $installdir/$filename.unpacked; then
11601     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11602 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11603     if test ! -d $installdir; then
11604       mkdir -p $installdir
11605     fi
11606     if test ! -d $installdir; then
11607       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11608     fi
11609     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11610     touch $tmpfile
11611     if test ! -f $tmpfile; then
11612       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11613     fi
11614 
11615   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11616   # $tmpfile is the local file name for the downloaded file.
11617   VALID_TOOL=no
11618   if test "x$BDEPS_FTP" = xwget; then
11619     VALID_TOOL=yes
11620     wget -O $tmpfile $with_builddeps_server/$resource
11621   fi
11622   if test "x$BDEPS_FTP" = xlftp; then
11623     VALID_TOOL=yes
11624     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11625   fi
11626   if test "x$BDEPS_FTP" = xftp; then
11627     VALID_TOOL=yes
11628     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11629     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11630     FTPUSERPWD=${FTPSERVER%%@*}
11631     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11632       FTPUSER=${userpwd%%:*}
11633       FTPPWD=${userpwd#*@}
11634       FTPSERVER=${FTPSERVER#*@}
11635     else
11636       FTPUSER=ftp
11637       FTPPWD=ftp
11638     fi
11639     # the "pass" command does not work on some
11640     # ftp clients (read ftp.exe) but if it works,
11641     # passive mode is better!
11642     ( \
11643         echo "user $FTPUSER $FTPPWD"        ; \
11644         echo "pass"                         ; \
11645         echo "bin"                          ; \
11646         echo "get $FTPPATH $tmpfile"              ; \
11647     ) | ftp -in $FTPSERVER
11648   fi
11649   if test "x$VALID_TOOL" != xyes; then
11650     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11651   fi
11652 
11653     mv $tmpfile $installdir/$filename
11654     if test ! -s $installdir/$filename; then
11655       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11656     fi
11657     case "$extension" in
11658       zip)  echo "Unzipping $installdir/$filename..."
11659         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11660         ;;
11661       tar.gz) echo "Untaring $installdir/$filename..."
11662         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11663         ;;
11664       tgz) echo "Untaring $installdir/$filename..."
11665         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11666         ;;
11667       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11668         ;;
11669     esac
11670   fi
11671   if test -f $installdir/$filename.unpacked; then
11672     depdir=$installdir
11673   fi
11674 
11675       fi
11676       # Source the builddeps file again, because in the previous command, the depdir
11677       # was updated to point at the current build dependency install directory.
11678       . $builddepsfile
11679       # Now extract variables from the builddeps.conf files.
11680       theroot=${builddep_bootjdk_ROOT}
11681       thecflags=${builddep_bootjdk_CFLAGS}
11682       thelibs=${builddep_bootjdk_LIBS}
11683       if test "x$depdir" = x; then
11684         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11685       fi
11686       BOOT_JDK=$depdir
11687       if test "x$theroot" != x; then
11688         BOOT_JDK="$theroot"
11689       fi
11690       if test "x$thecflags" != x; then
11691         BOOT_JDK_CFLAGS="$thecflags"
11692       fi
11693       if test "x$thelibs" != x; then
11694         BOOT_JDK_LIBS="$thelibs"
11695       fi
11696       BOOT_JDK_FOUND=maybe
11697       else BOOT_JDK_FOUND=no
11698 
11699     fi
11700     else BOOT_JDK_FOUND=no
11701 
11702   fi
11703 
11704 
11705 
11706     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11707     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11708       # Do we have a bin/java?
11709       if test ! -x "$BOOT_JDK/bin/java"; then
11710         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11712         BOOT_JDK_FOUND=no
11713       else
11714         # Do we have a bin/javac?
11715         if test ! -x "$BOOT_JDK/bin/javac"; then
11716           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11718           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11719 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11720           BOOT_JDK_FOUND=no
11721         else
11722           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11723           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11724             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11725 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11726             BOOT_JDK_FOUND=no
11727           else
11728             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11729             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11730 
11731             # Extra M4 quote needed to protect [] in grep expression.
11732             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11733             if test "x$FOUND_VERSION_78" = x; then
11734               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11735 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11736               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11737 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11738               BOOT_JDK_FOUND=no
11739             else
11740               # We're done! :-)
11741               BOOT_JDK_FOUND=yes
11742 
11743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11744 
11745   # Input might be given as Windows format, start by converting to
11746   # unix format.
11747   path="$BOOT_JDK"
11748   new_path=`$CYGPATH -u "$path"`
11749 
11750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11753   # "foo.exe" is OK but "foo" is an error.
11754   #
11755   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11756   # It is also a way to make sure we got the proper file name for the real test later on.
11757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11758   if test "x$test_shortpath" = x; then
11759     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11760 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11761     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11762   fi
11763 
11764   # Call helper function which possibly converts this using DOS-style short mode.
11765   # If so, the updated path is stored in $new_path.
11766 
11767   input_path="$new_path"
11768   # Check if we need to convert this using DOS-style short mode. If the path
11769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11770   # take no chances and rewrite it.
11771   # Note: m4 eats our [], so we need to use [ and ] instead.
11772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11773   if test "x$has_forbidden_chars" != x; then
11774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11775     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11776     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11777     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11778       # Going to short mode and back again did indeed matter. Since short mode is
11779       # case insensitive, let's make it lowercase to improve readability.
11780       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11781       # Now convert it back to Unix-stile (cygpath)
11782       input_path=`$CYGPATH -u "$shortmode_path"`
11783       new_path="$input_path"
11784     fi
11785   fi
11786 
11787   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11788   if test "x$test_cygdrive_prefix" = x; then
11789     # As a simple fix, exclude /usr/bin since it's not a real path.
11790     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11791       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11792       # a path prefixed by /cygdrive for fixpath to work.
11793       new_path="$CYGWIN_ROOT_PATH$input_path"
11794     fi
11795   fi
11796 
11797 
11798   if test "x$path" != "x$new_path"; then
11799     BOOT_JDK="$new_path"
11800     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11801 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11802   fi
11803 
11804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11805 
11806   path="$BOOT_JDK"
11807   has_colon=`$ECHO $path | $GREP ^.:`
11808   new_path="$path"
11809   if test "x$has_colon" = x; then
11810     # Not in mixed or Windows style, start by that.
11811     new_path=`cmd //c echo $path`
11812   fi
11813 
11814 
11815   input_path="$new_path"
11816   # Check if we need to convert this using DOS-style short mode. If the path
11817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11818   # take no chances and rewrite it.
11819   # Note: m4 eats our [], so we need to use [ and ] instead.
11820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11821   if test "x$has_forbidden_chars" != x; then
11822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11823     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11824   fi
11825 
11826 
11827   windows_path="$new_path"
11828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11829     unix_path=`$CYGPATH -u "$windows_path"`
11830     new_path="$unix_path"
11831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11833     new_path="$unix_path"
11834   fi
11835 
11836   if test "x$path" != "x$new_path"; then
11837     BOOT_JDK="$new_path"
11838     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11839 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11840   fi
11841 
11842   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11843   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11844 
11845   else
11846     # We're on a posix platform. Hooray! :)
11847     path="$BOOT_JDK"
11848     has_space=`$ECHO "$path" | $GREP " "`
11849     if test "x$has_space" != x; then
11850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11851 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11852       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11853     fi
11854 
11855     # Use eval to expand a potential ~
11856     eval path="$path"
11857     if test ! -f "$path" && test ! -d "$path"; then
11858       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11859     fi
11860 
11861     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11862   fi
11863 
11864               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11865 $as_echo_n "checking for Boot JDK... " >&6; }
11866               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11867 $as_echo "$BOOT_JDK" >&6; }
11868               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11869 $as_echo_n "checking Boot JDK version... " >&6; }
11870               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11871               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11872 $as_echo "$BOOT_JDK_VERSION" >&6; }
11873             fi # end check jdk version
11874           fi # end check rt.jar
11875         fi # end check javac
11876       fi # end check java
11877     fi # end check boot jdk found
11878   fi
11879 
11880 
11881   # Test: Is $JAVA_HOME set?
11882 
11883   if test "x$BOOT_JDK_FOUND" = xno; then
11884     # Now execute the test
11885 
11886   if test "x$JAVA_HOME" != x; then
11887     JAVA_HOME_PROCESSED="$JAVA_HOME"
11888 
11889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11890 
11891   # Input might be given as Windows format, start by converting to
11892   # unix format.
11893   path="$JAVA_HOME_PROCESSED"
11894   new_path=`$CYGPATH -u "$path"`
11895 
11896   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11897   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11898   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11899   # "foo.exe" is OK but "foo" is an error.
11900   #
11901   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11902   # It is also a way to make sure we got the proper file name for the real test later on.
11903   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11904   if test "x$test_shortpath" = x; then
11905     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11906 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11907     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11908   fi
11909 
11910   # Call helper function which possibly converts this using DOS-style short mode.
11911   # If so, the updated path is stored in $new_path.
11912 
11913   input_path="$new_path"
11914   # Check if we need to convert this using DOS-style short mode. If the path
11915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11916   # take no chances and rewrite it.
11917   # Note: m4 eats our [], so we need to use [ and ] instead.
11918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11919   if test "x$has_forbidden_chars" != x; then
11920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11924       # Going to short mode and back again did indeed matter. Since short mode is
11925       # case insensitive, let's make it lowercase to improve readability.
11926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11927       # Now convert it back to Unix-stile (cygpath)
11928       input_path=`$CYGPATH -u "$shortmode_path"`
11929       new_path="$input_path"
11930     fi
11931   fi
11932 
11933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11934   if test "x$test_cygdrive_prefix" = x; then
11935     # As a simple fix, exclude /usr/bin since it's not a real path.
11936     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11938       # a path prefixed by /cygdrive for fixpath to work.
11939       new_path="$CYGWIN_ROOT_PATH$input_path"
11940     fi
11941   fi
11942 
11943 
11944   if test "x$path" != "x$new_path"; then
11945     JAVA_HOME_PROCESSED="$new_path"
11946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11947 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11948   fi
11949 
11950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11951 
11952   path="$JAVA_HOME_PROCESSED"
11953   has_colon=`$ECHO $path | $GREP ^.:`
11954   new_path="$path"
11955   if test "x$has_colon" = x; then
11956     # Not in mixed or Windows style, start by that.
11957     new_path=`cmd //c echo $path`
11958   fi
11959 
11960 
11961   input_path="$new_path"
11962   # Check if we need to convert this using DOS-style short mode. If the path
11963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11964   # take no chances and rewrite it.
11965   # Note: m4 eats our [], so we need to use [ and ] instead.
11966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11967   if test "x$has_forbidden_chars" != x; then
11968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11970   fi
11971 
11972 
11973   windows_path="$new_path"
11974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11975     unix_path=`$CYGPATH -u "$windows_path"`
11976     new_path="$unix_path"
11977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11979     new_path="$unix_path"
11980   fi
11981 
11982   if test "x$path" != "x$new_path"; then
11983     JAVA_HOME_PROCESSED="$new_path"
11984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11985 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11986   fi
11987 
11988   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11989   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11990 
11991   else
11992     # We're on a posix platform. Hooray! :)
11993     path="$JAVA_HOME_PROCESSED"
11994     has_space=`$ECHO "$path" | $GREP " "`
11995     if test "x$has_space" != x; then
11996       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11997 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11998       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11999     fi
12000 
12001     # Use eval to expand a potential ~
12002     eval path="$path"
12003     if test ! -f "$path" && test ! -d "$path"; then
12004       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
12005     fi
12006 
12007     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
12008   fi
12009 
12010     if test ! -d "$JAVA_HOME_PROCESSED"; then
12011       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
12012 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
12013     else
12014       # Aha, the user has set a JAVA_HOME
12015       # let us use that as the Boot JDK.
12016       BOOT_JDK="$JAVA_HOME_PROCESSED"
12017       BOOT_JDK_FOUND=maybe
12018       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
12019 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
12020     fi
12021   fi
12022 
12023 
12024     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12025     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12026       # Do we have a bin/java?
12027       if test ! -x "$BOOT_JDK/bin/java"; then
12028         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12029 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12030         BOOT_JDK_FOUND=no
12031       else
12032         # Do we have a bin/javac?
12033         if test ! -x "$BOOT_JDK/bin/javac"; then
12034           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12035 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12036           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12037 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12038           BOOT_JDK_FOUND=no
12039         else
12040           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12041           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12042             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12044             BOOT_JDK_FOUND=no
12045           else
12046             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12047             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12048 
12049             # Extra M4 quote needed to protect [] in grep expression.
12050             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12051             if test "x$FOUND_VERSION_78" = x; then
12052               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12053 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12054               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12055 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12056               BOOT_JDK_FOUND=no
12057             else
12058               # We're done! :-)
12059               BOOT_JDK_FOUND=yes
12060 
12061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12062 
12063   # Input might be given as Windows format, start by converting to
12064   # unix format.
12065   path="$BOOT_JDK"
12066   new_path=`$CYGPATH -u "$path"`
12067 
12068   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12069   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12070   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12071   # "foo.exe" is OK but "foo" is an error.
12072   #
12073   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12074   # It is also a way to make sure we got the proper file name for the real test later on.
12075   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12076   if test "x$test_shortpath" = x; then
12077     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12078 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12079     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12080   fi
12081 
12082   # Call helper function which possibly converts this using DOS-style short mode.
12083   # If so, the updated path is stored in $new_path.
12084 
12085   input_path="$new_path"
12086   # Check if we need to convert this using DOS-style short mode. If the path
12087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12088   # take no chances and rewrite it.
12089   # Note: m4 eats our [], so we need to use [ and ] instead.
12090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12091   if test "x$has_forbidden_chars" != x; then
12092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12093     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12094     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12095     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12096       # Going to short mode and back again did indeed matter. Since short mode is
12097       # case insensitive, let's make it lowercase to improve readability.
12098       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12099       # Now convert it back to Unix-stile (cygpath)
12100       input_path=`$CYGPATH -u "$shortmode_path"`
12101       new_path="$input_path"
12102     fi
12103   fi
12104 
12105   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12106   if test "x$test_cygdrive_prefix" = x; then
12107     # As a simple fix, exclude /usr/bin since it's not a real path.
12108     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12109       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12110       # a path prefixed by /cygdrive for fixpath to work.
12111       new_path="$CYGWIN_ROOT_PATH$input_path"
12112     fi
12113   fi
12114 
12115 
12116   if test "x$path" != "x$new_path"; then
12117     BOOT_JDK="$new_path"
12118     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12119 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12120   fi
12121 
12122   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12123 
12124   path="$BOOT_JDK"
12125   has_colon=`$ECHO $path | $GREP ^.:`
12126   new_path="$path"
12127   if test "x$has_colon" = x; then
12128     # Not in mixed or Windows style, start by that.
12129     new_path=`cmd //c echo $path`
12130   fi
12131 
12132 
12133   input_path="$new_path"
12134   # Check if we need to convert this using DOS-style short mode. If the path
12135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12136   # take no chances and rewrite it.
12137   # Note: m4 eats our [], so we need to use [ and ] instead.
12138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12139   if test "x$has_forbidden_chars" != x; then
12140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12141     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12142   fi
12143 
12144 
12145   windows_path="$new_path"
12146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12147     unix_path=`$CYGPATH -u "$windows_path"`
12148     new_path="$unix_path"
12149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12151     new_path="$unix_path"
12152   fi
12153 
12154   if test "x$path" != "x$new_path"; then
12155     BOOT_JDK="$new_path"
12156     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12157 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12158   fi
12159 
12160   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12161   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12162 
12163   else
12164     # We're on a posix platform. Hooray! :)
12165     path="$BOOT_JDK"
12166     has_space=`$ECHO "$path" | $GREP " "`
12167     if test "x$has_space" != x; then
12168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12169 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12170       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12171     fi
12172 
12173     # Use eval to expand a potential ~
12174     eval path="$path"
12175     if test ! -f "$path" && test ! -d "$path"; then
12176       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12177     fi
12178 
12179     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12180   fi
12181 
12182               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12183 $as_echo_n "checking for Boot JDK... " >&6; }
12184               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12185 $as_echo "$BOOT_JDK" >&6; }
12186               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12187 $as_echo_n "checking Boot JDK version... " >&6; }
12188               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12189               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12190 $as_echo "$BOOT_JDK_VERSION" >&6; }
12191             fi # end check jdk version
12192           fi # end check rt.jar
12193         fi # end check javac
12194       fi # end check java
12195     fi # end check boot jdk found
12196   fi
12197 
12198 
12199   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12200 
12201   if test "x$BOOT_JDK_FOUND" = xno; then
12202     # Now execute the test
12203 
12204   if test -x /usr/libexec/java_home; then
12205     BOOT_JDK=`/usr/libexec/java_home`
12206     BOOT_JDK_FOUND=maybe
12207     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12208 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12209   fi
12210 
12211 
12212     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12213     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12214       # Do we have a bin/java?
12215       if test ! -x "$BOOT_JDK/bin/java"; then
12216         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12217 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12218         BOOT_JDK_FOUND=no
12219       else
12220         # Do we have a bin/javac?
12221         if test ! -x "$BOOT_JDK/bin/javac"; then
12222           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12223 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12224           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12225 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12226           BOOT_JDK_FOUND=no
12227         else
12228           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12229           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12230             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12231 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12232             BOOT_JDK_FOUND=no
12233           else
12234             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12235             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12236 
12237             # Extra M4 quote needed to protect [] in grep expression.
12238             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12239             if test "x$FOUND_VERSION_78" = x; then
12240               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12241 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12242               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12243 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12244               BOOT_JDK_FOUND=no
12245             else
12246               # We're done! :-)
12247               BOOT_JDK_FOUND=yes
12248 
12249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12250 
12251   # Input might be given as Windows format, start by converting to
12252   # unix format.
12253   path="$BOOT_JDK"
12254   new_path=`$CYGPATH -u "$path"`
12255 
12256   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12257   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12258   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12259   # "foo.exe" is OK but "foo" is an error.
12260   #
12261   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12262   # It is also a way to make sure we got the proper file name for the real test later on.
12263   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12264   if test "x$test_shortpath" = x; then
12265     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12266 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12267     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12268   fi
12269 
12270   # Call helper function which possibly converts this using DOS-style short mode.
12271   # If so, the updated path is stored in $new_path.
12272 
12273   input_path="$new_path"
12274   # Check if we need to convert this using DOS-style short mode. If the path
12275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12276   # take no chances and rewrite it.
12277   # Note: m4 eats our [], so we need to use [ and ] instead.
12278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12279   if test "x$has_forbidden_chars" != x; then
12280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12281     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12282     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12283     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12284       # Going to short mode and back again did indeed matter. Since short mode is
12285       # case insensitive, let's make it lowercase to improve readability.
12286       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12287       # Now convert it back to Unix-stile (cygpath)
12288       input_path=`$CYGPATH -u "$shortmode_path"`
12289       new_path="$input_path"
12290     fi
12291   fi
12292 
12293   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12294   if test "x$test_cygdrive_prefix" = x; then
12295     # As a simple fix, exclude /usr/bin since it's not a real path.
12296     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12297       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12298       # a path prefixed by /cygdrive for fixpath to work.
12299       new_path="$CYGWIN_ROOT_PATH$input_path"
12300     fi
12301   fi
12302 
12303 
12304   if test "x$path" != "x$new_path"; then
12305     BOOT_JDK="$new_path"
12306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12307 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12308   fi
12309 
12310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12311 
12312   path="$BOOT_JDK"
12313   has_colon=`$ECHO $path | $GREP ^.:`
12314   new_path="$path"
12315   if test "x$has_colon" = x; then
12316     # Not in mixed or Windows style, start by that.
12317     new_path=`cmd //c echo $path`
12318   fi
12319 
12320 
12321   input_path="$new_path"
12322   # Check if we need to convert this using DOS-style short mode. If the path
12323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12324   # take no chances and rewrite it.
12325   # Note: m4 eats our [], so we need to use [ and ] instead.
12326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12327   if test "x$has_forbidden_chars" != x; then
12328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12329     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12330   fi
12331 
12332 
12333   windows_path="$new_path"
12334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12335     unix_path=`$CYGPATH -u "$windows_path"`
12336     new_path="$unix_path"
12337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12339     new_path="$unix_path"
12340   fi
12341 
12342   if test "x$path" != "x$new_path"; then
12343     BOOT_JDK="$new_path"
12344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12345 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12346   fi
12347 
12348   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12349   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12350 
12351   else
12352     # We're on a posix platform. Hooray! :)
12353     path="$BOOT_JDK"
12354     has_space=`$ECHO "$path" | $GREP " "`
12355     if test "x$has_space" != x; then
12356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12357 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12358       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12359     fi
12360 
12361     # Use eval to expand a potential ~
12362     eval path="$path"
12363     if test ! -f "$path" && test ! -d "$path"; then
12364       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12365     fi
12366 
12367     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12368   fi
12369 
12370               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12371 $as_echo_n "checking for Boot JDK... " >&6; }
12372               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12373 $as_echo "$BOOT_JDK" >&6; }
12374               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12375 $as_echo_n "checking Boot JDK version... " >&6; }
12376               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12377               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12378 $as_echo "$BOOT_JDK_VERSION" >&6; }
12379             fi # end check jdk version
12380           fi # end check rt.jar
12381         fi # end check javac
12382       fi # end check java
12383     fi # end check boot jdk found
12384   fi
12385 
12386 
12387   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12388 
12389   if test "x$BOOT_JDK_FOUND" = xno; then
12390     # Now execute the test
12391 
12392   # Extract the first word of "javac", so it can be a program name with args.
12393 set dummy javac; 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_JAVAC_CHECK+:} false; then :
12397   $as_echo_n "(cached) " >&6
12398 else
12399   case $JAVAC_CHECK in
12400   [\\/]* | ?:[\\/]*)
12401   ac_cv_path_JAVAC_CHECK="$JAVAC_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_JAVAC_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 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12423 if test -n "$JAVAC_CHECK"; then
12424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12425 $as_echo "$JAVAC_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   # Extract the first word of "java", so it can be a program name with args.
12433 set dummy java; ac_word=$2
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12435 $as_echo_n "checking for $ac_word... " >&6; }
12436 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12437   $as_echo_n "(cached) " >&6
12438 else
12439   case $JAVA_CHECK in
12440   [\\/]* | ?:[\\/]*)
12441   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12442   ;;
12443   *)
12444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12445 for as_dir in $PATH
12446 do
12447   IFS=$as_save_IFS
12448   test -z "$as_dir" && as_dir=.
12449     for ac_exec_ext in '' $ac_executable_extensions; do
12450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12451     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12453     break 2
12454   fi
12455 done
12456   done
12457 IFS=$as_save_IFS
12458 
12459   ;;
12460 esac
12461 fi
12462 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12463 if test -n "$JAVA_CHECK"; then
12464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12465 $as_echo "$JAVA_CHECK" >&6; }
12466 else
12467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12468 $as_echo "no" >&6; }
12469 fi
12470 
12471 
12472   BINARY="$JAVAC_CHECK"
12473   if test "x$JAVAC_CHECK" = x; then
12474     BINARY="$JAVA_CHECK"
12475   fi
12476   if test "x$BINARY" != x; then
12477     # So there is a java(c) binary, it might be part of a JDK.
12478     # Lets find the JDK/JRE directory by following symbolic links.
12479     # Linux/GNU systems often have links from /usr/bin/java to
12480     # /etc/alternatives/java to the real JDK binary.
12481 
12482   if test "x$OPENJDK_BUILD_OS" != xwindows; then
12483     # Follow a chain of symbolic links. Use readlink
12484     # where it exists, else fall back to horribly
12485     # complicated shell code.
12486     if test "x$READLINK_TESTED" != yes; then
12487       # On MacOSX there is a readlink tool with a different
12488       # purpose than the GNU readlink tool. Check the found readlink.
12489       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12490       if test "x$ISGNU" = x; then
12491         # A readlink that we do not know how to use.
12492         # Are there other non-GNU readlinks out there?
12493         READLINK_TESTED=yes
12494         READLINK=
12495       fi
12496     fi
12497 
12498     if test "x$READLINK" != x; then
12499       BINARY=`$READLINK -f $BINARY`
12500     else
12501       # Save the current directory for restoring afterwards
12502       STARTDIR=$PWD
12503       COUNTER=0
12504       sym_link_dir=`$DIRNAME $BINARY`
12505       sym_link_file=`$BASENAME $BINARY`
12506       cd $sym_link_dir
12507       # Use -P flag to resolve symlinks in directories.
12508       cd `$THEPWDCMD -P`
12509       sym_link_dir=`$THEPWDCMD -P`
12510       # Resolve file symlinks
12511       while test $COUNTER -lt 20; do
12512         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12513         if test "x$ISLINK" == x; then
12514           # This is not a symbolic link! We are done!
12515           break
12516         fi
12517         # Again resolve directory symlinks since the target of the just found
12518         # link could be in a different directory
12519         cd `$DIRNAME $ISLINK`
12520         sym_link_dir=`$THEPWDCMD -P`
12521         sym_link_file=`$BASENAME $ISLINK`
12522         let COUNTER=COUNTER+1
12523       done
12524       cd $STARTDIR
12525       BINARY=$sym_link_dir/$sym_link_file
12526     fi
12527   fi
12528 
12529     BOOT_JDK=`dirname "$BINARY"`
12530     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12531     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12532       # Looks like we found ourselves an JDK
12533       BOOT_JDK_FOUND=maybe
12534       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12535 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12536     fi
12537   fi
12538 
12539 
12540     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12541     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12542       # Do we have a bin/java?
12543       if test ! -x "$BOOT_JDK/bin/java"; then
12544         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12545 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12546         BOOT_JDK_FOUND=no
12547       else
12548         # Do we have a bin/javac?
12549         if test ! -x "$BOOT_JDK/bin/javac"; then
12550           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12551 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12552           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12553 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12554           BOOT_JDK_FOUND=no
12555         else
12556           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12557           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12558             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12559 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12560             BOOT_JDK_FOUND=no
12561           else
12562             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12563             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12564 
12565             # Extra M4 quote needed to protect [] in grep expression.
12566             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12567             if test "x$FOUND_VERSION_78" = x; then
12568               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12569 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12570               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12571 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12572               BOOT_JDK_FOUND=no
12573             else
12574               # We're done! :-)
12575               BOOT_JDK_FOUND=yes
12576 
12577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12578 
12579   # Input might be given as Windows format, start by converting to
12580   # unix format.
12581   path="$BOOT_JDK"
12582   new_path=`$CYGPATH -u "$path"`
12583 
12584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12587   # "foo.exe" is OK but "foo" is an error.
12588   #
12589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12590   # It is also a way to make sure we got the proper file name for the real test later on.
12591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12592   if test "x$test_shortpath" = x; then
12593     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12594 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12595     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12596   fi
12597 
12598   # Call helper function which possibly converts this using DOS-style short mode.
12599   # If so, the updated path is stored in $new_path.
12600 
12601   input_path="$new_path"
12602   # Check if we need to convert this using DOS-style short mode. If the path
12603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12604   # take no chances and rewrite it.
12605   # Note: m4 eats our [], so we need to use [ and ] instead.
12606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12607   if test "x$has_forbidden_chars" != x; then
12608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12612       # Going to short mode and back again did indeed matter. Since short mode is
12613       # case insensitive, let's make it lowercase to improve readability.
12614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12615       # Now convert it back to Unix-stile (cygpath)
12616       input_path=`$CYGPATH -u "$shortmode_path"`
12617       new_path="$input_path"
12618     fi
12619   fi
12620 
12621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12622   if test "x$test_cygdrive_prefix" = x; then
12623     # As a simple fix, exclude /usr/bin since it's not a real path.
12624     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12626       # a path prefixed by /cygdrive for fixpath to work.
12627       new_path="$CYGWIN_ROOT_PATH$input_path"
12628     fi
12629   fi
12630 
12631 
12632   if test "x$path" != "x$new_path"; then
12633     BOOT_JDK="$new_path"
12634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12635 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12636   fi
12637 
12638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639 
12640   path="$BOOT_JDK"
12641   has_colon=`$ECHO $path | $GREP ^.:`
12642   new_path="$path"
12643   if test "x$has_colon" = x; then
12644     # Not in mixed or Windows style, start by that.
12645     new_path=`cmd //c echo $path`
12646   fi
12647 
12648 
12649   input_path="$new_path"
12650   # Check if we need to convert this using DOS-style short mode. If the path
12651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12652   # take no chances and rewrite it.
12653   # Note: m4 eats our [], so we need to use [ and ] instead.
12654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12655   if test "x$has_forbidden_chars" != x; then
12656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12658   fi
12659 
12660 
12661   windows_path="$new_path"
12662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12663     unix_path=`$CYGPATH -u "$windows_path"`
12664     new_path="$unix_path"
12665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12667     new_path="$unix_path"
12668   fi
12669 
12670   if test "x$path" != "x$new_path"; then
12671     BOOT_JDK="$new_path"
12672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12673 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12674   fi
12675 
12676   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12677   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12678 
12679   else
12680     # We're on a posix platform. Hooray! :)
12681     path="$BOOT_JDK"
12682     has_space=`$ECHO "$path" | $GREP " "`
12683     if test "x$has_space" != x; then
12684       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12685 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12686       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12687     fi
12688 
12689     # Use eval to expand a potential ~
12690     eval path="$path"
12691     if test ! -f "$path" && test ! -d "$path"; then
12692       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12693     fi
12694 
12695     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12696   fi
12697 
12698               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12699 $as_echo_n "checking for Boot JDK... " >&6; }
12700               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12701 $as_echo "$BOOT_JDK" >&6; }
12702               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12703 $as_echo_n "checking Boot JDK version... " >&6; }
12704               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12705               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12706 $as_echo "$BOOT_JDK_VERSION" >&6; }
12707             fi # end check jdk version
12708           fi # end check rt.jar
12709         fi # end check javac
12710       fi # end check java
12711     fi # end check boot jdk found
12712   fi
12713 
12714 
12715   # Test: Is there a JDK installed in default, well-known locations?
12716 
12717   if test "x$BOOT_JDK_FOUND" = xno; then
12718     # Now execute the test
12719 
12720   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12721 
12722   if test "x$BOOT_JDK_FOUND" = xno; then
12723     # Now execute the test
12724 
12725   if test "x$ProgramW6432" != x; then
12726     VIRTUAL_DIR="$ProgramW6432/Java"
12727 
12728   windows_path="$VIRTUAL_DIR"
12729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12730     unix_path=`$CYGPATH -u "$windows_path"`
12731     VIRTUAL_DIR="$unix_path"
12732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12734     VIRTUAL_DIR="$unix_path"
12735   fi
12736 
12737 
12738   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12739   BOOT_JDK_SUFFIX=""
12740   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12741   if test "x$ALL_JDKS_FOUND" != x; then
12742     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12743 
12744   if test "x$BOOT_JDK_FOUND" = xno; then
12745     # Now execute the test
12746 
12747         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12748         if test -d "$BOOT_JDK"; then
12749           BOOT_JDK_FOUND=maybe
12750           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12751 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12752         fi
12753 
12754 
12755     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12756     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12757       # Do we have a bin/java?
12758       if test ! -x "$BOOT_JDK/bin/java"; then
12759         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12760 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12761         BOOT_JDK_FOUND=no
12762       else
12763         # Do we have a bin/javac?
12764         if test ! -x "$BOOT_JDK/bin/javac"; then
12765           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12766 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12767           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12768 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12769           BOOT_JDK_FOUND=no
12770         else
12771           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12772           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12773             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12774 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12775             BOOT_JDK_FOUND=no
12776           else
12777             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12778             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12779 
12780             # Extra M4 quote needed to protect [] in grep expression.
12781             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12782             if test "x$FOUND_VERSION_78" = x; then
12783               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12784 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12785               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12786 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12787               BOOT_JDK_FOUND=no
12788             else
12789               # We're done! :-)
12790               BOOT_JDK_FOUND=yes
12791 
12792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12793 
12794   # Input might be given as Windows format, start by converting to
12795   # unix format.
12796   path="$BOOT_JDK"
12797   new_path=`$CYGPATH -u "$path"`
12798 
12799   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12800   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12801   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12802   # "foo.exe" is OK but "foo" is an error.
12803   #
12804   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12805   # It is also a way to make sure we got the proper file name for the real test later on.
12806   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12807   if test "x$test_shortpath" = x; then
12808     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12809 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12810     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12811   fi
12812 
12813   # Call helper function which possibly converts this using DOS-style short mode.
12814   # If so, the updated path is stored in $new_path.
12815 
12816   input_path="$new_path"
12817   # Check if we need to convert this using DOS-style short mode. If the path
12818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12819   # take no chances and rewrite it.
12820   # Note: m4 eats our [], so we need to use [ and ] instead.
12821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12822   if test "x$has_forbidden_chars" != x; then
12823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12824     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12825     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12826     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12827       # Going to short mode and back again did indeed matter. Since short mode is
12828       # case insensitive, let's make it lowercase to improve readability.
12829       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12830       # Now convert it back to Unix-stile (cygpath)
12831       input_path=`$CYGPATH -u "$shortmode_path"`
12832       new_path="$input_path"
12833     fi
12834   fi
12835 
12836   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12837   if test "x$test_cygdrive_prefix" = x; then
12838     # As a simple fix, exclude /usr/bin since it's not a real path.
12839     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12840       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12841       # a path prefixed by /cygdrive for fixpath to work.
12842       new_path="$CYGWIN_ROOT_PATH$input_path"
12843     fi
12844   fi
12845 
12846 
12847   if test "x$path" != "x$new_path"; then
12848     BOOT_JDK="$new_path"
12849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12850 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12851   fi
12852 
12853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12854 
12855   path="$BOOT_JDK"
12856   has_colon=`$ECHO $path | $GREP ^.:`
12857   new_path="$path"
12858   if test "x$has_colon" = x; then
12859     # Not in mixed or Windows style, start by that.
12860     new_path=`cmd //c echo $path`
12861   fi
12862 
12863 
12864   input_path="$new_path"
12865   # Check if we need to convert this using DOS-style short mode. If the path
12866   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12867   # take no chances and rewrite it.
12868   # Note: m4 eats our [], so we need to use [ and ] instead.
12869   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12870   if test "x$has_forbidden_chars" != x; then
12871     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12872     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12873   fi
12874 
12875 
12876   windows_path="$new_path"
12877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12878     unix_path=`$CYGPATH -u "$windows_path"`
12879     new_path="$unix_path"
12880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12882     new_path="$unix_path"
12883   fi
12884 
12885   if test "x$path" != "x$new_path"; then
12886     BOOT_JDK="$new_path"
12887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12888 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12889   fi
12890 
12891   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12892   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12893 
12894   else
12895     # We're on a posix platform. Hooray! :)
12896     path="$BOOT_JDK"
12897     has_space=`$ECHO "$path" | $GREP " "`
12898     if test "x$has_space" != x; then
12899       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12901       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12902     fi
12903 
12904     # Use eval to expand a potential ~
12905     eval path="$path"
12906     if test ! -f "$path" && test ! -d "$path"; then
12907       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12908     fi
12909 
12910     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12911   fi
12912 
12913               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12914 $as_echo_n "checking for Boot JDK... " >&6; }
12915               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12916 $as_echo "$BOOT_JDK" >&6; }
12917               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12918 $as_echo_n "checking Boot JDK version... " >&6; }
12919               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12920               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12921 $as_echo "$BOOT_JDK_VERSION" >&6; }
12922             fi # end check jdk version
12923           fi # end check rt.jar
12924         fi # end check javac
12925       fi # end check java
12926     fi # end check boot jdk found
12927   fi
12928 
12929     done
12930   fi
12931 
12932   fi
12933 
12934 
12935     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12936     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12937       # Do we have a bin/java?
12938       if test ! -x "$BOOT_JDK/bin/java"; then
12939         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12941         BOOT_JDK_FOUND=no
12942       else
12943         # Do we have a bin/javac?
12944         if test ! -x "$BOOT_JDK/bin/javac"; then
12945           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12947           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12948 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12949           BOOT_JDK_FOUND=no
12950         else
12951           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12952           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12953             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12954 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12955             BOOT_JDK_FOUND=no
12956           else
12957             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12958             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12959 
12960             # Extra M4 quote needed to protect [] in grep expression.
12961             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12962             if test "x$FOUND_VERSION_78" = x; then
12963               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12964 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12965               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12966 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12967               BOOT_JDK_FOUND=no
12968             else
12969               # We're done! :-)
12970               BOOT_JDK_FOUND=yes
12971 
12972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12973 
12974   # Input might be given as Windows format, start by converting to
12975   # unix format.
12976   path="$BOOT_JDK"
12977   new_path=`$CYGPATH -u "$path"`
12978 
12979   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12980   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12981   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12982   # "foo.exe" is OK but "foo" is an error.
12983   #
12984   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12985   # It is also a way to make sure we got the proper file name for the real test later on.
12986   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12987   if test "x$test_shortpath" = x; then
12988     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12989 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12990     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12991   fi
12992 
12993   # Call helper function which possibly converts this using DOS-style short mode.
12994   # If so, the updated path is stored in $new_path.
12995 
12996   input_path="$new_path"
12997   # Check if we need to convert this using DOS-style short mode. If the path
12998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12999   # take no chances and rewrite it.
13000   # Note: m4 eats our [], so we need to use [ and ] instead.
13001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13002   if test "x$has_forbidden_chars" != x; then
13003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13004     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13005     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13006     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13007       # Going to short mode and back again did indeed matter. Since short mode is
13008       # case insensitive, let's make it lowercase to improve readability.
13009       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13010       # Now convert it back to Unix-stile (cygpath)
13011       input_path=`$CYGPATH -u "$shortmode_path"`
13012       new_path="$input_path"
13013     fi
13014   fi
13015 
13016   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13017   if test "x$test_cygdrive_prefix" = x; then
13018     # As a simple fix, exclude /usr/bin since it's not a real path.
13019     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13020       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13021       # a path prefixed by /cygdrive for fixpath to work.
13022       new_path="$CYGWIN_ROOT_PATH$input_path"
13023     fi
13024   fi
13025 
13026 
13027   if test "x$path" != "x$new_path"; then
13028     BOOT_JDK="$new_path"
13029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13030 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13031   fi
13032 
13033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13034 
13035   path="$BOOT_JDK"
13036   has_colon=`$ECHO $path | $GREP ^.:`
13037   new_path="$path"
13038   if test "x$has_colon" = x; then
13039     # Not in mixed or Windows style, start by that.
13040     new_path=`cmd //c echo $path`
13041   fi
13042 
13043 
13044   input_path="$new_path"
13045   # Check if we need to convert this using DOS-style short mode. If the path
13046   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13047   # take no chances and rewrite it.
13048   # Note: m4 eats our [], so we need to use [ and ] instead.
13049   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13050   if test "x$has_forbidden_chars" != x; then
13051     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13052     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13053   fi
13054 
13055 
13056   windows_path="$new_path"
13057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13058     unix_path=`$CYGPATH -u "$windows_path"`
13059     new_path="$unix_path"
13060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13062     new_path="$unix_path"
13063   fi
13064 
13065   if test "x$path" != "x$new_path"; then
13066     BOOT_JDK="$new_path"
13067     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13068 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13069   fi
13070 
13071   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13072   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13073 
13074   else
13075     # We're on a posix platform. Hooray! :)
13076     path="$BOOT_JDK"
13077     has_space=`$ECHO "$path" | $GREP " "`
13078     if test "x$has_space" != x; then
13079       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13080 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13081       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13082     fi
13083 
13084     # Use eval to expand a potential ~
13085     eval path="$path"
13086     if test ! -f "$path" && test ! -d "$path"; then
13087       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13088     fi
13089 
13090     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13091   fi
13092 
13093               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13094 $as_echo_n "checking for Boot JDK... " >&6; }
13095               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13096 $as_echo "$BOOT_JDK" >&6; }
13097               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13098 $as_echo_n "checking Boot JDK version... " >&6; }
13099               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13100               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13101 $as_echo "$BOOT_JDK_VERSION" >&6; }
13102             fi # end check jdk version
13103           fi # end check rt.jar
13104         fi # end check javac
13105       fi # end check java
13106     fi # end check boot jdk found
13107   fi
13108 
13109 
13110   if test "x$BOOT_JDK_FOUND" = xno; then
13111     # Now execute the test
13112 
13113   if test "x$PROGRAMW6432" != x; then
13114     VIRTUAL_DIR="$PROGRAMW6432/Java"
13115 
13116   windows_path="$VIRTUAL_DIR"
13117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13118     unix_path=`$CYGPATH -u "$windows_path"`
13119     VIRTUAL_DIR="$unix_path"
13120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13122     VIRTUAL_DIR="$unix_path"
13123   fi
13124 
13125 
13126   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13127   BOOT_JDK_SUFFIX=""
13128   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13129   if test "x$ALL_JDKS_FOUND" != x; then
13130     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13131 
13132   if test "x$BOOT_JDK_FOUND" = xno; then
13133     # Now execute the test
13134 
13135         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13136         if test -d "$BOOT_JDK"; then
13137           BOOT_JDK_FOUND=maybe
13138           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13139 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13140         fi
13141 
13142 
13143     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13144     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13145       # Do we have a bin/java?
13146       if test ! -x "$BOOT_JDK/bin/java"; then
13147         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13148 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13149         BOOT_JDK_FOUND=no
13150       else
13151         # Do we have a bin/javac?
13152         if test ! -x "$BOOT_JDK/bin/javac"; then
13153           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13154 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13155           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13156 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13157           BOOT_JDK_FOUND=no
13158         else
13159           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13160           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13161             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13162 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13163             BOOT_JDK_FOUND=no
13164           else
13165             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13166             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13167 
13168             # Extra M4 quote needed to protect [] in grep expression.
13169             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13170             if test "x$FOUND_VERSION_78" = x; then
13171               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13172 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13173               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13174 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13175               BOOT_JDK_FOUND=no
13176             else
13177               # We're done! :-)
13178               BOOT_JDK_FOUND=yes
13179 
13180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13181 
13182   # Input might be given as Windows format, start by converting to
13183   # unix format.
13184   path="$BOOT_JDK"
13185   new_path=`$CYGPATH -u "$path"`
13186 
13187   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13188   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13189   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13190   # "foo.exe" is OK but "foo" is an error.
13191   #
13192   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13193   # It is also a way to make sure we got the proper file name for the real test later on.
13194   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13195   if test "x$test_shortpath" = x; then
13196     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13197 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13198     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13199   fi
13200 
13201   # Call helper function which possibly converts this using DOS-style short mode.
13202   # If so, the updated path is stored in $new_path.
13203 
13204   input_path="$new_path"
13205   # Check if we need to convert this using DOS-style short mode. If the path
13206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13207   # take no chances and rewrite it.
13208   # Note: m4 eats our [], so we need to use [ and ] instead.
13209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13210   if test "x$has_forbidden_chars" != x; then
13211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13212     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13213     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13214     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13215       # Going to short mode and back again did indeed matter. Since short mode is
13216       # case insensitive, let's make it lowercase to improve readability.
13217       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13218       # Now convert it back to Unix-stile (cygpath)
13219       input_path=`$CYGPATH -u "$shortmode_path"`
13220       new_path="$input_path"
13221     fi
13222   fi
13223 
13224   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13225   if test "x$test_cygdrive_prefix" = x; then
13226     # As a simple fix, exclude /usr/bin since it's not a real path.
13227     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13228       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13229       # a path prefixed by /cygdrive for fixpath to work.
13230       new_path="$CYGWIN_ROOT_PATH$input_path"
13231     fi
13232   fi
13233 
13234 
13235   if test "x$path" != "x$new_path"; then
13236     BOOT_JDK="$new_path"
13237     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13238 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13239   fi
13240 
13241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13242 
13243   path="$BOOT_JDK"
13244   has_colon=`$ECHO $path | $GREP ^.:`
13245   new_path="$path"
13246   if test "x$has_colon" = x; then
13247     # Not in mixed or Windows style, start by that.
13248     new_path=`cmd //c echo $path`
13249   fi
13250 
13251 
13252   input_path="$new_path"
13253   # Check if we need to convert this using DOS-style short mode. If the path
13254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13255   # take no chances and rewrite it.
13256   # Note: m4 eats our [], so we need to use [ and ] instead.
13257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13258   if test "x$has_forbidden_chars" != x; then
13259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13260     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13261   fi
13262 
13263 
13264   windows_path="$new_path"
13265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13266     unix_path=`$CYGPATH -u "$windows_path"`
13267     new_path="$unix_path"
13268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13269     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13270     new_path="$unix_path"
13271   fi
13272 
13273   if test "x$path" != "x$new_path"; then
13274     BOOT_JDK="$new_path"
13275     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13276 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13277   fi
13278 
13279   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13280   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13281 
13282   else
13283     # We're on a posix platform. Hooray! :)
13284     path="$BOOT_JDK"
13285     has_space=`$ECHO "$path" | $GREP " "`
13286     if test "x$has_space" != x; then
13287       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13288 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13289       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13290     fi
13291 
13292     # Use eval to expand a potential ~
13293     eval path="$path"
13294     if test ! -f "$path" && test ! -d "$path"; then
13295       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13296     fi
13297 
13298     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13299   fi
13300 
13301               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13302 $as_echo_n "checking for Boot JDK... " >&6; }
13303               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13304 $as_echo "$BOOT_JDK" >&6; }
13305               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13306 $as_echo_n "checking Boot JDK version... " >&6; }
13307               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13308               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13309 $as_echo "$BOOT_JDK_VERSION" >&6; }
13310             fi # end check jdk version
13311           fi # end check rt.jar
13312         fi # end check javac
13313       fi # end check java
13314     fi # end check boot jdk found
13315   fi
13316 
13317     done
13318   fi
13319 
13320   fi
13321 
13322 
13323     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13324     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13325       # Do we have a bin/java?
13326       if test ! -x "$BOOT_JDK/bin/java"; then
13327         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13328 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13329         BOOT_JDK_FOUND=no
13330       else
13331         # Do we have a bin/javac?
13332         if test ! -x "$BOOT_JDK/bin/javac"; then
13333           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13334 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13335           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13336 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13337           BOOT_JDK_FOUND=no
13338         else
13339           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13340           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13341             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13342 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13343             BOOT_JDK_FOUND=no
13344           else
13345             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13346             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13347 
13348             # Extra M4 quote needed to protect [] in grep expression.
13349             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13350             if test "x$FOUND_VERSION_78" = x; then
13351               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13352 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13353               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13354 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13355               BOOT_JDK_FOUND=no
13356             else
13357               # We're done! :-)
13358               BOOT_JDK_FOUND=yes
13359 
13360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13361 
13362   # Input might be given as Windows format, start by converting to
13363   # unix format.
13364   path="$BOOT_JDK"
13365   new_path=`$CYGPATH -u "$path"`
13366 
13367   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13368   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13369   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13370   # "foo.exe" is OK but "foo" is an error.
13371   #
13372   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13373   # It is also a way to make sure we got the proper file name for the real test later on.
13374   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13375   if test "x$test_shortpath" = x; then
13376     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13377 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13378     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13379   fi
13380 
13381   # Call helper function which possibly converts this using DOS-style short mode.
13382   # If so, the updated path is stored in $new_path.
13383 
13384   input_path="$new_path"
13385   # Check if we need to convert this using DOS-style short mode. If the path
13386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13387   # take no chances and rewrite it.
13388   # Note: m4 eats our [], so we need to use [ and ] instead.
13389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13390   if test "x$has_forbidden_chars" != x; then
13391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13392     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13393     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13394     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13395       # Going to short mode and back again did indeed matter. Since short mode is
13396       # case insensitive, let's make it lowercase to improve readability.
13397       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13398       # Now convert it back to Unix-stile (cygpath)
13399       input_path=`$CYGPATH -u "$shortmode_path"`
13400       new_path="$input_path"
13401     fi
13402   fi
13403 
13404   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13405   if test "x$test_cygdrive_prefix" = x; then
13406     # As a simple fix, exclude /usr/bin since it's not a real path.
13407     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13408       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13409       # a path prefixed by /cygdrive for fixpath to work.
13410       new_path="$CYGWIN_ROOT_PATH$input_path"
13411     fi
13412   fi
13413 
13414 
13415   if test "x$path" != "x$new_path"; then
13416     BOOT_JDK="$new_path"
13417     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13418 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13419   fi
13420 
13421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13422 
13423   path="$BOOT_JDK"
13424   has_colon=`$ECHO $path | $GREP ^.:`
13425   new_path="$path"
13426   if test "x$has_colon" = x; then
13427     # Not in mixed or Windows style, start by that.
13428     new_path=`cmd //c echo $path`
13429   fi
13430 
13431 
13432   input_path="$new_path"
13433   # Check if we need to convert this using DOS-style short mode. If the path
13434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13435   # take no chances and rewrite it.
13436   # Note: m4 eats our [], so we need to use [ and ] instead.
13437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13438   if test "x$has_forbidden_chars" != x; then
13439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13440     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13441   fi
13442 
13443 
13444   windows_path="$new_path"
13445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13446     unix_path=`$CYGPATH -u "$windows_path"`
13447     new_path="$unix_path"
13448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13450     new_path="$unix_path"
13451   fi
13452 
13453   if test "x$path" != "x$new_path"; then
13454     BOOT_JDK="$new_path"
13455     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13456 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13457   fi
13458 
13459   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13460   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13461 
13462   else
13463     # We're on a posix platform. Hooray! :)
13464     path="$BOOT_JDK"
13465     has_space=`$ECHO "$path" | $GREP " "`
13466     if test "x$has_space" != x; then
13467       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13468 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13469       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13470     fi
13471 
13472     # Use eval to expand a potential ~
13473     eval path="$path"
13474     if test ! -f "$path" && test ! -d "$path"; then
13475       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13476     fi
13477 
13478     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13479   fi
13480 
13481               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13482 $as_echo_n "checking for Boot JDK... " >&6; }
13483               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13484 $as_echo "$BOOT_JDK" >&6; }
13485               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13486 $as_echo_n "checking Boot JDK version... " >&6; }
13487               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13488               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13489 $as_echo "$BOOT_JDK_VERSION" >&6; }
13490             fi # end check jdk version
13491           fi # end check rt.jar
13492         fi # end check javac
13493       fi # end check java
13494     fi # end check boot jdk found
13495   fi
13496 
13497 
13498   if test "x$BOOT_JDK_FOUND" = xno; then
13499     # Now execute the test
13500 
13501   if test "x$PROGRAMFILES" != x; then
13502     VIRTUAL_DIR="$PROGRAMFILES/Java"
13503 
13504   windows_path="$VIRTUAL_DIR"
13505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13506     unix_path=`$CYGPATH -u "$windows_path"`
13507     VIRTUAL_DIR="$unix_path"
13508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13510     VIRTUAL_DIR="$unix_path"
13511   fi
13512 
13513 
13514   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13515   BOOT_JDK_SUFFIX=""
13516   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13517   if test "x$ALL_JDKS_FOUND" != x; then
13518     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13519 
13520   if test "x$BOOT_JDK_FOUND" = xno; then
13521     # Now execute the test
13522 
13523         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13524         if test -d "$BOOT_JDK"; then
13525           BOOT_JDK_FOUND=maybe
13526           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13527 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13528         fi
13529 
13530 
13531     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13532     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13533       # Do we have a bin/java?
13534       if test ! -x "$BOOT_JDK/bin/java"; then
13535         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13536 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13537         BOOT_JDK_FOUND=no
13538       else
13539         # Do we have a bin/javac?
13540         if test ! -x "$BOOT_JDK/bin/javac"; then
13541           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13543           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13544 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13545           BOOT_JDK_FOUND=no
13546         else
13547           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13548           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13549             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13550 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13551             BOOT_JDK_FOUND=no
13552           else
13553             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13554             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13555 
13556             # Extra M4 quote needed to protect [] in grep expression.
13557             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13558             if test "x$FOUND_VERSION_78" = x; then
13559               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13560 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13561               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13562 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13563               BOOT_JDK_FOUND=no
13564             else
13565               # We're done! :-)
13566               BOOT_JDK_FOUND=yes
13567 
13568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13569 
13570   # Input might be given as Windows format, start by converting to
13571   # unix format.
13572   path="$BOOT_JDK"
13573   new_path=`$CYGPATH -u "$path"`
13574 
13575   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13576   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13577   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13578   # "foo.exe" is OK but "foo" is an error.
13579   #
13580   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13581   # It is also a way to make sure we got the proper file name for the real test later on.
13582   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13583   if test "x$test_shortpath" = x; then
13584     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13585 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13586     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13587   fi
13588 
13589   # Call helper function which possibly converts this using DOS-style short mode.
13590   # If so, the updated path is stored in $new_path.
13591 
13592   input_path="$new_path"
13593   # Check if we need to convert this using DOS-style short mode. If the path
13594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13595   # take no chances and rewrite it.
13596   # Note: m4 eats our [], so we need to use [ and ] instead.
13597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13598   if test "x$has_forbidden_chars" != x; then
13599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13600     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13601     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13602     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13603       # Going to short mode and back again did indeed matter. Since short mode is
13604       # case insensitive, let's make it lowercase to improve readability.
13605       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13606       # Now convert it back to Unix-stile (cygpath)
13607       input_path=`$CYGPATH -u "$shortmode_path"`
13608       new_path="$input_path"
13609     fi
13610   fi
13611 
13612   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13613   if test "x$test_cygdrive_prefix" = x; then
13614     # As a simple fix, exclude /usr/bin since it's not a real path.
13615     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13616       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13617       # a path prefixed by /cygdrive for fixpath to work.
13618       new_path="$CYGWIN_ROOT_PATH$input_path"
13619     fi
13620   fi
13621 
13622 
13623   if test "x$path" != "x$new_path"; then
13624     BOOT_JDK="$new_path"
13625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13627   fi
13628 
13629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13630 
13631   path="$BOOT_JDK"
13632   has_colon=`$ECHO $path | $GREP ^.:`
13633   new_path="$path"
13634   if test "x$has_colon" = x; then
13635     # Not in mixed or Windows style, start by that.
13636     new_path=`cmd //c echo $path`
13637   fi
13638 
13639 
13640   input_path="$new_path"
13641   # Check if we need to convert this using DOS-style short mode. If the path
13642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13643   # take no chances and rewrite it.
13644   # Note: m4 eats our [], so we need to use [ and ] instead.
13645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13646   if test "x$has_forbidden_chars" != x; then
13647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13648     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13649   fi
13650 
13651 
13652   windows_path="$new_path"
13653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13654     unix_path=`$CYGPATH -u "$windows_path"`
13655     new_path="$unix_path"
13656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13658     new_path="$unix_path"
13659   fi
13660 
13661   if test "x$path" != "x$new_path"; then
13662     BOOT_JDK="$new_path"
13663     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13664 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13665   fi
13666 
13667   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13668   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13669 
13670   else
13671     # We're on a posix platform. Hooray! :)
13672     path="$BOOT_JDK"
13673     has_space=`$ECHO "$path" | $GREP " "`
13674     if test "x$has_space" != x; then
13675       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13676 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13677       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13678     fi
13679 
13680     # Use eval to expand a potential ~
13681     eval path="$path"
13682     if test ! -f "$path" && test ! -d "$path"; then
13683       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13684     fi
13685 
13686     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13687   fi
13688 
13689               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13690 $as_echo_n "checking for Boot JDK... " >&6; }
13691               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13692 $as_echo "$BOOT_JDK" >&6; }
13693               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13694 $as_echo_n "checking Boot JDK version... " >&6; }
13695               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13696               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13697 $as_echo "$BOOT_JDK_VERSION" >&6; }
13698             fi # end check jdk version
13699           fi # end check rt.jar
13700         fi # end check javac
13701       fi # end check java
13702     fi # end check boot jdk found
13703   fi
13704 
13705     done
13706   fi
13707 
13708   fi
13709 
13710 
13711     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13712     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13713       # Do we have a bin/java?
13714       if test ! -x "$BOOT_JDK/bin/java"; then
13715         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13716 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13717         BOOT_JDK_FOUND=no
13718       else
13719         # Do we have a bin/javac?
13720         if test ! -x "$BOOT_JDK/bin/javac"; then
13721           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13722 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13723           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13724 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13725           BOOT_JDK_FOUND=no
13726         else
13727           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13728           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13729             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13730 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13731             BOOT_JDK_FOUND=no
13732           else
13733             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13734             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13735 
13736             # Extra M4 quote needed to protect [] in grep expression.
13737             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13738             if test "x$FOUND_VERSION_78" = x; then
13739               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13740 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13741               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13742 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13743               BOOT_JDK_FOUND=no
13744             else
13745               # We're done! :-)
13746               BOOT_JDK_FOUND=yes
13747 
13748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13749 
13750   # Input might be given as Windows format, start by converting to
13751   # unix format.
13752   path="$BOOT_JDK"
13753   new_path=`$CYGPATH -u "$path"`
13754 
13755   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13756   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13757   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13758   # "foo.exe" is OK but "foo" is an error.
13759   #
13760   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13761   # It is also a way to make sure we got the proper file name for the real test later on.
13762   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13763   if test "x$test_shortpath" = x; then
13764     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13765 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13766     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13767   fi
13768 
13769   # Call helper function which possibly converts this using DOS-style short mode.
13770   # If so, the updated path is stored in $new_path.
13771 
13772   input_path="$new_path"
13773   # Check if we need to convert this using DOS-style short mode. If the path
13774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13775   # take no chances and rewrite it.
13776   # Note: m4 eats our [], so we need to use [ and ] instead.
13777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13778   if test "x$has_forbidden_chars" != x; then
13779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13780     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13781     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13782     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13783       # Going to short mode and back again did indeed matter. Since short mode is
13784       # case insensitive, let's make it lowercase to improve readability.
13785       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13786       # Now convert it back to Unix-stile (cygpath)
13787       input_path=`$CYGPATH -u "$shortmode_path"`
13788       new_path="$input_path"
13789     fi
13790   fi
13791 
13792   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13793   if test "x$test_cygdrive_prefix" = x; then
13794     # As a simple fix, exclude /usr/bin since it's not a real path.
13795     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13796       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13797       # a path prefixed by /cygdrive for fixpath to work.
13798       new_path="$CYGWIN_ROOT_PATH$input_path"
13799     fi
13800   fi
13801 
13802 
13803   if test "x$path" != "x$new_path"; then
13804     BOOT_JDK="$new_path"
13805     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13806 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13807   fi
13808 
13809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13810 
13811   path="$BOOT_JDK"
13812   has_colon=`$ECHO $path | $GREP ^.:`
13813   new_path="$path"
13814   if test "x$has_colon" = x; then
13815     # Not in mixed or Windows style, start by that.
13816     new_path=`cmd //c echo $path`
13817   fi
13818 
13819 
13820   input_path="$new_path"
13821   # Check if we need to convert this using DOS-style short mode. If the path
13822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13823   # take no chances and rewrite it.
13824   # Note: m4 eats our [], so we need to use [ and ] instead.
13825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13826   if test "x$has_forbidden_chars" != x; then
13827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13828     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13829   fi
13830 
13831 
13832   windows_path="$new_path"
13833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13834     unix_path=`$CYGPATH -u "$windows_path"`
13835     new_path="$unix_path"
13836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13838     new_path="$unix_path"
13839   fi
13840 
13841   if test "x$path" != "x$new_path"; then
13842     BOOT_JDK="$new_path"
13843     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13844 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13845   fi
13846 
13847   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13848   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13849 
13850   else
13851     # We're on a posix platform. Hooray! :)
13852     path="$BOOT_JDK"
13853     has_space=`$ECHO "$path" | $GREP " "`
13854     if test "x$has_space" != x; then
13855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13856 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13857       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13858     fi
13859 
13860     # Use eval to expand a potential ~
13861     eval path="$path"
13862     if test ! -f "$path" && test ! -d "$path"; then
13863       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13864     fi
13865 
13866     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13867   fi
13868 
13869               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13870 $as_echo_n "checking for Boot JDK... " >&6; }
13871               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13872 $as_echo "$BOOT_JDK" >&6; }
13873               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13874 $as_echo_n "checking Boot JDK version... " >&6; }
13875               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13876               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13877 $as_echo "$BOOT_JDK_VERSION" >&6; }
13878             fi # end check jdk version
13879           fi # end check rt.jar
13880         fi # end check javac
13881       fi # end check java
13882     fi # end check boot jdk found
13883   fi
13884 
13885 
13886   if test "x$BOOT_JDK_FOUND" = xno; then
13887     # Now execute the test
13888 
13889   if test "x$ProgramFiles" != x; then
13890     VIRTUAL_DIR="$ProgramFiles/Java"
13891 
13892   windows_path="$VIRTUAL_DIR"
13893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13894     unix_path=`$CYGPATH -u "$windows_path"`
13895     VIRTUAL_DIR="$unix_path"
13896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13898     VIRTUAL_DIR="$unix_path"
13899   fi
13900 
13901 
13902   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13903   BOOT_JDK_SUFFIX=""
13904   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13905   if test "x$ALL_JDKS_FOUND" != x; then
13906     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13907 
13908   if test "x$BOOT_JDK_FOUND" = xno; then
13909     # Now execute the test
13910 
13911         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13912         if test -d "$BOOT_JDK"; then
13913           BOOT_JDK_FOUND=maybe
13914           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13915 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13916         fi
13917 
13918 
13919     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13920     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13921       # Do we have a bin/java?
13922       if test ! -x "$BOOT_JDK/bin/java"; then
13923         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13924 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13925         BOOT_JDK_FOUND=no
13926       else
13927         # Do we have a bin/javac?
13928         if test ! -x "$BOOT_JDK/bin/javac"; then
13929           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13930 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13931           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13932 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13933           BOOT_JDK_FOUND=no
13934         else
13935           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13936           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13937             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13938 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13939             BOOT_JDK_FOUND=no
13940           else
13941             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13942             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13943 
13944             # Extra M4 quote needed to protect [] in grep expression.
13945             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13946             if test "x$FOUND_VERSION_78" = x; then
13947               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13948 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13949               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13950 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13951               BOOT_JDK_FOUND=no
13952             else
13953               # We're done! :-)
13954               BOOT_JDK_FOUND=yes
13955 
13956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13957 
13958   # Input might be given as Windows format, start by converting to
13959   # unix format.
13960   path="$BOOT_JDK"
13961   new_path=`$CYGPATH -u "$path"`
13962 
13963   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13964   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13965   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13966   # "foo.exe" is OK but "foo" is an error.
13967   #
13968   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13969   # It is also a way to make sure we got the proper file name for the real test later on.
13970   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13971   if test "x$test_shortpath" = x; then
13972     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13973 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13974     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13975   fi
13976 
13977   # Call helper function which possibly converts this using DOS-style short mode.
13978   # If so, the updated path is stored in $new_path.
13979 
13980   input_path="$new_path"
13981   # Check if we need to convert this using DOS-style short mode. If the path
13982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13983   # take no chances and rewrite it.
13984   # Note: m4 eats our [], so we need to use [ and ] instead.
13985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13986   if test "x$has_forbidden_chars" != x; then
13987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13988     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13989     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13990     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13991       # Going to short mode and back again did indeed matter. Since short mode is
13992       # case insensitive, let's make it lowercase to improve readability.
13993       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13994       # Now convert it back to Unix-stile (cygpath)
13995       input_path=`$CYGPATH -u "$shortmode_path"`
13996       new_path="$input_path"
13997     fi
13998   fi
13999 
14000   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14001   if test "x$test_cygdrive_prefix" = x; then
14002     # As a simple fix, exclude /usr/bin since it's not a real path.
14003     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14004       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14005       # a path prefixed by /cygdrive for fixpath to work.
14006       new_path="$CYGWIN_ROOT_PATH$input_path"
14007     fi
14008   fi
14009 
14010 
14011   if test "x$path" != "x$new_path"; then
14012     BOOT_JDK="$new_path"
14013     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14014 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14015   fi
14016 
14017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14018 
14019   path="$BOOT_JDK"
14020   has_colon=`$ECHO $path | $GREP ^.:`
14021   new_path="$path"
14022   if test "x$has_colon" = x; then
14023     # Not in mixed or Windows style, start by that.
14024     new_path=`cmd //c echo $path`
14025   fi
14026 
14027 
14028   input_path="$new_path"
14029   # Check if we need to convert this using DOS-style short mode. If the path
14030   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14031   # take no chances and rewrite it.
14032   # Note: m4 eats our [], so we need to use [ and ] instead.
14033   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14034   if test "x$has_forbidden_chars" != x; then
14035     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14036     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14037   fi
14038 
14039 
14040   windows_path="$new_path"
14041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14042     unix_path=`$CYGPATH -u "$windows_path"`
14043     new_path="$unix_path"
14044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14046     new_path="$unix_path"
14047   fi
14048 
14049   if test "x$path" != "x$new_path"; then
14050     BOOT_JDK="$new_path"
14051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14052 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14053   fi
14054 
14055   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14056   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14057 
14058   else
14059     # We're on a posix platform. Hooray! :)
14060     path="$BOOT_JDK"
14061     has_space=`$ECHO "$path" | $GREP " "`
14062     if test "x$has_space" != x; then
14063       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14064 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14065       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14066     fi
14067 
14068     # Use eval to expand a potential ~
14069     eval path="$path"
14070     if test ! -f "$path" && test ! -d "$path"; then
14071       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14072     fi
14073 
14074     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14075   fi
14076 
14077               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14078 $as_echo_n "checking for Boot JDK... " >&6; }
14079               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14080 $as_echo "$BOOT_JDK" >&6; }
14081               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14082 $as_echo_n "checking Boot JDK version... " >&6; }
14083               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14084               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14085 $as_echo "$BOOT_JDK_VERSION" >&6; }
14086             fi # end check jdk version
14087           fi # end check rt.jar
14088         fi # end check javac
14089       fi # end check java
14090     fi # end check boot jdk found
14091   fi
14092 
14093     done
14094   fi
14095 
14096   fi
14097 
14098 
14099     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14100     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14101       # Do we have a bin/java?
14102       if test ! -x "$BOOT_JDK/bin/java"; then
14103         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14104 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14105         BOOT_JDK_FOUND=no
14106       else
14107         # Do we have a bin/javac?
14108         if test ! -x "$BOOT_JDK/bin/javac"; then
14109           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14110 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14111           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14112 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14113           BOOT_JDK_FOUND=no
14114         else
14115           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14116           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14117             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14118 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14119             BOOT_JDK_FOUND=no
14120           else
14121             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14122             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14123 
14124             # Extra M4 quote needed to protect [] in grep expression.
14125             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14126             if test "x$FOUND_VERSION_78" = x; then
14127               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14128 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14129               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14130 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14131               BOOT_JDK_FOUND=no
14132             else
14133               # We're done! :-)
14134               BOOT_JDK_FOUND=yes
14135 
14136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14137 
14138   # Input might be given as Windows format, start by converting to
14139   # unix format.
14140   path="$BOOT_JDK"
14141   new_path=`$CYGPATH -u "$path"`
14142 
14143   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14144   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14145   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14146   # "foo.exe" is OK but "foo" is an error.
14147   #
14148   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14149   # It is also a way to make sure we got the proper file name for the real test later on.
14150   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14151   if test "x$test_shortpath" = x; then
14152     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14153 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14154     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14155   fi
14156 
14157   # Call helper function which possibly converts this using DOS-style short mode.
14158   # If so, the updated path is stored in $new_path.
14159 
14160   input_path="$new_path"
14161   # Check if we need to convert this using DOS-style short mode. If the path
14162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14163   # take no chances and rewrite it.
14164   # Note: m4 eats our [], so we need to use [ and ] instead.
14165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14166   if test "x$has_forbidden_chars" != x; then
14167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14171       # Going to short mode and back again did indeed matter. Since short mode is
14172       # case insensitive, let's make it lowercase to improve readability.
14173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14174       # Now convert it back to Unix-stile (cygpath)
14175       input_path=`$CYGPATH -u "$shortmode_path"`
14176       new_path="$input_path"
14177     fi
14178   fi
14179 
14180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14181   if test "x$test_cygdrive_prefix" = x; then
14182     # As a simple fix, exclude /usr/bin since it's not a real path.
14183     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14185       # a path prefixed by /cygdrive for fixpath to work.
14186       new_path="$CYGWIN_ROOT_PATH$input_path"
14187     fi
14188   fi
14189 
14190 
14191   if test "x$path" != "x$new_path"; then
14192     BOOT_JDK="$new_path"
14193     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14194 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14195   fi
14196 
14197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14198 
14199   path="$BOOT_JDK"
14200   has_colon=`$ECHO $path | $GREP ^.:`
14201   new_path="$path"
14202   if test "x$has_colon" = x; then
14203     # Not in mixed or Windows style, start by that.
14204     new_path=`cmd //c echo $path`
14205   fi
14206 
14207 
14208   input_path="$new_path"
14209   # Check if we need to convert this using DOS-style short mode. If the path
14210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14211   # take no chances and rewrite it.
14212   # Note: m4 eats our [], so we need to use [ and ] instead.
14213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14214   if test "x$has_forbidden_chars" != x; then
14215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14216     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14217   fi
14218 
14219 
14220   windows_path="$new_path"
14221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14222     unix_path=`$CYGPATH -u "$windows_path"`
14223     new_path="$unix_path"
14224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14226     new_path="$unix_path"
14227   fi
14228 
14229   if test "x$path" != "x$new_path"; then
14230     BOOT_JDK="$new_path"
14231     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14232 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14233   fi
14234 
14235   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14236   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14237 
14238   else
14239     # We're on a posix platform. Hooray! :)
14240     path="$BOOT_JDK"
14241     has_space=`$ECHO "$path" | $GREP " "`
14242     if test "x$has_space" != x; then
14243       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14244 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14245       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14246     fi
14247 
14248     # Use eval to expand a potential ~
14249     eval path="$path"
14250     if test ! -f "$path" && test ! -d "$path"; then
14251       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14252     fi
14253 
14254     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14255   fi
14256 
14257               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14258 $as_echo_n "checking for Boot JDK... " >&6; }
14259               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14260 $as_echo "$BOOT_JDK" >&6; }
14261               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14262 $as_echo_n "checking Boot JDK version... " >&6; }
14263               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14264               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14265 $as_echo "$BOOT_JDK_VERSION" >&6; }
14266             fi # end check jdk version
14267           fi # end check rt.jar
14268         fi # end check javac
14269       fi # end check java
14270     fi # end check boot jdk found
14271   fi
14272 
14273 
14274   if test "x$BOOT_JDK_FOUND" = xno; then
14275     # Now execute the test
14276 
14277   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14278   BOOT_JDK_SUFFIX=""
14279   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14280   if test "x$ALL_JDKS_FOUND" != x; then
14281     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14282 
14283   if test "x$BOOT_JDK_FOUND" = xno; then
14284     # Now execute the test
14285 
14286         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14287         if test -d "$BOOT_JDK"; then
14288           BOOT_JDK_FOUND=maybe
14289           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14290 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14291         fi
14292 
14293 
14294     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14295     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14296       # Do we have a bin/java?
14297       if test ! -x "$BOOT_JDK/bin/java"; then
14298         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14299 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14300         BOOT_JDK_FOUND=no
14301       else
14302         # Do we have a bin/javac?
14303         if test ! -x "$BOOT_JDK/bin/javac"; then
14304           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14305 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14306           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14307 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14308           BOOT_JDK_FOUND=no
14309         else
14310           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14311           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14312             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14314             BOOT_JDK_FOUND=no
14315           else
14316             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14317             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14318 
14319             # Extra M4 quote needed to protect [] in grep expression.
14320             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14321             if test "x$FOUND_VERSION_78" = x; then
14322               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14323 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14324               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14325 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14326               BOOT_JDK_FOUND=no
14327             else
14328               # We're done! :-)
14329               BOOT_JDK_FOUND=yes
14330 
14331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14332 
14333   # Input might be given as Windows format, start by converting to
14334   # unix format.
14335   path="$BOOT_JDK"
14336   new_path=`$CYGPATH -u "$path"`
14337 
14338   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14339   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14340   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14341   # "foo.exe" is OK but "foo" is an error.
14342   #
14343   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14344   # It is also a way to make sure we got the proper file name for the real test later on.
14345   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14346   if test "x$test_shortpath" = x; then
14347     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14348 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14349     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14350   fi
14351 
14352   # Call helper function which possibly converts this using DOS-style short mode.
14353   # If so, the updated path is stored in $new_path.
14354 
14355   input_path="$new_path"
14356   # Check if we need to convert this using DOS-style short mode. If the path
14357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14358   # take no chances and rewrite it.
14359   # Note: m4 eats our [], so we need to use [ and ] instead.
14360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14361   if test "x$has_forbidden_chars" != x; then
14362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14363     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14364     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14365     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14366       # Going to short mode and back again did indeed matter. Since short mode is
14367       # case insensitive, let's make it lowercase to improve readability.
14368       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14369       # Now convert it back to Unix-stile (cygpath)
14370       input_path=`$CYGPATH -u "$shortmode_path"`
14371       new_path="$input_path"
14372     fi
14373   fi
14374 
14375   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14376   if test "x$test_cygdrive_prefix" = x; then
14377     # As a simple fix, exclude /usr/bin since it's not a real path.
14378     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14379       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14380       # a path prefixed by /cygdrive for fixpath to work.
14381       new_path="$CYGWIN_ROOT_PATH$input_path"
14382     fi
14383   fi
14384 
14385 
14386   if test "x$path" != "x$new_path"; then
14387     BOOT_JDK="$new_path"
14388     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14389 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14390   fi
14391 
14392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14393 
14394   path="$BOOT_JDK"
14395   has_colon=`$ECHO $path | $GREP ^.:`
14396   new_path="$path"
14397   if test "x$has_colon" = x; then
14398     # Not in mixed or Windows style, start by that.
14399     new_path=`cmd //c echo $path`
14400   fi
14401 
14402 
14403   input_path="$new_path"
14404   # Check if we need to convert this using DOS-style short mode. If the path
14405   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14406   # take no chances and rewrite it.
14407   # Note: m4 eats our [], so we need to use [ and ] instead.
14408   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14409   if test "x$has_forbidden_chars" != x; then
14410     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14411     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14412   fi
14413 
14414 
14415   windows_path="$new_path"
14416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14417     unix_path=`$CYGPATH -u "$windows_path"`
14418     new_path="$unix_path"
14419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14421     new_path="$unix_path"
14422   fi
14423 
14424   if test "x$path" != "x$new_path"; then
14425     BOOT_JDK="$new_path"
14426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14427 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14428   fi
14429 
14430   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14431   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14432 
14433   else
14434     # We're on a posix platform. Hooray! :)
14435     path="$BOOT_JDK"
14436     has_space=`$ECHO "$path" | $GREP " "`
14437     if test "x$has_space" != x; then
14438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14439 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14440       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14441     fi
14442 
14443     # Use eval to expand a potential ~
14444     eval path="$path"
14445     if test ! -f "$path" && test ! -d "$path"; then
14446       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14447     fi
14448 
14449     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14450   fi
14451 
14452               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14453 $as_echo_n "checking for Boot JDK... " >&6; }
14454               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14455 $as_echo "$BOOT_JDK" >&6; }
14456               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14457 $as_echo_n "checking Boot JDK version... " >&6; }
14458               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14459               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14460 $as_echo "$BOOT_JDK_VERSION" >&6; }
14461             fi # end check jdk version
14462           fi # end check rt.jar
14463         fi # end check javac
14464       fi # end check java
14465     fi # end check boot jdk found
14466   fi
14467 
14468     done
14469   fi
14470 
14471 
14472     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14473     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14474       # Do we have a bin/java?
14475       if test ! -x "$BOOT_JDK/bin/java"; then
14476         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14477 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14478         BOOT_JDK_FOUND=no
14479       else
14480         # Do we have a bin/javac?
14481         if test ! -x "$BOOT_JDK/bin/javac"; then
14482           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14483 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14484           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14485 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14486           BOOT_JDK_FOUND=no
14487         else
14488           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14489           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14490             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14491 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14492             BOOT_JDK_FOUND=no
14493           else
14494             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14495             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14496 
14497             # Extra M4 quote needed to protect [] in grep expression.
14498             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14499             if test "x$FOUND_VERSION_78" = x; then
14500               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14501 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14502               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14503 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14504               BOOT_JDK_FOUND=no
14505             else
14506               # We're done! :-)
14507               BOOT_JDK_FOUND=yes
14508 
14509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14510 
14511   # Input might be given as Windows format, start by converting to
14512   # unix format.
14513   path="$BOOT_JDK"
14514   new_path=`$CYGPATH -u "$path"`
14515 
14516   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14517   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14518   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14519   # "foo.exe" is OK but "foo" is an error.
14520   #
14521   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14522   # It is also a way to make sure we got the proper file name for the real test later on.
14523   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14524   if test "x$test_shortpath" = x; then
14525     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14526 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14527     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14528   fi
14529 
14530   # Call helper function which possibly converts this using DOS-style short mode.
14531   # If so, the updated path is stored in $new_path.
14532 
14533   input_path="$new_path"
14534   # Check if we need to convert this using DOS-style short mode. If the path
14535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14536   # take no chances and rewrite it.
14537   # Note: m4 eats our [], so we need to use [ and ] instead.
14538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14539   if test "x$has_forbidden_chars" != x; then
14540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14541     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14542     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14543     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14544       # Going to short mode and back again did indeed matter. Since short mode is
14545       # case insensitive, let's make it lowercase to improve readability.
14546       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14547       # Now convert it back to Unix-stile (cygpath)
14548       input_path=`$CYGPATH -u "$shortmode_path"`
14549       new_path="$input_path"
14550     fi
14551   fi
14552 
14553   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14554   if test "x$test_cygdrive_prefix" = x; then
14555     # As a simple fix, exclude /usr/bin since it's not a real path.
14556     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14557       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14558       # a path prefixed by /cygdrive for fixpath to work.
14559       new_path="$CYGWIN_ROOT_PATH$input_path"
14560     fi
14561   fi
14562 
14563 
14564   if test "x$path" != "x$new_path"; then
14565     BOOT_JDK="$new_path"
14566     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14567 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14568   fi
14569 
14570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14571 
14572   path="$BOOT_JDK"
14573   has_colon=`$ECHO $path | $GREP ^.:`
14574   new_path="$path"
14575   if test "x$has_colon" = x; then
14576     # Not in mixed or Windows style, start by that.
14577     new_path=`cmd //c echo $path`
14578   fi
14579 
14580 
14581   input_path="$new_path"
14582   # Check if we need to convert this using DOS-style short mode. If the path
14583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14584   # take no chances and rewrite it.
14585   # Note: m4 eats our [], so we need to use [ and ] instead.
14586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14587   if test "x$has_forbidden_chars" != x; then
14588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14589     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14590   fi
14591 
14592 
14593   windows_path="$new_path"
14594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14595     unix_path=`$CYGPATH -u "$windows_path"`
14596     new_path="$unix_path"
14597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14599     new_path="$unix_path"
14600   fi
14601 
14602   if test "x$path" != "x$new_path"; then
14603     BOOT_JDK="$new_path"
14604     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14605 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14606   fi
14607 
14608   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14609   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14610 
14611   else
14612     # We're on a posix platform. Hooray! :)
14613     path="$BOOT_JDK"
14614     has_space=`$ECHO "$path" | $GREP " "`
14615     if test "x$has_space" != x; then
14616       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14617 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14618       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14619     fi
14620 
14621     # Use eval to expand a potential ~
14622     eval path="$path"
14623     if test ! -f "$path" && test ! -d "$path"; then
14624       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14625     fi
14626 
14627     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14628   fi
14629 
14630               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14631 $as_echo_n "checking for Boot JDK... " >&6; }
14632               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14633 $as_echo "$BOOT_JDK" >&6; }
14634               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14635 $as_echo_n "checking Boot JDK version... " >&6; }
14636               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14637               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14638 $as_echo "$BOOT_JDK_VERSION" >&6; }
14639             fi # end check jdk version
14640           fi # end check rt.jar
14641         fi # end check javac
14642       fi # end check java
14643     fi # end check boot jdk found
14644   fi
14645 
14646   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14647 
14648   if test "x$BOOT_JDK_FOUND" = xno; then
14649     # Now execute the test
14650 
14651   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14652   BOOT_JDK_SUFFIX="/Contents/Home"
14653   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14654   if test "x$ALL_JDKS_FOUND" != x; then
14655     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14656 
14657   if test "x$BOOT_JDK_FOUND" = xno; then
14658     # Now execute the test
14659 
14660         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14661         if test -d "$BOOT_JDK"; then
14662           BOOT_JDK_FOUND=maybe
14663           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14664 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14665         fi
14666 
14667 
14668     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14669     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14670       # Do we have a bin/java?
14671       if test ! -x "$BOOT_JDK/bin/java"; then
14672         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14673 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14674         BOOT_JDK_FOUND=no
14675       else
14676         # Do we have a bin/javac?
14677         if test ! -x "$BOOT_JDK/bin/javac"; then
14678           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14679 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14680           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14681 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14682           BOOT_JDK_FOUND=no
14683         else
14684           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14685           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14686             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14688             BOOT_JDK_FOUND=no
14689           else
14690             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14691             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14692 
14693             # Extra M4 quote needed to protect [] in grep expression.
14694             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14695             if test "x$FOUND_VERSION_78" = x; then
14696               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14697 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14698               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14699 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14700               BOOT_JDK_FOUND=no
14701             else
14702               # We're done! :-)
14703               BOOT_JDK_FOUND=yes
14704 
14705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14706 
14707   # Input might be given as Windows format, start by converting to
14708   # unix format.
14709   path="$BOOT_JDK"
14710   new_path=`$CYGPATH -u "$path"`
14711 
14712   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14713   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14714   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14715   # "foo.exe" is OK but "foo" is an error.
14716   #
14717   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14718   # It is also a way to make sure we got the proper file name for the real test later on.
14719   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14720   if test "x$test_shortpath" = x; then
14721     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14722 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14723     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14724   fi
14725 
14726   # Call helper function which possibly converts this using DOS-style short mode.
14727   # If so, the updated path is stored in $new_path.
14728 
14729   input_path="$new_path"
14730   # Check if we need to convert this using DOS-style short mode. If the path
14731   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14732   # take no chances and rewrite it.
14733   # Note: m4 eats our [], so we need to use [ and ] instead.
14734   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14735   if test "x$has_forbidden_chars" != x; then
14736     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14737     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14738     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14739     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14740       # Going to short mode and back again did indeed matter. Since short mode is
14741       # case insensitive, let's make it lowercase to improve readability.
14742       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14743       # Now convert it back to Unix-stile (cygpath)
14744       input_path=`$CYGPATH -u "$shortmode_path"`
14745       new_path="$input_path"
14746     fi
14747   fi
14748 
14749   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14750   if test "x$test_cygdrive_prefix" = x; then
14751     # As a simple fix, exclude /usr/bin since it's not a real path.
14752     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14753       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14754       # a path prefixed by /cygdrive for fixpath to work.
14755       new_path="$CYGWIN_ROOT_PATH$input_path"
14756     fi
14757   fi
14758 
14759 
14760   if test "x$path" != "x$new_path"; then
14761     BOOT_JDK="$new_path"
14762     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14763 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14764   fi
14765 
14766   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14767 
14768   path="$BOOT_JDK"
14769   has_colon=`$ECHO $path | $GREP ^.:`
14770   new_path="$path"
14771   if test "x$has_colon" = x; then
14772     # Not in mixed or Windows style, start by that.
14773     new_path=`cmd //c echo $path`
14774   fi
14775 
14776 
14777   input_path="$new_path"
14778   # Check if we need to convert this using DOS-style short mode. If the path
14779   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14780   # take no chances and rewrite it.
14781   # Note: m4 eats our [], so we need to use [ and ] instead.
14782   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14783   if test "x$has_forbidden_chars" != x; then
14784     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14785     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14786   fi
14787 
14788 
14789   windows_path="$new_path"
14790   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14791     unix_path=`$CYGPATH -u "$windows_path"`
14792     new_path="$unix_path"
14793   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14794     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14795     new_path="$unix_path"
14796   fi
14797 
14798   if test "x$path" != "x$new_path"; then
14799     BOOT_JDK="$new_path"
14800     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14801 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14802   fi
14803 
14804   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14805   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14806 
14807   else
14808     # We're on a posix platform. Hooray! :)
14809     path="$BOOT_JDK"
14810     has_space=`$ECHO "$path" | $GREP " "`
14811     if test "x$has_space" != x; then
14812       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14813 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14814       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14815     fi
14816 
14817     # Use eval to expand a potential ~
14818     eval path="$path"
14819     if test ! -f "$path" && test ! -d "$path"; then
14820       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14821     fi
14822 
14823     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14824   fi
14825 
14826               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14827 $as_echo_n "checking for Boot JDK... " >&6; }
14828               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14829 $as_echo "$BOOT_JDK" >&6; }
14830               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14831 $as_echo_n "checking Boot JDK version... " >&6; }
14832               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14833               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14834 $as_echo "$BOOT_JDK_VERSION" >&6; }
14835             fi # end check jdk version
14836           fi # end check rt.jar
14837         fi # end check javac
14838       fi # end check java
14839     fi # end check boot jdk found
14840   fi
14841 
14842     done
14843   fi
14844 
14845 
14846     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14847     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14848       # Do we have a bin/java?
14849       if test ! -x "$BOOT_JDK/bin/java"; then
14850         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14851 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14852         BOOT_JDK_FOUND=no
14853       else
14854         # Do we have a bin/javac?
14855         if test ! -x "$BOOT_JDK/bin/javac"; then
14856           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14857 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14858           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14859 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14860           BOOT_JDK_FOUND=no
14861         else
14862           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14863           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14864             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14865 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14866             BOOT_JDK_FOUND=no
14867           else
14868             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14869             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14870 
14871             # Extra M4 quote needed to protect [] in grep expression.
14872             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14873             if test "x$FOUND_VERSION_78" = x; then
14874               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14875 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14876               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14877 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14878               BOOT_JDK_FOUND=no
14879             else
14880               # We're done! :-)
14881               BOOT_JDK_FOUND=yes
14882 
14883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14884 
14885   # Input might be given as Windows format, start by converting to
14886   # unix format.
14887   path="$BOOT_JDK"
14888   new_path=`$CYGPATH -u "$path"`
14889 
14890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14893   # "foo.exe" is OK but "foo" is an error.
14894   #
14895   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14896   # It is also a way to make sure we got the proper file name for the real test later on.
14897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14898   if test "x$test_shortpath" = x; then
14899     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14901     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14902   fi
14903 
14904   # Call helper function which possibly converts this using DOS-style short mode.
14905   # If so, the updated path is stored in $new_path.
14906 
14907   input_path="$new_path"
14908   # Check if we need to convert this using DOS-style short mode. If the path
14909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14910   # take no chances and rewrite it.
14911   # Note: m4 eats our [], so we need to use [ and ] instead.
14912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14913   if test "x$has_forbidden_chars" != x; then
14914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14918       # Going to short mode and back again did indeed matter. Since short mode is
14919       # case insensitive, let's make it lowercase to improve readability.
14920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14921       # Now convert it back to Unix-stile (cygpath)
14922       input_path=`$CYGPATH -u "$shortmode_path"`
14923       new_path="$input_path"
14924     fi
14925   fi
14926 
14927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14928   if test "x$test_cygdrive_prefix" = x; then
14929     # As a simple fix, exclude /usr/bin since it's not a real path.
14930     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14932       # a path prefixed by /cygdrive for fixpath to work.
14933       new_path="$CYGWIN_ROOT_PATH$input_path"
14934     fi
14935   fi
14936 
14937 
14938   if test "x$path" != "x$new_path"; then
14939     BOOT_JDK="$new_path"
14940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14942   fi
14943 
14944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14945 
14946   path="$BOOT_JDK"
14947   has_colon=`$ECHO $path | $GREP ^.:`
14948   new_path="$path"
14949   if test "x$has_colon" = x; then
14950     # Not in mixed or Windows style, start by that.
14951     new_path=`cmd //c echo $path`
14952   fi
14953 
14954 
14955   input_path="$new_path"
14956   # Check if we need to convert this using DOS-style short mode. If the path
14957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14958   # take no chances and rewrite it.
14959   # Note: m4 eats our [], so we need to use [ and ] instead.
14960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14961   if test "x$has_forbidden_chars" != x; then
14962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14963     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14964   fi
14965 
14966 
14967   windows_path="$new_path"
14968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14969     unix_path=`$CYGPATH -u "$windows_path"`
14970     new_path="$unix_path"
14971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14973     new_path="$unix_path"
14974   fi
14975 
14976   if test "x$path" != "x$new_path"; then
14977     BOOT_JDK="$new_path"
14978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14979 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14980   fi
14981 
14982   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14983   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14984 
14985   else
14986     # We're on a posix platform. Hooray! :)
14987     path="$BOOT_JDK"
14988     has_space=`$ECHO "$path" | $GREP " "`
14989     if test "x$has_space" != x; then
14990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14991 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14992       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14993     fi
14994 
14995     # Use eval to expand a potential ~
14996     eval path="$path"
14997     if test ! -f "$path" && test ! -d "$path"; then
14998       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14999     fi
15000 
15001     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15002   fi
15003 
15004               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15005 $as_echo_n "checking for Boot JDK... " >&6; }
15006               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15007 $as_echo "$BOOT_JDK" >&6; }
15008               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15009 $as_echo_n "checking Boot JDK version... " >&6; }
15010               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15011               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15012 $as_echo "$BOOT_JDK_VERSION" >&6; }
15013             fi # end check jdk version
15014           fi # end check rt.jar
15015         fi # end check javac
15016       fi # end check java
15017     fi # end check boot jdk found
15018   fi
15019 
15020 
15021   if test "x$BOOT_JDK_FOUND" = xno; then
15022     # Now execute the test
15023 
15024   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
15025   BOOT_JDK_SUFFIX="/Contents/Home"
15026   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15027   if test "x$ALL_JDKS_FOUND" != x; then
15028     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15029 
15030   if test "x$BOOT_JDK_FOUND" = xno; then
15031     # Now execute the test
15032 
15033         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15034         if test -d "$BOOT_JDK"; then
15035           BOOT_JDK_FOUND=maybe
15036           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15037 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15038         fi
15039 
15040 
15041     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15042     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15043       # Do we have a bin/java?
15044       if test ! -x "$BOOT_JDK/bin/java"; then
15045         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15046 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15047         BOOT_JDK_FOUND=no
15048       else
15049         # Do we have a bin/javac?
15050         if test ! -x "$BOOT_JDK/bin/javac"; then
15051           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15052 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15053           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15054 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15055           BOOT_JDK_FOUND=no
15056         else
15057           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15058           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15059             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15060 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15061             BOOT_JDK_FOUND=no
15062           else
15063             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15064             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15065 
15066             # Extra M4 quote needed to protect [] in grep expression.
15067             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15068             if test "x$FOUND_VERSION_78" = x; then
15069               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15070 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15071               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15072 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15073               BOOT_JDK_FOUND=no
15074             else
15075               # We're done! :-)
15076               BOOT_JDK_FOUND=yes
15077 
15078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15079 
15080   # Input might be given as Windows format, start by converting to
15081   # unix format.
15082   path="$BOOT_JDK"
15083   new_path=`$CYGPATH -u "$path"`
15084 
15085   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15086   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15087   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15088   # "foo.exe" is OK but "foo" is an error.
15089   #
15090   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15091   # It is also a way to make sure we got the proper file name for the real test later on.
15092   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15093   if test "x$test_shortpath" = x; then
15094     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15095 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15096     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15097   fi
15098 
15099   # Call helper function which possibly converts this using DOS-style short mode.
15100   # If so, the updated path is stored in $new_path.
15101 
15102   input_path="$new_path"
15103   # Check if we need to convert this using DOS-style short mode. If the path
15104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15105   # take no chances and rewrite it.
15106   # Note: m4 eats our [], so we need to use [ and ] instead.
15107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15108   if test "x$has_forbidden_chars" != x; then
15109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15110     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15111     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15112     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15113       # Going to short mode and back again did indeed matter. Since short mode is
15114       # case insensitive, let's make it lowercase to improve readability.
15115       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15116       # Now convert it back to Unix-stile (cygpath)
15117       input_path=`$CYGPATH -u "$shortmode_path"`
15118       new_path="$input_path"
15119     fi
15120   fi
15121 
15122   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15123   if test "x$test_cygdrive_prefix" = x; then
15124     # As a simple fix, exclude /usr/bin since it's not a real path.
15125     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15126       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15127       # a path prefixed by /cygdrive for fixpath to work.
15128       new_path="$CYGWIN_ROOT_PATH$input_path"
15129     fi
15130   fi
15131 
15132 
15133   if test "x$path" != "x$new_path"; then
15134     BOOT_JDK="$new_path"
15135     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15136 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15137   fi
15138 
15139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15140 
15141   path="$BOOT_JDK"
15142   has_colon=`$ECHO $path | $GREP ^.:`
15143   new_path="$path"
15144   if test "x$has_colon" = x; then
15145     # Not in mixed or Windows style, start by that.
15146     new_path=`cmd //c echo $path`
15147   fi
15148 
15149 
15150   input_path="$new_path"
15151   # Check if we need to convert this using DOS-style short mode. If the path
15152   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15153   # take no chances and rewrite it.
15154   # Note: m4 eats our [], so we need to use [ and ] instead.
15155   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15156   if test "x$has_forbidden_chars" != x; then
15157     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15158     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15159   fi
15160 
15161 
15162   windows_path="$new_path"
15163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15164     unix_path=`$CYGPATH -u "$windows_path"`
15165     new_path="$unix_path"
15166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15167     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15168     new_path="$unix_path"
15169   fi
15170 
15171   if test "x$path" != "x$new_path"; then
15172     BOOT_JDK="$new_path"
15173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15174 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15175   fi
15176 
15177   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15178   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15179 
15180   else
15181     # We're on a posix platform. Hooray! :)
15182     path="$BOOT_JDK"
15183     has_space=`$ECHO "$path" | $GREP " "`
15184     if test "x$has_space" != x; then
15185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15186 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15187       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15188     fi
15189 
15190     # Use eval to expand a potential ~
15191     eval path="$path"
15192     if test ! -f "$path" && test ! -d "$path"; then
15193       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15194     fi
15195 
15196     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15197   fi
15198 
15199               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15200 $as_echo_n "checking for Boot JDK... " >&6; }
15201               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15202 $as_echo "$BOOT_JDK" >&6; }
15203               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15204 $as_echo_n "checking Boot JDK version... " >&6; }
15205               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15206               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15207 $as_echo "$BOOT_JDK_VERSION" >&6; }
15208             fi # end check jdk version
15209           fi # end check rt.jar
15210         fi # end check javac
15211       fi # end check java
15212     fi # end check boot jdk found
15213   fi
15214 
15215     done
15216   fi
15217 
15218 
15219     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15220     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15221       # Do we have a bin/java?
15222       if test ! -x "$BOOT_JDK/bin/java"; then
15223         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15224 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15225         BOOT_JDK_FOUND=no
15226       else
15227         # Do we have a bin/javac?
15228         if test ! -x "$BOOT_JDK/bin/javac"; then
15229           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15230 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15231           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15232 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15233           BOOT_JDK_FOUND=no
15234         else
15235           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15236           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15237             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15238 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15239             BOOT_JDK_FOUND=no
15240           else
15241             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15242             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15243 
15244             # Extra M4 quote needed to protect [] in grep expression.
15245             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15246             if test "x$FOUND_VERSION_78" = x; then
15247               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15248 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15249               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15250 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15251               BOOT_JDK_FOUND=no
15252             else
15253               # We're done! :-)
15254               BOOT_JDK_FOUND=yes
15255 
15256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15257 
15258   # Input might be given as Windows format, start by converting to
15259   # unix format.
15260   path="$BOOT_JDK"
15261   new_path=`$CYGPATH -u "$path"`
15262 
15263   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15264   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15265   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15266   # "foo.exe" is OK but "foo" is an error.
15267   #
15268   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15269   # It is also a way to make sure we got the proper file name for the real test later on.
15270   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15271   if test "x$test_shortpath" = x; then
15272     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15273 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15274     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15275   fi
15276 
15277   # Call helper function which possibly converts this using DOS-style short mode.
15278   # If so, the updated path is stored in $new_path.
15279 
15280   input_path="$new_path"
15281   # Check if we need to convert this using DOS-style short mode. If the path
15282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283   # take no chances and rewrite it.
15284   # Note: m4 eats our [], so we need to use [ and ] instead.
15285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15286   if test "x$has_forbidden_chars" != x; then
15287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15289     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15290     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15291       # Going to short mode and back again did indeed matter. Since short mode is
15292       # case insensitive, let's make it lowercase to improve readability.
15293       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15294       # Now convert it back to Unix-stile (cygpath)
15295       input_path=`$CYGPATH -u "$shortmode_path"`
15296       new_path="$input_path"
15297     fi
15298   fi
15299 
15300   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15301   if test "x$test_cygdrive_prefix" = x; then
15302     # As a simple fix, exclude /usr/bin since it's not a real path.
15303     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15304       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15305       # a path prefixed by /cygdrive for fixpath to work.
15306       new_path="$CYGWIN_ROOT_PATH$input_path"
15307     fi
15308   fi
15309 
15310 
15311   if test "x$path" != "x$new_path"; then
15312     BOOT_JDK="$new_path"
15313     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15314 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15315   fi
15316 
15317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15318 
15319   path="$BOOT_JDK"
15320   has_colon=`$ECHO $path | $GREP ^.:`
15321   new_path="$path"
15322   if test "x$has_colon" = x; then
15323     # Not in mixed or Windows style, start by that.
15324     new_path=`cmd //c echo $path`
15325   fi
15326 
15327 
15328   input_path="$new_path"
15329   # Check if we need to convert this using DOS-style short mode. If the path
15330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15331   # take no chances and rewrite it.
15332   # Note: m4 eats our [], so we need to use [ and ] instead.
15333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15334   if test "x$has_forbidden_chars" != x; then
15335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15336     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15337   fi
15338 
15339 
15340   windows_path="$new_path"
15341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15342     unix_path=`$CYGPATH -u "$windows_path"`
15343     new_path="$unix_path"
15344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15346     new_path="$unix_path"
15347   fi
15348 
15349   if test "x$path" != "x$new_path"; then
15350     BOOT_JDK="$new_path"
15351     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15352 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15353   fi
15354 
15355   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15356   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15357 
15358   else
15359     # We're on a posix platform. Hooray! :)
15360     path="$BOOT_JDK"
15361     has_space=`$ECHO "$path" | $GREP " "`
15362     if test "x$has_space" != x; then
15363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15364 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15365       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15366     fi
15367 
15368     # Use eval to expand a potential ~
15369     eval path="$path"
15370     if test ! -f "$path" && test ! -d "$path"; then
15371       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15372     fi
15373 
15374     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15375   fi
15376 
15377               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15378 $as_echo_n "checking for Boot JDK... " >&6; }
15379               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15380 $as_echo "$BOOT_JDK" >&6; }
15381               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15382 $as_echo_n "checking Boot JDK version... " >&6; }
15383               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15384               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15385 $as_echo "$BOOT_JDK_VERSION" >&6; }
15386             fi # end check jdk version
15387           fi # end check rt.jar
15388         fi # end check javac
15389       fi # end check java
15390     fi # end check boot jdk found
15391   fi
15392 
15393   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15394 
15395   if test "x$BOOT_JDK_FOUND" = xno; then
15396     # Now execute the test
15397 
15398   BOOT_JDK_PREFIX="/usr/lib/jvm"
15399   BOOT_JDK_SUFFIX=""
15400   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15401   if test "x$ALL_JDKS_FOUND" != x; then
15402     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15403 
15404   if test "x$BOOT_JDK_FOUND" = xno; then
15405     # Now execute the test
15406 
15407         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15408         if test -d "$BOOT_JDK"; then
15409           BOOT_JDK_FOUND=maybe
15410           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15411 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15412         fi
15413 
15414 
15415     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15416     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15417       # Do we have a bin/java?
15418       if test ! -x "$BOOT_JDK/bin/java"; then
15419         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15420 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15421         BOOT_JDK_FOUND=no
15422       else
15423         # Do we have a bin/javac?
15424         if test ! -x "$BOOT_JDK/bin/javac"; then
15425           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15426 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15427           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15428 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15429           BOOT_JDK_FOUND=no
15430         else
15431           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15432           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15433             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15435             BOOT_JDK_FOUND=no
15436           else
15437             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15438             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15439 
15440             # Extra M4 quote needed to protect [] in grep expression.
15441             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15442             if test "x$FOUND_VERSION_78" = x; then
15443               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15445               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15446 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15447               BOOT_JDK_FOUND=no
15448             else
15449               # We're done! :-)
15450               BOOT_JDK_FOUND=yes
15451 
15452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15453 
15454   # Input might be given as Windows format, start by converting to
15455   # unix format.
15456   path="$BOOT_JDK"
15457   new_path=`$CYGPATH -u "$path"`
15458 
15459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15462   # "foo.exe" is OK but "foo" is an error.
15463   #
15464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15465   # It is also a way to make sure we got the proper file name for the real test later on.
15466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15467   if test "x$test_shortpath" = x; then
15468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15469 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15470     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15471   fi
15472 
15473   # Call helper function which possibly converts this using DOS-style short mode.
15474   # If so, the updated path is stored in $new_path.
15475 
15476   input_path="$new_path"
15477   # Check if we need to convert this using DOS-style short mode. If the path
15478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15479   # take no chances and rewrite it.
15480   # Note: m4 eats our [], so we need to use [ and ] instead.
15481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15482   if test "x$has_forbidden_chars" != x; then
15483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15487       # Going to short mode and back again did indeed matter. Since short mode is
15488       # case insensitive, let's make it lowercase to improve readability.
15489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15490       # Now convert it back to Unix-stile (cygpath)
15491       input_path=`$CYGPATH -u "$shortmode_path"`
15492       new_path="$input_path"
15493     fi
15494   fi
15495 
15496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15497   if test "x$test_cygdrive_prefix" = x; then
15498     # As a simple fix, exclude /usr/bin since it's not a real path.
15499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15501       # a path prefixed by /cygdrive for fixpath to work.
15502       new_path="$CYGWIN_ROOT_PATH$input_path"
15503     fi
15504   fi
15505 
15506 
15507   if test "x$path" != "x$new_path"; then
15508     BOOT_JDK="$new_path"
15509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15510 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15511   fi
15512 
15513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15514 
15515   path="$BOOT_JDK"
15516   has_colon=`$ECHO $path | $GREP ^.:`
15517   new_path="$path"
15518   if test "x$has_colon" = x; then
15519     # Not in mixed or Windows style, start by that.
15520     new_path=`cmd //c echo $path`
15521   fi
15522 
15523 
15524   input_path="$new_path"
15525   # Check if we need to convert this using DOS-style short mode. If the path
15526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15527   # take no chances and rewrite it.
15528   # Note: m4 eats our [], so we need to use [ and ] instead.
15529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15530   if test "x$has_forbidden_chars" != x; then
15531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15533   fi
15534 
15535 
15536   windows_path="$new_path"
15537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15538     unix_path=`$CYGPATH -u "$windows_path"`
15539     new_path="$unix_path"
15540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15542     new_path="$unix_path"
15543   fi
15544 
15545   if test "x$path" != "x$new_path"; then
15546     BOOT_JDK="$new_path"
15547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15549   fi
15550 
15551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15553 
15554   else
15555     # We're on a posix platform. Hooray! :)
15556     path="$BOOT_JDK"
15557     has_space=`$ECHO "$path" | $GREP " "`
15558     if test "x$has_space" != x; then
15559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15560 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15561       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15562     fi
15563 
15564     # Use eval to expand a potential ~
15565     eval path="$path"
15566     if test ! -f "$path" && test ! -d "$path"; then
15567       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15568     fi
15569 
15570     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15571   fi
15572 
15573               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15574 $as_echo_n "checking for Boot JDK... " >&6; }
15575               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15576 $as_echo "$BOOT_JDK" >&6; }
15577               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15578 $as_echo_n "checking Boot JDK version... " >&6; }
15579               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15580               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15581 $as_echo "$BOOT_JDK_VERSION" >&6; }
15582             fi # end check jdk version
15583           fi # end check rt.jar
15584         fi # end check javac
15585       fi # end check java
15586     fi # end check boot jdk found
15587   fi
15588 
15589     done
15590   fi
15591 
15592 
15593     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15594     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15595       # Do we have a bin/java?
15596       if test ! -x "$BOOT_JDK/bin/java"; then
15597         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15598 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15599         BOOT_JDK_FOUND=no
15600       else
15601         # Do we have a bin/javac?
15602         if test ! -x "$BOOT_JDK/bin/javac"; then
15603           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15604 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15605           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15606 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15607           BOOT_JDK_FOUND=no
15608         else
15609           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15610           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15611             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15612 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15613             BOOT_JDK_FOUND=no
15614           else
15615             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15616             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15617 
15618             # Extra M4 quote needed to protect [] in grep expression.
15619             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15620             if test "x$FOUND_VERSION_78" = x; then
15621               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15623               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15624 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15625               BOOT_JDK_FOUND=no
15626             else
15627               # We're done! :-)
15628               BOOT_JDK_FOUND=yes
15629 
15630   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15631 
15632   # Input might be given as Windows format, start by converting to
15633   # unix format.
15634   path="$BOOT_JDK"
15635   new_path=`$CYGPATH -u "$path"`
15636 
15637   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15638   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15639   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15640   # "foo.exe" is OK but "foo" is an error.
15641   #
15642   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15643   # It is also a way to make sure we got the proper file name for the real test later on.
15644   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15645   if test "x$test_shortpath" = x; then
15646     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15647 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15648     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15649   fi
15650 
15651   # Call helper function which possibly converts this using DOS-style short mode.
15652   # If so, the updated path is stored in $new_path.
15653 
15654   input_path="$new_path"
15655   # Check if we need to convert this using DOS-style short mode. If the path
15656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15657   # take no chances and rewrite it.
15658   # Note: m4 eats our [], so we need to use [ and ] instead.
15659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15660   if test "x$has_forbidden_chars" != x; then
15661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15662     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15663     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15664     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15665       # Going to short mode and back again did indeed matter. Since short mode is
15666       # case insensitive, let's make it lowercase to improve readability.
15667       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15668       # Now convert it back to Unix-stile (cygpath)
15669       input_path=`$CYGPATH -u "$shortmode_path"`
15670       new_path="$input_path"
15671     fi
15672   fi
15673 
15674   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15675   if test "x$test_cygdrive_prefix" = x; then
15676     # As a simple fix, exclude /usr/bin since it's not a real path.
15677     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15678       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15679       # a path prefixed by /cygdrive for fixpath to work.
15680       new_path="$CYGWIN_ROOT_PATH$input_path"
15681     fi
15682   fi
15683 
15684 
15685   if test "x$path" != "x$new_path"; then
15686     BOOT_JDK="$new_path"
15687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15688 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15689   fi
15690 
15691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15692 
15693   path="$BOOT_JDK"
15694   has_colon=`$ECHO $path | $GREP ^.:`
15695   new_path="$path"
15696   if test "x$has_colon" = x; then
15697     # Not in mixed or Windows style, start by that.
15698     new_path=`cmd //c echo $path`
15699   fi
15700 
15701 
15702   input_path="$new_path"
15703   # Check if we need to convert this using DOS-style short mode. If the path
15704   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15705   # take no chances and rewrite it.
15706   # Note: m4 eats our [], so we need to use [ and ] instead.
15707   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15708   if test "x$has_forbidden_chars" != x; then
15709     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15710     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15711   fi
15712 
15713 
15714   windows_path="$new_path"
15715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15716     unix_path=`$CYGPATH -u "$windows_path"`
15717     new_path="$unix_path"
15718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15720     new_path="$unix_path"
15721   fi
15722 
15723   if test "x$path" != "x$new_path"; then
15724     BOOT_JDK="$new_path"
15725     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15726 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15727   fi
15728 
15729   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15730   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15731 
15732   else
15733     # We're on a posix platform. Hooray! :)
15734     path="$BOOT_JDK"
15735     has_space=`$ECHO "$path" | $GREP " "`
15736     if test "x$has_space" != x; then
15737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15738 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15739       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15740     fi
15741 
15742     # Use eval to expand a potential ~
15743     eval path="$path"
15744     if test ! -f "$path" && test ! -d "$path"; then
15745       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15746     fi
15747 
15748     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15749   fi
15750 
15751               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15752 $as_echo_n "checking for Boot JDK... " >&6; }
15753               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15754 $as_echo "$BOOT_JDK" >&6; }
15755               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15756 $as_echo_n "checking Boot JDK version... " >&6; }
15757               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15758               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15759 $as_echo "$BOOT_JDK_VERSION" >&6; }
15760             fi # end check jdk version
15761           fi # end check rt.jar
15762         fi # end check javac
15763       fi # end check java
15764     fi # end check boot jdk found
15765   fi
15766 
15767   fi
15768 
15769 
15770     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15771     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15772       # Do we have a bin/java?
15773       if test ! -x "$BOOT_JDK/bin/java"; then
15774         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15775 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15776         BOOT_JDK_FOUND=no
15777       else
15778         # Do we have a bin/javac?
15779         if test ! -x "$BOOT_JDK/bin/javac"; then
15780           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15781 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15782           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15783 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15784           BOOT_JDK_FOUND=no
15785         else
15786           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15787           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15788             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15789 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15790             BOOT_JDK_FOUND=no
15791           else
15792             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15793             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15794 
15795             # Extra M4 quote needed to protect [] in grep expression.
15796             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15797             if test "x$FOUND_VERSION_78" = x; then
15798               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15799 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15800               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15801 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15802               BOOT_JDK_FOUND=no
15803             else
15804               # We're done! :-)
15805               BOOT_JDK_FOUND=yes
15806 
15807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15808 
15809   # Input might be given as Windows format, start by converting to
15810   # unix format.
15811   path="$BOOT_JDK"
15812   new_path=`$CYGPATH -u "$path"`
15813 
15814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15817   # "foo.exe" is OK but "foo" is an error.
15818   #
15819   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15820   # It is also a way to make sure we got the proper file name for the real test later on.
15821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15822   if test "x$test_shortpath" = x; then
15823     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15824 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15825     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15826   fi
15827 
15828   # Call helper function which possibly converts this using DOS-style short mode.
15829   # If so, the updated path is stored in $new_path.
15830 
15831   input_path="$new_path"
15832   # Check if we need to convert this using DOS-style short mode. If the path
15833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15834   # take no chances and rewrite it.
15835   # Note: m4 eats our [], so we need to use [ and ] instead.
15836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15837   if test "x$has_forbidden_chars" != x; then
15838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15839     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15840     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15841     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15842       # Going to short mode and back again did indeed matter. Since short mode is
15843       # case insensitive, let's make it lowercase to improve readability.
15844       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15845       # Now convert it back to Unix-stile (cygpath)
15846       input_path=`$CYGPATH -u "$shortmode_path"`
15847       new_path="$input_path"
15848     fi
15849   fi
15850 
15851   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15852   if test "x$test_cygdrive_prefix" = x; then
15853     # As a simple fix, exclude /usr/bin since it's not a real path.
15854     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15855       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15856       # a path prefixed by /cygdrive for fixpath to work.
15857       new_path="$CYGWIN_ROOT_PATH$input_path"
15858     fi
15859   fi
15860 
15861 
15862   if test "x$path" != "x$new_path"; then
15863     BOOT_JDK="$new_path"
15864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15865 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15866   fi
15867 
15868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15869 
15870   path="$BOOT_JDK"
15871   has_colon=`$ECHO $path | $GREP ^.:`
15872   new_path="$path"
15873   if test "x$has_colon" = x; then
15874     # Not in mixed or Windows style, start by that.
15875     new_path=`cmd //c echo $path`
15876   fi
15877 
15878 
15879   input_path="$new_path"
15880   # Check if we need to convert this using DOS-style short mode. If the path
15881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15882   # take no chances and rewrite it.
15883   # Note: m4 eats our [], so we need to use [ and ] instead.
15884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15885   if test "x$has_forbidden_chars" != x; then
15886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15887     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15888   fi
15889 
15890 
15891   windows_path="$new_path"
15892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15893     unix_path=`$CYGPATH -u "$windows_path"`
15894     new_path="$unix_path"
15895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15897     new_path="$unix_path"
15898   fi
15899 
15900   if test "x$path" != "x$new_path"; then
15901     BOOT_JDK="$new_path"
15902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15903 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15904   fi
15905 
15906   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15907   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15908 
15909   else
15910     # We're on a posix platform. Hooray! :)
15911     path="$BOOT_JDK"
15912     has_space=`$ECHO "$path" | $GREP " "`
15913     if test "x$has_space" != x; then
15914       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15915 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15916       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15917     fi
15918 
15919     # Use eval to expand a potential ~
15920     eval path="$path"
15921     if test ! -f "$path" && test ! -d "$path"; then
15922       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15923     fi
15924 
15925     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15926   fi
15927 
15928               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15929 $as_echo_n "checking for Boot JDK... " >&6; }
15930               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15931 $as_echo "$BOOT_JDK" >&6; }
15932               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15933 $as_echo_n "checking Boot JDK version... " >&6; }
15934               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15935               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15936 $as_echo "$BOOT_JDK_VERSION" >&6; }
15937             fi # end check jdk version
15938           fi # end check rt.jar
15939         fi # end check javac
15940       fi # end check java
15941     fi # end check boot jdk found
15942   fi
15943 
15944 
15945   # If we haven't found anything yet, we've truly lost. Give up.
15946   if test "x$BOOT_JDK_FOUND" = xno; then
15947 
15948   # Print a helpful message on how to acquire the necessary build dependency.
15949   # openjdk is the help tag: freetype, cups, pulse, alsa etc
15950   MISSING_DEPENDENCY=openjdk
15951 
15952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953     cygwin_help $MISSING_DEPENDENCY
15954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15955     msys_help $MISSING_DEPENDENCY
15956   else
15957     PKGHANDLER_COMMAND=
15958 
15959     case $PKGHANDLER in
15960       apt-get)
15961         apt_help     $MISSING_DEPENDENCY ;;
15962       yum)
15963         yum_help     $MISSING_DEPENDENCY ;;
15964       port)
15965         port_help    $MISSING_DEPENDENCY ;;
15966       pkgutil)
15967         pkgutil_help $MISSING_DEPENDENCY ;;
15968       pkgadd)
15969         pkgadd_help  $MISSING_DEPENDENCY ;;
15970     esac
15971 
15972     if test "x$PKGHANDLER_COMMAND" != x; then
15973       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15974     fi
15975   fi
15976 
15977     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15978 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15979     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15980 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15981     as_fn_error $? "Cannot continue" "$LINENO" 5
15982   fi
15983 
15984   # Setup proper paths for what we found
15985   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15986   if test ! -f "$BOOT_RTJAR"; then
15987     # On MacOSX it is called classes.jar
15988     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15989     if test -f "$BOOT_RTJAR"; then
15990       # Remove the ..
15991       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15992     fi
15993   fi
15994   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15995   BOOT_JDK="$BOOT_JDK"
15996 
15997 
15998 
15999 
16000   # Setup tools from the Boot JDK.
16001 
16002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
16003 $as_echo_n "checking for java in Boot JDK... " >&6; }
16004   JAVA=$BOOT_JDK/bin/java
16005   if test ! -x $JAVA; then
16006     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16007 $as_echo "not found" >&6; }
16008     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16009 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16010     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
16011   fi
16012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16013 $as_echo "ok" >&6; }
16014 
16015 
16016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
16017 $as_echo_n "checking for javac in Boot JDK... " >&6; }
16018   JAVAC=$BOOT_JDK/bin/javac
16019   if test ! -x $JAVAC; then
16020     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16021 $as_echo "not found" >&6; }
16022     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16023 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16024     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
16025   fi
16026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16027 $as_echo "ok" >&6; }
16028 
16029 
16030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
16031 $as_echo_n "checking for javah in Boot JDK... " >&6; }
16032   JAVAH=$BOOT_JDK/bin/javah
16033   if test ! -x $JAVAH; then
16034     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16035 $as_echo "not found" >&6; }
16036     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16037 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16038     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
16039   fi
16040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16041 $as_echo "ok" >&6; }
16042 
16043 
16044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
16045 $as_echo_n "checking for javap in Boot JDK... " >&6; }
16046   JAVAP=$BOOT_JDK/bin/javap
16047   if test ! -x $JAVAP; then
16048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16049 $as_echo "not found" >&6; }
16050     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16051 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16052     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
16053   fi
16054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16055 $as_echo "ok" >&6; }
16056 
16057 
16058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16059 $as_echo_n "checking for jar in Boot JDK... " >&6; }
16060   JAR=$BOOT_JDK/bin/jar
16061   if test ! -x $JAR; then
16062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16063 $as_echo "not found" >&6; }
16064     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16065 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16066     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16067   fi
16068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16069 $as_echo "ok" >&6; }
16070 
16071 
16072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16073 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16074   RMIC=$BOOT_JDK/bin/rmic
16075   if test ! -x $RMIC; then
16076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16077 $as_echo "not found" >&6; }
16078     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16079 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16080     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16081   fi
16082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16083 $as_echo "ok" >&6; }
16084 
16085 
16086   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16087 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16088   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16089   if test ! -x $NATIVE2ASCII; then
16090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16091 $as_echo "not found" >&6; }
16092     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16093 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16094     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16095   fi
16096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16097 $as_echo "ok" >&6; }
16098 
16099 
16100   # Finally, set some other options...
16101 
16102   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16103   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16104 
16105 
16106 
16107   # Check if the boot jdk is 32 or 64 bit
16108   if "$JAVA" -d64 -version > /dev/null 2>&1; then
16109     BOOT_JDK_BITS="64"
16110   else
16111     BOOT_JDK_BITS="32"
16112   fi
16113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
16114 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
16115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
16116 $as_echo "$BOOT_JDK_BITS" >&6; }
16117 
16118 
16119 
16120   ##############################################################################
16121   #
16122   # Specify options for anything that is run with the Boot JDK.
16123   #
16124 
16125 # Check whether --with-boot-jdk-jvmargs was given.
16126 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16127   withval=$with_boot_jdk_jvmargs;
16128 fi
16129 
16130 
16131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
16132 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
16133 
16134   # Disable special log output when a debug build is used as Boot JDK...
16135 
16136   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16137   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16138   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16139   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16140   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16141   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16142     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16143     JVM_ARG_OK=true
16144   else
16145     $ECHO "Arg failed:" >&5
16146     $ECHO "$OUTPUT" >&5
16147     JVM_ARG_OK=false
16148   fi
16149 
16150 
16151   # Apply user provided options.
16152 
16153   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
16154   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
16155   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
16156   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16157   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16158   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16159     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
16160     JVM_ARG_OK=true
16161   else
16162     $ECHO "Arg failed:" >&5
16163     $ECHO "$OUTPUT" >&5
16164     JVM_ARG_OK=false
16165   fi
16166 
16167 
16168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
16169 $as_echo "$boot_jdk_jvmargs" >&6; }
16170 
16171   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
16172   JAVA_FLAGS=$boot_jdk_jvmargs
16173 
16174 
16175 
16176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
16177 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
16178 
16179   # Starting amount of heap memory.
16180 
16181   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16182   $ECHO "Command: $JAVA -Xms64M -version" >&5
16183   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16184   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16185   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16186   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16187     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
16188     JVM_ARG_OK=true
16189   else
16190     $ECHO "Arg failed:" >&5
16191     $ECHO "$OUTPUT" >&5
16192     JVM_ARG_OK=false
16193   fi
16194 
16195 
16196   # Maximum amount of heap memory.
16197   # Maximum stack size.
16198   if test "x$BOOT_JDK_BITS" = x32; then
16199     JVM_MAX_HEAP=1100M
16200     STACK_SIZE=768
16201   else
16202     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
16203     # pointers are used. Apparently, we need to increase the heap and stack
16204     # space for the jvm. More specifically, when running javac to build huge
16205     # jdk batch
16206     JVM_MAX_HEAP=1600M
16207     STACK_SIZE=1536
16208   fi
16209 
16210   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
16211   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
16212   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
16213   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16214   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16215   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16216     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
16217     JVM_ARG_OK=true
16218   else
16219     $ECHO "Arg failed:" >&5
16220     $ECHO "$OUTPUT" >&5
16221     JVM_ARG_OK=false
16222   fi
16223 
16224 
16225   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16226   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16227   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16228   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16229   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16230   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16231     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
16232     JVM_ARG_OK=true
16233   else
16234     $ECHO "Arg failed:" >&5
16235     $ECHO "$OUTPUT" >&5
16236     JVM_ARG_OK=false
16237   fi
16238 
16239 
16240   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16241   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16242   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16243   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16244   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16245   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16246     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
16247     JVM_ARG_OK=true
16248   else
16249     $ECHO "Arg failed:" >&5
16250     $ECHO "$OUTPUT" >&5
16251     JVM_ARG_OK=false
16252   fi
16253 
16254 
16255   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16256   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16257   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16258   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16259   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16260   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16261     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
16262     JVM_ARG_OK=true
16263   else
16264     $ECHO "Arg failed:" >&5
16265     $ECHO "$OUTPUT" >&5
16266     JVM_ARG_OK=false
16267   fi
16268 
16269 
16270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
16271 $as_echo "$boot_jdk_jvmargs_big" >&6; }
16272 
16273   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
16274 
16275 
16276 
16277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
16278 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
16279 
16280   # Use serial gc for small short lived tools if possible
16281 
16282   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
16283   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
16284   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
16285   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16286   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16287   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16288     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
16289     JVM_ARG_OK=true
16290   else
16291     $ECHO "Arg failed:" >&5
16292     $ECHO "$OUTPUT" >&5
16293     JVM_ARG_OK=false
16294   fi
16295 
16296 
16297   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
16298   $ECHO "Command: $JAVA -Xms32M -version" >&5
16299   OUTPUT=`$JAVA -Xms32M -version 2>&1`
16300   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16301   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16302   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16303     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
16304     JVM_ARG_OK=true
16305   else
16306     $ECHO "Arg failed:" >&5
16307     $ECHO "$OUTPUT" >&5
16308     JVM_ARG_OK=false
16309   fi
16310 
16311 
16312   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
16313   $ECHO "Command: $JAVA -Xmx512M -version" >&5
16314   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
16315   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16316   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16317   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16318     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
16319     JVM_ARG_OK=true
16320   else
16321     $ECHO "Arg failed:" >&5
16322     $ECHO "$OUTPUT" >&5
16323     JVM_ARG_OK=false
16324   fi
16325 
16326 
16327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
16328 $as_echo "$boot_jdk_jvmargs_small" >&6; }
16329 
16330   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
16331 
16332 
16333 
16334 ###############################################################################
16335 #
16336 # Configure the sources to use. We can add or override individual directories.
16337 #
16338 ###############################################################################
16339 
16340 
16341   # Where are the sources. Any of these can be overridden
16342   # using --with-override-corba and the likes.
16343   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16344   CORBA_TOPDIR="$SRC_ROOT/corba"
16345   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16346   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16347   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16348   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16349   JDK_TOPDIR="$SRC_ROOT/jdk"
16350 
16351 
16352 
16353 
16354 
16355 
16356 
16357 
16358 
16359 
16360   ###############################################################################
16361   #
16362   # Pickup additional source for a component from outside of the source root
16363   # or override source for a component.
16364   #
16365 
16366 # Check whether --with-add-source-root was given.
16367 if test "${with_add_source_root+set}" = set; then :
16368   withval=$with_add_source_root;
16369 fi
16370 
16371 
16372 
16373 # Check whether --with-override-source-root was given.
16374 if test "${with_override_source_root+set}" = set; then :
16375   withval=$with_override_source_root;
16376 fi
16377 
16378 
16379 
16380 # Check whether --with-adds-and-overrides was given.
16381 if test "${with_adds_and_overrides+set}" = set; then :
16382   withval=$with_adds_and_overrides;
16383 fi
16384 
16385 
16386   if test "x$with_adds_and_overrides" != x; then
16387     with_add_source_root="$with_adds_and_overrides/adds"
16388     with_override_source_root="$with_adds_and_overrides/overrides"
16389   fi
16390 
16391   if test "x$with_add_source_root" != x; then
16392     if ! test -d $with_add_source_root; then
16393       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16394     fi
16395     CURDIR="$PWD"
16396     cd "$with_add_source_root"
16397     ADD_SRC_ROOT="`pwd`"
16398     cd "$CURDIR"
16399     # Verify that the addon source root does not have any root makefiles.
16400     # If it does, then it is usually an error, prevent this.
16401     if test -f $with_add_source_root/langtools/make/Makefile; then
16402       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
16403     fi
16404     if test -f $with_add_source_root/corba/make/Makefile; then
16405       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
16406     fi
16407     if test -f $with_add_source_root/jaxp/make/Makefile; then
16408       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
16409     fi
16410     if test -f $with_add_source_root/jaxws/make/Makefile; then
16411       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
16412     fi
16413     if test -f $with_add_source_root/hotspot/make/Makefile; then
16414       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
16415     fi
16416     if test -f $with_add_source_root/nashorn/make/Makefile; then
16417       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
16418     fi
16419     if test -f $with_add_source_root/jdk/make/Makefile; then
16420       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
16421     fi
16422   fi
16423 
16424 
16425   if test "x$with_override_source_root" != x; then
16426     if ! test -d $with_override_source_root; then
16427       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16428     fi
16429     CURDIR="$PWD"
16430     cd "$with_override_source_root"
16431     OVERRIDE_SRC_ROOT="`pwd`"
16432     cd "$CURDIR"
16433     if test -f $with_override_source_root/langtools/make/Makefile; then
16434       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
16435     fi
16436     if test -f $with_override_source_root/corba/make/Makefile; then
16437       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
16438     fi
16439     if test -f $with_override_source_root/jaxp/make/Makefile; then
16440       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
16441     fi
16442     if test -f $with_override_source_root/jaxws/make/Makefile; then
16443       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
16444     fi
16445     if test -f $with_override_source_root/hotspot/make/Makefile; then
16446       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
16447     fi
16448     if test -f $with_override_source_root/nashorn/make/Makefile; then
16449       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
16450     fi
16451     if test -f $with_override_source_root/jdk/make/Makefile; then
16452       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
16453     fi
16454   fi
16455 
16456 
16457   ###############################################################################
16458   #
16459   # Override a repo completely, this is used for example when you have 3 small
16460   # development sandboxes of the langtools sources and want to avoid having 3 full
16461   # OpenJDK sources checked out on disk.
16462   #
16463   # Assuming that the 3 langtools sandboxes are located here:
16464   # /home/fredrik/sandbox1/langtools
16465   # /home/fredrik/sandbox2/langtools
16466   # /home/fredrik/sandbox3/langtools
16467   #
16468   # From the source root you create build subdirs manually:
16469   #     mkdir -p build1 build2 build3
16470   # in each build directory run:
16471   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16472   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16473   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16474   #
16475 
16476 
16477 # Check whether --with-override-langtools was given.
16478 if test "${with_override_langtools+set}" = set; then :
16479   withval=$with_override_langtools;
16480 fi
16481 
16482 
16483 
16484 # Check whether --with-override-corba was given.
16485 if test "${with_override_corba+set}" = set; then :
16486   withval=$with_override_corba;
16487 fi
16488 
16489 
16490 
16491 # Check whether --with-override-jaxp was given.
16492 if test "${with_override_jaxp+set}" = set; then :
16493   withval=$with_override_jaxp;
16494 fi
16495 
16496 
16497 
16498 # Check whether --with-override-jaxws was given.
16499 if test "${with_override_jaxws+set}" = set; then :
16500   withval=$with_override_jaxws;
16501 fi
16502 
16503 
16504 
16505 # Check whether --with-override-hotspot was given.
16506 if test "${with_override_hotspot+set}" = set; then :
16507   withval=$with_override_hotspot;
16508 fi
16509 
16510 
16511 
16512 # Check whether --with-override-nashorn was given.
16513 if test "${with_override_nashorn+set}" = set; then :
16514   withval=$with_override_nashorn;
16515 fi
16516 
16517 
16518 
16519 # Check whether --with-override-jdk was given.
16520 if test "${with_override_jdk+set}" = set; then :
16521   withval=$with_override_jdk;
16522 fi
16523 
16524 
16525   if test "x$with_override_langtools" != x; then
16526     CURDIR="$PWD"
16527     cd "$with_override_langtools"
16528     LANGTOOLS_TOPDIR="`pwd`"
16529     cd "$CURDIR"
16530     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16531       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16532     fi
16533     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16534 $as_echo_n "checking if langtools should be overridden... " >&6; }
16535     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16536 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16537   fi
16538   if test "x$with_override_corba" != x; then
16539     CURDIR="$PWD"
16540     cd "$with_override_corba"
16541     CORBA_TOPDIR="`pwd`"
16542     cd "$CURDIR"
16543     if ! test -f $CORBA_TOPDIR/make/Makefile; then
16544       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16545     fi
16546     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16547 $as_echo_n "checking if corba should be overridden... " >&6; }
16548     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16549 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16550   fi
16551   if test "x$with_override_jaxp" != x; then
16552     CURDIR="$PWD"
16553     cd "$with_override_jaxp"
16554     JAXP_TOPDIR="`pwd`"
16555     cd "$CURDIR"
16556     if ! test -f $JAXP_TOPDIR/make/Makefile; then
16557       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16558     fi
16559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16560 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16561     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16562 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16563   fi
16564   if test "x$with_override_jaxws" != x; then
16565     CURDIR="$PWD"
16566     cd "$with_override_jaxws"
16567     JAXWS_TOPDIR="`pwd`"
16568     cd "$CURDIR"
16569     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16570       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16571     fi
16572     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16573 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16574     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16575 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16576   fi
16577   if test "x$with_override_hotspot" != x; then
16578     CURDIR="$PWD"
16579     cd "$with_override_hotspot"
16580     HOTSPOT_TOPDIR="`pwd`"
16581     cd "$CURDIR"
16582     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16583       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16584     fi
16585     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16586 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16588 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16589   fi
16590   if test "x$with_override_nashorn" != x; then
16591     CURDIR="$PWD"
16592     cd "$with_override_nashorn"
16593     NASHORN_TOPDIR="`pwd`"
16594     cd "$CURDIR"
16595     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16596       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16597     fi
16598     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16599 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16600     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16601 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16602   fi
16603   if test "x$with_override_jdk" != x; then
16604     CURDIR="$PWD"
16605     cd "$with_override_jdk"
16606     JDK_TOPDIR="`pwd`"
16607     cd "$CURDIR"
16608     if ! test -f $JDK_TOPDIR/make/Makefile; then
16609       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16610     fi
16611     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16612 $as_echo_n "checking if JDK should be overridden... " >&6; }
16613     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16614 $as_echo "yes with $JDK_TOPDIR" >&6; }
16615   fi
16616 
16617 
16618   BUILD_OUTPUT="$OUTPUT_ROOT"
16619 
16620 
16621   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16622   BUILD_HOTSPOT=true
16623 
16624 
16625 
16626 # Check whether --with-import-hotspot was given.
16627 if test "${with_import_hotspot+set}" = set; then :
16628   withval=$with_import_hotspot;
16629 fi
16630 
16631   if test "x$with_import_hotspot" != x; then
16632     CURDIR="$PWD"
16633     cd "$with_import_hotspot"
16634     HOTSPOT_DIST="`pwd`"
16635     cd "$CURDIR"
16636     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16637       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16638     fi
16639     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16640 $as_echo_n "checking if hotspot should be imported... " >&6; }
16641     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16642 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16643     BUILD_HOTSPOT=false
16644   fi
16645 
16646   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16647 
16648 
16649 ###############################################################################
16650 #
16651 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16652 # cross-compilation aware.
16653 #
16654 ###############################################################################
16655 
16656 
16657   ###############################################################################
16658   #
16659   # Configure the development tool paths and potential sysroot.
16660   #
16661   ac_ext=cpp
16662 ac_cpp='$CXXCPP $CPPFLAGS'
16663 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16664 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16665 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16666 
16667 
16668   # The option used to specify the target .o,.a or .so file.
16669   # When compiling, how to specify the to be created object file.
16670   CC_OUT_OPTION='-o$(SPACE)'
16671   # When linking, how to specify the to be created executable.
16672   EXE_OUT_OPTION='-o$(SPACE)'
16673   # When linking, how to specify the to be created dynamically linkable library.
16674   LD_OUT_OPTION='-o$(SPACE)'
16675   # When archiving, how to specify the to be create static archive for object files.
16676   AR_OUT_OPTION='rcs$(SPACE)'
16677 
16678 
16679 
16680 
16681 
16682 # Locate the actual tools
16683 
16684 
16685 # Check whether --with-jtreg was given.
16686 if test "${with_jtreg+set}" = set; then :
16687   withval=$with_jtreg;
16688 else
16689   with_jtreg=no
16690 fi
16691 
16692 
16693   if test "x$with_jtreg" = xno; then
16694     # jtreg disabled
16695     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16696 $as_echo_n "checking for jtreg... " >&6; }
16697     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16698 $as_echo "no" >&6; }
16699   else
16700     if test "x$with_jtreg" != xyes; then
16701       # with path specified.
16702       JT_HOME="$with_jtreg"
16703     fi
16704 
16705     if test "x$JT_HOME" != x; then
16706       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16707 $as_echo_n "checking for jtreg... " >&6; }
16708 
16709       # use JT_HOME enviroment var.
16710 
16711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16712 
16713   # Input might be given as Windows format, start by converting to
16714   # unix format.
16715   path="$JT_HOME"
16716   new_path=`$CYGPATH -u "$path"`
16717 
16718   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16719   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16720   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16721   # "foo.exe" is OK but "foo" is an error.
16722   #
16723   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16724   # It is also a way to make sure we got the proper file name for the real test later on.
16725   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16726   if test "x$test_shortpath" = x; then
16727     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16728 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16729     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16730   fi
16731 
16732   # Call helper function which possibly converts this using DOS-style short mode.
16733   # If so, the updated path is stored in $new_path.
16734 
16735   input_path="$new_path"
16736   # Check if we need to convert this using DOS-style short mode. If the path
16737   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16738   # take no chances and rewrite it.
16739   # Note: m4 eats our [], so we need to use [ and ] instead.
16740   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16741   if test "x$has_forbidden_chars" != x; then
16742     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16743     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16744     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16745     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16746       # Going to short mode and back again did indeed matter. Since short mode is
16747       # case insensitive, let's make it lowercase to improve readability.
16748       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16749       # Now convert it back to Unix-stile (cygpath)
16750       input_path=`$CYGPATH -u "$shortmode_path"`
16751       new_path="$input_path"
16752     fi
16753   fi
16754 
16755   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16756   if test "x$test_cygdrive_prefix" = x; then
16757     # As a simple fix, exclude /usr/bin since it's not a real path.
16758     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16759       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16760       # a path prefixed by /cygdrive for fixpath to work.
16761       new_path="$CYGWIN_ROOT_PATH$input_path"
16762     fi
16763   fi
16764 
16765 
16766   if test "x$path" != "x$new_path"; then
16767     JT_HOME="$new_path"
16768     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16769 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16770   fi
16771 
16772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16773 
16774   path="$JT_HOME"
16775   has_colon=`$ECHO $path | $GREP ^.:`
16776   new_path="$path"
16777   if test "x$has_colon" = x; then
16778     # Not in mixed or Windows style, start by that.
16779     new_path=`cmd //c echo $path`
16780   fi
16781 
16782 
16783   input_path="$new_path"
16784   # Check if we need to convert this using DOS-style short mode. If the path
16785   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16786   # take no chances and rewrite it.
16787   # Note: m4 eats our [], so we need to use [ and ] instead.
16788   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16789   if test "x$has_forbidden_chars" != x; then
16790     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16791     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16792   fi
16793 
16794 
16795   windows_path="$new_path"
16796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16797     unix_path=`$CYGPATH -u "$windows_path"`
16798     new_path="$unix_path"
16799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16801     new_path="$unix_path"
16802   fi
16803 
16804   if test "x$path" != "x$new_path"; then
16805     JT_HOME="$new_path"
16806     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16807 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16808   fi
16809 
16810   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16811   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16812 
16813   else
16814     # We're on a posix platform. Hooray! :)
16815     path="$JT_HOME"
16816     has_space=`$ECHO "$path" | $GREP " "`
16817     if test "x$has_space" != x; then
16818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16819 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16820       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16821     fi
16822 
16823     # Use eval to expand a potential ~
16824     eval path="$path"
16825     if test ! -f "$path" && test ! -d "$path"; then
16826       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16827     fi
16828 
16829     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16830   fi
16831 
16832 
16833       # jtreg win32 script works for everybody
16834       JTREGEXE="$JT_HOME/bin/jtreg"
16835 
16836       if test ! -f "$JTREGEXE"; then
16837         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16838       fi
16839 
16840       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16841 $as_echo "$JTREGEXE" >&6; }
16842     else
16843       # try to find jtreg on path
16844 
16845   for ac_prog in jtreg
16846 do
16847   # Extract the first word of "$ac_prog", so it can be a program name with args.
16848 set dummy $ac_prog; ac_word=$2
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16850 $as_echo_n "checking for $ac_word... " >&6; }
16851 if ${ac_cv_path_JTREGEXE+:} false; then :
16852   $as_echo_n "(cached) " >&6
16853 else
16854   case $JTREGEXE in
16855   [\\/]* | ?:[\\/]*)
16856   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16857   ;;
16858   *)
16859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16860 for as_dir in $PATH
16861 do
16862   IFS=$as_save_IFS
16863   test -z "$as_dir" && as_dir=.
16864     for ac_exec_ext in '' $ac_executable_extensions; do
16865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16866     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16868     break 2
16869   fi
16870 done
16871   done
16872 IFS=$as_save_IFS
16873 
16874   ;;
16875 esac
16876 fi
16877 JTREGEXE=$ac_cv_path_JTREGEXE
16878 if test -n "$JTREGEXE"; then
16879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16880 $as_echo "$JTREGEXE" >&6; }
16881 else
16882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16883 $as_echo "no" >&6; }
16884 fi
16885 
16886 
16887   test -n "$JTREGEXE" && break
16888 done
16889 
16890 
16891   if test "x$JTREGEXE" = x; then
16892     if test "xjtreg" = x; then
16893       PROG_NAME=jtregexe
16894     else
16895       PROG_NAME=jtreg
16896     fi
16897     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16898 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16899     as_fn_error $? "Cannot continue" "$LINENO" 5
16900   fi
16901 
16902 
16903       JT_HOME="`$DIRNAME $JTREGEXE`"
16904     fi
16905   fi
16906 
16907 
16908 
16909 
16910 
16911   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16912 
16913   # Store path to cygwin link.exe to help excluding it when searching for
16914   # VS linker. This must be done before changing the PATH when looking for VS.
16915   # Extract the first word of "link", so it can be a program name with args.
16916 set dummy link; ac_word=$2
16917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16918 $as_echo_n "checking for $ac_word... " >&6; }
16919 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16920   $as_echo_n "(cached) " >&6
16921 else
16922   case $CYGWIN_LINK in
16923   [\\/]* | ?:[\\/]*)
16924   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16925   ;;
16926   *)
16927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16928 for as_dir in $PATH
16929 do
16930   IFS=$as_save_IFS
16931   test -z "$as_dir" && as_dir=.
16932     for ac_exec_ext in '' $ac_executable_extensions; do
16933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16934     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16936     break 2
16937   fi
16938 done
16939   done
16940 IFS=$as_save_IFS
16941 
16942   ;;
16943 esac
16944 fi
16945 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16946 if test -n "$CYGWIN_LINK"; then
16947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16948 $as_echo "$CYGWIN_LINK" >&6; }
16949 else
16950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16951 $as_echo "no" >&6; }
16952 fi
16953 
16954 
16955   if test "x$CYGWIN_LINK" != x; then
16956     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16957 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16958     "$CYGWIN_LINK" --version > /dev/null
16959     if test $? -eq 0 ; then
16960       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16961 $as_echo "yes" >&6; }
16962     else
16963       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16964 $as_echo "no" >&6; }
16965       # This might be the VS linker. Don't exclude it later on.
16966       CYGWIN_LINK=""
16967     fi
16968   fi
16969 
16970   # First-hand choice is to locate and run the vsvars bat file.
16971 
16972   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16973     VCVARSFILE="vc/bin/vcvars32.bat"
16974   else
16975     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16976   fi
16977 
16978   VS_ENV_CMD=""
16979   VS_ENV_ARGS=""
16980   if test "x$with_toolsdir" != x; then
16981 
16982   if test "x$VS_ENV_CMD" = x; then
16983     VS100BASE="$with_toolsdir/../.."
16984     METHOD="--with-tools-dir"
16985 
16986   windows_path="$VS100BASE"
16987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16988     unix_path=`$CYGPATH -u "$windows_path"`
16989     VS100BASE="$unix_path"
16990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16992     VS100BASE="$unix_path"
16993   fi
16994 
16995     if test -d "$VS100BASE"; then
16996       if test -f "$VS100BASE/$VCVARSFILE"; then
16997         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16998 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16999         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17000       else
17001         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17002 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17003         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17004 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17005       fi
17006     fi
17007   fi
17008 
17009   fi
17010 
17011   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
17012     # Having specified an argument which is incorrect will produce an instant failure;
17013     # we should not go on looking
17014     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
17015 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
17016     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
17017 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
17018     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
17019   fi
17020 
17021   if test "x$VS100COMNTOOLS" != x; then
17022 
17023   if test "x$VS_ENV_CMD" = x; then
17024     VS100BASE="$VS100COMNTOOLS/../.."
17025     METHOD="VS100COMNTOOLS variable"
17026 
17027   windows_path="$VS100BASE"
17028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17029     unix_path=`$CYGPATH -u "$windows_path"`
17030     VS100BASE="$unix_path"
17031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17033     VS100BASE="$unix_path"
17034   fi
17035 
17036     if test -d "$VS100BASE"; then
17037       if test -f "$VS100BASE/$VCVARSFILE"; then
17038         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17039 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17040         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17041       else
17042         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17043 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17044         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17045 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17046       fi
17047     fi
17048   fi
17049 
17050   fi
17051   if test "x$PROGRAMFILES" != x; then
17052 
17053   if test "x$VS_ENV_CMD" = x; then
17054     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
17055     METHOD="well-known name"
17056 
17057   windows_path="$VS100BASE"
17058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17059     unix_path=`$CYGPATH -u "$windows_path"`
17060     VS100BASE="$unix_path"
17061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17063     VS100BASE="$unix_path"
17064   fi
17065 
17066     if test -d "$VS100BASE"; then
17067       if test -f "$VS100BASE/$VCVARSFILE"; then
17068         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17069 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17070         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17071       else
17072         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17073 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17074         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17075 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17076       fi
17077     fi
17078   fi
17079 
17080   fi
17081 
17082   if test "x$VS_ENV_CMD" = x; then
17083     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
17084     METHOD="well-known name"
17085 
17086   windows_path="$VS100BASE"
17087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17088     unix_path=`$CYGPATH -u "$windows_path"`
17089     VS100BASE="$unix_path"
17090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17092     VS100BASE="$unix_path"
17093   fi
17094 
17095     if test -d "$VS100BASE"; then
17096       if test -f "$VS100BASE/$VCVARSFILE"; then
17097         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17098 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17099         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17100       else
17101         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17102 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17103         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17104 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17105       fi
17106     fi
17107   fi
17108 
17109 
17110   if test "x$VS_ENV_CMD" = x; then
17111     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
17112     METHOD="well-known name"
17113 
17114   windows_path="$VS100BASE"
17115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17116     unix_path=`$CYGPATH -u "$windows_path"`
17117     VS100BASE="$unix_path"
17118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17120     VS100BASE="$unix_path"
17121   fi
17122 
17123     if test -d "$VS100BASE"; then
17124       if test -f "$VS100BASE/$VCVARSFILE"; then
17125         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17126 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17127         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17128       else
17129         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17130 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17131         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17132 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17133       fi
17134     fi
17135   fi
17136 
17137 
17138   if test "x$ProgramW6432" != x; then
17139 
17140   if test "x$VS_ENV_CMD" = x; then
17141     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17142     METHOD="well-known name"
17143 
17144   windows_path="$WIN_SDK_BASE"
17145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17146     unix_path=`$CYGPATH -u "$windows_path"`
17147     WIN_SDK_BASE="$unix_path"
17148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17150     WIN_SDK_BASE="$unix_path"
17151   fi
17152 
17153     if test -d "$WIN_SDK_BASE"; then
17154       # There have been cases of partial or broken SDK installations. A missing
17155       # lib dir is not going to work.
17156       if test ! -d "$WIN_SDK_BASE/../lib"; then
17157         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17158 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17159         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17160 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17161       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17162         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17163 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17164         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17165         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17166           VS_ENV_ARGS="/x86"
17167         else
17168           VS_ENV_ARGS="/x64"
17169         fi
17170       else
17171         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17172 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17173         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17174 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17175       fi
17176     fi
17177   fi
17178 
17179   fi
17180   if test "x$PROGRAMW6432" != x; then
17181 
17182   if test "x$VS_ENV_CMD" = x; then
17183     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17184     METHOD="well-known name"
17185 
17186   windows_path="$WIN_SDK_BASE"
17187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17188     unix_path=`$CYGPATH -u "$windows_path"`
17189     WIN_SDK_BASE="$unix_path"
17190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17192     WIN_SDK_BASE="$unix_path"
17193   fi
17194 
17195     if test -d "$WIN_SDK_BASE"; then
17196       # There have been cases of partial or broken SDK installations. A missing
17197       # lib dir is not going to work.
17198       if test ! -d "$WIN_SDK_BASE/../lib"; then
17199         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17200 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17201         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17202 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17203       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17204         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17205 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17206         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17207         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17208           VS_ENV_ARGS="/x86"
17209         else
17210           VS_ENV_ARGS="/x64"
17211         fi
17212       else
17213         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17214 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17215         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17216 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17217       fi
17218     fi
17219   fi
17220 
17221   fi
17222   if test "x$PROGRAMFILES" != x; then
17223 
17224   if test "x$VS_ENV_CMD" = x; then
17225     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17226     METHOD="well-known name"
17227 
17228   windows_path="$WIN_SDK_BASE"
17229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17230     unix_path=`$CYGPATH -u "$windows_path"`
17231     WIN_SDK_BASE="$unix_path"
17232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17234     WIN_SDK_BASE="$unix_path"
17235   fi
17236 
17237     if test -d "$WIN_SDK_BASE"; then
17238       # There have been cases of partial or broken SDK installations. A missing
17239       # lib dir is not going to work.
17240       if test ! -d "$WIN_SDK_BASE/../lib"; then
17241         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17242 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17243         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17244 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17245       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17246         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17247 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17248         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17249         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17250           VS_ENV_ARGS="/x86"
17251         else
17252           VS_ENV_ARGS="/x64"
17253         fi
17254       else
17255         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17256 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17257         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17258 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17259       fi
17260     fi
17261   fi
17262 
17263   fi
17264 
17265   if test "x$VS_ENV_CMD" = x; then
17266     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17267     METHOD="well-known name"
17268 
17269   windows_path="$WIN_SDK_BASE"
17270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17271     unix_path=`$CYGPATH -u "$windows_path"`
17272     WIN_SDK_BASE="$unix_path"
17273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17275     WIN_SDK_BASE="$unix_path"
17276   fi
17277 
17278     if test -d "$WIN_SDK_BASE"; then
17279       # There have been cases of partial or broken SDK installations. A missing
17280       # lib dir is not going to work.
17281       if test ! -d "$WIN_SDK_BASE/../lib"; then
17282         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17283 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17284         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17285 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17286       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17287         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17288 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17289         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17290         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17291           VS_ENV_ARGS="/x86"
17292         else
17293           VS_ENV_ARGS="/x64"
17294         fi
17295       else
17296         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17297 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17298         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17299 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17300       fi
17301     fi
17302   fi
17303 
17304 
17305   if test "x$VS_ENV_CMD" = x; then
17306     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17307     METHOD="well-known name"
17308 
17309   windows_path="$WIN_SDK_BASE"
17310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17311     unix_path=`$CYGPATH -u "$windows_path"`
17312     WIN_SDK_BASE="$unix_path"
17313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17315     WIN_SDK_BASE="$unix_path"
17316   fi
17317 
17318     if test -d "$WIN_SDK_BASE"; then
17319       # There have been cases of partial or broken SDK installations. A missing
17320       # lib dir is not going to work.
17321       if test ! -d "$WIN_SDK_BASE/../lib"; then
17322         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17323 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17324         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17325 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17326       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17327         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17328 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17329         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17330         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17331           VS_ENV_ARGS="/x86"
17332         else
17333           VS_ENV_ARGS="/x64"
17334         fi
17335       else
17336         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17337 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17338         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17339 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17340       fi
17341     fi
17342   fi
17343 
17344 
17345   if test "x$VS_ENV_CMD" != x; then
17346     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17347 
17348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17349 
17350   # First separate the path from the arguments. This will split at the first
17351   # space.
17352   complete="$VS_ENV_CMD"
17353   path="${complete%% *}"
17354   tmp="$complete EOL"
17355   arguments="${tmp#* }"
17356 
17357   # Input might be given as Windows format, start by converting to
17358   # unix format.
17359   new_path=`$CYGPATH -u "$path"`
17360 
17361   # Now try to locate executable using which
17362   new_path=`$WHICH "$new_path" 2> /dev/null`
17363   # bat and cmd files are not always considered executable in cygwin causing which
17364   # to not find them
17365   if test "x$new_path" = x \
17366       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17367       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17368     new_path=`$CYGPATH -u "$path"`
17369   fi
17370   if test "x$new_path" = x; then
17371     # Oops. Which didn't find the executable.
17372     # The splitting of arguments from the executable at a space might have been incorrect,
17373     # since paths with space are more likely in Windows. Give it another try with the whole
17374     # argument.
17375     path="$complete"
17376     arguments="EOL"
17377     new_path=`$CYGPATH -u "$path"`
17378     new_path=`$WHICH "$new_path" 2> /dev/null`
17379     # bat and cmd files are not always considered executable in cygwin causing which
17380     # to not find them
17381     if test "x$new_path" = x \
17382         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17383         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17384       new_path=`$CYGPATH -u "$path"`
17385     fi
17386     if test "x$new_path" = x; then
17387       # It's still not found. Now this is an unrecoverable error.
17388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17389 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17390       has_space=`$ECHO "$complete" | $GREP " "`
17391       if test "x$has_space" != x; then
17392         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17393 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17394       fi
17395       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17396     fi
17397   fi
17398 
17399   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17400   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17401   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17402   # "foo.exe" is OK but "foo" is an error.
17403   #
17404   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17405   # It is also a way to make sure we got the proper file name for the real test later on.
17406   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17407   if test "x$test_shortpath" = x; then
17408     # Short path failed, file does not exist as specified.
17409     # Try adding .exe or .cmd
17410     if test -f "${new_path}.exe"; then
17411       input_to_shortpath="${new_path}.exe"
17412     elif test -f "${new_path}.cmd"; then
17413       input_to_shortpath="${new_path}.cmd"
17414     else
17415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17416 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17417       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17418 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17419       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17420     fi
17421   else
17422     input_to_shortpath="$new_path"
17423   fi
17424 
17425   # Call helper function which possibly converts this using DOS-style short mode.
17426   # If so, the updated path is stored in $new_path.
17427   new_path="$input_to_shortpath"
17428 
17429   input_path="$input_to_shortpath"
17430   # Check if we need to convert this using DOS-style short mode. If the path
17431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17432   # take no chances and rewrite it.
17433   # Note: m4 eats our [], so we need to use [ and ] instead.
17434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17435   if test "x$has_forbidden_chars" != x; then
17436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17437     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17438     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17439     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17440       # Going to short mode and back again did indeed matter. Since short mode is
17441       # case insensitive, let's make it lowercase to improve readability.
17442       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17443       # Now convert it back to Unix-stile (cygpath)
17444       input_path=`$CYGPATH -u "$shortmode_path"`
17445       new_path="$input_path"
17446     fi
17447   fi
17448 
17449   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17450   if test "x$test_cygdrive_prefix" = x; then
17451     # As a simple fix, exclude /usr/bin since it's not a real path.
17452     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17453       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17454       # a path prefixed by /cygdrive for fixpath to work.
17455       new_path="$CYGWIN_ROOT_PATH$input_path"
17456     fi
17457   fi
17458 
17459   # remove trailing .exe if any
17460   new_path="${new_path/%.exe/}"
17461 
17462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17463 
17464   # First separate the path from the arguments. This will split at the first
17465   # space.
17466   complete="$VS_ENV_CMD"
17467   path="${complete%% *}"
17468   tmp="$complete EOL"
17469   arguments="${tmp#* }"
17470 
17471   # Input might be given as Windows format, start by converting to
17472   # unix format.
17473   new_path="$path"
17474 
17475   windows_path="$new_path"
17476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17477     unix_path=`$CYGPATH -u "$windows_path"`
17478     new_path="$unix_path"
17479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17481     new_path="$unix_path"
17482   fi
17483 
17484 
17485   # Now try to locate executable using which
17486   new_path=`$WHICH "$new_path" 2> /dev/null`
17487 
17488   if test "x$new_path" = x; then
17489     # Oops. Which didn't find the executable.
17490     # The splitting of arguments from the executable at a space might have been incorrect,
17491     # since paths with space are more likely in Windows. Give it another try with the whole
17492     # argument.
17493     path="$complete"
17494     arguments="EOL"
17495     new_path="$path"
17496 
17497   windows_path="$new_path"
17498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17499     unix_path=`$CYGPATH -u "$windows_path"`
17500     new_path="$unix_path"
17501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17503     new_path="$unix_path"
17504   fi
17505 
17506 
17507     new_path=`$WHICH "$new_path" 2> /dev/null`
17508 
17509     if test "x$new_path" = x; then
17510       # It's still not found. Now this is an unrecoverable error.
17511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17512 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17513       has_space=`$ECHO "$complete" | $GREP " "`
17514       if test "x$has_space" != x; then
17515         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17516 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17517       fi
17518       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17519     fi
17520   fi
17521 
17522   # Now new_path has a complete unix path to the binary
17523   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17524     # Keep paths in /bin as-is, but remove trailing .exe if any
17525     new_path="${new_path/%.exe/}"
17526     # Do not save /bin paths to all_fixpath_prefixes!
17527   else
17528     # Not in mixed or Windows style, start by that.
17529     new_path=`cmd //c echo $new_path`
17530 
17531   input_path="$new_path"
17532   # Check if we need to convert this using DOS-style short mode. If the path
17533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17534   # take no chances and rewrite it.
17535   # Note: m4 eats our [], so we need to use [ and ] instead.
17536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17537   if test "x$has_forbidden_chars" != x; then
17538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17539     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17540   fi
17541 
17542     # Output is in $new_path
17543 
17544   windows_path="$new_path"
17545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17546     unix_path=`$CYGPATH -u "$windows_path"`
17547     new_path="$unix_path"
17548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17550     new_path="$unix_path"
17551   fi
17552 
17553     # remove trailing .exe if any
17554     new_path="${new_path/%.exe/}"
17555 
17556     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17557     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17558   fi
17559 
17560   else
17561     # We're on a posix platform. Hooray! :)
17562     # First separate the path from the arguments. This will split at the first
17563     # space.
17564     complete="$VS_ENV_CMD"
17565     path="${complete%% *}"
17566     tmp="$complete EOL"
17567     arguments="${tmp#* }"
17568 
17569     # Cannot rely on the command "which" here since it doesn't always work.
17570     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17571     if test -z "$is_absolute_path"; then
17572       # Path to executable is not absolute. Find it.
17573       IFS_save="$IFS"
17574       IFS=:
17575       for p in $PATH; do
17576         if test -f "$p/$path" && test -x "$p/$path"; then
17577           new_path="$p/$path"
17578           break
17579         fi
17580       done
17581       IFS="$IFS_save"
17582     else
17583       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17584 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17585       new_path="$path"
17586     fi
17587 
17588     if test "x$new_path" = x; then
17589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17590 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17591       has_space=`$ECHO "$complete" | $GREP " "`
17592       if test "x$has_space" != x; then
17593         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17594 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17595       fi
17596       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17597     fi
17598   fi
17599 
17600   # Now join together the path and the arguments once again
17601   if test "x$arguments" != xEOL; then
17602     new_complete="$new_path ${arguments% *}"
17603   else
17604     new_complete="$new_path"
17605   fi
17606 
17607   if test "x$complete" != "x$new_complete"; then
17608     VS_ENV_CMD="$new_complete"
17609     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17610 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17611   fi
17612 
17613 
17614     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17615     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17616 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17617     cd $OUTPUT_ROOT
17618     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17619     # to autoconf standards.
17620 
17621     #----
17622 
17623     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17624     # but calculate the difference in Cygwin environment before/after running it and then
17625     # apply the diff.
17626 
17627     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17628       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17629       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17630       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17631     else
17632       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17633       _dosbash=`cmd //c echo \`which bash\``
17634     fi
17635 
17636     # generate the set of exported vars before/after the vs10 setup
17637     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17638     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17639     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17640     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17641 
17642     # Now execute the newly created bat file.
17643     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17644     cmd /c localdevenvtmp.bat | cat
17645 
17646     # apply the diff (less some non-vs10 vars named by "!")
17647     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17648     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17649     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17650 
17651     # cleanup
17652     $RM localdevenvtmp*
17653     #----
17654     cd $CURDIR
17655     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17657 $as_echo "no" >&6; }
17658       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17659 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17660       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17661 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17662       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17663 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17664       as_fn_error $? "Cannot continue" "$LINENO" 5
17665     fi
17666 
17667     # Now set all paths and other env variables. This will allow the rest of
17668     # the configure script to find and run the compiler in the proper way.
17669     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17670 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17671     . $OUTPUT_ROOT/localdevenv.sh
17672   else
17673     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17674     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17675 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17676   fi
17677 
17678   # At this point, we should have corrent variables in the environment, or we can't continue.
17679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17680 $as_echo_n "checking for Visual Studio variables... " >&6; }
17681 
17682   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17683     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17684       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17685 $as_echo "present but broken" >&6; }
17686       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17687     else
17688       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17689 $as_echo "ok" >&6; }
17690       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17691       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17692       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17693       # Remove any paths containing # (typically F#) as that messes up make
17694       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17695       VS_PATH="$PATH"
17696 
17697 
17698 
17699     fi
17700   else
17701     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17702 $as_echo "not found" >&6; }
17703 
17704     if test "x$VS_ENV_CMD" = x; then
17705       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17706 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17707       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17708 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17709     else
17710       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17711 $as_echo "$as_me: Running the extraction script failed." >&6;}
17712     fi
17713     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17714 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17715     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17716 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17717     as_fn_error $? "Cannot continue" "$LINENO" 5
17718   fi
17719 
17720 
17721 
17722 # Check whether --with-msvcr-dll was given.
17723 if test "${with_msvcr_dll+set}" = set; then :
17724   withval=$with_msvcr_dll;
17725 fi
17726 
17727 
17728   if test "x$with_msvcr_dll" != x; then
17729     # If given explicitely by user, do not probe. If not present, fail directly.
17730 
17731   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17732   METHOD="--with-msvcr-dll"
17733   if test -e "$POSSIBLE_MSVCR_DLL"; then
17734     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17735 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17736 
17737     # Need to check if the found msvcr is correct architecture
17738     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17739 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17740     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17741     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17742       CORRECT_MSVCR_ARCH=386
17743     else
17744       CORRECT_MSVCR_ARCH=x86-64
17745     fi
17746     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17747       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17748 $as_echo "ok" >&6; }
17749       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17750       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17751 $as_echo_n "checking for msvcr100.dll... " >&6; }
17752       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17753 $as_echo "$MSVCR_DLL" >&6; }
17754     else
17755       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17756 $as_echo "incorrect, ignoring" >&6; }
17757       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17758 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17759     fi
17760   fi
17761 
17762     if test "x$MSVCR_DLL" = x; then
17763       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17764     fi
17765   fi
17766 
17767   if test "x$MSVCR_DLL" = x; then
17768     # Probe: Using well-known location from Visual Studio 10.0
17769     if test "x$VCINSTALLDIR" != x; then
17770       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17771 
17772   windows_path="$CYGWIN_VC_INSTALL_DIR"
17773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17774     unix_path=`$CYGPATH -u "$windows_path"`
17775     CYGWIN_VC_INSTALL_DIR="$unix_path"
17776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17778     CYGWIN_VC_INSTALL_DIR="$unix_path"
17779   fi
17780 
17781       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17782         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17783       else
17784         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17785       fi
17786 
17787   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17788   METHOD="well-known location in VCINSTALLDIR"
17789   if test -e "$POSSIBLE_MSVCR_DLL"; then
17790     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17791 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17792 
17793     # Need to check if the found msvcr is correct architecture
17794     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17795 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17796     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17797     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17798       CORRECT_MSVCR_ARCH=386
17799     else
17800       CORRECT_MSVCR_ARCH=x86-64
17801     fi
17802     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17803       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17804 $as_echo "ok" >&6; }
17805       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17806       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17807 $as_echo_n "checking for msvcr100.dll... " >&6; }
17808       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17809 $as_echo "$MSVCR_DLL" >&6; }
17810     else
17811       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17812 $as_echo "incorrect, ignoring" >&6; }
17813       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17814 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17815     fi
17816   fi
17817 
17818     fi
17819   fi
17820 
17821   if test "x$MSVCR_DLL" = x; then
17822     # Probe: Check in the Boot JDK directory.
17823     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17824 
17825   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17826   METHOD="well-known location in Boot JDK"
17827   if test -e "$POSSIBLE_MSVCR_DLL"; then
17828     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17829 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17830 
17831     # Need to check if the found msvcr is correct architecture
17832     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17833 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17834     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17835     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17836       CORRECT_MSVCR_ARCH=386
17837     else
17838       CORRECT_MSVCR_ARCH=x86-64
17839     fi
17840     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17841       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17842 $as_echo "ok" >&6; }
17843       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17844       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17845 $as_echo_n "checking for msvcr100.dll... " >&6; }
17846       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17847 $as_echo "$MSVCR_DLL" >&6; }
17848     else
17849       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17850 $as_echo "incorrect, ignoring" >&6; }
17851       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17852 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17853     fi
17854   fi
17855 
17856   fi
17857 
17858   if test "x$MSVCR_DLL" = x; then
17859     # Probe: Look in the Windows system32 directory
17860     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17861 
17862   windows_path="$CYGWIN_SYSTEMROOT"
17863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17864     unix_path=`$CYGPATH -u "$windows_path"`
17865     CYGWIN_SYSTEMROOT="$unix_path"
17866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17868     CYGWIN_SYSTEMROOT="$unix_path"
17869   fi
17870 
17871     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17872 
17873   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17874   METHOD="well-known location in SYSTEMROOT"
17875   if test -e "$POSSIBLE_MSVCR_DLL"; then
17876     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17877 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17878 
17879     # Need to check if the found msvcr is correct architecture
17880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17881 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17882     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17883     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17884       CORRECT_MSVCR_ARCH=386
17885     else
17886       CORRECT_MSVCR_ARCH=x86-64
17887     fi
17888     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17889       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17890 $as_echo "ok" >&6; }
17891       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17892       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17893 $as_echo_n "checking for msvcr100.dll... " >&6; }
17894       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17895 $as_echo "$MSVCR_DLL" >&6; }
17896     else
17897       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17898 $as_echo "incorrect, ignoring" >&6; }
17899       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17900 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17901     fi
17902   fi
17903 
17904   fi
17905 
17906   if test "x$MSVCR_DLL" = x; then
17907     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17908     if test "x$VS100COMNTOOLS" != x; then
17909       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17910 
17911   windows_path="$CYGWIN_VS_TOOLS_DIR"
17912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17913     unix_path=`$CYGPATH -u "$windows_path"`
17914     CYGWIN_VS_TOOLS_DIR="$unix_path"
17915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17917     CYGWIN_VS_TOOLS_DIR="$unix_path"
17918   fi
17919 
17920       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17921         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17922       else
17923         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17924       fi
17925 
17926   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17927   METHOD="search of VS100COMNTOOLS"
17928   if test -e "$POSSIBLE_MSVCR_DLL"; then
17929     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17930 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17931 
17932     # Need to check if the found msvcr is correct architecture
17933     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17934 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17935     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17936     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17937       CORRECT_MSVCR_ARCH=386
17938     else
17939       CORRECT_MSVCR_ARCH=x86-64
17940     fi
17941     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17942       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17943 $as_echo "ok" >&6; }
17944       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17945       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17946 $as_echo_n "checking for msvcr100.dll... " >&6; }
17947       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17948 $as_echo "$MSVCR_DLL" >&6; }
17949     else
17950       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17951 $as_echo "incorrect, ignoring" >&6; }
17952       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17953 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17954     fi
17955   fi
17956 
17957     fi
17958   fi
17959 
17960   if test "x$MSVCR_DLL" = x; then
17961     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17962     # (This was the original behaviour; kept since it might turn up something)
17963     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17964       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17965         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17966       else
17967         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17968         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17969           # We're grasping at straws now...
17970           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17971         fi
17972       fi
17973 
17974 
17975   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17976   METHOD="search of VCINSTALLDIR"
17977   if test -e "$POSSIBLE_MSVCR_DLL"; then
17978     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17979 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17980 
17981     # Need to check if the found msvcr is correct architecture
17982     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17983 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17984     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17985     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17986       CORRECT_MSVCR_ARCH=386
17987     else
17988       CORRECT_MSVCR_ARCH=x86-64
17989     fi
17990     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17991       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17992 $as_echo "ok" >&6; }
17993       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17994       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17995 $as_echo_n "checking for msvcr100.dll... " >&6; }
17996       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17997 $as_echo "$MSVCR_DLL" >&6; }
17998     else
17999       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
18000 $as_echo "incorrect, ignoring" >&6; }
18001       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
18002 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
18003     fi
18004   fi
18005 
18006     fi
18007   fi
18008 
18009   if test "x$MSVCR_DLL" = x; then
18010     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
18011 $as_echo_n "checking for msvcr100.dll... " >&6; }
18012     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18013 $as_echo "no" >&6; }
18014     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
18015   fi
18016 
18017 
18018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18019 
18020   # Input might be given as Windows format, start by converting to
18021   # unix format.
18022   path="$MSVCR_DLL"
18023   new_path=`$CYGPATH -u "$path"`
18024 
18025   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18026   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18027   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18028   # "foo.exe" is OK but "foo" is an error.
18029   #
18030   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18031   # It is also a way to make sure we got the proper file name for the real test later on.
18032   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18033   if test "x$test_shortpath" = x; then
18034     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18035 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18036     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
18037   fi
18038 
18039   # Call helper function which possibly converts this using DOS-style short mode.
18040   # If so, the updated path is stored in $new_path.
18041 
18042   input_path="$new_path"
18043   # Check if we need to convert this using DOS-style short mode. If the path
18044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18045   # take no chances and rewrite it.
18046   # Note: m4 eats our [], so we need to use [ and ] instead.
18047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18048   if test "x$has_forbidden_chars" != x; then
18049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18050     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18051     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18052     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18053       # Going to short mode and back again did indeed matter. Since short mode is
18054       # case insensitive, let's make it lowercase to improve readability.
18055       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18056       # Now convert it back to Unix-stile (cygpath)
18057       input_path=`$CYGPATH -u "$shortmode_path"`
18058       new_path="$input_path"
18059     fi
18060   fi
18061 
18062   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18063   if test "x$test_cygdrive_prefix" = x; then
18064     # As a simple fix, exclude /usr/bin since it's not a real path.
18065     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18066       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18067       # a path prefixed by /cygdrive for fixpath to work.
18068       new_path="$CYGWIN_ROOT_PATH$input_path"
18069     fi
18070   fi
18071 
18072 
18073   if test "x$path" != "x$new_path"; then
18074     MSVCR_DLL="$new_path"
18075     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18076 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18077   fi
18078 
18079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18080 
18081   path="$MSVCR_DLL"
18082   has_colon=`$ECHO $path | $GREP ^.:`
18083   new_path="$path"
18084   if test "x$has_colon" = x; then
18085     # Not in mixed or Windows style, start by that.
18086     new_path=`cmd //c echo $path`
18087   fi
18088 
18089 
18090   input_path="$new_path"
18091   # Check if we need to convert this using DOS-style short mode. If the path
18092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18093   # take no chances and rewrite it.
18094   # Note: m4 eats our [], so we need to use [ and ] instead.
18095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18096   if test "x$has_forbidden_chars" != x; then
18097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18098     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18099   fi
18100 
18101 
18102   windows_path="$new_path"
18103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18104     unix_path=`$CYGPATH -u "$windows_path"`
18105     new_path="$unix_path"
18106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18108     new_path="$unix_path"
18109   fi
18110 
18111   if test "x$path" != "x$new_path"; then
18112     MSVCR_DLL="$new_path"
18113     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18114 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18115   fi
18116 
18117   # Save the first 10 bytes of this path to the storage, so fixpath can work.
18118   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18119 
18120   else
18121     # We're on a posix platform. Hooray! :)
18122     path="$MSVCR_DLL"
18123     has_space=`$ECHO "$path" | $GREP " "`
18124     if test "x$has_space" != x; then
18125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18126 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18127       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18128     fi
18129 
18130     # Use eval to expand a potential ~
18131     eval path="$path"
18132     if test ! -f "$path" && test ! -d "$path"; then
18133       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18134     fi
18135 
18136     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18137   fi
18138 
18139 
18140 
18141 
18142 # Check whether --with-dxsdk was given.
18143 if test "${with_dxsdk+set}" = set; then :
18144   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18145 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18146 fi
18147 
18148 
18149 
18150 
18151 # Check whether --with-dxsdk-lib was given.
18152 if test "${with_dxsdk_lib+set}" = set; then :
18153   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18154 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18155 fi
18156 
18157 
18158 
18159 
18160 # Check whether --with-dxsdk-include was given.
18161 if test "${with_dxsdk_include+set}" = set; then :
18162   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18163 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18164 fi
18165 
18166 
18167   fi
18168 
18169 
18170 
18171   # If --build AND --host is set, then the configure script will find any
18172   # cross compilation tools in the PATH. Cross compilation tools
18173   # follows the cross compilation standard where they are prefixed with ${host}.
18174   # For example the binary i686-sun-solaris2.10-gcc
18175   # will cross compile for i686-sun-solaris2.10
18176   # If neither of build and host is not set, then build=host and the
18177   # default compiler found in the path will be used.
18178   # Setting only --host, does not seem to be really supported.
18179   # Please set both --build and --host if you want to cross compile.
18180 
18181   if test "x$COMPILE_TYPE" = "xcross"; then
18182     # Now we to find a C/C++ compiler that can build executables for the build
18183     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18184     # once. Also, we need to do this before adding a tools dir to the path,
18185     # otherwise we might pick up cross-compilers which don't use standard naming.
18186     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18187     # to wait until they are properly discovered.
18188     for ac_prog in cl cc gcc
18189 do
18190   # Extract the first word of "$ac_prog", so it can be a program name with args.
18191 set dummy $ac_prog; ac_word=$2
18192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18193 $as_echo_n "checking for $ac_word... " >&6; }
18194 if ${ac_cv_path_BUILD_CC+:} false; then :
18195   $as_echo_n "(cached) " >&6
18196 else
18197   case $BUILD_CC in
18198   [\\/]* | ?:[\\/]*)
18199   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18200   ;;
18201   *)
18202   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18203 for as_dir in $PATH
18204 do
18205   IFS=$as_save_IFS
18206   test -z "$as_dir" && as_dir=.
18207     for ac_exec_ext in '' $ac_executable_extensions; do
18208   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18209     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18210     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18211     break 2
18212   fi
18213 done
18214   done
18215 IFS=$as_save_IFS
18216 
18217   ;;
18218 esac
18219 fi
18220 BUILD_CC=$ac_cv_path_BUILD_CC
18221 if test -n "$BUILD_CC"; then
18222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18223 $as_echo "$BUILD_CC" >&6; }
18224 else
18225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18226 $as_echo "no" >&6; }
18227 fi
18228 
18229 
18230   test -n "$BUILD_CC" && break
18231 done
18232 
18233 
18234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18235 
18236   # First separate the path from the arguments. This will split at the first
18237   # space.
18238   complete="$BUILD_CC"
18239   path="${complete%% *}"
18240   tmp="$complete EOL"
18241   arguments="${tmp#* }"
18242 
18243   # Input might be given as Windows format, start by converting to
18244   # unix format.
18245   new_path=`$CYGPATH -u "$path"`
18246 
18247   # Now try to locate executable using which
18248   new_path=`$WHICH "$new_path" 2> /dev/null`
18249   # bat and cmd files are not always considered executable in cygwin causing which
18250   # to not find them
18251   if test "x$new_path" = x \
18252       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18253       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18254     new_path=`$CYGPATH -u "$path"`
18255   fi
18256   if test "x$new_path" = x; then
18257     # Oops. Which didn't find the executable.
18258     # The splitting of arguments from the executable at a space might have been incorrect,
18259     # since paths with space are more likely in Windows. Give it another try with the whole
18260     # argument.
18261     path="$complete"
18262     arguments="EOL"
18263     new_path=`$CYGPATH -u "$path"`
18264     new_path=`$WHICH "$new_path" 2> /dev/null`
18265     # bat and cmd files are not always considered executable in cygwin causing which
18266     # to not find them
18267     if test "x$new_path" = x \
18268         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18269         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18270       new_path=`$CYGPATH -u "$path"`
18271     fi
18272     if test "x$new_path" = x; then
18273       # It's still not found. Now this is an unrecoverable error.
18274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18275 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18276       has_space=`$ECHO "$complete" | $GREP " "`
18277       if test "x$has_space" != x; then
18278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18280       fi
18281       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18282     fi
18283   fi
18284 
18285   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18286   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18287   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18288   # "foo.exe" is OK but "foo" is an error.
18289   #
18290   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18291   # It is also a way to make sure we got the proper file name for the real test later on.
18292   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18293   if test "x$test_shortpath" = x; then
18294     # Short path failed, file does not exist as specified.
18295     # Try adding .exe or .cmd
18296     if test -f "${new_path}.exe"; then
18297       input_to_shortpath="${new_path}.exe"
18298     elif test -f "${new_path}.cmd"; then
18299       input_to_shortpath="${new_path}.cmd"
18300     else
18301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18302 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18303       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18304 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18305       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18306     fi
18307   else
18308     input_to_shortpath="$new_path"
18309   fi
18310 
18311   # Call helper function which possibly converts this using DOS-style short mode.
18312   # If so, the updated path is stored in $new_path.
18313   new_path="$input_to_shortpath"
18314 
18315   input_path="$input_to_shortpath"
18316   # Check if we need to convert this using DOS-style short mode. If the path
18317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18318   # take no chances and rewrite it.
18319   # Note: m4 eats our [], so we need to use [ and ] instead.
18320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18321   if test "x$has_forbidden_chars" != x; then
18322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18323     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18324     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18325     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18326       # Going to short mode and back again did indeed matter. Since short mode is
18327       # case insensitive, let's make it lowercase to improve readability.
18328       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18329       # Now convert it back to Unix-stile (cygpath)
18330       input_path=`$CYGPATH -u "$shortmode_path"`
18331       new_path="$input_path"
18332     fi
18333   fi
18334 
18335   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18336   if test "x$test_cygdrive_prefix" = x; then
18337     # As a simple fix, exclude /usr/bin since it's not a real path.
18338     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18339       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18340       # a path prefixed by /cygdrive for fixpath to work.
18341       new_path="$CYGWIN_ROOT_PATH$input_path"
18342     fi
18343   fi
18344 
18345   # remove trailing .exe if any
18346   new_path="${new_path/%.exe/}"
18347 
18348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18349 
18350   # First separate the path from the arguments. This will split at the first
18351   # space.
18352   complete="$BUILD_CC"
18353   path="${complete%% *}"
18354   tmp="$complete EOL"
18355   arguments="${tmp#* }"
18356 
18357   # Input might be given as Windows format, start by converting to
18358   # unix format.
18359   new_path="$path"
18360 
18361   windows_path="$new_path"
18362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18363     unix_path=`$CYGPATH -u "$windows_path"`
18364     new_path="$unix_path"
18365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18367     new_path="$unix_path"
18368   fi
18369 
18370 
18371   # Now try to locate executable using which
18372   new_path=`$WHICH "$new_path" 2> /dev/null`
18373 
18374   if test "x$new_path" = x; then
18375     # Oops. Which didn't find the executable.
18376     # The splitting of arguments from the executable at a space might have been incorrect,
18377     # since paths with space are more likely in Windows. Give it another try with the whole
18378     # argument.
18379     path="$complete"
18380     arguments="EOL"
18381     new_path="$path"
18382 
18383   windows_path="$new_path"
18384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18385     unix_path=`$CYGPATH -u "$windows_path"`
18386     new_path="$unix_path"
18387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18389     new_path="$unix_path"
18390   fi
18391 
18392 
18393     new_path=`$WHICH "$new_path" 2> /dev/null`
18394 
18395     if test "x$new_path" = x; then
18396       # It's still not found. Now this is an unrecoverable error.
18397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18398 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18399       has_space=`$ECHO "$complete" | $GREP " "`
18400       if test "x$has_space" != x; then
18401         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18402 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18403       fi
18404       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18405     fi
18406   fi
18407 
18408   # Now new_path has a complete unix path to the binary
18409   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18410     # Keep paths in /bin as-is, but remove trailing .exe if any
18411     new_path="${new_path/%.exe/}"
18412     # Do not save /bin paths to all_fixpath_prefixes!
18413   else
18414     # Not in mixed or Windows style, start by that.
18415     new_path=`cmd //c echo $new_path`
18416 
18417   input_path="$new_path"
18418   # Check if we need to convert this using DOS-style short mode. If the path
18419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18420   # take no chances and rewrite it.
18421   # Note: m4 eats our [], so we need to use [ and ] instead.
18422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18423   if test "x$has_forbidden_chars" != x; then
18424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18425     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18426   fi
18427 
18428     # Output is in $new_path
18429 
18430   windows_path="$new_path"
18431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18432     unix_path=`$CYGPATH -u "$windows_path"`
18433     new_path="$unix_path"
18434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18436     new_path="$unix_path"
18437   fi
18438 
18439     # remove trailing .exe if any
18440     new_path="${new_path/%.exe/}"
18441 
18442     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18443     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18444   fi
18445 
18446   else
18447     # We're on a posix platform. Hooray! :)
18448     # First separate the path from the arguments. This will split at the first
18449     # space.
18450     complete="$BUILD_CC"
18451     path="${complete%% *}"
18452     tmp="$complete EOL"
18453     arguments="${tmp#* }"
18454 
18455     # Cannot rely on the command "which" here since it doesn't always work.
18456     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18457     if test -z "$is_absolute_path"; then
18458       # Path to executable is not absolute. Find it.
18459       IFS_save="$IFS"
18460       IFS=:
18461       for p in $PATH; do
18462         if test -f "$p/$path" && test -x "$p/$path"; then
18463           new_path="$p/$path"
18464           break
18465         fi
18466       done
18467       IFS="$IFS_save"
18468     else
18469       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18470 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18471       new_path="$path"
18472     fi
18473 
18474     if test "x$new_path" = x; then
18475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18476 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18477       has_space=`$ECHO "$complete" | $GREP " "`
18478       if test "x$has_space" != x; then
18479         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18480 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18481       fi
18482       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18483     fi
18484   fi
18485 
18486   # Now join together the path and the arguments once again
18487   if test "x$arguments" != xEOL; then
18488     new_complete="$new_path ${arguments% *}"
18489   else
18490     new_complete="$new_path"
18491   fi
18492 
18493   if test "x$complete" != "x$new_complete"; then
18494     BUILD_CC="$new_complete"
18495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18496 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18497   fi
18498 
18499     for ac_prog in cl CC g++
18500 do
18501   # Extract the first word of "$ac_prog", so it can be a program name with args.
18502 set dummy $ac_prog; ac_word=$2
18503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18504 $as_echo_n "checking for $ac_word... " >&6; }
18505 if ${ac_cv_path_BUILD_CXX+:} false; then :
18506   $as_echo_n "(cached) " >&6
18507 else
18508   case $BUILD_CXX in
18509   [\\/]* | ?:[\\/]*)
18510   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18511   ;;
18512   *)
18513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18514 for as_dir in $PATH
18515 do
18516   IFS=$as_save_IFS
18517   test -z "$as_dir" && as_dir=.
18518     for ac_exec_ext in '' $ac_executable_extensions; do
18519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18520     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18522     break 2
18523   fi
18524 done
18525   done
18526 IFS=$as_save_IFS
18527 
18528   ;;
18529 esac
18530 fi
18531 BUILD_CXX=$ac_cv_path_BUILD_CXX
18532 if test -n "$BUILD_CXX"; then
18533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18534 $as_echo "$BUILD_CXX" >&6; }
18535 else
18536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18537 $as_echo "no" >&6; }
18538 fi
18539 
18540 
18541   test -n "$BUILD_CXX" && break
18542 done
18543 
18544 
18545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18546 
18547   # First separate the path from the arguments. This will split at the first
18548   # space.
18549   complete="$BUILD_CXX"
18550   path="${complete%% *}"
18551   tmp="$complete EOL"
18552   arguments="${tmp#* }"
18553 
18554   # Input might be given as Windows format, start by converting to
18555   # unix format.
18556   new_path=`$CYGPATH -u "$path"`
18557 
18558   # Now try to locate executable using which
18559   new_path=`$WHICH "$new_path" 2> /dev/null`
18560   # bat and cmd files are not always considered executable in cygwin causing which
18561   # to not find them
18562   if test "x$new_path" = x \
18563       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18564       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18565     new_path=`$CYGPATH -u "$path"`
18566   fi
18567   if test "x$new_path" = x; then
18568     # Oops. Which didn't find the executable.
18569     # The splitting of arguments from the executable at a space might have been incorrect,
18570     # since paths with space are more likely in Windows. Give it another try with the whole
18571     # argument.
18572     path="$complete"
18573     arguments="EOL"
18574     new_path=`$CYGPATH -u "$path"`
18575     new_path=`$WHICH "$new_path" 2> /dev/null`
18576     # bat and cmd files are not always considered executable in cygwin causing which
18577     # to not find them
18578     if test "x$new_path" = x \
18579         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18580         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18581       new_path=`$CYGPATH -u "$path"`
18582     fi
18583     if test "x$new_path" = x; then
18584       # It's still not found. Now this is an unrecoverable error.
18585       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18586 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18587       has_space=`$ECHO "$complete" | $GREP " "`
18588       if test "x$has_space" != x; then
18589         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18590 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18591       fi
18592       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18593     fi
18594   fi
18595 
18596   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18597   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18598   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18599   # "foo.exe" is OK but "foo" is an error.
18600   #
18601   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18602   # It is also a way to make sure we got the proper file name for the real test later on.
18603   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18604   if test "x$test_shortpath" = x; then
18605     # Short path failed, file does not exist as specified.
18606     # Try adding .exe or .cmd
18607     if test -f "${new_path}.exe"; then
18608       input_to_shortpath="${new_path}.exe"
18609     elif test -f "${new_path}.cmd"; then
18610       input_to_shortpath="${new_path}.cmd"
18611     else
18612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18613 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18614       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18615 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18616       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18617     fi
18618   else
18619     input_to_shortpath="$new_path"
18620   fi
18621 
18622   # Call helper function which possibly converts this using DOS-style short mode.
18623   # If so, the updated path is stored in $new_path.
18624   new_path="$input_to_shortpath"
18625 
18626   input_path="$input_to_shortpath"
18627   # Check if we need to convert this using DOS-style short mode. If the path
18628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18629   # take no chances and rewrite it.
18630   # Note: m4 eats our [], so we need to use [ and ] instead.
18631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18632   if test "x$has_forbidden_chars" != x; then
18633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18634     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18635     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18636     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18637       # Going to short mode and back again did indeed matter. Since short mode is
18638       # case insensitive, let's make it lowercase to improve readability.
18639       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18640       # Now convert it back to Unix-stile (cygpath)
18641       input_path=`$CYGPATH -u "$shortmode_path"`
18642       new_path="$input_path"
18643     fi
18644   fi
18645 
18646   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18647   if test "x$test_cygdrive_prefix" = x; then
18648     # As a simple fix, exclude /usr/bin since it's not a real path.
18649     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18650       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18651       # a path prefixed by /cygdrive for fixpath to work.
18652       new_path="$CYGWIN_ROOT_PATH$input_path"
18653     fi
18654   fi
18655 
18656   # remove trailing .exe if any
18657   new_path="${new_path/%.exe/}"
18658 
18659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18660 
18661   # First separate the path from the arguments. This will split at the first
18662   # space.
18663   complete="$BUILD_CXX"
18664   path="${complete%% *}"
18665   tmp="$complete EOL"
18666   arguments="${tmp#* }"
18667 
18668   # Input might be given as Windows format, start by converting to
18669   # unix format.
18670   new_path="$path"
18671 
18672   windows_path="$new_path"
18673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18674     unix_path=`$CYGPATH -u "$windows_path"`
18675     new_path="$unix_path"
18676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18678     new_path="$unix_path"
18679   fi
18680 
18681 
18682   # Now try to locate executable using which
18683   new_path=`$WHICH "$new_path" 2> /dev/null`
18684 
18685   if test "x$new_path" = x; then
18686     # Oops. Which didn't find the executable.
18687     # The splitting of arguments from the executable at a space might have been incorrect,
18688     # since paths with space are more likely in Windows. Give it another try with the whole
18689     # argument.
18690     path="$complete"
18691     arguments="EOL"
18692     new_path="$path"
18693 
18694   windows_path="$new_path"
18695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18696     unix_path=`$CYGPATH -u "$windows_path"`
18697     new_path="$unix_path"
18698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18700     new_path="$unix_path"
18701   fi
18702 
18703 
18704     new_path=`$WHICH "$new_path" 2> /dev/null`
18705 
18706     if test "x$new_path" = x; then
18707       # It's still not found. Now this is an unrecoverable error.
18708       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18709 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18710       has_space=`$ECHO "$complete" | $GREP " "`
18711       if test "x$has_space" != x; then
18712         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18713 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18714       fi
18715       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18716     fi
18717   fi
18718 
18719   # Now new_path has a complete unix path to the binary
18720   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18721     # Keep paths in /bin as-is, but remove trailing .exe if any
18722     new_path="${new_path/%.exe/}"
18723     # Do not save /bin paths to all_fixpath_prefixes!
18724   else
18725     # Not in mixed or Windows style, start by that.
18726     new_path=`cmd //c echo $new_path`
18727 
18728   input_path="$new_path"
18729   # Check if we need to convert this using DOS-style short mode. If the path
18730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18731   # take no chances and rewrite it.
18732   # Note: m4 eats our [], so we need to use [ and ] instead.
18733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18734   if test "x$has_forbidden_chars" != x; then
18735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18737   fi
18738 
18739     # Output is in $new_path
18740 
18741   windows_path="$new_path"
18742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18743     unix_path=`$CYGPATH -u "$windows_path"`
18744     new_path="$unix_path"
18745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18746     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18747     new_path="$unix_path"
18748   fi
18749 
18750     # remove trailing .exe if any
18751     new_path="${new_path/%.exe/}"
18752 
18753     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18754     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18755   fi
18756 
18757   else
18758     # We're on a posix platform. Hooray! :)
18759     # First separate the path from the arguments. This will split at the first
18760     # space.
18761     complete="$BUILD_CXX"
18762     path="${complete%% *}"
18763     tmp="$complete EOL"
18764     arguments="${tmp#* }"
18765 
18766     # Cannot rely on the command "which" here since it doesn't always work.
18767     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18768     if test -z "$is_absolute_path"; then
18769       # Path to executable is not absolute. Find it.
18770       IFS_save="$IFS"
18771       IFS=:
18772       for p in $PATH; do
18773         if test -f "$p/$path" && test -x "$p/$path"; then
18774           new_path="$p/$path"
18775           break
18776         fi
18777       done
18778       IFS="$IFS_save"
18779     else
18780       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18781 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18782       new_path="$path"
18783     fi
18784 
18785     if test "x$new_path" = x; then
18786       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18787 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18788       has_space=`$ECHO "$complete" | $GREP " "`
18789       if test "x$has_space" != x; then
18790         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18791 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18792       fi
18793       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18794     fi
18795   fi
18796 
18797   # Now join together the path and the arguments once again
18798   if test "x$arguments" != xEOL; then
18799     new_complete="$new_path ${arguments% *}"
18800   else
18801     new_complete="$new_path"
18802   fi
18803 
18804   if test "x$complete" != "x$new_complete"; then
18805     BUILD_CXX="$new_complete"
18806     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18807 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18808   fi
18809 
18810     # Extract the first word of "ld", so it can be a program name with args.
18811 set dummy ld; ac_word=$2
18812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18813 $as_echo_n "checking for $ac_word... " >&6; }
18814 if ${ac_cv_path_BUILD_LD+:} false; then :
18815   $as_echo_n "(cached) " >&6
18816 else
18817   case $BUILD_LD in
18818   [\\/]* | ?:[\\/]*)
18819   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18820   ;;
18821   *)
18822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18823 for as_dir in $PATH
18824 do
18825   IFS=$as_save_IFS
18826   test -z "$as_dir" && as_dir=.
18827     for ac_exec_ext in '' $ac_executable_extensions; do
18828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18829     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18831     break 2
18832   fi
18833 done
18834   done
18835 IFS=$as_save_IFS
18836 
18837   ;;
18838 esac
18839 fi
18840 BUILD_LD=$ac_cv_path_BUILD_LD
18841 if test -n "$BUILD_LD"; then
18842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18843 $as_echo "$BUILD_LD" >&6; }
18844 else
18845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18846 $as_echo "no" >&6; }
18847 fi
18848 
18849 
18850 
18851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18852 
18853   # First separate the path from the arguments. This will split at the first
18854   # space.
18855   complete="$BUILD_LD"
18856   path="${complete%% *}"
18857   tmp="$complete EOL"
18858   arguments="${tmp#* }"
18859 
18860   # Input might be given as Windows format, start by converting to
18861   # unix format.
18862   new_path=`$CYGPATH -u "$path"`
18863 
18864   # Now try to locate executable using which
18865   new_path=`$WHICH "$new_path" 2> /dev/null`
18866   # bat and cmd files are not always considered executable in cygwin causing which
18867   # to not find them
18868   if test "x$new_path" = x \
18869       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18870       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18871     new_path=`$CYGPATH -u "$path"`
18872   fi
18873   if test "x$new_path" = x; then
18874     # Oops. Which didn't find the executable.
18875     # The splitting of arguments from the executable at a space might have been incorrect,
18876     # since paths with space are more likely in Windows. Give it another try with the whole
18877     # argument.
18878     path="$complete"
18879     arguments="EOL"
18880     new_path=`$CYGPATH -u "$path"`
18881     new_path=`$WHICH "$new_path" 2> /dev/null`
18882     # bat and cmd files are not always considered executable in cygwin causing which
18883     # to not find them
18884     if test "x$new_path" = x \
18885         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18886         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18887       new_path=`$CYGPATH -u "$path"`
18888     fi
18889     if test "x$new_path" = x; then
18890       # It's still not found. Now this is an unrecoverable error.
18891       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18892 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18893       has_space=`$ECHO "$complete" | $GREP " "`
18894       if test "x$has_space" != x; then
18895         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18896 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18897       fi
18898       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18899     fi
18900   fi
18901 
18902   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18903   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18904   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18905   # "foo.exe" is OK but "foo" is an error.
18906   #
18907   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18908   # It is also a way to make sure we got the proper file name for the real test later on.
18909   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18910   if test "x$test_shortpath" = x; then
18911     # Short path failed, file does not exist as specified.
18912     # Try adding .exe or .cmd
18913     if test -f "${new_path}.exe"; then
18914       input_to_shortpath="${new_path}.exe"
18915     elif test -f "${new_path}.cmd"; then
18916       input_to_shortpath="${new_path}.cmd"
18917     else
18918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18919 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18920       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18921 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18922       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18923     fi
18924   else
18925     input_to_shortpath="$new_path"
18926   fi
18927 
18928   # Call helper function which possibly converts this using DOS-style short mode.
18929   # If so, the updated path is stored in $new_path.
18930   new_path="$input_to_shortpath"
18931 
18932   input_path="$input_to_shortpath"
18933   # Check if we need to convert this using DOS-style short mode. If the path
18934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18935   # take no chances and rewrite it.
18936   # Note: m4 eats our [], so we need to use [ and ] instead.
18937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18938   if test "x$has_forbidden_chars" != x; then
18939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18940     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18941     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18942     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18943       # Going to short mode and back again did indeed matter. Since short mode is
18944       # case insensitive, let's make it lowercase to improve readability.
18945       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18946       # Now convert it back to Unix-stile (cygpath)
18947       input_path=`$CYGPATH -u "$shortmode_path"`
18948       new_path="$input_path"
18949     fi
18950   fi
18951 
18952   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18953   if test "x$test_cygdrive_prefix" = x; then
18954     # As a simple fix, exclude /usr/bin since it's not a real path.
18955     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18956       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18957       # a path prefixed by /cygdrive for fixpath to work.
18958       new_path="$CYGWIN_ROOT_PATH$input_path"
18959     fi
18960   fi
18961 
18962   # remove trailing .exe if any
18963   new_path="${new_path/%.exe/}"
18964 
18965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18966 
18967   # First separate the path from the arguments. This will split at the first
18968   # space.
18969   complete="$BUILD_LD"
18970   path="${complete%% *}"
18971   tmp="$complete EOL"
18972   arguments="${tmp#* }"
18973 
18974   # Input might be given as Windows format, start by converting to
18975   # unix format.
18976   new_path="$path"
18977 
18978   windows_path="$new_path"
18979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18980     unix_path=`$CYGPATH -u "$windows_path"`
18981     new_path="$unix_path"
18982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18984     new_path="$unix_path"
18985   fi
18986 
18987 
18988   # Now try to locate executable using which
18989   new_path=`$WHICH "$new_path" 2> /dev/null`
18990 
18991   if test "x$new_path" = x; then
18992     # Oops. Which didn't find the executable.
18993     # The splitting of arguments from the executable at a space might have been incorrect,
18994     # since paths with space are more likely in Windows. Give it another try with the whole
18995     # argument.
18996     path="$complete"
18997     arguments="EOL"
18998     new_path="$path"
18999 
19000   windows_path="$new_path"
19001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19002     unix_path=`$CYGPATH -u "$windows_path"`
19003     new_path="$unix_path"
19004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19006     new_path="$unix_path"
19007   fi
19008 
19009 
19010     new_path=`$WHICH "$new_path" 2> /dev/null`
19011 
19012     if test "x$new_path" = x; then
19013       # It's still not found. Now this is an unrecoverable error.
19014       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19015 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19016       has_space=`$ECHO "$complete" | $GREP " "`
19017       if test "x$has_space" != x; then
19018         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19019 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19020       fi
19021       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19022     fi
19023   fi
19024 
19025   # Now new_path has a complete unix path to the binary
19026   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19027     # Keep paths in /bin as-is, but remove trailing .exe if any
19028     new_path="${new_path/%.exe/}"
19029     # Do not save /bin paths to all_fixpath_prefixes!
19030   else
19031     # Not in mixed or Windows style, start by that.
19032     new_path=`cmd //c echo $new_path`
19033 
19034   input_path="$new_path"
19035   # Check if we need to convert this using DOS-style short mode. If the path
19036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19037   # take no chances and rewrite it.
19038   # Note: m4 eats our [], so we need to use [ and ] instead.
19039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19040   if test "x$has_forbidden_chars" != x; then
19041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19042     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19043   fi
19044 
19045     # Output is in $new_path
19046 
19047   windows_path="$new_path"
19048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19049     unix_path=`$CYGPATH -u "$windows_path"`
19050     new_path="$unix_path"
19051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19053     new_path="$unix_path"
19054   fi
19055 
19056     # remove trailing .exe if any
19057     new_path="${new_path/%.exe/}"
19058 
19059     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19060     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19061   fi
19062 
19063   else
19064     # We're on a posix platform. Hooray! :)
19065     # First separate the path from the arguments. This will split at the first
19066     # space.
19067     complete="$BUILD_LD"
19068     path="${complete%% *}"
19069     tmp="$complete EOL"
19070     arguments="${tmp#* }"
19071 
19072     # Cannot rely on the command "which" here since it doesn't always work.
19073     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19074     if test -z "$is_absolute_path"; then
19075       # Path to executable is not absolute. Find it.
19076       IFS_save="$IFS"
19077       IFS=:
19078       for p in $PATH; do
19079         if test -f "$p/$path" && test -x "$p/$path"; then
19080           new_path="$p/$path"
19081           break
19082         fi
19083       done
19084       IFS="$IFS_save"
19085     else
19086       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19087 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19088       new_path="$path"
19089     fi
19090 
19091     if test "x$new_path" = x; then
19092       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19093 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19094       has_space=`$ECHO "$complete" | $GREP " "`
19095       if test "x$has_space" != x; then
19096         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19097 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19098       fi
19099       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19100     fi
19101   fi
19102 
19103   # Now join together the path and the arguments once again
19104   if test "x$arguments" != xEOL; then
19105     new_complete="$new_path ${arguments% *}"
19106   else
19107     new_complete="$new_path"
19108   fi
19109 
19110   if test "x$complete" != "x$new_complete"; then
19111     BUILD_LD="$new_complete"
19112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19113 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19114   fi
19115 
19116   fi
19117 
19118 
19119 
19120 
19121   # If a devkit is found on the builddeps server, then prepend its path to the
19122   # PATH variable. If there are cross compilers available in the devkit, these
19123   # will be found by AC_PROG_CC et al.
19124   DEVKIT=
19125 
19126 
19127   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19128     # Source the builddeps file again, to make sure it uses the latest variables!
19129     . $builddepsfile
19130     # Look for a target and build machine specific resource!
19131     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19132     if test "x$resource" = x; then
19133       # Ok, lets instead look for a target specific resource
19134       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19135     fi
19136     if test "x$resource" = x; then
19137       # Ok, lets instead look for a build specific resource
19138       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19139     fi
19140     if test "x$resource" = x; then
19141       # Ok, lets instead look for a generic resource
19142       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19143       resource=${builddep_devkit}
19144     fi
19145     if test "x$resource" != x; then
19146       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19147 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19148       # If the resource in the builddeps.conf file is an existing directory,
19149       # for example /java/linux/cups
19150       if test -d ${resource}; then
19151         depdir=${resource}
19152       else
19153 
19154   # devkit is for example mymodule
19155   # $resource is for example libs/general/libmymod_1_2_3.zip
19156   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19157   # $with_builddeps_dir is for example /localhome/builddeps
19158   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19159   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19160   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19161   filename=`basename $resource`
19162   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19163   filebase=${filename%%.*}
19164   extension=${filename#*.}
19165   installdir=$with_builddeps_dir/$filebase
19166   if test ! -f $installdir/$filename.unpacked; then
19167     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19168 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19169     if test ! -d $installdir; then
19170       mkdir -p $installdir
19171     fi
19172     if test ! -d $installdir; then
19173       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19174     fi
19175     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19176     touch $tmpfile
19177     if test ! -f $tmpfile; then
19178       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19179     fi
19180 
19181   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19182   # $tmpfile is the local file name for the downloaded file.
19183   VALID_TOOL=no
19184   if test "x$BDEPS_FTP" = xwget; then
19185     VALID_TOOL=yes
19186     wget -O $tmpfile $with_builddeps_server/$resource
19187   fi
19188   if test "x$BDEPS_FTP" = xlftp; then
19189     VALID_TOOL=yes
19190     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19191   fi
19192   if test "x$BDEPS_FTP" = xftp; then
19193     VALID_TOOL=yes
19194     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19195     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19196     FTPUSERPWD=${FTPSERVER%%@*}
19197     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19198       FTPUSER=${userpwd%%:*}
19199       FTPPWD=${userpwd#*@}
19200       FTPSERVER=${FTPSERVER#*@}
19201     else
19202       FTPUSER=ftp
19203       FTPPWD=ftp
19204     fi
19205     # the "pass" command does not work on some
19206     # ftp clients (read ftp.exe) but if it works,
19207     # passive mode is better!
19208     ( \
19209         echo "user $FTPUSER $FTPPWD"        ; \
19210         echo "pass"                         ; \
19211         echo "bin"                          ; \
19212         echo "get $FTPPATH $tmpfile"              ; \
19213     ) | ftp -in $FTPSERVER
19214   fi
19215   if test "x$VALID_TOOL" != xyes; then
19216     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19217   fi
19218 
19219     mv $tmpfile $installdir/$filename
19220     if test ! -s $installdir/$filename; then
19221       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19222     fi
19223     case "$extension" in
19224       zip)  echo "Unzipping $installdir/$filename..."
19225         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19226         ;;
19227       tar.gz) echo "Untaring $installdir/$filename..."
19228         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19229         ;;
19230       tgz) echo "Untaring $installdir/$filename..."
19231         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19232         ;;
19233       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19234         ;;
19235     esac
19236   fi
19237   if test -f $installdir/$filename.unpacked; then
19238     depdir=$installdir
19239   fi
19240 
19241       fi
19242       # Source the builddeps file again, because in the previous command, the depdir
19243       # was updated to point at the current build dependency install directory.
19244       . $builddepsfile
19245       # Now extract variables from the builddeps.conf files.
19246       theroot=${builddep_devkit_ROOT}
19247       thecflags=${builddep_devkit_CFLAGS}
19248       thelibs=${builddep_devkit_LIBS}
19249       if test "x$depdir" = x; then
19250         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19251       fi
19252       DEVKIT=$depdir
19253       if test "x$theroot" != x; then
19254         DEVKIT="$theroot"
19255       fi
19256       if test "x$thecflags" != x; then
19257         DEVKIT_CFLAGS="$thecflags"
19258       fi
19259       if test "x$thelibs" != x; then
19260         DEVKIT_LIBS="$thelibs"
19261       fi
19262 
19263         # Found devkit
19264         PATH="$DEVKIT/bin:$PATH"
19265         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19266         if test "x$x_includes" = "xNONE"; then
19267           x_includes="$SYS_ROOT/usr/include/X11"
19268         fi
19269         if test "x$x_libraries" = "xNONE"; then
19270           x_libraries="$SYS_ROOT/usr/lib"
19271         fi
19272 
19273 
19274     fi
19275 
19276   fi
19277 
19278 
19279   # Store the CFLAGS etal passed to the configure script.
19280   ORG_CFLAGS="$CFLAGS"
19281   ORG_CXXFLAGS="$CXXFLAGS"
19282   ORG_OBJCFLAGS="$OBJCFLAGS"
19283 
19284   # autoconf magic only relies on PATH, so update it if tools dir is specified
19285   OLD_PATH="$PATH"
19286   if test "x$TOOLS_DIR" != x; then
19287     PATH=$TOOLS_DIR:$PATH
19288   fi
19289 
19290   # Before we locate the compilers, we need to sanitize the Xcode build environment
19291   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19292     # determine path to Xcode developer directory
19293     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
19294     SET_DEVELOPER_DIR=
19295 
19296     if test -n "$XCODE_PATH"; then
19297       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
19298     fi
19299 
19300     # DEVELOPER_DIR could also be provided directly
19301     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
19302 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
19303     if test -n "$DEVELOPER_DIR"; then
19304       if test ! -d "$DEVELOPER_DIR"; then
19305         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
19306       fi
19307       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
19308         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
19309       fi
19310       # make it visible to all the tools immediately
19311       export DEVELOPER_DIR
19312       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
19313       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
19314 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
19315     else
19316       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19317 $as_echo "no" >&6; }
19318     fi
19319 
19320 
19321     # Extract the first word of "xcodebuild", so it can be a program name with args.
19322 set dummy xcodebuild; ac_word=$2
19323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19324 $as_echo_n "checking for $ac_word... " >&6; }
19325 if ${ac_cv_path_XCODEBUILD+:} false; then :
19326   $as_echo_n "(cached) " >&6
19327 else
19328   case $XCODEBUILD in
19329   [\\/]* | ?:[\\/]*)
19330   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
19331   ;;
19332   *)
19333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19334 for as_dir in $PATH
19335 do
19336   IFS=$as_save_IFS
19337   test -z "$as_dir" && as_dir=.
19338     for ac_exec_ext in '' $ac_executable_extensions; do
19339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19340     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
19341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19342     break 2
19343   fi
19344 done
19345   done
19346 IFS=$as_save_IFS
19347 
19348   ;;
19349 esac
19350 fi
19351 XCODEBUILD=$ac_cv_path_XCODEBUILD
19352 if test -n "$XCODEBUILD"; then
19353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
19354 $as_echo "$XCODEBUILD" >&6; }
19355 else
19356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19357 $as_echo "no" >&6; }
19358 fi
19359 
19360 
19361     if test -z "$XCODEBUILD"; then
19362       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
19363     fi
19364 
19365     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
19366     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
19367     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
19368     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
19369       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
19370     fi
19371 
19372     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
19373     # clang and clang++, which will break the build. So handle that here if we need to.
19374     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
19375       # use xcrun to find the real gcc and add it's directory to PATH
19376       # then autoconf magic will find it
19377       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
19378 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
19379       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
19380       PATH="$XCODE_BIN_PATH":$PATH
19381     fi
19382 
19383     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
19384     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
19385 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
19386     # allow SDKNAME to be set to override the default SDK selection
19387     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
19388     if test -n "$SDKPATH"; then
19389       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
19390 $as_echo "$SDKPATH" >&6; }
19391     else
19392       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
19393 $as_echo "(none, will use system headers and frameworks)" >&6; }
19394     fi
19395 
19396 
19397     # Perform a basic sanity test
19398     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
19399       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
19400     fi
19401 
19402     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
19403     if test -n "$SDKPATH"; then
19404       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
19405       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19406       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19407       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19408     fi
19409 
19410     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
19411     # setting this here means it doesn't have to be peppered throughout the forest
19412     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19413     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19414     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19415   fi
19416 
19417   ### Locate C compiler (CC)
19418 
19419   # On windows, only cl.exe is supported.
19420   # On Solaris, cc is preferred to gcc.
19421   # Elsewhere, gcc is preferred to cc.
19422 
19423   if test "x$CC" != x; then
19424     COMPILER_CHECK_LIST="$CC"
19425   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19426     COMPILER_CHECK_LIST="cl"
19427   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19428     COMPILER_CHECK_LIST="cc gcc"
19429   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19430     # Do not probe for cc on AIX.
19431     COMPILER_CHECK_LIST="xlc_r"
19432   else
19433     COMPILER_CHECK_LIST="gcc cc"
19434   fi
19435 
19436 
19437   COMPILER_NAME=C
19438 
19439   CC=
19440   # If TOOLS_DIR is set, check for all compiler names in there first
19441   # before checking the rest of the PATH.
19442   if test -n "$TOOLS_DIR"; then
19443     PATH_save="$PATH"
19444     PATH="$TOOLS_DIR"
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_TOOLS_DIR_CC+:} false; then :
19452   $as_echo_n "(cached) " >&6
19453 else
19454   case $TOOLS_DIR_CC in
19455   [\\/]* | ?:[\\/]*)
19456   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_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_TOOLS_DIR_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 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19478 if test -n "$TOOLS_DIR_CC"; then
19479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19480 $as_echo "$TOOLS_DIR_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 "$TOOLS_DIR_CC" && break
19488 done
19489 
19490     CC=$TOOLS_DIR_CC
19491     PATH="$PATH_save"
19492   fi
19493 
19494   # AC_PATH_PROGS can't be run multiple times with the same variable,
19495   # so create a new name for this run.
19496   if test "x$CC" = x; then
19497     for ac_prog in $COMPILER_CHECK_LIST
19498 do
19499   # Extract the first word of "$ac_prog", so it can be a program name with args.
19500 set dummy $ac_prog; ac_word=$2
19501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19502 $as_echo_n "checking for $ac_word... " >&6; }
19503 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19504   $as_echo_n "(cached) " >&6
19505 else
19506   case $POTENTIAL_CC in
19507   [\\/]* | ?:[\\/]*)
19508   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19509   ;;
19510   *)
19511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19512 for as_dir in $PATH
19513 do
19514   IFS=$as_save_IFS
19515   test -z "$as_dir" && as_dir=.
19516     for ac_exec_ext in '' $ac_executable_extensions; do
19517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19518     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19520     break 2
19521   fi
19522 done
19523   done
19524 IFS=$as_save_IFS
19525 
19526   ;;
19527 esac
19528 fi
19529 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19530 if test -n "$POTENTIAL_CC"; then
19531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19532 $as_echo "$POTENTIAL_CC" >&6; }
19533 else
19534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19535 $as_echo "no" >&6; }
19536 fi
19537 
19538 
19539   test -n "$POTENTIAL_CC" && break
19540 done
19541 
19542     CC=$POTENTIAL_CC
19543   fi
19544 
19545   if test "x$CC" = x; then
19546 
19547   # Print a helpful message on how to acquire the necessary build dependency.
19548   # devkit is the help tag: freetype, cups, pulse, alsa etc
19549   MISSING_DEPENDENCY=devkit
19550 
19551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19552     cygwin_help $MISSING_DEPENDENCY
19553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19554     msys_help $MISSING_DEPENDENCY
19555   else
19556     PKGHANDLER_COMMAND=
19557 
19558     case $PKGHANDLER in
19559       apt-get)
19560         apt_help     $MISSING_DEPENDENCY ;;
19561       yum)
19562         yum_help     $MISSING_DEPENDENCY ;;
19563       port)
19564         port_help    $MISSING_DEPENDENCY ;;
19565       pkgutil)
19566         pkgutil_help $MISSING_DEPENDENCY ;;
19567       pkgadd)
19568         pkgadd_help  $MISSING_DEPENDENCY ;;
19569     esac
19570 
19571     if test "x$PKGHANDLER_COMMAND" != x; then
19572       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19573     fi
19574   fi
19575 
19576     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19577   fi
19578 
19579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19580 
19581   # First separate the path from the arguments. This will split at the first
19582   # space.
19583   complete="$CC"
19584   path="${complete%% *}"
19585   tmp="$complete EOL"
19586   arguments="${tmp#* }"
19587 
19588   # Input might be given as Windows format, start by converting to
19589   # unix format.
19590   new_path=`$CYGPATH -u "$path"`
19591 
19592   # Now try to locate executable using which
19593   new_path=`$WHICH "$new_path" 2> /dev/null`
19594   # bat and cmd files are not always considered executable in cygwin causing which
19595   # to not find them
19596   if test "x$new_path" = x \
19597       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19598       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19599     new_path=`$CYGPATH -u "$path"`
19600   fi
19601   if test "x$new_path" = x; then
19602     # Oops. Which didn't find the executable.
19603     # The splitting of arguments from the executable at a space might have been incorrect,
19604     # since paths with space are more likely in Windows. Give it another try with the whole
19605     # argument.
19606     path="$complete"
19607     arguments="EOL"
19608     new_path=`$CYGPATH -u "$path"`
19609     new_path=`$WHICH "$new_path" 2> /dev/null`
19610     # bat and cmd files are not always considered executable in cygwin causing which
19611     # to not find them
19612     if test "x$new_path" = x \
19613         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19614         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19615       new_path=`$CYGPATH -u "$path"`
19616     fi
19617     if test "x$new_path" = x; then
19618       # It's still not found. Now this is an unrecoverable error.
19619       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19620 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19621       has_space=`$ECHO "$complete" | $GREP " "`
19622       if test "x$has_space" != x; then
19623         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19624 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19625       fi
19626       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19627     fi
19628   fi
19629 
19630   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19631   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19632   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19633   # "foo.exe" is OK but "foo" is an error.
19634   #
19635   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19636   # It is also a way to make sure we got the proper file name for the real test later on.
19637   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19638   if test "x$test_shortpath" = x; then
19639     # Short path failed, file does not exist as specified.
19640     # Try adding .exe or .cmd
19641     if test -f "${new_path}.exe"; then
19642       input_to_shortpath="${new_path}.exe"
19643     elif test -f "${new_path}.cmd"; then
19644       input_to_shortpath="${new_path}.cmd"
19645     else
19646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19647 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19648       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19649 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19650       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19651     fi
19652   else
19653     input_to_shortpath="$new_path"
19654   fi
19655 
19656   # Call helper function which possibly converts this using DOS-style short mode.
19657   # If so, the updated path is stored in $new_path.
19658   new_path="$input_to_shortpath"
19659 
19660   input_path="$input_to_shortpath"
19661   # Check if we need to convert this using DOS-style short mode. If the path
19662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19663   # take no chances and rewrite it.
19664   # Note: m4 eats our [], so we need to use [ and ] instead.
19665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19666   if test "x$has_forbidden_chars" != x; then
19667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19668     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19669     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19670     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19671       # Going to short mode and back again did indeed matter. Since short mode is
19672       # case insensitive, let's make it lowercase to improve readability.
19673       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19674       # Now convert it back to Unix-stile (cygpath)
19675       input_path=`$CYGPATH -u "$shortmode_path"`
19676       new_path="$input_path"
19677     fi
19678   fi
19679 
19680   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19681   if test "x$test_cygdrive_prefix" = x; then
19682     # As a simple fix, exclude /usr/bin since it's not a real path.
19683     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19684       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19685       # a path prefixed by /cygdrive for fixpath to work.
19686       new_path="$CYGWIN_ROOT_PATH$input_path"
19687     fi
19688   fi
19689 
19690   # remove trailing .exe if any
19691   new_path="${new_path/%.exe/}"
19692 
19693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19694 
19695   # First separate the path from the arguments. This will split at the first
19696   # space.
19697   complete="$CC"
19698   path="${complete%% *}"
19699   tmp="$complete EOL"
19700   arguments="${tmp#* }"
19701 
19702   # Input might be given as Windows format, start by converting to
19703   # unix format.
19704   new_path="$path"
19705 
19706   windows_path="$new_path"
19707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19708     unix_path=`$CYGPATH -u "$windows_path"`
19709     new_path="$unix_path"
19710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19711     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19712     new_path="$unix_path"
19713   fi
19714 
19715 
19716   # Now try to locate executable using which
19717   new_path=`$WHICH "$new_path" 2> /dev/null`
19718 
19719   if test "x$new_path" = x; then
19720     # Oops. Which didn't find the executable.
19721     # The splitting of arguments from the executable at a space might have been incorrect,
19722     # since paths with space are more likely in Windows. Give it another try with the whole
19723     # argument.
19724     path="$complete"
19725     arguments="EOL"
19726     new_path="$path"
19727 
19728   windows_path="$new_path"
19729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19730     unix_path=`$CYGPATH -u "$windows_path"`
19731     new_path="$unix_path"
19732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19734     new_path="$unix_path"
19735   fi
19736 
19737 
19738     new_path=`$WHICH "$new_path" 2> /dev/null`
19739 
19740     if test "x$new_path" = x; then
19741       # It's still not found. Now this is an unrecoverable error.
19742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19743 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19744       has_space=`$ECHO "$complete" | $GREP " "`
19745       if test "x$has_space" != x; then
19746         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19747 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19748       fi
19749       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19750     fi
19751   fi
19752 
19753   # Now new_path has a complete unix path to the binary
19754   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19755     # Keep paths in /bin as-is, but remove trailing .exe if any
19756     new_path="${new_path/%.exe/}"
19757     # Do not save /bin paths to all_fixpath_prefixes!
19758   else
19759     # Not in mixed or Windows style, start by that.
19760     new_path=`cmd //c echo $new_path`
19761 
19762   input_path="$new_path"
19763   # Check if we need to convert this using DOS-style short mode. If the path
19764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19765   # take no chances and rewrite it.
19766   # Note: m4 eats our [], so we need to use [ and ] instead.
19767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19768   if test "x$has_forbidden_chars" != x; then
19769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19771   fi
19772 
19773     # Output is in $new_path
19774 
19775   windows_path="$new_path"
19776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19777     unix_path=`$CYGPATH -u "$windows_path"`
19778     new_path="$unix_path"
19779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19781     new_path="$unix_path"
19782   fi
19783 
19784     # remove trailing .exe if any
19785     new_path="${new_path/%.exe/}"
19786 
19787     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19788     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19789   fi
19790 
19791   else
19792     # We're on a posix platform. Hooray! :)
19793     # First separate the path from the arguments. This will split at the first
19794     # space.
19795     complete="$CC"
19796     path="${complete%% *}"
19797     tmp="$complete EOL"
19798     arguments="${tmp#* }"
19799 
19800     # Cannot rely on the command "which" here since it doesn't always work.
19801     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19802     if test -z "$is_absolute_path"; then
19803       # Path to executable is not absolute. Find it.
19804       IFS_save="$IFS"
19805       IFS=:
19806       for p in $PATH; do
19807         if test -f "$p/$path" && test -x "$p/$path"; then
19808           new_path="$p/$path"
19809           break
19810         fi
19811       done
19812       IFS="$IFS_save"
19813     else
19814       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19815 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19816       new_path="$path"
19817     fi
19818 
19819     if test "x$new_path" = x; then
19820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19821 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19822       has_space=`$ECHO "$complete" | $GREP " "`
19823       if test "x$has_space" != x; then
19824         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19825 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19826       fi
19827       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19828     fi
19829   fi
19830 
19831   # Now join together the path and the arguments once again
19832   if test "x$arguments" != xEOL; then
19833     new_complete="$new_path ${arguments% *}"
19834   else
19835     new_complete="$new_path"
19836   fi
19837 
19838   if test "x$complete" != "x$new_complete"; then
19839     CC="$new_complete"
19840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19841 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19842   fi
19843 
19844   TEST_COMPILER="$CC"
19845   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19846   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19847   if test "x$OPENJDK_BUILD_OS" != xaix; then
19848     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19849 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19850 
19851   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19852     # Follow a chain of symbolic links. Use readlink
19853     # where it exists, else fall back to horribly
19854     # complicated shell code.
19855     if test "x$READLINK_TESTED" != yes; then
19856       # On MacOSX there is a readlink tool with a different
19857       # purpose than the GNU readlink tool. Check the found readlink.
19858       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19859       if test "x$ISGNU" = x; then
19860         # A readlink that we do not know how to use.
19861         # Are there other non-GNU readlinks out there?
19862         READLINK_TESTED=yes
19863         READLINK=
19864       fi
19865     fi
19866 
19867     if test "x$READLINK" != x; then
19868       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19869     else
19870       # Save the current directory for restoring afterwards
19871       STARTDIR=$PWD
19872       COUNTER=0
19873       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19874       sym_link_file=`$BASENAME $TEST_COMPILER`
19875       cd $sym_link_dir
19876       # Use -P flag to resolve symlinks in directories.
19877       cd `$THEPWDCMD -P`
19878       sym_link_dir=`$THEPWDCMD -P`
19879       # Resolve file symlinks
19880       while test $COUNTER -lt 20; do
19881         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19882         if test "x$ISLINK" == x; then
19883           # This is not a symbolic link! We are done!
19884           break
19885         fi
19886         # Again resolve directory symlinks since the target of the just found
19887         # link could be in a different directory
19888         cd `$DIRNAME $ISLINK`
19889         sym_link_dir=`$THEPWDCMD -P`
19890         sym_link_file=`$BASENAME $ISLINK`
19891         let COUNTER=COUNTER+1
19892       done
19893       cd $STARTDIR
19894       TEST_COMPILER=$sym_link_dir/$sym_link_file
19895     fi
19896   fi
19897 
19898     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19899 $as_echo "$TEST_COMPILER" >&6; }
19900   fi
19901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19902 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19903 
19904   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19905   if test "x$COMPILER_BASENAME" = "xccache"; then
19906     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19907 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19908     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19909     # We want to control ccache invocation ourselves, so ignore this cc and try
19910     # searching again.
19911 
19912     # Remove the path to the fake ccache cc from the PATH
19913     RETRY_COMPILER_SAVED_PATH="$PATH"
19914     COMPILER_DIRNAME=`$DIRNAME $CC`
19915     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19916 
19917     # Try again looking for our compiler
19918     if test -n "$ac_tool_prefix"; then
19919   for ac_prog in $COMPILER_CHECK_LIST
19920   do
19921     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19922 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19924 $as_echo_n "checking for $ac_word... " >&6; }
19925 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19926   $as_echo_n "(cached) " >&6
19927 else
19928   if test -n "$PROPER_COMPILER_CC"; then
19929   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19930 else
19931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19932 for as_dir in $PATH
19933 do
19934   IFS=$as_save_IFS
19935   test -z "$as_dir" && as_dir=.
19936     for ac_exec_ext in '' $ac_executable_extensions; do
19937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19938     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19940     break 2
19941   fi
19942 done
19943   done
19944 IFS=$as_save_IFS
19945 
19946 fi
19947 fi
19948 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19949 if test -n "$PROPER_COMPILER_CC"; then
19950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19951 $as_echo "$PROPER_COMPILER_CC" >&6; }
19952 else
19953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19954 $as_echo "no" >&6; }
19955 fi
19956 
19957 
19958     test -n "$PROPER_COMPILER_CC" && break
19959   done
19960 fi
19961 if test -z "$PROPER_COMPILER_CC"; then
19962   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19963   for ac_prog in $COMPILER_CHECK_LIST
19964 do
19965   # Extract the first word of "$ac_prog", so it can be a program name with args.
19966 set dummy $ac_prog; ac_word=$2
19967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19968 $as_echo_n "checking for $ac_word... " >&6; }
19969 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19970   $as_echo_n "(cached) " >&6
19971 else
19972   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19973   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19974 else
19975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19976 for as_dir in $PATH
19977 do
19978   IFS=$as_save_IFS
19979   test -z "$as_dir" && as_dir=.
19980     for ac_exec_ext in '' $ac_executable_extensions; do
19981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19982     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19984     break 2
19985   fi
19986 done
19987   done
19988 IFS=$as_save_IFS
19989 
19990 fi
19991 fi
19992 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19993 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19995 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19996 else
19997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19998 $as_echo "no" >&6; }
19999 fi
20000 
20001 
20002   test -n "$ac_ct_PROPER_COMPILER_CC" && break
20003 done
20004 
20005   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
20006     PROPER_COMPILER_CC=""
20007   else
20008     case $cross_compiling:$ac_tool_warned in
20009 yes:)
20010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20011 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20012 ac_tool_warned=yes ;;
20013 esac
20014     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
20015   fi
20016 fi
20017 
20018 
20019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20020 
20021   # First separate the path from the arguments. This will split at the first
20022   # space.
20023   complete="$PROPER_COMPILER_CC"
20024   path="${complete%% *}"
20025   tmp="$complete EOL"
20026   arguments="${tmp#* }"
20027 
20028   # Input might be given as Windows format, start by converting to
20029   # unix format.
20030   new_path=`$CYGPATH -u "$path"`
20031 
20032   # Now try to locate executable using which
20033   new_path=`$WHICH "$new_path" 2> /dev/null`
20034   # bat and cmd files are not always considered executable in cygwin causing which
20035   # to not find them
20036   if test "x$new_path" = x \
20037       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20038       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20039     new_path=`$CYGPATH -u "$path"`
20040   fi
20041   if test "x$new_path" = x; then
20042     # Oops. Which didn't find the executable.
20043     # The splitting of arguments from the executable at a space might have been incorrect,
20044     # since paths with space are more likely in Windows. Give it another try with the whole
20045     # argument.
20046     path="$complete"
20047     arguments="EOL"
20048     new_path=`$CYGPATH -u "$path"`
20049     new_path=`$WHICH "$new_path" 2> /dev/null`
20050     # bat and cmd files are not always considered executable in cygwin causing which
20051     # to not find them
20052     if test "x$new_path" = x \
20053         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20054         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20055       new_path=`$CYGPATH -u "$path"`
20056     fi
20057     if test "x$new_path" = x; then
20058       # It's still not found. Now this is an unrecoverable error.
20059       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20060 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20061       has_space=`$ECHO "$complete" | $GREP " "`
20062       if test "x$has_space" != x; then
20063         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20064 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20065       fi
20066       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20067     fi
20068   fi
20069 
20070   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20071   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20072   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20073   # "foo.exe" is OK but "foo" is an error.
20074   #
20075   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20076   # It is also a way to make sure we got the proper file name for the real test later on.
20077   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20078   if test "x$test_shortpath" = x; then
20079     # Short path failed, file does not exist as specified.
20080     # Try adding .exe or .cmd
20081     if test -f "${new_path}.exe"; then
20082       input_to_shortpath="${new_path}.exe"
20083     elif test -f "${new_path}.cmd"; then
20084       input_to_shortpath="${new_path}.cmd"
20085     else
20086       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
20087 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
20088       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20089 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20090       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20091     fi
20092   else
20093     input_to_shortpath="$new_path"
20094   fi
20095 
20096   # Call helper function which possibly converts this using DOS-style short mode.
20097   # If so, the updated path is stored in $new_path.
20098   new_path="$input_to_shortpath"
20099 
20100   input_path="$input_to_shortpath"
20101   # Check if we need to convert this using DOS-style short mode. If the path
20102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20103   # take no chances and rewrite it.
20104   # Note: m4 eats our [], so we need to use [ and ] instead.
20105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20106   if test "x$has_forbidden_chars" != x; then
20107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20108     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20109     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20110     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20111       # Going to short mode and back again did indeed matter. Since short mode is
20112       # case insensitive, let's make it lowercase to improve readability.
20113       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20114       # Now convert it back to Unix-stile (cygpath)
20115       input_path=`$CYGPATH -u "$shortmode_path"`
20116       new_path="$input_path"
20117     fi
20118   fi
20119 
20120   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20121   if test "x$test_cygdrive_prefix" = x; then
20122     # As a simple fix, exclude /usr/bin since it's not a real path.
20123     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20124       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20125       # a path prefixed by /cygdrive for fixpath to work.
20126       new_path="$CYGWIN_ROOT_PATH$input_path"
20127     fi
20128   fi
20129 
20130   # remove trailing .exe if any
20131   new_path="${new_path/%.exe/}"
20132 
20133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20134 
20135   # First separate the path from the arguments. This will split at the first
20136   # space.
20137   complete="$PROPER_COMPILER_CC"
20138   path="${complete%% *}"
20139   tmp="$complete EOL"
20140   arguments="${tmp#* }"
20141 
20142   # Input might be given as Windows format, start by converting to
20143   # unix format.
20144   new_path="$path"
20145 
20146   windows_path="$new_path"
20147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20148     unix_path=`$CYGPATH -u "$windows_path"`
20149     new_path="$unix_path"
20150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20152     new_path="$unix_path"
20153   fi
20154 
20155 
20156   # Now try to locate executable using which
20157   new_path=`$WHICH "$new_path" 2> /dev/null`
20158 
20159   if test "x$new_path" = x; then
20160     # Oops. Which didn't find the executable.
20161     # The splitting of arguments from the executable at a space might have been incorrect,
20162     # since paths with space are more likely in Windows. Give it another try with the whole
20163     # argument.
20164     path="$complete"
20165     arguments="EOL"
20166     new_path="$path"
20167 
20168   windows_path="$new_path"
20169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20170     unix_path=`$CYGPATH -u "$windows_path"`
20171     new_path="$unix_path"
20172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20174     new_path="$unix_path"
20175   fi
20176 
20177 
20178     new_path=`$WHICH "$new_path" 2> /dev/null`
20179 
20180     if test "x$new_path" = x; then
20181       # It's still not found. Now this is an unrecoverable error.
20182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20183 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20184       has_space=`$ECHO "$complete" | $GREP " "`
20185       if test "x$has_space" != x; then
20186         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20187 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20188       fi
20189       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20190     fi
20191   fi
20192 
20193   # Now new_path has a complete unix path to the binary
20194   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20195     # Keep paths in /bin as-is, but remove trailing .exe if any
20196     new_path="${new_path/%.exe/}"
20197     # Do not save /bin paths to all_fixpath_prefixes!
20198   else
20199     # Not in mixed or Windows style, start by that.
20200     new_path=`cmd //c echo $new_path`
20201 
20202   input_path="$new_path"
20203   # Check if we need to convert this using DOS-style short mode. If the path
20204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20205   # take no chances and rewrite it.
20206   # Note: m4 eats our [], so we need to use [ and ] instead.
20207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20208   if test "x$has_forbidden_chars" != x; then
20209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20210     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20211   fi
20212 
20213     # Output is in $new_path
20214 
20215   windows_path="$new_path"
20216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20217     unix_path=`$CYGPATH -u "$windows_path"`
20218     new_path="$unix_path"
20219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20221     new_path="$unix_path"
20222   fi
20223 
20224     # remove trailing .exe if any
20225     new_path="${new_path/%.exe/}"
20226 
20227     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20228     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20229   fi
20230 
20231   else
20232     # We're on a posix platform. Hooray! :)
20233     # First separate the path from the arguments. This will split at the first
20234     # space.
20235     complete="$PROPER_COMPILER_CC"
20236     path="${complete%% *}"
20237     tmp="$complete EOL"
20238     arguments="${tmp#* }"
20239 
20240     # Cannot rely on the command "which" here since it doesn't always work.
20241     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20242     if test -z "$is_absolute_path"; then
20243       # Path to executable is not absolute. Find it.
20244       IFS_save="$IFS"
20245       IFS=:
20246       for p in $PATH; do
20247         if test -f "$p/$path" && test -x "$p/$path"; then
20248           new_path="$p/$path"
20249           break
20250         fi
20251       done
20252       IFS="$IFS_save"
20253     else
20254       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20255 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20256       new_path="$path"
20257     fi
20258 
20259     if test "x$new_path" = x; then
20260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20261 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20262       has_space=`$ECHO "$complete" | $GREP " "`
20263       if test "x$has_space" != x; then
20264         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20265 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20266       fi
20267       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20268     fi
20269   fi
20270 
20271   # Now join together the path and the arguments once again
20272   if test "x$arguments" != xEOL; then
20273     new_complete="$new_path ${arguments% *}"
20274   else
20275     new_complete="$new_path"
20276   fi
20277 
20278   if test "x$complete" != "x$new_complete"; then
20279     PROPER_COMPILER_CC="$new_complete"
20280     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20281 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20282   fi
20283 
20284     PATH="$RETRY_COMPILER_SAVED_PATH"
20285 
20286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20287 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20288 
20289   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20290     # Follow a chain of symbolic links. Use readlink
20291     # where it exists, else fall back to horribly
20292     # complicated shell code.
20293     if test "x$READLINK_TESTED" != yes; then
20294       # On MacOSX there is a readlink tool with a different
20295       # purpose than the GNU readlink tool. Check the found readlink.
20296       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20297       if test "x$ISGNU" = x; then
20298         # A readlink that we do not know how to use.
20299         # Are there other non-GNU readlinks out there?
20300         READLINK_TESTED=yes
20301         READLINK=
20302       fi
20303     fi
20304 
20305     if test "x$READLINK" != x; then
20306       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20307     else
20308       # Save the current directory for restoring afterwards
20309       STARTDIR=$PWD
20310       COUNTER=0
20311       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20312       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20313       cd $sym_link_dir
20314       # Use -P flag to resolve symlinks in directories.
20315       cd `$THEPWDCMD -P`
20316       sym_link_dir=`$THEPWDCMD -P`
20317       # Resolve file symlinks
20318       while test $COUNTER -lt 20; do
20319         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20320         if test "x$ISLINK" == x; then
20321           # This is not a symbolic link! We are done!
20322           break
20323         fi
20324         # Again resolve directory symlinks since the target of the just found
20325         # link could be in a different directory
20326         cd `$DIRNAME $ISLINK`
20327         sym_link_dir=`$THEPWDCMD -P`
20328         sym_link_file=`$BASENAME $ISLINK`
20329         let COUNTER=COUNTER+1
20330       done
20331       cd $STARTDIR
20332       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20333     fi
20334   fi
20335 
20336     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20337 $as_echo "$PROPER_COMPILER_CC" >&6; }
20338     CC="$PROPER_COMPILER_CC"
20339   else
20340     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20341 $as_echo "no, keeping CC" >&6; }
20342     CC="$TEST_COMPILER"
20343   fi
20344 
20345   COMPILER=$CC
20346   COMPILER_NAME=$COMPILER_NAME
20347 
20348   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20349     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20350     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20351     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20352     if test $? -ne 0; then
20353       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20354 
20355       { $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
20356 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20357       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20358 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20359       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20360     else
20361       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20362       COMPILER_VENDOR="Sun Studio"
20363     fi
20364   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20365       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20366       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20367       if test $? -ne 0; then
20368         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20369       else
20370         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20371         COMPILER_VENDOR='IBM'
20372       fi
20373   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20374     # First line typically looks something like:
20375     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20376     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20377     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20378     COMPILER_VENDOR="Microsoft CL.EXE"
20379     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20380     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20381       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20382         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20383       fi
20384     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20385       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20386         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20387       fi
20388     fi
20389   else
20390     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20391     # Check that this is likely to be GCC.
20392     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20393     if test $? -ne 0; then
20394       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20395 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20396       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20397 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20398       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20399     fi
20400 
20401     # First line typically looks something like:
20402     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20403     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | \
20404         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
20405     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20406   fi
20407   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20408   CC_VERSION="$COMPILER_VERSION"
20409   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20410   CC_VENDOR="$COMPILER_VENDOR"
20411 
20412   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20413 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20414 
20415 
20416   # Now that we have resolved CC ourself, let autoconf have its go at it
20417   ac_ext=c
20418 ac_cpp='$CPP $CPPFLAGS'
20419 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20420 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20421 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20422 if test -n "$ac_tool_prefix"; then
20423   for ac_prog in $CC
20424   do
20425     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20426 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20428 $as_echo_n "checking for $ac_word... " >&6; }
20429 if ${ac_cv_prog_CC+:} false; then :
20430   $as_echo_n "(cached) " >&6
20431 else
20432   if test -n "$CC"; then
20433   ac_cv_prog_CC="$CC" # Let the user override the test.
20434 else
20435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20436 for as_dir in $PATH
20437 do
20438   IFS=$as_save_IFS
20439   test -z "$as_dir" && as_dir=.
20440     for ac_exec_ext in '' $ac_executable_extensions; do
20441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20442     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20444     break 2
20445   fi
20446 done
20447   done
20448 IFS=$as_save_IFS
20449 
20450 fi
20451 fi
20452 CC=$ac_cv_prog_CC
20453 if test -n "$CC"; then
20454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20455 $as_echo "$CC" >&6; }
20456 else
20457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20458 $as_echo "no" >&6; }
20459 fi
20460 
20461 
20462     test -n "$CC" && break
20463   done
20464 fi
20465 if test -z "$CC"; then
20466   ac_ct_CC=$CC
20467   for ac_prog in $CC
20468 do
20469   # Extract the first word of "$ac_prog", so it can be a program name with args.
20470 set dummy $ac_prog; ac_word=$2
20471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20472 $as_echo_n "checking for $ac_word... " >&6; }
20473 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20474   $as_echo_n "(cached) " >&6
20475 else
20476   if test -n "$ac_ct_CC"; then
20477   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20478 else
20479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20480 for as_dir in $PATH
20481 do
20482   IFS=$as_save_IFS
20483   test -z "$as_dir" && as_dir=.
20484     for ac_exec_ext in '' $ac_executable_extensions; do
20485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20486     ac_cv_prog_ac_ct_CC="$ac_prog"
20487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20488     break 2
20489   fi
20490 done
20491   done
20492 IFS=$as_save_IFS
20493 
20494 fi
20495 fi
20496 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20497 if test -n "$ac_ct_CC"; then
20498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20499 $as_echo "$ac_ct_CC" >&6; }
20500 else
20501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20502 $as_echo "no" >&6; }
20503 fi
20504 
20505 
20506   test -n "$ac_ct_CC" && break
20507 done
20508 
20509   if test "x$ac_ct_CC" = x; then
20510     CC=""
20511   else
20512     case $cross_compiling:$ac_tool_warned in
20513 yes:)
20514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20515 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20516 ac_tool_warned=yes ;;
20517 esac
20518     CC=$ac_ct_CC
20519   fi
20520 fi
20521 
20522 
20523 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20524 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20525 as_fn_error $? "no acceptable C compiler found in \$PATH
20526 See \`config.log' for more details" "$LINENO" 5; }
20527 
20528 # Provide some information about the compiler.
20529 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20530 set X $ac_compile
20531 ac_compiler=$2
20532 for ac_option in --version -v -V -qversion; do
20533   { { ac_try="$ac_compiler $ac_option >&5"
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_compiler $ac_option >&5") 2>conftest.err
20541   ac_status=$?
20542   if test -s conftest.err; then
20543     sed '10a\
20544 ... rest of stderr output deleted ...
20545          10q' conftest.err >conftest.er1
20546     cat conftest.er1 >&5
20547   fi
20548   rm -f conftest.er1 conftest.err
20549   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20550   test $ac_status = 0; }
20551 done
20552 
20553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20554 /* end confdefs.h.  */
20555 
20556 int
20557 main ()
20558 {
20559 
20560   ;
20561   return 0;
20562 }
20563 _ACEOF
20564 ac_clean_files_save=$ac_clean_files
20565 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20566 # Try to create an executable without -o first, disregard a.out.
20567 # It will help us diagnose broken compilers, and finding out an intuition
20568 # of exeext.
20569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20570 $as_echo_n "checking whether the C compiler works... " >&6; }
20571 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20572 
20573 # The possible output files:
20574 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20575 
20576 ac_rmfiles=
20577 for ac_file in $ac_files
20578 do
20579   case $ac_file in
20580     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20581     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20582   esac
20583 done
20584 rm -f $ac_rmfiles
20585 
20586 if { { ac_try="$ac_link_default"
20587 case "(($ac_try" in
20588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20589   *) ac_try_echo=$ac_try;;
20590 esac
20591 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20592 $as_echo "$ac_try_echo"; } >&5
20593   (eval "$ac_link_default") 2>&5
20594   ac_status=$?
20595   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20596   test $ac_status = 0; }; then :
20597   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20598 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20599 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20600 # so that the user can short-circuit this test for compilers unknown to
20601 # Autoconf.
20602 for ac_file in $ac_files ''
20603 do
20604   test -f "$ac_file" || continue
20605   case $ac_file in
20606     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20607         ;;
20608     [ab].out )
20609         # We found the default executable, but exeext='' is most
20610         # certainly right.
20611         break;;
20612     *.* )
20613         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20614         then :; else
20615            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20616         fi
20617         # We set ac_cv_exeext here because the later test for it is not
20618         # safe: cross compilers may not add the suffix if given an `-o'
20619         # argument, so we may need to know it at that point already.
20620         # Even if this section looks crufty: it has the advantage of
20621         # actually working.
20622         break;;
20623     * )
20624         break;;
20625   esac
20626 done
20627 test "$ac_cv_exeext" = no && ac_cv_exeext=
20628 
20629 else
20630   ac_file=''
20631 fi
20632 if test -z "$ac_file"; then :
20633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20634 $as_echo "no" >&6; }
20635 $as_echo "$as_me: failed program was:" >&5
20636 sed 's/^/| /' conftest.$ac_ext >&5
20637 
20638 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20639 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20640 as_fn_error 77 "C compiler cannot create executables
20641 See \`config.log' for more details" "$LINENO" 5; }
20642 else
20643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20644 $as_echo "yes" >&6; }
20645 fi
20646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20647 $as_echo_n "checking for C compiler default output file name... " >&6; }
20648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20649 $as_echo "$ac_file" >&6; }
20650 ac_exeext=$ac_cv_exeext
20651 
20652 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20653 ac_clean_files=$ac_clean_files_save
20654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20655 $as_echo_n "checking for suffix of executables... " >&6; }
20656 if { { ac_try="$ac_link"
20657 case "(($ac_try" in
20658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20659   *) ac_try_echo=$ac_try;;
20660 esac
20661 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20662 $as_echo "$ac_try_echo"; } >&5
20663   (eval "$ac_link") 2>&5
20664   ac_status=$?
20665   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20666   test $ac_status = 0; }; then :
20667   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20668 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20669 # work properly (i.e., refer to `conftest.exe'), while it won't with
20670 # `rm'.
20671 for ac_file in conftest.exe conftest conftest.*; do
20672   test -f "$ac_file" || continue
20673   case $ac_file in
20674     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20675     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20676           break;;
20677     * ) break;;
20678   esac
20679 done
20680 else
20681   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20682 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20683 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20684 See \`config.log' for more details" "$LINENO" 5; }
20685 fi
20686 rm -f conftest conftest$ac_cv_exeext
20687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20688 $as_echo "$ac_cv_exeext" >&6; }
20689 
20690 rm -f conftest.$ac_ext
20691 EXEEXT=$ac_cv_exeext
20692 ac_exeext=$EXEEXT
20693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20694 /* end confdefs.h.  */
20695 #include <stdio.h>
20696 int
20697 main ()
20698 {
20699 FILE *f = fopen ("conftest.out", "w");
20700  return ferror (f) || fclose (f) != 0;
20701 
20702   ;
20703   return 0;
20704 }
20705 _ACEOF
20706 ac_clean_files="$ac_clean_files conftest.out"
20707 # Check that the compiler produces executables we can run.  If not, either
20708 # the compiler is broken, or we cross compile.
20709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20710 $as_echo_n "checking whether we are cross compiling... " >&6; }
20711 if test "$cross_compiling" != yes; then
20712   { { ac_try="$ac_link"
20713 case "(($ac_try" in
20714   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20715   *) ac_try_echo=$ac_try;;
20716 esac
20717 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20718 $as_echo "$ac_try_echo"; } >&5
20719   (eval "$ac_link") 2>&5
20720   ac_status=$?
20721   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20722   test $ac_status = 0; }
20723   if { ac_try='./conftest$ac_cv_exeext'
20724   { { case "(($ac_try" in
20725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20726   *) ac_try_echo=$ac_try;;
20727 esac
20728 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20729 $as_echo "$ac_try_echo"; } >&5
20730   (eval "$ac_try") 2>&5
20731   ac_status=$?
20732   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20733   test $ac_status = 0; }; }; then
20734     cross_compiling=no
20735   else
20736     if test "$cross_compiling" = maybe; then
20737         cross_compiling=yes
20738     else
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 run C compiled programs.
20742 If you meant to cross compile, use \`--host'.
20743 See \`config.log' for more details" "$LINENO" 5; }
20744     fi
20745   fi
20746 fi
20747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20748 $as_echo "$cross_compiling" >&6; }
20749 
20750 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20751 ac_clean_files=$ac_clean_files_save
20752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20753 $as_echo_n "checking for suffix of object files... " >&6; }
20754 if ${ac_cv_objext+:} false; then :
20755   $as_echo_n "(cached) " >&6
20756 else
20757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20758 /* end confdefs.h.  */
20759 
20760 int
20761 main ()
20762 {
20763 
20764   ;
20765   return 0;
20766 }
20767 _ACEOF
20768 rm -f conftest.o conftest.obj
20769 if { { ac_try="$ac_compile"
20770 case "(($ac_try" in
20771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20772   *) ac_try_echo=$ac_try;;
20773 esac
20774 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20775 $as_echo "$ac_try_echo"; } >&5
20776   (eval "$ac_compile") 2>&5
20777   ac_status=$?
20778   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20779   test $ac_status = 0; }; then :
20780   for ac_file in conftest.o conftest.obj conftest.*; do
20781   test -f "$ac_file" || continue;
20782   case $ac_file in
20783     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20784     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20785        break;;
20786   esac
20787 done
20788 else
20789   $as_echo "$as_me: failed program was:" >&5
20790 sed 's/^/| /' conftest.$ac_ext >&5
20791 
20792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20793 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20794 as_fn_error $? "cannot compute suffix of object files: cannot compile
20795 See \`config.log' for more details" "$LINENO" 5; }
20796 fi
20797 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20798 fi
20799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20800 $as_echo "$ac_cv_objext" >&6; }
20801 OBJEXT=$ac_cv_objext
20802 ac_objext=$OBJEXT
20803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20804 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20805 if ${ac_cv_c_compiler_gnu+:} false; then :
20806   $as_echo_n "(cached) " >&6
20807 else
20808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20809 /* end confdefs.h.  */
20810 
20811 int
20812 main ()
20813 {
20814 #ifndef __GNUC__
20815        choke me
20816 #endif
20817 
20818   ;
20819   return 0;
20820 }
20821 _ACEOF
20822 if ac_fn_c_try_compile "$LINENO"; then :
20823   ac_compiler_gnu=yes
20824 else
20825   ac_compiler_gnu=no
20826 fi
20827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20828 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20829 
20830 fi
20831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20832 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20833 if test $ac_compiler_gnu = yes; then
20834   GCC=yes
20835 else
20836   GCC=
20837 fi
20838 ac_test_CFLAGS=${CFLAGS+set}
20839 ac_save_CFLAGS=$CFLAGS
20840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20841 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20842 if ${ac_cv_prog_cc_g+:} false; then :
20843   $as_echo_n "(cached) " >&6
20844 else
20845   ac_save_c_werror_flag=$ac_c_werror_flag
20846    ac_c_werror_flag=yes
20847    ac_cv_prog_cc_g=no
20848    CFLAGS="-g"
20849    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20850 /* end confdefs.h.  */
20851 
20852 int
20853 main ()
20854 {
20855 
20856   ;
20857   return 0;
20858 }
20859 _ACEOF
20860 if ac_fn_c_try_compile "$LINENO"; then :
20861   ac_cv_prog_cc_g=yes
20862 else
20863   CFLAGS=""
20864       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20865 /* end confdefs.h.  */
20866 
20867 int
20868 main ()
20869 {
20870 
20871   ;
20872   return 0;
20873 }
20874 _ACEOF
20875 if ac_fn_c_try_compile "$LINENO"; then :
20876 
20877 else
20878   ac_c_werror_flag=$ac_save_c_werror_flag
20879          CFLAGS="-g"
20880          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20881 /* end confdefs.h.  */
20882 
20883 int
20884 main ()
20885 {
20886 
20887   ;
20888   return 0;
20889 }
20890 _ACEOF
20891 if ac_fn_c_try_compile "$LINENO"; then :
20892   ac_cv_prog_cc_g=yes
20893 fi
20894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20895 fi
20896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20897 fi
20898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20899    ac_c_werror_flag=$ac_save_c_werror_flag
20900 fi
20901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20902 $as_echo "$ac_cv_prog_cc_g" >&6; }
20903 if test "$ac_test_CFLAGS" = set; then
20904   CFLAGS=$ac_save_CFLAGS
20905 elif test $ac_cv_prog_cc_g = yes; then
20906   if test "$GCC" = yes; then
20907     CFLAGS="-g -O2"
20908   else
20909     CFLAGS="-g"
20910   fi
20911 else
20912   if test "$GCC" = yes; then
20913     CFLAGS="-O2"
20914   else
20915     CFLAGS=
20916   fi
20917 fi
20918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20919 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20920 if ${ac_cv_prog_cc_c89+:} false; then :
20921   $as_echo_n "(cached) " >&6
20922 else
20923   ac_cv_prog_cc_c89=no
20924 ac_save_CC=$CC
20925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20926 /* end confdefs.h.  */
20927 #include <stdarg.h>
20928 #include <stdio.h>
20929 struct stat;
20930 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20931 struct buf { int x; };
20932 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20933 static char *e (p, i)
20934      char **p;
20935      int i;
20936 {
20937   return p[i];
20938 }
20939 static char *f (char * (*g) (char **, int), char **p, ...)
20940 {
20941   char *s;
20942   va_list v;
20943   va_start (v,p);
20944   s = g (p, va_arg (v,int));
20945   va_end (v);
20946   return s;
20947 }
20948 
20949 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20950    function prototypes and stuff, but not '\xHH' hex character constants.
20951    These don't provoke an error unfortunately, instead are silently treated
20952    as 'x'.  The following induces an error, until -std is added to get
20953    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20954    array size at least.  It's necessary to write '\x00'==0 to get something
20955    that's true only with -std.  */
20956 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20957 
20958 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20959    inside strings and character constants.  */
20960 #define FOO(x) 'x'
20961 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20962 
20963 int test (int i, double x);
20964 struct s1 {int (*f) (int a);};
20965 struct s2 {int (*f) (double a);};
20966 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20967 int argc;
20968 char **argv;
20969 int
20970 main ()
20971 {
20972 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20973   ;
20974   return 0;
20975 }
20976 _ACEOF
20977 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20978         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20979 do
20980   CC="$ac_save_CC $ac_arg"
20981   if ac_fn_c_try_compile "$LINENO"; then :
20982   ac_cv_prog_cc_c89=$ac_arg
20983 fi
20984 rm -f core conftest.err conftest.$ac_objext
20985   test "x$ac_cv_prog_cc_c89" != "xno" && break
20986 done
20987 rm -f conftest.$ac_ext
20988 CC=$ac_save_CC
20989 
20990 fi
20991 # AC_CACHE_VAL
20992 case "x$ac_cv_prog_cc_c89" in
20993   x)
20994     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20995 $as_echo "none needed" >&6; } ;;
20996   xno)
20997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20998 $as_echo "unsupported" >&6; } ;;
20999   *)
21000     CC="$CC $ac_cv_prog_cc_c89"
21001     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
21002 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
21003 esac
21004 if test "x$ac_cv_prog_cc_c89" != xno; then :
21005 
21006 fi
21007 
21008 ac_ext=cpp
21009 ac_cpp='$CXXCPP $CPPFLAGS'
21010 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21011 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21012 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21013 
21014 
21015   # Option used to tell the compiler whether to create 32- or 64-bit executables
21016   # Notice that CC contains the full compiler path at this point.
21017   case $CC in
21018     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
21019     *)      COMPILER_TARGET_BITS_FLAG="-m";;
21020   esac
21021 
21022 
21023   ### Locate C++ compiler (CXX)
21024 
21025   if test "x$CXX" != x; then
21026     COMPILER_CHECK_LIST="$CXX"
21027   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
21028     COMPILER_CHECK_LIST="cl"
21029   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21030     COMPILER_CHECK_LIST="CC g++"
21031   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
21032     # Do not probe for CC on AIX .
21033     COMPILER_CHECK_LIST="xlC_r"
21034   else
21035     COMPILER_CHECK_LIST="g++ CC"
21036   fi
21037 
21038 
21039   COMPILER_NAME=C++
21040 
21041   CXX=
21042   # If TOOLS_DIR is set, check for all compiler names in there first
21043   # before checking the rest of the PATH.
21044   if test -n "$TOOLS_DIR"; then
21045     PATH_save="$PATH"
21046     PATH="$TOOLS_DIR"
21047     for ac_prog in $COMPILER_CHECK_LIST
21048 do
21049   # Extract the first word of "$ac_prog", so it can be a program name with args.
21050 set dummy $ac_prog; ac_word=$2
21051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21052 $as_echo_n "checking for $ac_word... " >&6; }
21053 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
21054   $as_echo_n "(cached) " >&6
21055 else
21056   case $TOOLS_DIR_CXX in
21057   [\\/]* | ?:[\\/]*)
21058   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
21059   ;;
21060   *)
21061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21062 for as_dir in $PATH
21063 do
21064   IFS=$as_save_IFS
21065   test -z "$as_dir" && as_dir=.
21066     for ac_exec_ext in '' $ac_executable_extensions; do
21067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21068     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
21069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21070     break 2
21071   fi
21072 done
21073   done
21074 IFS=$as_save_IFS
21075 
21076   ;;
21077 esac
21078 fi
21079 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
21080 if test -n "$TOOLS_DIR_CXX"; then
21081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
21082 $as_echo "$TOOLS_DIR_CXX" >&6; }
21083 else
21084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21085 $as_echo "no" >&6; }
21086 fi
21087 
21088 
21089   test -n "$TOOLS_DIR_CXX" && break
21090 done
21091 
21092     CXX=$TOOLS_DIR_CXX
21093     PATH="$PATH_save"
21094   fi
21095 
21096   # AC_PATH_PROGS can't be run multiple times with the same variable,
21097   # so create a new name for this run.
21098   if test "x$CXX" = x; then
21099     for ac_prog in $COMPILER_CHECK_LIST
21100 do
21101   # Extract the first word of "$ac_prog", so it can be a program name with args.
21102 set dummy $ac_prog; ac_word=$2
21103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21104 $as_echo_n "checking for $ac_word... " >&6; }
21105 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
21106   $as_echo_n "(cached) " >&6
21107 else
21108   case $POTENTIAL_CXX in
21109   [\\/]* | ?:[\\/]*)
21110   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
21111   ;;
21112   *)
21113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21114 for as_dir in $PATH
21115 do
21116   IFS=$as_save_IFS
21117   test -z "$as_dir" && as_dir=.
21118     for ac_exec_ext in '' $ac_executable_extensions; do
21119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21120     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
21121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21122     break 2
21123   fi
21124 done
21125   done
21126 IFS=$as_save_IFS
21127 
21128   ;;
21129 esac
21130 fi
21131 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
21132 if test -n "$POTENTIAL_CXX"; then
21133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
21134 $as_echo "$POTENTIAL_CXX" >&6; }
21135 else
21136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21137 $as_echo "no" >&6; }
21138 fi
21139 
21140 
21141   test -n "$POTENTIAL_CXX" && break
21142 done
21143 
21144     CXX=$POTENTIAL_CXX
21145   fi
21146 
21147   if test "x$CXX" = x; then
21148 
21149   # Print a helpful message on how to acquire the necessary build dependency.
21150   # devkit is the help tag: freetype, cups, pulse, alsa etc
21151   MISSING_DEPENDENCY=devkit
21152 
21153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21154     cygwin_help $MISSING_DEPENDENCY
21155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21156     msys_help $MISSING_DEPENDENCY
21157   else
21158     PKGHANDLER_COMMAND=
21159 
21160     case $PKGHANDLER in
21161       apt-get)
21162         apt_help     $MISSING_DEPENDENCY ;;
21163       yum)
21164         yum_help     $MISSING_DEPENDENCY ;;
21165       port)
21166         port_help    $MISSING_DEPENDENCY ;;
21167       pkgutil)
21168         pkgutil_help $MISSING_DEPENDENCY ;;
21169       pkgadd)
21170         pkgadd_help  $MISSING_DEPENDENCY ;;
21171     esac
21172 
21173     if test "x$PKGHANDLER_COMMAND" != x; then
21174       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21175     fi
21176   fi
21177 
21178     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21179   fi
21180 
21181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21182 
21183   # First separate the path from the arguments. This will split at the first
21184   # space.
21185   complete="$CXX"
21186   path="${complete%% *}"
21187   tmp="$complete EOL"
21188   arguments="${tmp#* }"
21189 
21190   # Input might be given as Windows format, start by converting to
21191   # unix format.
21192   new_path=`$CYGPATH -u "$path"`
21193 
21194   # Now try to locate executable using which
21195   new_path=`$WHICH "$new_path" 2> /dev/null`
21196   # bat and cmd files are not always considered executable in cygwin causing which
21197   # to not find them
21198   if test "x$new_path" = x \
21199       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21200       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21201     new_path=`$CYGPATH -u "$path"`
21202   fi
21203   if test "x$new_path" = x; then
21204     # Oops. Which didn't find the executable.
21205     # The splitting of arguments from the executable at a space might have been incorrect,
21206     # since paths with space are more likely in Windows. Give it another try with the whole
21207     # argument.
21208     path="$complete"
21209     arguments="EOL"
21210     new_path=`$CYGPATH -u "$path"`
21211     new_path=`$WHICH "$new_path" 2> /dev/null`
21212     # bat and cmd files are not always considered executable in cygwin causing which
21213     # to not find them
21214     if test "x$new_path" = x \
21215         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21216         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21217       new_path=`$CYGPATH -u "$path"`
21218     fi
21219     if test "x$new_path" = x; then
21220       # It's still not found. Now this is an unrecoverable error.
21221       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21222 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21223       has_space=`$ECHO "$complete" | $GREP " "`
21224       if test "x$has_space" != x; then
21225         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21226 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21227       fi
21228       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21229     fi
21230   fi
21231 
21232   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21233   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21234   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21235   # "foo.exe" is OK but "foo" is an error.
21236   #
21237   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21238   # It is also a way to make sure we got the proper file name for the real test later on.
21239   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21240   if test "x$test_shortpath" = x; then
21241     # Short path failed, file does not exist as specified.
21242     # Try adding .exe or .cmd
21243     if test -f "${new_path}.exe"; then
21244       input_to_shortpath="${new_path}.exe"
21245     elif test -f "${new_path}.cmd"; then
21246       input_to_shortpath="${new_path}.cmd"
21247     else
21248       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21249 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21250       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21251 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21252       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21253     fi
21254   else
21255     input_to_shortpath="$new_path"
21256   fi
21257 
21258   # Call helper function which possibly converts this using DOS-style short mode.
21259   # If so, the updated path is stored in $new_path.
21260   new_path="$input_to_shortpath"
21261 
21262   input_path="$input_to_shortpath"
21263   # Check if we need to convert this using DOS-style short mode. If the path
21264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21265   # take no chances and rewrite it.
21266   # Note: m4 eats our [], so we need to use [ and ] instead.
21267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21268   if test "x$has_forbidden_chars" != x; then
21269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21270     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21271     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21272     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21273       # Going to short mode and back again did indeed matter. Since short mode is
21274       # case insensitive, let's make it lowercase to improve readability.
21275       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21276       # Now convert it back to Unix-stile (cygpath)
21277       input_path=`$CYGPATH -u "$shortmode_path"`
21278       new_path="$input_path"
21279     fi
21280   fi
21281 
21282   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21283   if test "x$test_cygdrive_prefix" = x; then
21284     # As a simple fix, exclude /usr/bin since it's not a real path.
21285     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21286       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21287       # a path prefixed by /cygdrive for fixpath to work.
21288       new_path="$CYGWIN_ROOT_PATH$input_path"
21289     fi
21290   fi
21291 
21292   # remove trailing .exe if any
21293   new_path="${new_path/%.exe/}"
21294 
21295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21296 
21297   # First separate the path from the arguments. This will split at the first
21298   # space.
21299   complete="$CXX"
21300   path="${complete%% *}"
21301   tmp="$complete EOL"
21302   arguments="${tmp#* }"
21303 
21304   # Input might be given as Windows format, start by converting to
21305   # unix format.
21306   new_path="$path"
21307 
21308   windows_path="$new_path"
21309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21310     unix_path=`$CYGPATH -u "$windows_path"`
21311     new_path="$unix_path"
21312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21313     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21314     new_path="$unix_path"
21315   fi
21316 
21317 
21318   # Now try to locate executable using which
21319   new_path=`$WHICH "$new_path" 2> /dev/null`
21320 
21321   if test "x$new_path" = x; then
21322     # Oops. Which didn't find the executable.
21323     # The splitting of arguments from the executable at a space might have been incorrect,
21324     # since paths with space are more likely in Windows. Give it another try with the whole
21325     # argument.
21326     path="$complete"
21327     arguments="EOL"
21328     new_path="$path"
21329 
21330   windows_path="$new_path"
21331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21332     unix_path=`$CYGPATH -u "$windows_path"`
21333     new_path="$unix_path"
21334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21336     new_path="$unix_path"
21337   fi
21338 
21339 
21340     new_path=`$WHICH "$new_path" 2> /dev/null`
21341 
21342     if test "x$new_path" = x; then
21343       # It's still not found. Now this is an unrecoverable error.
21344       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21345 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21346       has_space=`$ECHO "$complete" | $GREP " "`
21347       if test "x$has_space" != x; then
21348         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21349 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21350       fi
21351       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21352     fi
21353   fi
21354 
21355   # Now new_path has a complete unix path to the binary
21356   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21357     # Keep paths in /bin as-is, but remove trailing .exe if any
21358     new_path="${new_path/%.exe/}"
21359     # Do not save /bin paths to all_fixpath_prefixes!
21360   else
21361     # Not in mixed or Windows style, start by that.
21362     new_path=`cmd //c echo $new_path`
21363 
21364   input_path="$new_path"
21365   # Check if we need to convert this using DOS-style short mode. If the path
21366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21367   # take no chances and rewrite it.
21368   # Note: m4 eats our [], so we need to use [ and ] instead.
21369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21370   if test "x$has_forbidden_chars" != x; then
21371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21372     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21373   fi
21374 
21375     # Output is in $new_path
21376 
21377   windows_path="$new_path"
21378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21379     unix_path=`$CYGPATH -u "$windows_path"`
21380     new_path="$unix_path"
21381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21383     new_path="$unix_path"
21384   fi
21385 
21386     # remove trailing .exe if any
21387     new_path="${new_path/%.exe/}"
21388 
21389     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21390     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21391   fi
21392 
21393   else
21394     # We're on a posix platform. Hooray! :)
21395     # First separate the path from the arguments. This will split at the first
21396     # space.
21397     complete="$CXX"
21398     path="${complete%% *}"
21399     tmp="$complete EOL"
21400     arguments="${tmp#* }"
21401 
21402     # Cannot rely on the command "which" here since it doesn't always work.
21403     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21404     if test -z "$is_absolute_path"; then
21405       # Path to executable is not absolute. Find it.
21406       IFS_save="$IFS"
21407       IFS=:
21408       for p in $PATH; do
21409         if test -f "$p/$path" && test -x "$p/$path"; then
21410           new_path="$p/$path"
21411           break
21412         fi
21413       done
21414       IFS="$IFS_save"
21415     else
21416       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21417 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21418       new_path="$path"
21419     fi
21420 
21421     if test "x$new_path" = x; then
21422       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21423 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21424       has_space=`$ECHO "$complete" | $GREP " "`
21425       if test "x$has_space" != x; then
21426         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21427 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21428       fi
21429       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21430     fi
21431   fi
21432 
21433   # Now join together the path and the arguments once again
21434   if test "x$arguments" != xEOL; then
21435     new_complete="$new_path ${arguments% *}"
21436   else
21437     new_complete="$new_path"
21438   fi
21439 
21440   if test "x$complete" != "x$new_complete"; then
21441     CXX="$new_complete"
21442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21443 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21444   fi
21445 
21446   TEST_COMPILER="$CXX"
21447   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21448   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21449   if test "x$OPENJDK_BUILD_OS" != xaix; then
21450     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21451 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21452 
21453   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21454     # Follow a chain of symbolic links. Use readlink
21455     # where it exists, else fall back to horribly
21456     # complicated shell code.
21457     if test "x$READLINK_TESTED" != yes; then
21458       # On MacOSX there is a readlink tool with a different
21459       # purpose than the GNU readlink tool. Check the found readlink.
21460       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21461       if test "x$ISGNU" = x; then
21462         # A readlink that we do not know how to use.
21463         # Are there other non-GNU readlinks out there?
21464         READLINK_TESTED=yes
21465         READLINK=
21466       fi
21467     fi
21468 
21469     if test "x$READLINK" != x; then
21470       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21471     else
21472       # Save the current directory for restoring afterwards
21473       STARTDIR=$PWD
21474       COUNTER=0
21475       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21476       sym_link_file=`$BASENAME $TEST_COMPILER`
21477       cd $sym_link_dir
21478       # Use -P flag to resolve symlinks in directories.
21479       cd `$THEPWDCMD -P`
21480       sym_link_dir=`$THEPWDCMD -P`
21481       # Resolve file symlinks
21482       while test $COUNTER -lt 20; do
21483         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21484         if test "x$ISLINK" == x; then
21485           # This is not a symbolic link! We are done!
21486           break
21487         fi
21488         # Again resolve directory symlinks since the target of the just found
21489         # link could be in a different directory
21490         cd `$DIRNAME $ISLINK`
21491         sym_link_dir=`$THEPWDCMD -P`
21492         sym_link_file=`$BASENAME $ISLINK`
21493         let COUNTER=COUNTER+1
21494       done
21495       cd $STARTDIR
21496       TEST_COMPILER=$sym_link_dir/$sym_link_file
21497     fi
21498   fi
21499 
21500     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21501 $as_echo "$TEST_COMPILER" >&6; }
21502   fi
21503   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21504 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21505 
21506   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21507   if test "x$COMPILER_BASENAME" = "xccache"; then
21508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21509 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21510     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21511     # We want to control ccache invocation ourselves, so ignore this cc and try
21512     # searching again.
21513 
21514     # Remove the path to the fake ccache cc from the PATH
21515     RETRY_COMPILER_SAVED_PATH="$PATH"
21516     COMPILER_DIRNAME=`$DIRNAME $CXX`
21517     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21518 
21519     # Try again looking for our compiler
21520     if test -n "$ac_tool_prefix"; then
21521   for ac_prog in $COMPILER_CHECK_LIST
21522   do
21523     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21524 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21526 $as_echo_n "checking for $ac_word... " >&6; }
21527 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21528   $as_echo_n "(cached) " >&6
21529 else
21530   if test -n "$PROPER_COMPILER_CXX"; then
21531   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21532 else
21533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21534 for as_dir in $PATH
21535 do
21536   IFS=$as_save_IFS
21537   test -z "$as_dir" && as_dir=.
21538     for ac_exec_ext in '' $ac_executable_extensions; do
21539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21540     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21542     break 2
21543   fi
21544 done
21545   done
21546 IFS=$as_save_IFS
21547 
21548 fi
21549 fi
21550 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21551 if test -n "$PROPER_COMPILER_CXX"; then
21552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21553 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21554 else
21555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21556 $as_echo "no" >&6; }
21557 fi
21558 
21559 
21560     test -n "$PROPER_COMPILER_CXX" && break
21561   done
21562 fi
21563 if test -z "$PROPER_COMPILER_CXX"; then
21564   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21565   for ac_prog in $COMPILER_CHECK_LIST
21566 do
21567   # Extract the first word of "$ac_prog", so it can be a program name with args.
21568 set dummy $ac_prog; ac_word=$2
21569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21570 $as_echo_n "checking for $ac_word... " >&6; }
21571 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21572   $as_echo_n "(cached) " >&6
21573 else
21574   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21575   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21576 else
21577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21578 for as_dir in $PATH
21579 do
21580   IFS=$as_save_IFS
21581   test -z "$as_dir" && as_dir=.
21582     for ac_exec_ext in '' $ac_executable_extensions; do
21583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21584     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21586     break 2
21587   fi
21588 done
21589   done
21590 IFS=$as_save_IFS
21591 
21592 fi
21593 fi
21594 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21595 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21597 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21598 else
21599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21600 $as_echo "no" >&6; }
21601 fi
21602 
21603 
21604   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21605 done
21606 
21607   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21608     PROPER_COMPILER_CXX=""
21609   else
21610     case $cross_compiling:$ac_tool_warned in
21611 yes:)
21612 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21613 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21614 ac_tool_warned=yes ;;
21615 esac
21616     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21617   fi
21618 fi
21619 
21620 
21621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21622 
21623   # First separate the path from the arguments. This will split at the first
21624   # space.
21625   complete="$PROPER_COMPILER_CXX"
21626   path="${complete%% *}"
21627   tmp="$complete EOL"
21628   arguments="${tmp#* }"
21629 
21630   # Input might be given as Windows format, start by converting to
21631   # unix format.
21632   new_path=`$CYGPATH -u "$path"`
21633 
21634   # Now try to locate executable using which
21635   new_path=`$WHICH "$new_path" 2> /dev/null`
21636   # bat and cmd files are not always considered executable in cygwin causing which
21637   # to not find them
21638   if test "x$new_path" = x \
21639       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21640       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21641     new_path=`$CYGPATH -u "$path"`
21642   fi
21643   if test "x$new_path" = x; then
21644     # Oops. Which didn't find the executable.
21645     # The splitting of arguments from the executable at a space might have been incorrect,
21646     # since paths with space are more likely in Windows. Give it another try with the whole
21647     # argument.
21648     path="$complete"
21649     arguments="EOL"
21650     new_path=`$CYGPATH -u "$path"`
21651     new_path=`$WHICH "$new_path" 2> /dev/null`
21652     # bat and cmd files are not always considered executable in cygwin causing which
21653     # to not find them
21654     if test "x$new_path" = x \
21655         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21656         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21657       new_path=`$CYGPATH -u "$path"`
21658     fi
21659     if test "x$new_path" = x; then
21660       # It's still not found. Now this is an unrecoverable error.
21661       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21662 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21663       has_space=`$ECHO "$complete" | $GREP " "`
21664       if test "x$has_space" != x; then
21665         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21666 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21667       fi
21668       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21669     fi
21670   fi
21671 
21672   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21673   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21674   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21675   # "foo.exe" is OK but "foo" is an error.
21676   #
21677   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21678   # It is also a way to make sure we got the proper file name for the real test later on.
21679   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21680   if test "x$test_shortpath" = x; then
21681     # Short path failed, file does not exist as specified.
21682     # Try adding .exe or .cmd
21683     if test -f "${new_path}.exe"; then
21684       input_to_shortpath="${new_path}.exe"
21685     elif test -f "${new_path}.cmd"; then
21686       input_to_shortpath="${new_path}.cmd"
21687     else
21688       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21689 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21690       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21691 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21692       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21693     fi
21694   else
21695     input_to_shortpath="$new_path"
21696   fi
21697 
21698   # Call helper function which possibly converts this using DOS-style short mode.
21699   # If so, the updated path is stored in $new_path.
21700   new_path="$input_to_shortpath"
21701 
21702   input_path="$input_to_shortpath"
21703   # Check if we need to convert this using DOS-style short mode. If the path
21704   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21705   # take no chances and rewrite it.
21706   # Note: m4 eats our [], so we need to use [ and ] instead.
21707   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21708   if test "x$has_forbidden_chars" != x; then
21709     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21710     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21711     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21712     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21713       # Going to short mode and back again did indeed matter. Since short mode is
21714       # case insensitive, let's make it lowercase to improve readability.
21715       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21716       # Now convert it back to Unix-stile (cygpath)
21717       input_path=`$CYGPATH -u "$shortmode_path"`
21718       new_path="$input_path"
21719     fi
21720   fi
21721 
21722   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21723   if test "x$test_cygdrive_prefix" = x; then
21724     # As a simple fix, exclude /usr/bin since it's not a real path.
21725     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21726       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21727       # a path prefixed by /cygdrive for fixpath to work.
21728       new_path="$CYGWIN_ROOT_PATH$input_path"
21729     fi
21730   fi
21731 
21732   # remove trailing .exe if any
21733   new_path="${new_path/%.exe/}"
21734 
21735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21736 
21737   # First separate the path from the arguments. This will split at the first
21738   # space.
21739   complete="$PROPER_COMPILER_CXX"
21740   path="${complete%% *}"
21741   tmp="$complete EOL"
21742   arguments="${tmp#* }"
21743 
21744   # Input might be given as Windows format, start by converting to
21745   # unix format.
21746   new_path="$path"
21747 
21748   windows_path="$new_path"
21749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21750     unix_path=`$CYGPATH -u "$windows_path"`
21751     new_path="$unix_path"
21752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21753     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21754     new_path="$unix_path"
21755   fi
21756 
21757 
21758   # Now try to locate executable using which
21759   new_path=`$WHICH "$new_path" 2> /dev/null`
21760 
21761   if test "x$new_path" = x; then
21762     # Oops. Which didn't find the executable.
21763     # The splitting of arguments from the executable at a space might have been incorrect,
21764     # since paths with space are more likely in Windows. Give it another try with the whole
21765     # argument.
21766     path="$complete"
21767     arguments="EOL"
21768     new_path="$path"
21769 
21770   windows_path="$new_path"
21771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21772     unix_path=`$CYGPATH -u "$windows_path"`
21773     new_path="$unix_path"
21774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21776     new_path="$unix_path"
21777   fi
21778 
21779 
21780     new_path=`$WHICH "$new_path" 2> /dev/null`
21781 
21782     if test "x$new_path" = x; then
21783       # It's still not found. Now this is an unrecoverable error.
21784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21785 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21786       has_space=`$ECHO "$complete" | $GREP " "`
21787       if test "x$has_space" != x; then
21788         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21789 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21790       fi
21791       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21792     fi
21793   fi
21794 
21795   # Now new_path has a complete unix path to the binary
21796   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21797     # Keep paths in /bin as-is, but remove trailing .exe if any
21798     new_path="${new_path/%.exe/}"
21799     # Do not save /bin paths to all_fixpath_prefixes!
21800   else
21801     # Not in mixed or Windows style, start by that.
21802     new_path=`cmd //c echo $new_path`
21803 
21804   input_path="$new_path"
21805   # Check if we need to convert this using DOS-style short mode. If the path
21806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21807   # take no chances and rewrite it.
21808   # Note: m4 eats our [], so we need to use [ and ] instead.
21809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21810   if test "x$has_forbidden_chars" != x; then
21811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21812     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21813   fi
21814 
21815     # Output is in $new_path
21816 
21817   windows_path="$new_path"
21818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21819     unix_path=`$CYGPATH -u "$windows_path"`
21820     new_path="$unix_path"
21821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21823     new_path="$unix_path"
21824   fi
21825 
21826     # remove trailing .exe if any
21827     new_path="${new_path/%.exe/}"
21828 
21829     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21830     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21831   fi
21832 
21833   else
21834     # We're on a posix platform. Hooray! :)
21835     # First separate the path from the arguments. This will split at the first
21836     # space.
21837     complete="$PROPER_COMPILER_CXX"
21838     path="${complete%% *}"
21839     tmp="$complete EOL"
21840     arguments="${tmp#* }"
21841 
21842     # Cannot rely on the command "which" here since it doesn't always work.
21843     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21844     if test -z "$is_absolute_path"; then
21845       # Path to executable is not absolute. Find it.
21846       IFS_save="$IFS"
21847       IFS=:
21848       for p in $PATH; do
21849         if test -f "$p/$path" && test -x "$p/$path"; then
21850           new_path="$p/$path"
21851           break
21852         fi
21853       done
21854       IFS="$IFS_save"
21855     else
21856       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21857 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21858       new_path="$path"
21859     fi
21860 
21861     if test "x$new_path" = x; then
21862       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21863 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21864       has_space=`$ECHO "$complete" | $GREP " "`
21865       if test "x$has_space" != x; then
21866         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21867 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21868       fi
21869       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21870     fi
21871   fi
21872 
21873   # Now join together the path and the arguments once again
21874   if test "x$arguments" != xEOL; then
21875     new_complete="$new_path ${arguments% *}"
21876   else
21877     new_complete="$new_path"
21878   fi
21879 
21880   if test "x$complete" != "x$new_complete"; then
21881     PROPER_COMPILER_CXX="$new_complete"
21882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21883 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21884   fi
21885 
21886     PATH="$RETRY_COMPILER_SAVED_PATH"
21887 
21888     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21889 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21890 
21891   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21892     # Follow a chain of symbolic links. Use readlink
21893     # where it exists, else fall back to horribly
21894     # complicated shell code.
21895     if test "x$READLINK_TESTED" != yes; then
21896       # On MacOSX there is a readlink tool with a different
21897       # purpose than the GNU readlink tool. Check the found readlink.
21898       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21899       if test "x$ISGNU" = x; then
21900         # A readlink that we do not know how to use.
21901         # Are there other non-GNU readlinks out there?
21902         READLINK_TESTED=yes
21903         READLINK=
21904       fi
21905     fi
21906 
21907     if test "x$READLINK" != x; then
21908       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21909     else
21910       # Save the current directory for restoring afterwards
21911       STARTDIR=$PWD
21912       COUNTER=0
21913       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21914       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21915       cd $sym_link_dir
21916       # Use -P flag to resolve symlinks in directories.
21917       cd `$THEPWDCMD -P`
21918       sym_link_dir=`$THEPWDCMD -P`
21919       # Resolve file symlinks
21920       while test $COUNTER -lt 20; do
21921         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21922         if test "x$ISLINK" == x; then
21923           # This is not a symbolic link! We are done!
21924           break
21925         fi
21926         # Again resolve directory symlinks since the target of the just found
21927         # link could be in a different directory
21928         cd `$DIRNAME $ISLINK`
21929         sym_link_dir=`$THEPWDCMD -P`
21930         sym_link_file=`$BASENAME $ISLINK`
21931         let COUNTER=COUNTER+1
21932       done
21933       cd $STARTDIR
21934       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21935     fi
21936   fi
21937 
21938     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21939 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21940     CXX="$PROPER_COMPILER_CXX"
21941   else
21942     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21943 $as_echo "no, keeping CXX" >&6; }
21944     CXX="$TEST_COMPILER"
21945   fi
21946 
21947   COMPILER=$CXX
21948   COMPILER_NAME=$COMPILER_NAME
21949 
21950   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21951     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21952     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21953     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21954     if test $? -ne 0; then
21955       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21956 
21957       { $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
21958 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21959       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21960 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21961       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21962     else
21963       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21964       COMPILER_VENDOR="Sun Studio"
21965     fi
21966   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21967       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21968       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21969       if test $? -ne 0; then
21970         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21971       else
21972         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21973         COMPILER_VENDOR='IBM'
21974       fi
21975   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21976     # First line typically looks something like:
21977     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21978     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21979     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21980     COMPILER_VENDOR="Microsoft CL.EXE"
21981     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21982     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21983       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21984         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21985       fi
21986     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21987       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21988         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21989       fi
21990     fi
21991   else
21992     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21993     # Check that this is likely to be GCC.
21994     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21995     if test $? -ne 0; then
21996       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21997 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21998       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21999 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
22000       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
22001     fi
22002 
22003     # First line typically looks something like:
22004     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
22005     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | \
22006         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
22007     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
22008   fi
22009   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
22010   CXX_VERSION="$COMPILER_VERSION"
22011   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
22012   CXX_VENDOR="$COMPILER_VENDOR"
22013 
22014   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
22015 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
22016 
22017 
22018   # Now that we have resolved CXX ourself, let autoconf have its go at it
22019   ac_ext=cpp
22020 ac_cpp='$CXXCPP $CPPFLAGS'
22021 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22022 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22023 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22024 if test -z "$CXX"; then
22025   if test -n "$CCC"; then
22026     CXX=$CCC
22027   else
22028     if test -n "$ac_tool_prefix"; then
22029   for ac_prog in $CXX
22030   do
22031     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22032 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22034 $as_echo_n "checking for $ac_word... " >&6; }
22035 if ${ac_cv_prog_CXX+:} false; then :
22036   $as_echo_n "(cached) " >&6
22037 else
22038   if test -n "$CXX"; then
22039   ac_cv_prog_CXX="$CXX" # Let the user override the test.
22040 else
22041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22042 for as_dir in $PATH
22043 do
22044   IFS=$as_save_IFS
22045   test -z "$as_dir" && as_dir=.
22046     for ac_exec_ext in '' $ac_executable_extensions; do
22047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22048     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
22049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22050     break 2
22051   fi
22052 done
22053   done
22054 IFS=$as_save_IFS
22055 
22056 fi
22057 fi
22058 CXX=$ac_cv_prog_CXX
22059 if test -n "$CXX"; then
22060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
22061 $as_echo "$CXX" >&6; }
22062 else
22063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22064 $as_echo "no" >&6; }
22065 fi
22066 
22067 
22068     test -n "$CXX" && break
22069   done
22070 fi
22071 if test -z "$CXX"; then
22072   ac_ct_CXX=$CXX
22073   for ac_prog in $CXX
22074 do
22075   # Extract the first word of "$ac_prog", so it can be a program name with args.
22076 set dummy $ac_prog; ac_word=$2
22077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22078 $as_echo_n "checking for $ac_word... " >&6; }
22079 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
22080   $as_echo_n "(cached) " >&6
22081 else
22082   if test -n "$ac_ct_CXX"; then
22083   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
22084 else
22085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22086 for as_dir in $PATH
22087 do
22088   IFS=$as_save_IFS
22089   test -z "$as_dir" && as_dir=.
22090     for ac_exec_ext in '' $ac_executable_extensions; do
22091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22092     ac_cv_prog_ac_ct_CXX="$ac_prog"
22093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22094     break 2
22095   fi
22096 done
22097   done
22098 IFS=$as_save_IFS
22099 
22100 fi
22101 fi
22102 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
22103 if test -n "$ac_ct_CXX"; then
22104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
22105 $as_echo "$ac_ct_CXX" >&6; }
22106 else
22107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22108 $as_echo "no" >&6; }
22109 fi
22110 
22111 
22112   test -n "$ac_ct_CXX" && break
22113 done
22114 
22115   if test "x$ac_ct_CXX" = x; then
22116     CXX="g++"
22117   else
22118     case $cross_compiling:$ac_tool_warned in
22119 yes:)
22120 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22121 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22122 ac_tool_warned=yes ;;
22123 esac
22124     CXX=$ac_ct_CXX
22125   fi
22126 fi
22127 
22128   fi
22129 fi
22130 # Provide some information about the compiler.
22131 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
22132 set X $ac_compile
22133 ac_compiler=$2
22134 for ac_option in --version -v -V -qversion; do
22135   { { ac_try="$ac_compiler $ac_option >&5"
22136 case "(($ac_try" in
22137   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22138   *) ac_try_echo=$ac_try;;
22139 esac
22140 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22141 $as_echo "$ac_try_echo"; } >&5
22142   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22143   ac_status=$?
22144   if test -s conftest.err; then
22145     sed '10a\
22146 ... rest of stderr output deleted ...
22147          10q' conftest.err >conftest.er1
22148     cat conftest.er1 >&5
22149   fi
22150   rm -f conftest.er1 conftest.err
22151   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22152   test $ac_status = 0; }
22153 done
22154 
22155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
22156 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
22157 if ${ac_cv_cxx_compiler_gnu+:} false; then :
22158   $as_echo_n "(cached) " >&6
22159 else
22160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22161 /* end confdefs.h.  */
22162 
22163 int
22164 main ()
22165 {
22166 #ifndef __GNUC__
22167        choke me
22168 #endif
22169 
22170   ;
22171   return 0;
22172 }
22173 _ACEOF
22174 if ac_fn_cxx_try_compile "$LINENO"; then :
22175   ac_compiler_gnu=yes
22176 else
22177   ac_compiler_gnu=no
22178 fi
22179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22180 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22181 
22182 fi
22183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22184 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22185 if test $ac_compiler_gnu = yes; then
22186   GXX=yes
22187 else
22188   GXX=
22189 fi
22190 ac_test_CXXFLAGS=${CXXFLAGS+set}
22191 ac_save_CXXFLAGS=$CXXFLAGS
22192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22193 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
22194 if ${ac_cv_prog_cxx_g+:} false; then :
22195   $as_echo_n "(cached) " >&6
22196 else
22197   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22198    ac_cxx_werror_flag=yes
22199    ac_cv_prog_cxx_g=no
22200    CXXFLAGS="-g"
22201    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22202 /* end confdefs.h.  */
22203 
22204 int
22205 main ()
22206 {
22207 
22208   ;
22209   return 0;
22210 }
22211 _ACEOF
22212 if ac_fn_cxx_try_compile "$LINENO"; then :
22213   ac_cv_prog_cxx_g=yes
22214 else
22215   CXXFLAGS=""
22216       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22217 /* end confdefs.h.  */
22218 
22219 int
22220 main ()
22221 {
22222 
22223   ;
22224   return 0;
22225 }
22226 _ACEOF
22227 if ac_fn_cxx_try_compile "$LINENO"; then :
22228 
22229 else
22230   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22231          CXXFLAGS="-g"
22232          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22233 /* end confdefs.h.  */
22234 
22235 int
22236 main ()
22237 {
22238 
22239   ;
22240   return 0;
22241 }
22242 _ACEOF
22243 if ac_fn_cxx_try_compile "$LINENO"; then :
22244   ac_cv_prog_cxx_g=yes
22245 fi
22246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22247 fi
22248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22249 fi
22250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22251    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22252 fi
22253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22254 $as_echo "$ac_cv_prog_cxx_g" >&6; }
22255 if test "$ac_test_CXXFLAGS" = set; then
22256   CXXFLAGS=$ac_save_CXXFLAGS
22257 elif test $ac_cv_prog_cxx_g = yes; then
22258   if test "$GXX" = yes; then
22259     CXXFLAGS="-g -O2"
22260   else
22261     CXXFLAGS="-g"
22262   fi
22263 else
22264   if test "$GXX" = yes; then
22265     CXXFLAGS="-O2"
22266   else
22267     CXXFLAGS=
22268   fi
22269 fi
22270 ac_ext=cpp
22271 ac_cpp='$CXXCPP $CPPFLAGS'
22272 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22273 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22274 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22275 
22276 
22277   # This is the compiler version number on the form X.Y[.Z]
22278 
22279 
22280 
22281 
22282   if test "x$CC_VERSION" != "x$CXX_VERSION"; then
22283     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&5
22284 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&2;}
22285     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
22286 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
22287   fi
22288 
22289   # We only check CC_VERSION since we assume CXX_VERSION is equal.
22290   if  [[ "$CC_VERSION" =~ (.*\.){3} ]] ; then
22291     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&5
22292 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
22293   fi
22294 
22295   if  [[  "$CC_VERSION" =~ [0-9]{6} ]] ; then
22296     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&5
22297 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
22298   fi
22299 
22300   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION"`
22301 
22302 
22303   ### Locate other tools
22304 
22305   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22306     ac_ext=m
22307 ac_cpp='$OBJCPP $CPPFLAGS'
22308 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22309 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22310 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22311 if test -n "$ac_tool_prefix"; then
22312   for ac_prog in gcc objcc objc cc CC
22313   do
22314     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22315 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22317 $as_echo_n "checking for $ac_word... " >&6; }
22318 if ${ac_cv_prog_OBJC+:} false; then :
22319   $as_echo_n "(cached) " >&6
22320 else
22321   if test -n "$OBJC"; then
22322   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22323 else
22324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22325 for as_dir in $PATH
22326 do
22327   IFS=$as_save_IFS
22328   test -z "$as_dir" && as_dir=.
22329     for ac_exec_ext in '' $ac_executable_extensions; do
22330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22331     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22333     break 2
22334   fi
22335 done
22336   done
22337 IFS=$as_save_IFS
22338 
22339 fi
22340 fi
22341 OBJC=$ac_cv_prog_OBJC
22342 if test -n "$OBJC"; then
22343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22344 $as_echo "$OBJC" >&6; }
22345 else
22346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22347 $as_echo "no" >&6; }
22348 fi
22349 
22350 
22351     test -n "$OBJC" && break
22352   done
22353 fi
22354 if test -z "$OBJC"; then
22355   ac_ct_OBJC=$OBJC
22356   for ac_prog in gcc objcc objc cc CC
22357 do
22358   # Extract the first word of "$ac_prog", so it can be a program name with args.
22359 set dummy $ac_prog; ac_word=$2
22360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22361 $as_echo_n "checking for $ac_word... " >&6; }
22362 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22363   $as_echo_n "(cached) " >&6
22364 else
22365   if test -n "$ac_ct_OBJC"; then
22366   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22367 else
22368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22369 for as_dir in $PATH
22370 do
22371   IFS=$as_save_IFS
22372   test -z "$as_dir" && as_dir=.
22373     for ac_exec_ext in '' $ac_executable_extensions; do
22374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22375     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22377     break 2
22378   fi
22379 done
22380   done
22381 IFS=$as_save_IFS
22382 
22383 fi
22384 fi
22385 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22386 if test -n "$ac_ct_OBJC"; then
22387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22388 $as_echo "$ac_ct_OBJC" >&6; }
22389 else
22390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22391 $as_echo "no" >&6; }
22392 fi
22393 
22394 
22395   test -n "$ac_ct_OBJC" && break
22396 done
22397 
22398   if test "x$ac_ct_OBJC" = x; then
22399     OBJC="gcc"
22400   else
22401     case $cross_compiling:$ac_tool_warned in
22402 yes:)
22403 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22404 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22405 ac_tool_warned=yes ;;
22406 esac
22407     OBJC=$ac_ct_OBJC
22408   fi
22409 fi
22410 
22411 # Provide some information about the compiler.
22412 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22413 set X $ac_compile
22414 ac_compiler=$2
22415 for ac_option in --version -v -V -qversion; do
22416   { { ac_try="$ac_compiler $ac_option >&5"
22417 case "(($ac_try" in
22418   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22419   *) ac_try_echo=$ac_try;;
22420 esac
22421 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22422 $as_echo "$ac_try_echo"; } >&5
22423   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22424   ac_status=$?
22425   if test -s conftest.err; then
22426     sed '10a\
22427 ... rest of stderr output deleted ...
22428          10q' conftest.err >conftest.er1
22429     cat conftest.er1 >&5
22430   fi
22431   rm -f conftest.er1 conftest.err
22432   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22433   test $ac_status = 0; }
22434 done
22435 
22436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22437 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22438 if ${ac_cv_objc_compiler_gnu+:} false; then :
22439   $as_echo_n "(cached) " >&6
22440 else
22441   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22442 /* end confdefs.h.  */
22443 
22444 int
22445 main ()
22446 {
22447 #ifndef __GNUC__
22448        choke me
22449 #endif
22450 
22451   ;
22452   return 0;
22453 }
22454 _ACEOF
22455 if ac_fn_objc_try_compile "$LINENO"; then :
22456   ac_compiler_gnu=yes
22457 else
22458   ac_compiler_gnu=no
22459 fi
22460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22461 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22462 
22463 fi
22464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22465 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22466 if test $ac_compiler_gnu = yes; then
22467   GOBJC=yes
22468 else
22469   GOBJC=
22470 fi
22471 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22472 ac_save_OBJCFLAGS=$OBJCFLAGS
22473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22474 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22475 if ${ac_cv_prog_objc_g+:} false; then :
22476   $as_echo_n "(cached) " >&6
22477 else
22478   ac_save_objc_werror_flag=$ac_objc_werror_flag
22479    ac_objc_werror_flag=yes
22480    ac_cv_prog_objc_g=no
22481    OBJCFLAGS="-g"
22482    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22483 /* end confdefs.h.  */
22484 
22485 int
22486 main ()
22487 {
22488 
22489   ;
22490   return 0;
22491 }
22492 _ACEOF
22493 if ac_fn_objc_try_compile "$LINENO"; then :
22494   ac_cv_prog_objc_g=yes
22495 else
22496   OBJCFLAGS=""
22497       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22498 /* end confdefs.h.  */
22499 
22500 int
22501 main ()
22502 {
22503 
22504   ;
22505   return 0;
22506 }
22507 _ACEOF
22508 if ac_fn_objc_try_compile "$LINENO"; then :
22509 
22510 else
22511   ac_objc_werror_flag=$ac_save_objc_werror_flag
22512          OBJCFLAGS="-g"
22513          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22514 /* end confdefs.h.  */
22515 
22516 int
22517 main ()
22518 {
22519 
22520   ;
22521   return 0;
22522 }
22523 _ACEOF
22524 if ac_fn_objc_try_compile "$LINENO"; then :
22525   ac_cv_prog_objc_g=yes
22526 fi
22527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22528 fi
22529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22530 fi
22531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22532    ac_objc_werror_flag=$ac_save_objc_werror_flag
22533 fi
22534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22535 $as_echo "$ac_cv_prog_objc_g" >&6; }
22536 if test "$ac_test_OBJCFLAGS" = set; then
22537   OBJCFLAGS=$ac_save_OBJCFLAGS
22538 elif test $ac_cv_prog_objc_g = yes; then
22539   if test "$GOBJC" = yes; then
22540     OBJCFLAGS="-g -O2"
22541   else
22542     OBJCFLAGS="-g"
22543   fi
22544 else
22545   if test "$GOBJC" = yes; then
22546     OBJCFLAGS="-O2"
22547   else
22548     OBJCFLAGS=
22549   fi
22550 fi
22551 ac_ext=cpp
22552 ac_cpp='$CXXCPP $CPPFLAGS'
22553 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22554 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22555 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22556 
22557 
22558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22559 
22560   # First separate the path from the arguments. This will split at the first
22561   # space.
22562   complete="$OBJC"
22563   path="${complete%% *}"
22564   tmp="$complete EOL"
22565   arguments="${tmp#* }"
22566 
22567   # Input might be given as Windows format, start by converting to
22568   # unix format.
22569   new_path=`$CYGPATH -u "$path"`
22570 
22571   # Now try to locate executable using which
22572   new_path=`$WHICH "$new_path" 2> /dev/null`
22573   # bat and cmd files are not always considered executable in cygwin causing which
22574   # to not find them
22575   if test "x$new_path" = x \
22576       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22577       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22578     new_path=`$CYGPATH -u "$path"`
22579   fi
22580   if test "x$new_path" = x; then
22581     # Oops. Which didn't find the executable.
22582     # The splitting of arguments from the executable at a space might have been incorrect,
22583     # since paths with space are more likely in Windows. Give it another try with the whole
22584     # argument.
22585     path="$complete"
22586     arguments="EOL"
22587     new_path=`$CYGPATH -u "$path"`
22588     new_path=`$WHICH "$new_path" 2> /dev/null`
22589     # bat and cmd files are not always considered executable in cygwin causing which
22590     # to not find them
22591     if test "x$new_path" = x \
22592         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22593         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22594       new_path=`$CYGPATH -u "$path"`
22595     fi
22596     if test "x$new_path" = x; then
22597       # It's still not found. Now this is an unrecoverable error.
22598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22599 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22600       has_space=`$ECHO "$complete" | $GREP " "`
22601       if test "x$has_space" != x; then
22602         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22603 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22604       fi
22605       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22606     fi
22607   fi
22608 
22609   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22610   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22611   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22612   # "foo.exe" is OK but "foo" is an error.
22613   #
22614   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22615   # It is also a way to make sure we got the proper file name for the real test later on.
22616   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22617   if test "x$test_shortpath" = x; then
22618     # Short path failed, file does not exist as specified.
22619     # Try adding .exe or .cmd
22620     if test -f "${new_path}.exe"; then
22621       input_to_shortpath="${new_path}.exe"
22622     elif test -f "${new_path}.cmd"; then
22623       input_to_shortpath="${new_path}.cmd"
22624     else
22625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22626 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22627       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22628 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22629       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22630     fi
22631   else
22632     input_to_shortpath="$new_path"
22633   fi
22634 
22635   # Call helper function which possibly converts this using DOS-style short mode.
22636   # If so, the updated path is stored in $new_path.
22637   new_path="$input_to_shortpath"
22638 
22639   input_path="$input_to_shortpath"
22640   # Check if we need to convert this using DOS-style short mode. If the path
22641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22642   # take no chances and rewrite it.
22643   # Note: m4 eats our [], so we need to use [ and ] instead.
22644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22645   if test "x$has_forbidden_chars" != x; then
22646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22647     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22648     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22649     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22650       # Going to short mode and back again did indeed matter. Since short mode is
22651       # case insensitive, let's make it lowercase to improve readability.
22652       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22653       # Now convert it back to Unix-stile (cygpath)
22654       input_path=`$CYGPATH -u "$shortmode_path"`
22655       new_path="$input_path"
22656     fi
22657   fi
22658 
22659   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22660   if test "x$test_cygdrive_prefix" = x; then
22661     # As a simple fix, exclude /usr/bin since it's not a real path.
22662     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22663       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22664       # a path prefixed by /cygdrive for fixpath to work.
22665       new_path="$CYGWIN_ROOT_PATH$input_path"
22666     fi
22667   fi
22668 
22669   # remove trailing .exe if any
22670   new_path="${new_path/%.exe/}"
22671 
22672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22673 
22674   # First separate the path from the arguments. This will split at the first
22675   # space.
22676   complete="$OBJC"
22677   path="${complete%% *}"
22678   tmp="$complete EOL"
22679   arguments="${tmp#* }"
22680 
22681   # Input might be given as Windows format, start by converting to
22682   # unix format.
22683   new_path="$path"
22684 
22685   windows_path="$new_path"
22686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22687     unix_path=`$CYGPATH -u "$windows_path"`
22688     new_path="$unix_path"
22689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22691     new_path="$unix_path"
22692   fi
22693 
22694 
22695   # Now try to locate executable using which
22696   new_path=`$WHICH "$new_path" 2> /dev/null`
22697 
22698   if test "x$new_path" = x; then
22699     # Oops. Which didn't find the executable.
22700     # The splitting of arguments from the executable at a space might have been incorrect,
22701     # since paths with space are more likely in Windows. Give it another try with the whole
22702     # argument.
22703     path="$complete"
22704     arguments="EOL"
22705     new_path="$path"
22706 
22707   windows_path="$new_path"
22708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22709     unix_path=`$CYGPATH -u "$windows_path"`
22710     new_path="$unix_path"
22711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22712     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22713     new_path="$unix_path"
22714   fi
22715 
22716 
22717     new_path=`$WHICH "$new_path" 2> /dev/null`
22718 
22719     if test "x$new_path" = x; then
22720       # It's still not found. Now this is an unrecoverable error.
22721       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22722 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22723       has_space=`$ECHO "$complete" | $GREP " "`
22724       if test "x$has_space" != x; then
22725         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22726 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22727       fi
22728       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22729     fi
22730   fi
22731 
22732   # Now new_path has a complete unix path to the binary
22733   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22734     # Keep paths in /bin as-is, but remove trailing .exe if any
22735     new_path="${new_path/%.exe/}"
22736     # Do not save /bin paths to all_fixpath_prefixes!
22737   else
22738     # Not in mixed or Windows style, start by that.
22739     new_path=`cmd //c echo $new_path`
22740 
22741   input_path="$new_path"
22742   # Check if we need to convert this using DOS-style short mode. If the path
22743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22744   # take no chances and rewrite it.
22745   # Note: m4 eats our [], so we need to use [ and ] instead.
22746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22747   if test "x$has_forbidden_chars" != x; then
22748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22749     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22750   fi
22751 
22752     # Output is in $new_path
22753 
22754   windows_path="$new_path"
22755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22756     unix_path=`$CYGPATH -u "$windows_path"`
22757     new_path="$unix_path"
22758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22760     new_path="$unix_path"
22761   fi
22762 
22763     # remove trailing .exe if any
22764     new_path="${new_path/%.exe/}"
22765 
22766     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22767     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22768   fi
22769 
22770   else
22771     # We're on a posix platform. Hooray! :)
22772     # First separate the path from the arguments. This will split at the first
22773     # space.
22774     complete="$OBJC"
22775     path="${complete%% *}"
22776     tmp="$complete EOL"
22777     arguments="${tmp#* }"
22778 
22779     # Cannot rely on the command "which" here since it doesn't always work.
22780     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22781     if test -z "$is_absolute_path"; then
22782       # Path to executable is not absolute. Find it.
22783       IFS_save="$IFS"
22784       IFS=:
22785       for p in $PATH; do
22786         if test -f "$p/$path" && test -x "$p/$path"; then
22787           new_path="$p/$path"
22788           break
22789         fi
22790       done
22791       IFS="$IFS_save"
22792     else
22793       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22794 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22795       new_path="$path"
22796     fi
22797 
22798     if test "x$new_path" = x; then
22799       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22800 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22801       has_space=`$ECHO "$complete" | $GREP " "`
22802       if test "x$has_space" != x; then
22803         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22804 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22805       fi
22806       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22807     fi
22808   fi
22809 
22810   # Now join together the path and the arguments once again
22811   if test "x$arguments" != xEOL; then
22812     new_complete="$new_path ${arguments% *}"
22813   else
22814     new_complete="$new_path"
22815   fi
22816 
22817   if test "x$complete" != "x$new_complete"; then
22818     OBJC="$new_complete"
22819     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22820 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22821   fi
22822 
22823   else
22824     OBJC=
22825   fi
22826 
22827   # Restore the flags to the user specified values.
22828   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22829   CFLAGS="$ORG_CFLAGS"
22830   CXXFLAGS="$ORG_CXXFLAGS"
22831   OBJCFLAGS="$ORG_OBJCFLAGS"
22832 
22833   LD="$CC"
22834   LDEXE="$CC"
22835   LDCXX="$CXX"
22836   LDEXECXX="$CXX"
22837 
22838   # LDEXE is the linker to use, when creating executables.
22839 
22840   # Linking C++ libraries.
22841 
22842   # Linking C++ executables.
22843 
22844 
22845   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22846     if test -n "$ac_tool_prefix"; then
22847   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22848 set dummy ${ac_tool_prefix}ar; ac_word=$2
22849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22850 $as_echo_n "checking for $ac_word... " >&6; }
22851 if ${ac_cv_prog_AR+:} false; then :
22852   $as_echo_n "(cached) " >&6
22853 else
22854   if test -n "$AR"; then
22855   ac_cv_prog_AR="$AR" # Let the user override the test.
22856 else
22857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22858 for as_dir in $PATH
22859 do
22860   IFS=$as_save_IFS
22861   test -z "$as_dir" && as_dir=.
22862     for ac_exec_ext in '' $ac_executable_extensions; do
22863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22864     ac_cv_prog_AR="${ac_tool_prefix}ar"
22865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22866     break 2
22867   fi
22868 done
22869   done
22870 IFS=$as_save_IFS
22871 
22872 fi
22873 fi
22874 AR=$ac_cv_prog_AR
22875 if test -n "$AR"; then
22876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22877 $as_echo "$AR" >&6; }
22878 else
22879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22880 $as_echo "no" >&6; }
22881 fi
22882 
22883 
22884 fi
22885 if test -z "$ac_cv_prog_AR"; then
22886   ac_ct_AR=$AR
22887   # Extract the first word of "ar", so it can be a program name with args.
22888 set dummy ar; ac_word=$2
22889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22890 $as_echo_n "checking for $ac_word... " >&6; }
22891 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22892   $as_echo_n "(cached) " >&6
22893 else
22894   if test -n "$ac_ct_AR"; then
22895   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22896 else
22897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22898 for as_dir in $PATH
22899 do
22900   IFS=$as_save_IFS
22901   test -z "$as_dir" && as_dir=.
22902     for ac_exec_ext in '' $ac_executable_extensions; do
22903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22904     ac_cv_prog_ac_ct_AR="ar"
22905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22906     break 2
22907   fi
22908 done
22909   done
22910 IFS=$as_save_IFS
22911 
22912 fi
22913 fi
22914 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22915 if test -n "$ac_ct_AR"; then
22916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22917 $as_echo "$ac_ct_AR" >&6; }
22918 else
22919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22920 $as_echo "no" >&6; }
22921 fi
22922 
22923   if test "x$ac_ct_AR" = x; then
22924     AR=""
22925   else
22926     case $cross_compiling:$ac_tool_warned in
22927 yes:)
22928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22929 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22930 ac_tool_warned=yes ;;
22931 esac
22932     AR=$ac_ct_AR
22933   fi
22934 else
22935   AR="$ac_cv_prog_AR"
22936 fi
22937 
22938 
22939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22940 
22941   # First separate the path from the arguments. This will split at the first
22942   # space.
22943   complete="$AR"
22944   path="${complete%% *}"
22945   tmp="$complete EOL"
22946   arguments="${tmp#* }"
22947 
22948   # Input might be given as Windows format, start by converting to
22949   # unix format.
22950   new_path=`$CYGPATH -u "$path"`
22951 
22952   # Now try to locate executable using which
22953   new_path=`$WHICH "$new_path" 2> /dev/null`
22954   # bat and cmd files are not always considered executable in cygwin causing which
22955   # to not find them
22956   if test "x$new_path" = x \
22957       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22958       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22959     new_path=`$CYGPATH -u "$path"`
22960   fi
22961   if test "x$new_path" = x; then
22962     # Oops. Which didn't find the executable.
22963     # The splitting of arguments from the executable at a space might have been incorrect,
22964     # since paths with space are more likely in Windows. Give it another try with the whole
22965     # argument.
22966     path="$complete"
22967     arguments="EOL"
22968     new_path=`$CYGPATH -u "$path"`
22969     new_path=`$WHICH "$new_path" 2> /dev/null`
22970     # bat and cmd files are not always considered executable in cygwin causing which
22971     # to not find them
22972     if test "x$new_path" = x \
22973         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22974         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22975       new_path=`$CYGPATH -u "$path"`
22976     fi
22977     if test "x$new_path" = x; then
22978       # It's still not found. Now this is an unrecoverable error.
22979       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22980 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22981       has_space=`$ECHO "$complete" | $GREP " "`
22982       if test "x$has_space" != x; then
22983         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22984 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22985       fi
22986       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22987     fi
22988   fi
22989 
22990   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22991   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22992   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22993   # "foo.exe" is OK but "foo" is an error.
22994   #
22995   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22996   # It is also a way to make sure we got the proper file name for the real test later on.
22997   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22998   if test "x$test_shortpath" = x; then
22999     # Short path failed, file does not exist as specified.
23000     # Try adding .exe or .cmd
23001     if test -f "${new_path}.exe"; then
23002       input_to_shortpath="${new_path}.exe"
23003     elif test -f "${new_path}.cmd"; then
23004       input_to_shortpath="${new_path}.cmd"
23005     else
23006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
23007 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
23008       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23009 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23010       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23011     fi
23012   else
23013     input_to_shortpath="$new_path"
23014   fi
23015 
23016   # Call helper function which possibly converts this using DOS-style short mode.
23017   # If so, the updated path is stored in $new_path.
23018   new_path="$input_to_shortpath"
23019 
23020   input_path="$input_to_shortpath"
23021   # Check if we need to convert this using DOS-style short mode. If the path
23022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23023   # take no chances and rewrite it.
23024   # Note: m4 eats our [], so we need to use [ and ] instead.
23025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23026   if test "x$has_forbidden_chars" != x; then
23027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23028     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23029     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23030     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23031       # Going to short mode and back again did indeed matter. Since short mode is
23032       # case insensitive, let's make it lowercase to improve readability.
23033       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23034       # Now convert it back to Unix-stile (cygpath)
23035       input_path=`$CYGPATH -u "$shortmode_path"`
23036       new_path="$input_path"
23037     fi
23038   fi
23039 
23040   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23041   if test "x$test_cygdrive_prefix" = x; then
23042     # As a simple fix, exclude /usr/bin since it's not a real path.
23043     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23044       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23045       # a path prefixed by /cygdrive for fixpath to work.
23046       new_path="$CYGWIN_ROOT_PATH$input_path"
23047     fi
23048   fi
23049 
23050   # remove trailing .exe if any
23051   new_path="${new_path/%.exe/}"
23052 
23053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23054 
23055   # First separate the path from the arguments. This will split at the first
23056   # space.
23057   complete="$AR"
23058   path="${complete%% *}"
23059   tmp="$complete EOL"
23060   arguments="${tmp#* }"
23061 
23062   # Input might be given as Windows format, start by converting to
23063   # unix format.
23064   new_path="$path"
23065 
23066   windows_path="$new_path"
23067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23068     unix_path=`$CYGPATH -u "$windows_path"`
23069     new_path="$unix_path"
23070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23072     new_path="$unix_path"
23073   fi
23074 
23075 
23076   # Now try to locate executable using which
23077   new_path=`$WHICH "$new_path" 2> /dev/null`
23078 
23079   if test "x$new_path" = x; then
23080     # Oops. Which didn't find the executable.
23081     # The splitting of arguments from the executable at a space might have been incorrect,
23082     # since paths with space are more likely in Windows. Give it another try with the whole
23083     # argument.
23084     path="$complete"
23085     arguments="EOL"
23086     new_path="$path"
23087 
23088   windows_path="$new_path"
23089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23090     unix_path=`$CYGPATH -u "$windows_path"`
23091     new_path="$unix_path"
23092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23094     new_path="$unix_path"
23095   fi
23096 
23097 
23098     new_path=`$WHICH "$new_path" 2> /dev/null`
23099 
23100     if test "x$new_path" = x; then
23101       # It's still not found. Now this is an unrecoverable error.
23102       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23103 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23104       has_space=`$ECHO "$complete" | $GREP " "`
23105       if test "x$has_space" != x; then
23106         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23107 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23108       fi
23109       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23110     fi
23111   fi
23112 
23113   # Now new_path has a complete unix path to the binary
23114   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23115     # Keep paths in /bin as-is, but remove trailing .exe if any
23116     new_path="${new_path/%.exe/}"
23117     # Do not save /bin paths to all_fixpath_prefixes!
23118   else
23119     # Not in mixed or Windows style, start by that.
23120     new_path=`cmd //c echo $new_path`
23121 
23122   input_path="$new_path"
23123   # Check if we need to convert this using DOS-style short mode. If the path
23124   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23125   # take no chances and rewrite it.
23126   # Note: m4 eats our [], so we need to use [ and ] instead.
23127   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23128   if test "x$has_forbidden_chars" != x; then
23129     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23130     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23131   fi
23132 
23133     # Output is in $new_path
23134 
23135   windows_path="$new_path"
23136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23137     unix_path=`$CYGPATH -u "$windows_path"`
23138     new_path="$unix_path"
23139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23140     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23141     new_path="$unix_path"
23142   fi
23143 
23144     # remove trailing .exe if any
23145     new_path="${new_path/%.exe/}"
23146 
23147     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23148     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23149   fi
23150 
23151   else
23152     # We're on a posix platform. Hooray! :)
23153     # First separate the path from the arguments. This will split at the first
23154     # space.
23155     complete="$AR"
23156     path="${complete%% *}"
23157     tmp="$complete EOL"
23158     arguments="${tmp#* }"
23159 
23160     # Cannot rely on the command "which" here since it doesn't always work.
23161     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23162     if test -z "$is_absolute_path"; then
23163       # Path to executable is not absolute. Find it.
23164       IFS_save="$IFS"
23165       IFS=:
23166       for p in $PATH; do
23167         if test -f "$p/$path" && test -x "$p/$path"; then
23168           new_path="$p/$path"
23169           break
23170         fi
23171       done
23172       IFS="$IFS_save"
23173     else
23174       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
23175 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
23176       new_path="$path"
23177     fi
23178 
23179     if test "x$new_path" = x; then
23180       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23181 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23182       has_space=`$ECHO "$complete" | $GREP " "`
23183       if test "x$has_space" != x; then
23184         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23185 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23186       fi
23187       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23188     fi
23189   fi
23190 
23191   # Now join together the path and the arguments once again
23192   if test "x$arguments" != xEOL; then
23193     new_complete="$new_path ${arguments% *}"
23194   else
23195     new_complete="$new_path"
23196   fi
23197 
23198   if test "x$complete" != "x$new_complete"; then
23199     AR="$new_complete"
23200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23201 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23202   fi
23203 
23204   fi
23205   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23206     ARFLAGS="-r"
23207   elif test "x$OPENJDK_TARGET_OS" = xaix; then
23208     ARFLAGS="-X64"
23209   else
23210     ARFLAGS=""
23211   fi
23212 
23213 
23214   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
23215   HOTSPOT_CXX="$CXX"
23216   HOTSPOT_LD="$LD"
23217 
23218 
23219 
23220   COMPILER_NAME=gcc
23221   COMPILER_TYPE=CC
23222   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23223 
23224     # For now, assume that we are always compiling using cl.exe.
23225     CC_OUT_OPTION=-Fo
23226     EXE_OUT_OPTION=-out:
23227     LD_OUT_OPTION=-out:
23228     AR_OUT_OPTION=-out:
23229     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23230     # program for something completely different.
23231     # Extract the first word of "link", so it can be a program name with args.
23232 set dummy link; ac_word=$2
23233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23234 $as_echo_n "checking for $ac_word... " >&6; }
23235 if ${ac_cv_prog_WINLD+:} false; then :
23236   $as_echo_n "(cached) " >&6
23237 else
23238   if test -n "$WINLD"; then
23239   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23240 else
23241   ac_prog_rejected=no
23242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23243 for as_dir in $PATH
23244 do
23245   IFS=$as_save_IFS
23246   test -z "$as_dir" && as_dir=.
23247     for ac_exec_ext in '' $ac_executable_extensions; do
23248   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23249     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23250        ac_prog_rejected=yes
23251        continue
23252      fi
23253     ac_cv_prog_WINLD="link"
23254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23255     break 2
23256   fi
23257 done
23258   done
23259 IFS=$as_save_IFS
23260 
23261 if test $ac_prog_rejected = yes; then
23262   # We found a bogon in the path, so make sure we never use it.
23263   set dummy $ac_cv_prog_WINLD
23264   shift
23265   if test $# != 0; then
23266     # We chose a different compiler from the bogus one.
23267     # However, it has the same basename, so the bogon will be chosen
23268     # first if we set WINLD to just the basename; use the full file name.
23269     shift
23270     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23271   fi
23272 fi
23273 fi
23274 fi
23275 WINLD=$ac_cv_prog_WINLD
23276 if test -n "$WINLD"; then
23277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23278 $as_echo "$WINLD" >&6; }
23279 else
23280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23281 $as_echo "no" >&6; }
23282 fi
23283 
23284 
23285     # Since we must ignore the first found link, WINLD will contain
23286     # the full path to the link.exe program.
23287 
23288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23289 
23290   # First separate the path from the arguments. This will split at the first
23291   # space.
23292   complete="$WINLD"
23293   path="${complete%% *}"
23294   tmp="$complete EOL"
23295   arguments="${tmp#* }"
23296 
23297   # Input might be given as Windows format, start by converting to
23298   # unix format.
23299   new_path=`$CYGPATH -u "$path"`
23300 
23301   # Now try to locate executable using which
23302   new_path=`$WHICH "$new_path" 2> /dev/null`
23303   # bat and cmd files are not always considered executable in cygwin causing which
23304   # to not find them
23305   if test "x$new_path" = x \
23306       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23307       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23308     new_path=`$CYGPATH -u "$path"`
23309   fi
23310   if test "x$new_path" = x; then
23311     # Oops. Which didn't find the executable.
23312     # The splitting of arguments from the executable at a space might have been incorrect,
23313     # since paths with space are more likely in Windows. Give it another try with the whole
23314     # argument.
23315     path="$complete"
23316     arguments="EOL"
23317     new_path=`$CYGPATH -u "$path"`
23318     new_path=`$WHICH "$new_path" 2> /dev/null`
23319     # bat and cmd files are not always considered executable in cygwin causing which
23320     # to not find them
23321     if test "x$new_path" = x \
23322         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23323         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23324       new_path=`$CYGPATH -u "$path"`
23325     fi
23326     if test "x$new_path" = x; then
23327       # It's still not found. Now this is an unrecoverable error.
23328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23329 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23330       has_space=`$ECHO "$complete" | $GREP " "`
23331       if test "x$has_space" != x; then
23332         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23333 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23334       fi
23335       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23336     fi
23337   fi
23338 
23339   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23340   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23341   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23342   # "foo.exe" is OK but "foo" is an error.
23343   #
23344   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23345   # It is also a way to make sure we got the proper file name for the real test later on.
23346   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23347   if test "x$test_shortpath" = x; then
23348     # Short path failed, file does not exist as specified.
23349     # Try adding .exe or .cmd
23350     if test -f "${new_path}.exe"; then
23351       input_to_shortpath="${new_path}.exe"
23352     elif test -f "${new_path}.cmd"; then
23353       input_to_shortpath="${new_path}.cmd"
23354     else
23355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23356 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23357       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23358 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23359       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23360     fi
23361   else
23362     input_to_shortpath="$new_path"
23363   fi
23364 
23365   # Call helper function which possibly converts this using DOS-style short mode.
23366   # If so, the updated path is stored in $new_path.
23367   new_path="$input_to_shortpath"
23368 
23369   input_path="$input_to_shortpath"
23370   # Check if we need to convert this using DOS-style short mode. If the path
23371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23372   # take no chances and rewrite it.
23373   # Note: m4 eats our [], so we need to use [ and ] instead.
23374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23375   if test "x$has_forbidden_chars" != x; then
23376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23377     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23378     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23379     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23380       # Going to short mode and back again did indeed matter. Since short mode is
23381       # case insensitive, let's make it lowercase to improve readability.
23382       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23383       # Now convert it back to Unix-stile (cygpath)
23384       input_path=`$CYGPATH -u "$shortmode_path"`
23385       new_path="$input_path"
23386     fi
23387   fi
23388 
23389   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23390   if test "x$test_cygdrive_prefix" = x; then
23391     # As a simple fix, exclude /usr/bin since it's not a real path.
23392     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23393       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23394       # a path prefixed by /cygdrive for fixpath to work.
23395       new_path="$CYGWIN_ROOT_PATH$input_path"
23396     fi
23397   fi
23398 
23399   # remove trailing .exe if any
23400   new_path="${new_path/%.exe/}"
23401 
23402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23403 
23404   # First separate the path from the arguments. This will split at the first
23405   # space.
23406   complete="$WINLD"
23407   path="${complete%% *}"
23408   tmp="$complete EOL"
23409   arguments="${tmp#* }"
23410 
23411   # Input might be given as Windows format, start by converting to
23412   # unix format.
23413   new_path="$path"
23414 
23415   windows_path="$new_path"
23416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23417     unix_path=`$CYGPATH -u "$windows_path"`
23418     new_path="$unix_path"
23419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23421     new_path="$unix_path"
23422   fi
23423 
23424 
23425   # Now try to locate executable using which
23426   new_path=`$WHICH "$new_path" 2> /dev/null`
23427 
23428   if test "x$new_path" = x; then
23429     # Oops. Which didn't find the executable.
23430     # The splitting of arguments from the executable at a space might have been incorrect,
23431     # since paths with space are more likely in Windows. Give it another try with the whole
23432     # argument.
23433     path="$complete"
23434     arguments="EOL"
23435     new_path="$path"
23436 
23437   windows_path="$new_path"
23438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23439     unix_path=`$CYGPATH -u "$windows_path"`
23440     new_path="$unix_path"
23441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23443     new_path="$unix_path"
23444   fi
23445 
23446 
23447     new_path=`$WHICH "$new_path" 2> /dev/null`
23448 
23449     if test "x$new_path" = x; then
23450       # It's still not found. Now this is an unrecoverable error.
23451       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23452 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23453       has_space=`$ECHO "$complete" | $GREP " "`
23454       if test "x$has_space" != x; then
23455         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23456 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23457       fi
23458       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23459     fi
23460   fi
23461 
23462   # Now new_path has a complete unix path to the binary
23463   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23464     # Keep paths in /bin as-is, but remove trailing .exe if any
23465     new_path="${new_path/%.exe/}"
23466     # Do not save /bin paths to all_fixpath_prefixes!
23467   else
23468     # Not in mixed or Windows style, start by that.
23469     new_path=`cmd //c echo $new_path`
23470 
23471   input_path="$new_path"
23472   # Check if we need to convert this using DOS-style short mode. If the path
23473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23474   # take no chances and rewrite it.
23475   # Note: m4 eats our [], so we need to use [ and ] instead.
23476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23477   if test "x$has_forbidden_chars" != x; then
23478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23479     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23480   fi
23481 
23482     # Output is in $new_path
23483 
23484   windows_path="$new_path"
23485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23486     unix_path=`$CYGPATH -u "$windows_path"`
23487     new_path="$unix_path"
23488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23490     new_path="$unix_path"
23491   fi
23492 
23493     # remove trailing .exe if any
23494     new_path="${new_path/%.exe/}"
23495 
23496     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23497     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23498   fi
23499 
23500   else
23501     # We're on a posix platform. Hooray! :)
23502     # First separate the path from the arguments. This will split at the first
23503     # space.
23504     complete="$WINLD"
23505     path="${complete%% *}"
23506     tmp="$complete EOL"
23507     arguments="${tmp#* }"
23508 
23509     # Cannot rely on the command "which" here since it doesn't always work.
23510     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23511     if test -z "$is_absolute_path"; then
23512       # Path to executable is not absolute. Find it.
23513       IFS_save="$IFS"
23514       IFS=:
23515       for p in $PATH; do
23516         if test -f "$p/$path" && test -x "$p/$path"; then
23517           new_path="$p/$path"
23518           break
23519         fi
23520       done
23521       IFS="$IFS_save"
23522     else
23523       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23524 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23525       new_path="$path"
23526     fi
23527 
23528     if test "x$new_path" = x; then
23529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23530 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23531       has_space=`$ECHO "$complete" | $GREP " "`
23532       if test "x$has_space" != x; then
23533         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23534 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23535       fi
23536       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23537     fi
23538   fi
23539 
23540   # Now join together the path and the arguments once again
23541   if test "x$arguments" != xEOL; then
23542     new_complete="$new_path ${arguments% *}"
23543   else
23544     new_complete="$new_path"
23545   fi
23546 
23547   if test "x$complete" != "x$new_complete"; then
23548     WINLD="$new_complete"
23549     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23550 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23551   fi
23552 
23553     printf "Windows linker was found at $WINLD\n"
23554     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23555 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23556     "$WINLD" --version > /dev/null
23557     if test $? -eq 0 ; then
23558       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23559 $as_echo "no" >&6; }
23560       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23561     else
23562       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23563 $as_echo "yes" >&6; }
23564     fi
23565     LD="$WINLD"
23566     LDEXE="$WINLD"
23567     LDCXX="$WINLD"
23568     LDEXECXX="$WINLD"
23569 
23570     # Extract the first word of "mt", so it can be a program name with args.
23571 set dummy mt; ac_word=$2
23572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23573 $as_echo_n "checking for $ac_word... " >&6; }
23574 if ${ac_cv_prog_MT+:} false; then :
23575   $as_echo_n "(cached) " >&6
23576 else
23577   if test -n "$MT"; then
23578   ac_cv_prog_MT="$MT" # Let the user override the test.
23579 else
23580   ac_prog_rejected=no
23581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23582 for as_dir in $PATH
23583 do
23584   IFS=$as_save_IFS
23585   test -z "$as_dir" && as_dir=.
23586     for ac_exec_ext in '' $ac_executable_extensions; do
23587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23588     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23589        ac_prog_rejected=yes
23590        continue
23591      fi
23592     ac_cv_prog_MT="mt"
23593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23594     break 2
23595   fi
23596 done
23597   done
23598 IFS=$as_save_IFS
23599 
23600 if test $ac_prog_rejected = yes; then
23601   # We found a bogon in the path, so make sure we never use it.
23602   set dummy $ac_cv_prog_MT
23603   shift
23604   if test $# != 0; then
23605     # We chose a different compiler from the bogus one.
23606     # However, it has the same basename, so the bogon will be chosen
23607     # first if we set MT to just the basename; use the full file name.
23608     shift
23609     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23610   fi
23611 fi
23612 fi
23613 fi
23614 MT=$ac_cv_prog_MT
23615 if test -n "$MT"; then
23616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23617 $as_echo "$MT" >&6; }
23618 else
23619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23620 $as_echo "no" >&6; }
23621 fi
23622 
23623 
23624 
23625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23626 
23627   # First separate the path from the arguments. This will split at the first
23628   # space.
23629   complete="$MT"
23630   path="${complete%% *}"
23631   tmp="$complete EOL"
23632   arguments="${tmp#* }"
23633 
23634   # Input might be given as Windows format, start by converting to
23635   # unix format.
23636   new_path=`$CYGPATH -u "$path"`
23637 
23638   # Now try to locate executable using which
23639   new_path=`$WHICH "$new_path" 2> /dev/null`
23640   # bat and cmd files are not always considered executable in cygwin causing which
23641   # to not find them
23642   if test "x$new_path" = x \
23643       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23644       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23645     new_path=`$CYGPATH -u "$path"`
23646   fi
23647   if test "x$new_path" = x; then
23648     # Oops. Which didn't find the executable.
23649     # The splitting of arguments from the executable at a space might have been incorrect,
23650     # since paths with space are more likely in Windows. Give it another try with the whole
23651     # argument.
23652     path="$complete"
23653     arguments="EOL"
23654     new_path=`$CYGPATH -u "$path"`
23655     new_path=`$WHICH "$new_path" 2> /dev/null`
23656     # bat and cmd files are not always considered executable in cygwin causing which
23657     # to not find them
23658     if test "x$new_path" = x \
23659         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23660         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23661       new_path=`$CYGPATH -u "$path"`
23662     fi
23663     if test "x$new_path" = x; then
23664       # It's still not found. Now this is an unrecoverable error.
23665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23666 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23667       has_space=`$ECHO "$complete" | $GREP " "`
23668       if test "x$has_space" != x; then
23669         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23670 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23671       fi
23672       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23673     fi
23674   fi
23675 
23676   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23677   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23678   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23679   # "foo.exe" is OK but "foo" is an error.
23680   #
23681   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23682   # It is also a way to make sure we got the proper file name for the real test later on.
23683   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23684   if test "x$test_shortpath" = x; then
23685     # Short path failed, file does not exist as specified.
23686     # Try adding .exe or .cmd
23687     if test -f "${new_path}.exe"; then
23688       input_to_shortpath="${new_path}.exe"
23689     elif test -f "${new_path}.cmd"; then
23690       input_to_shortpath="${new_path}.cmd"
23691     else
23692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23693 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23694       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23695 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23696       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23697     fi
23698   else
23699     input_to_shortpath="$new_path"
23700   fi
23701 
23702   # Call helper function which possibly converts this using DOS-style short mode.
23703   # If so, the updated path is stored in $new_path.
23704   new_path="$input_to_shortpath"
23705 
23706   input_path="$input_to_shortpath"
23707   # Check if we need to convert this using DOS-style short mode. If the path
23708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23709   # take no chances and rewrite it.
23710   # Note: m4 eats our [], so we need to use [ and ] instead.
23711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23712   if test "x$has_forbidden_chars" != x; then
23713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23714     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23715     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23716     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23717       # Going to short mode and back again did indeed matter. Since short mode is
23718       # case insensitive, let's make it lowercase to improve readability.
23719       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23720       # Now convert it back to Unix-stile (cygpath)
23721       input_path=`$CYGPATH -u "$shortmode_path"`
23722       new_path="$input_path"
23723     fi
23724   fi
23725 
23726   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23727   if test "x$test_cygdrive_prefix" = x; then
23728     # As a simple fix, exclude /usr/bin since it's not a real path.
23729     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23730       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23731       # a path prefixed by /cygdrive for fixpath to work.
23732       new_path="$CYGWIN_ROOT_PATH$input_path"
23733     fi
23734   fi
23735 
23736   # remove trailing .exe if any
23737   new_path="${new_path/%.exe/}"
23738 
23739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23740 
23741   # First separate the path from the arguments. This will split at the first
23742   # space.
23743   complete="$MT"
23744   path="${complete%% *}"
23745   tmp="$complete EOL"
23746   arguments="${tmp#* }"
23747 
23748   # Input might be given as Windows format, start by converting to
23749   # unix format.
23750   new_path="$path"
23751 
23752   windows_path="$new_path"
23753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23754     unix_path=`$CYGPATH -u "$windows_path"`
23755     new_path="$unix_path"
23756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23758     new_path="$unix_path"
23759   fi
23760 
23761 
23762   # Now try to locate executable using which
23763   new_path=`$WHICH "$new_path" 2> /dev/null`
23764 
23765   if test "x$new_path" = x; then
23766     # Oops. Which didn't find the executable.
23767     # The splitting of arguments from the executable at a space might have been incorrect,
23768     # since paths with space are more likely in Windows. Give it another try with the whole
23769     # argument.
23770     path="$complete"
23771     arguments="EOL"
23772     new_path="$path"
23773 
23774   windows_path="$new_path"
23775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23776     unix_path=`$CYGPATH -u "$windows_path"`
23777     new_path="$unix_path"
23778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23780     new_path="$unix_path"
23781   fi
23782 
23783 
23784     new_path=`$WHICH "$new_path" 2> /dev/null`
23785 
23786     if test "x$new_path" = x; then
23787       # It's still not found. Now this is an unrecoverable error.
23788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23789 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23790       has_space=`$ECHO "$complete" | $GREP " "`
23791       if test "x$has_space" != x; then
23792         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23793 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23794       fi
23795       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23796     fi
23797   fi
23798 
23799   # Now new_path has a complete unix path to the binary
23800   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23801     # Keep paths in /bin as-is, but remove trailing .exe if any
23802     new_path="${new_path/%.exe/}"
23803     # Do not save /bin paths to all_fixpath_prefixes!
23804   else
23805     # Not in mixed or Windows style, start by that.
23806     new_path=`cmd //c echo $new_path`
23807 
23808   input_path="$new_path"
23809   # Check if we need to convert this using DOS-style short mode. If the path
23810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23811   # take no chances and rewrite it.
23812   # Note: m4 eats our [], so we need to use [ and ] instead.
23813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23814   if test "x$has_forbidden_chars" != x; then
23815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23816     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23817   fi
23818 
23819     # Output is in $new_path
23820 
23821   windows_path="$new_path"
23822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23823     unix_path=`$CYGPATH -u "$windows_path"`
23824     new_path="$unix_path"
23825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23827     new_path="$unix_path"
23828   fi
23829 
23830     # remove trailing .exe if any
23831     new_path="${new_path/%.exe/}"
23832 
23833     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23834     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23835   fi
23836 
23837   else
23838     # We're on a posix platform. Hooray! :)
23839     # First separate the path from the arguments. This will split at the first
23840     # space.
23841     complete="$MT"
23842     path="${complete%% *}"
23843     tmp="$complete EOL"
23844     arguments="${tmp#* }"
23845 
23846     # Cannot rely on the command "which" here since it doesn't always work.
23847     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23848     if test -z "$is_absolute_path"; then
23849       # Path to executable is not absolute. Find it.
23850       IFS_save="$IFS"
23851       IFS=:
23852       for p in $PATH; do
23853         if test -f "$p/$path" && test -x "$p/$path"; then
23854           new_path="$p/$path"
23855           break
23856         fi
23857       done
23858       IFS="$IFS_save"
23859     else
23860       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23861 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23862       new_path="$path"
23863     fi
23864 
23865     if test "x$new_path" = x; then
23866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23867 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23868       has_space=`$ECHO "$complete" | $GREP " "`
23869       if test "x$has_space" != x; then
23870         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23871 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23872       fi
23873       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23874     fi
23875   fi
23876 
23877   # Now join together the path and the arguments once again
23878   if test "x$arguments" != xEOL; then
23879     new_complete="$new_path ${arguments% *}"
23880   else
23881     new_complete="$new_path"
23882   fi
23883 
23884   if test "x$complete" != "x$new_complete"; then
23885     MT="$new_complete"
23886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23887 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23888   fi
23889 
23890     # The resource compiler
23891     # Extract the first word of "rc", so it can be a program name with args.
23892 set dummy rc; ac_word=$2
23893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23894 $as_echo_n "checking for $ac_word... " >&6; }
23895 if ${ac_cv_prog_RC+:} false; then :
23896   $as_echo_n "(cached) " >&6
23897 else
23898   if test -n "$RC"; then
23899   ac_cv_prog_RC="$RC" # Let the user override the test.
23900 else
23901   ac_prog_rejected=no
23902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23903 for as_dir in $PATH
23904 do
23905   IFS=$as_save_IFS
23906   test -z "$as_dir" && as_dir=.
23907     for ac_exec_ext in '' $ac_executable_extensions; do
23908   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23909     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23910        ac_prog_rejected=yes
23911        continue
23912      fi
23913     ac_cv_prog_RC="rc"
23914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23915     break 2
23916   fi
23917 done
23918   done
23919 IFS=$as_save_IFS
23920 
23921 if test $ac_prog_rejected = yes; then
23922   # We found a bogon in the path, so make sure we never use it.
23923   set dummy $ac_cv_prog_RC
23924   shift
23925   if test $# != 0; then
23926     # We chose a different compiler from the bogus one.
23927     # However, it has the same basename, so the bogon will be chosen
23928     # first if we set RC to just the basename; use the full file name.
23929     shift
23930     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23931   fi
23932 fi
23933 fi
23934 fi
23935 RC=$ac_cv_prog_RC
23936 if test -n "$RC"; then
23937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23938 $as_echo "$RC" >&6; }
23939 else
23940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23941 $as_echo "no" >&6; }
23942 fi
23943 
23944 
23945 
23946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23947 
23948   # First separate the path from the arguments. This will split at the first
23949   # space.
23950   complete="$RC"
23951   path="${complete%% *}"
23952   tmp="$complete EOL"
23953   arguments="${tmp#* }"
23954 
23955   # Input might be given as Windows format, start by converting to
23956   # unix format.
23957   new_path=`$CYGPATH -u "$path"`
23958 
23959   # Now try to locate executable using which
23960   new_path=`$WHICH "$new_path" 2> /dev/null`
23961   # bat and cmd files are not always considered executable in cygwin causing which
23962   # to not find them
23963   if test "x$new_path" = x \
23964       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23965       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23966     new_path=`$CYGPATH -u "$path"`
23967   fi
23968   if test "x$new_path" = x; then
23969     # Oops. Which didn't find the executable.
23970     # The splitting of arguments from the executable at a space might have been incorrect,
23971     # since paths with space are more likely in Windows. Give it another try with the whole
23972     # argument.
23973     path="$complete"
23974     arguments="EOL"
23975     new_path=`$CYGPATH -u "$path"`
23976     new_path=`$WHICH "$new_path" 2> /dev/null`
23977     # bat and cmd files are not always considered executable in cygwin causing which
23978     # to not find them
23979     if test "x$new_path" = x \
23980         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23981         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23982       new_path=`$CYGPATH -u "$path"`
23983     fi
23984     if test "x$new_path" = x; then
23985       # It's still not found. Now this is an unrecoverable error.
23986       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23987 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23988       has_space=`$ECHO "$complete" | $GREP " "`
23989       if test "x$has_space" != x; then
23990         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23991 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23992       fi
23993       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23994     fi
23995   fi
23996 
23997   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23998   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23999   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24000   # "foo.exe" is OK but "foo" is an error.
24001   #
24002   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24003   # It is also a way to make sure we got the proper file name for the real test later on.
24004   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24005   if test "x$test_shortpath" = x; then
24006     # Short path failed, file does not exist as specified.
24007     # Try adding .exe or .cmd
24008     if test -f "${new_path}.exe"; then
24009       input_to_shortpath="${new_path}.exe"
24010     elif test -f "${new_path}.cmd"; then
24011       input_to_shortpath="${new_path}.cmd"
24012     else
24013       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
24014 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
24015       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24016 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24017       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24018     fi
24019   else
24020     input_to_shortpath="$new_path"
24021   fi
24022 
24023   # Call helper function which possibly converts this using DOS-style short mode.
24024   # If so, the updated path is stored in $new_path.
24025   new_path="$input_to_shortpath"
24026 
24027   input_path="$input_to_shortpath"
24028   # Check if we need to convert this using DOS-style short mode. If the path
24029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24030   # take no chances and rewrite it.
24031   # Note: m4 eats our [], so we need to use [ and ] instead.
24032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24033   if test "x$has_forbidden_chars" != x; then
24034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24035     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24036     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24037     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24038       # Going to short mode and back again did indeed matter. Since short mode is
24039       # case insensitive, let's make it lowercase to improve readability.
24040       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24041       # Now convert it back to Unix-stile (cygpath)
24042       input_path=`$CYGPATH -u "$shortmode_path"`
24043       new_path="$input_path"
24044     fi
24045   fi
24046 
24047   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24048   if test "x$test_cygdrive_prefix" = x; then
24049     # As a simple fix, exclude /usr/bin since it's not a real path.
24050     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24051       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24052       # a path prefixed by /cygdrive for fixpath to work.
24053       new_path="$CYGWIN_ROOT_PATH$input_path"
24054     fi
24055   fi
24056 
24057   # remove trailing .exe if any
24058   new_path="${new_path/%.exe/}"
24059 
24060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24061 
24062   # First separate the path from the arguments. This will split at the first
24063   # space.
24064   complete="$RC"
24065   path="${complete%% *}"
24066   tmp="$complete EOL"
24067   arguments="${tmp#* }"
24068 
24069   # Input might be given as Windows format, start by converting to
24070   # unix format.
24071   new_path="$path"
24072 
24073   windows_path="$new_path"
24074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24075     unix_path=`$CYGPATH -u "$windows_path"`
24076     new_path="$unix_path"
24077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24079     new_path="$unix_path"
24080   fi
24081 
24082 
24083   # Now try to locate executable using which
24084   new_path=`$WHICH "$new_path" 2> /dev/null`
24085 
24086   if test "x$new_path" = x; then
24087     # Oops. Which didn't find the executable.
24088     # The splitting of arguments from the executable at a space might have been incorrect,
24089     # since paths with space are more likely in Windows. Give it another try with the whole
24090     # argument.
24091     path="$complete"
24092     arguments="EOL"
24093     new_path="$path"
24094 
24095   windows_path="$new_path"
24096   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24097     unix_path=`$CYGPATH -u "$windows_path"`
24098     new_path="$unix_path"
24099   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24100     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24101     new_path="$unix_path"
24102   fi
24103 
24104 
24105     new_path=`$WHICH "$new_path" 2> /dev/null`
24106 
24107     if test "x$new_path" = x; then
24108       # It's still not found. Now this is an unrecoverable error.
24109       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24110 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24111       has_space=`$ECHO "$complete" | $GREP " "`
24112       if test "x$has_space" != x; then
24113         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24114 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24115       fi
24116       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24117     fi
24118   fi
24119 
24120   # Now new_path has a complete unix path to the binary
24121   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24122     # Keep paths in /bin as-is, but remove trailing .exe if any
24123     new_path="${new_path/%.exe/}"
24124     # Do not save /bin paths to all_fixpath_prefixes!
24125   else
24126     # Not in mixed or Windows style, start by that.
24127     new_path=`cmd //c echo $new_path`
24128 
24129   input_path="$new_path"
24130   # Check if we need to convert this using DOS-style short mode. If the path
24131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24132   # take no chances and rewrite it.
24133   # Note: m4 eats our [], so we need to use [ and ] instead.
24134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24135   if test "x$has_forbidden_chars" != x; then
24136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24137     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24138   fi
24139 
24140     # Output is in $new_path
24141 
24142   windows_path="$new_path"
24143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24144     unix_path=`$CYGPATH -u "$windows_path"`
24145     new_path="$unix_path"
24146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24148     new_path="$unix_path"
24149   fi
24150 
24151     # remove trailing .exe if any
24152     new_path="${new_path/%.exe/}"
24153 
24154     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24155     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24156   fi
24157 
24158   else
24159     # We're on a posix platform. Hooray! :)
24160     # First separate the path from the arguments. This will split at the first
24161     # space.
24162     complete="$RC"
24163     path="${complete%% *}"
24164     tmp="$complete EOL"
24165     arguments="${tmp#* }"
24166 
24167     # Cannot rely on the command "which" here since it doesn't always work.
24168     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24169     if test -z "$is_absolute_path"; then
24170       # Path to executable is not absolute. Find it.
24171       IFS_save="$IFS"
24172       IFS=:
24173       for p in $PATH; do
24174         if test -f "$p/$path" && test -x "$p/$path"; then
24175           new_path="$p/$path"
24176           break
24177         fi
24178       done
24179       IFS="$IFS_save"
24180     else
24181       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
24182 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
24183       new_path="$path"
24184     fi
24185 
24186     if test "x$new_path" = x; then
24187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24188 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24189       has_space=`$ECHO "$complete" | $GREP " "`
24190       if test "x$has_space" != x; then
24191         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24192 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24193       fi
24194       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24195     fi
24196   fi
24197 
24198   # Now join together the path and the arguments once again
24199   if test "x$arguments" != xEOL; then
24200     new_complete="$new_path ${arguments% *}"
24201   else
24202     new_complete="$new_path"
24203   fi
24204 
24205   if test "x$complete" != "x$new_complete"; then
24206     RC="$new_complete"
24207     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24208 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24209   fi
24210 
24211 
24212     # For hotspot, we need these in Windows mixed path,
24213     # so rewrite them all. Need added .exe suffix.
24214     HOTSPOT_CXX="$CXX.exe"
24215     HOTSPOT_LD="$LD.exe"
24216     HOTSPOT_MT="$MT.exe"
24217     HOTSPOT_RC="$RC.exe"
24218 
24219   unix_path="$HOTSPOT_CXX"
24220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24221     windows_path=`$CYGPATH -m "$unix_path"`
24222     HOTSPOT_CXX="$windows_path"
24223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24224     windows_path=`cmd //c echo $unix_path`
24225     HOTSPOT_CXX="$windows_path"
24226   fi
24227 
24228 
24229   unix_path="$HOTSPOT_LD"
24230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24231     windows_path=`$CYGPATH -m "$unix_path"`
24232     HOTSPOT_LD="$windows_path"
24233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24234     windows_path=`cmd //c echo $unix_path`
24235     HOTSPOT_LD="$windows_path"
24236   fi
24237 
24238 
24239   unix_path="$HOTSPOT_MT"
24240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24241     windows_path=`$CYGPATH -m "$unix_path"`
24242     HOTSPOT_MT="$windows_path"
24243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24244     windows_path=`cmd //c echo $unix_path`
24245     HOTSPOT_MT="$windows_path"
24246   fi
24247 
24248 
24249   unix_path="$HOTSPOT_RC"
24250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24251     windows_path=`$CYGPATH -m "$unix_path"`
24252     HOTSPOT_RC="$windows_path"
24253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24254     windows_path=`cmd //c echo $unix_path`
24255     HOTSPOT_RC="$windows_path"
24256   fi
24257 
24258 
24259 
24260 
24261     RC_FLAGS="-nologo -l 0x409 -r"
24262     if test "x$VARIANT" = xOPT; then :
24263 
24264     RC_FLAGS="$RC_FLAGS -d NDEBUG"
24265 
24266 fi
24267 
24268   # The version variables used to create RC_FLAGS may be overridden
24269   # in a custom configure script, or possibly the command line.
24270   # Let those variables be expanded at make time in spec.gmk.
24271   # The \$ are escaped to the shell, and the $(...) variables
24272   # are evaluated by make.
24273   RC_FLAGS="$RC_FLAGS \
24274       -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
24275       -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
24276       -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
24277       -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(COOKED_JDK_UPDATE_VERSION).\$(COOKED_BUILD_NUMBER)\" \
24278       -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
24279       -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
24280       -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(COOKED_JDK_UPDATE_VERSION),\$(COOKED_BUILD_NUMBER)\""
24281 
24282   # lib.exe is used to create static libraries.
24283   # Extract the first word of "lib", so it can be a program name with args.
24284 set dummy lib; ac_word=$2
24285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24286 $as_echo_n "checking for $ac_word... " >&6; }
24287 if ${ac_cv_prog_WINAR+:} false; then :
24288   $as_echo_n "(cached) " >&6
24289 else
24290   if test -n "$WINAR"; then
24291   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24292 else
24293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24294 for as_dir in $PATH
24295 do
24296   IFS=$as_save_IFS
24297   test -z "$as_dir" && as_dir=.
24298     for ac_exec_ext in '' $ac_executable_extensions; do
24299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24300     ac_cv_prog_WINAR="lib"
24301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24302     break 2
24303   fi
24304 done
24305   done
24306 IFS=$as_save_IFS
24307 
24308 fi
24309 fi
24310 WINAR=$ac_cv_prog_WINAR
24311 if test -n "$WINAR"; then
24312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24313 $as_echo "$WINAR" >&6; }
24314 else
24315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24316 $as_echo "no" >&6; }
24317 fi
24318 
24319 
24320 
24321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24322 
24323   # First separate the path from the arguments. This will split at the first
24324   # space.
24325   complete="$WINAR"
24326   path="${complete%% *}"
24327   tmp="$complete EOL"
24328   arguments="${tmp#* }"
24329 
24330   # Input might be given as Windows format, start by converting to
24331   # unix format.
24332   new_path=`$CYGPATH -u "$path"`
24333 
24334   # Now try to locate executable using which
24335   new_path=`$WHICH "$new_path" 2> /dev/null`
24336   # bat and cmd files are not always considered executable in cygwin causing which
24337   # to not find them
24338   if test "x$new_path" = x \
24339       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24340       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24341     new_path=`$CYGPATH -u "$path"`
24342   fi
24343   if test "x$new_path" = x; then
24344     # Oops. Which didn't find the executable.
24345     # The splitting of arguments from the executable at a space might have been incorrect,
24346     # since paths with space are more likely in Windows. Give it another try with the whole
24347     # argument.
24348     path="$complete"
24349     arguments="EOL"
24350     new_path=`$CYGPATH -u "$path"`
24351     new_path=`$WHICH "$new_path" 2> /dev/null`
24352     # bat and cmd files are not always considered executable in cygwin causing which
24353     # to not find them
24354     if test "x$new_path" = x \
24355         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24356         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24357       new_path=`$CYGPATH -u "$path"`
24358     fi
24359     if test "x$new_path" = x; then
24360       # It's still not found. Now this is an unrecoverable error.
24361       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24362 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24363       has_space=`$ECHO "$complete" | $GREP " "`
24364       if test "x$has_space" != x; then
24365         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24366 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24367       fi
24368       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24369     fi
24370   fi
24371 
24372   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24373   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24374   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24375   # "foo.exe" is OK but "foo" is an error.
24376   #
24377   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24378   # It is also a way to make sure we got the proper file name for the real test later on.
24379   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24380   if test "x$test_shortpath" = x; then
24381     # Short path failed, file does not exist as specified.
24382     # Try adding .exe or .cmd
24383     if test -f "${new_path}.exe"; then
24384       input_to_shortpath="${new_path}.exe"
24385     elif test -f "${new_path}.cmd"; then
24386       input_to_shortpath="${new_path}.cmd"
24387     else
24388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24389 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24390       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24391 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24392       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24393     fi
24394   else
24395     input_to_shortpath="$new_path"
24396   fi
24397 
24398   # Call helper function which possibly converts this using DOS-style short mode.
24399   # If so, the updated path is stored in $new_path.
24400   new_path="$input_to_shortpath"
24401 
24402   input_path="$input_to_shortpath"
24403   # Check if we need to convert this using DOS-style short mode. If the path
24404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24405   # take no chances and rewrite it.
24406   # Note: m4 eats our [], so we need to use [ and ] instead.
24407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24408   if test "x$has_forbidden_chars" != x; then
24409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24410     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24411     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24412     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24413       # Going to short mode and back again did indeed matter. Since short mode is
24414       # case insensitive, let's make it lowercase to improve readability.
24415       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24416       # Now convert it back to Unix-stile (cygpath)
24417       input_path=`$CYGPATH -u "$shortmode_path"`
24418       new_path="$input_path"
24419     fi
24420   fi
24421 
24422   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24423   if test "x$test_cygdrive_prefix" = x; then
24424     # As a simple fix, exclude /usr/bin since it's not a real path.
24425     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24426       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24427       # a path prefixed by /cygdrive for fixpath to work.
24428       new_path="$CYGWIN_ROOT_PATH$input_path"
24429     fi
24430   fi
24431 
24432   # remove trailing .exe if any
24433   new_path="${new_path/%.exe/}"
24434 
24435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24436 
24437   # First separate the path from the arguments. This will split at the first
24438   # space.
24439   complete="$WINAR"
24440   path="${complete%% *}"
24441   tmp="$complete EOL"
24442   arguments="${tmp#* }"
24443 
24444   # Input might be given as Windows format, start by converting to
24445   # unix format.
24446   new_path="$path"
24447 
24448   windows_path="$new_path"
24449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24450     unix_path=`$CYGPATH -u "$windows_path"`
24451     new_path="$unix_path"
24452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24454     new_path="$unix_path"
24455   fi
24456 
24457 
24458   # Now try to locate executable using which
24459   new_path=`$WHICH "$new_path" 2> /dev/null`
24460 
24461   if test "x$new_path" = x; then
24462     # Oops. Which didn't find the executable.
24463     # The splitting of arguments from the executable at a space might have been incorrect,
24464     # since paths with space are more likely in Windows. Give it another try with the whole
24465     # argument.
24466     path="$complete"
24467     arguments="EOL"
24468     new_path="$path"
24469 
24470   windows_path="$new_path"
24471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24472     unix_path=`$CYGPATH -u "$windows_path"`
24473     new_path="$unix_path"
24474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24476     new_path="$unix_path"
24477   fi
24478 
24479 
24480     new_path=`$WHICH "$new_path" 2> /dev/null`
24481 
24482     if test "x$new_path" = x; then
24483       # It's still not found. Now this is an unrecoverable error.
24484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24485 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24486       has_space=`$ECHO "$complete" | $GREP " "`
24487       if test "x$has_space" != x; then
24488         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24489 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24490       fi
24491       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24492     fi
24493   fi
24494 
24495   # Now new_path has a complete unix path to the binary
24496   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24497     # Keep paths in /bin as-is, but remove trailing .exe if any
24498     new_path="${new_path/%.exe/}"
24499     # Do not save /bin paths to all_fixpath_prefixes!
24500   else
24501     # Not in mixed or Windows style, start by that.
24502     new_path=`cmd //c echo $new_path`
24503 
24504   input_path="$new_path"
24505   # Check if we need to convert this using DOS-style short mode. If the path
24506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24507   # take no chances and rewrite it.
24508   # Note: m4 eats our [], so we need to use [ and ] instead.
24509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24510   if test "x$has_forbidden_chars" != x; then
24511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24512     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24513   fi
24514 
24515     # Output is in $new_path
24516 
24517   windows_path="$new_path"
24518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24519     unix_path=`$CYGPATH -u "$windows_path"`
24520     new_path="$unix_path"
24521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24523     new_path="$unix_path"
24524   fi
24525 
24526     # remove trailing .exe if any
24527     new_path="${new_path/%.exe/}"
24528 
24529     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24530     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24531   fi
24532 
24533   else
24534     # We're on a posix platform. Hooray! :)
24535     # First separate the path from the arguments. This will split at the first
24536     # space.
24537     complete="$WINAR"
24538     path="${complete%% *}"
24539     tmp="$complete EOL"
24540     arguments="${tmp#* }"
24541 
24542     # Cannot rely on the command "which" here since it doesn't always work.
24543     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24544     if test -z "$is_absolute_path"; then
24545       # Path to executable is not absolute. Find it.
24546       IFS_save="$IFS"
24547       IFS=:
24548       for p in $PATH; do
24549         if test -f "$p/$path" && test -x "$p/$path"; then
24550           new_path="$p/$path"
24551           break
24552         fi
24553       done
24554       IFS="$IFS_save"
24555     else
24556       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24557 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24558       new_path="$path"
24559     fi
24560 
24561     if test "x$new_path" = x; then
24562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24563 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24564       has_space=`$ECHO "$complete" | $GREP " "`
24565       if test "x$has_space" != x; then
24566         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24567 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24568       fi
24569       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24570     fi
24571   fi
24572 
24573   # Now join together the path and the arguments once again
24574   if test "x$arguments" != xEOL; then
24575     new_complete="$new_path ${arguments% *}"
24576   else
24577     new_complete="$new_path"
24578   fi
24579 
24580   if test "x$complete" != "x$new_complete"; then
24581     WINAR="$new_complete"
24582     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24583 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24584   fi
24585 
24586   AR="$WINAR"
24587   ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24588 
24589   # Extract the first word of "dumpbin", so it can be a program name with args.
24590 set dummy dumpbin; ac_word=$2
24591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24592 $as_echo_n "checking for $ac_word... " >&6; }
24593 if ${ac_cv_prog_DUMPBIN+:} false; then :
24594   $as_echo_n "(cached) " >&6
24595 else
24596   if test -n "$DUMPBIN"; then
24597   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24598 else
24599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24600 for as_dir in $PATH
24601 do
24602   IFS=$as_save_IFS
24603   test -z "$as_dir" && as_dir=.
24604     for ac_exec_ext in '' $ac_executable_extensions; do
24605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24606     ac_cv_prog_DUMPBIN="dumpbin"
24607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24608     break 2
24609   fi
24610 done
24611   done
24612 IFS=$as_save_IFS
24613 
24614 fi
24615 fi
24616 DUMPBIN=$ac_cv_prog_DUMPBIN
24617 if test -n "$DUMPBIN"; then
24618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24619 $as_echo "$DUMPBIN" >&6; }
24620 else
24621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24622 $as_echo "no" >&6; }
24623 fi
24624 
24625 
24626 
24627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24628 
24629   # First separate the path from the arguments. This will split at the first
24630   # space.
24631   complete="$DUMPBIN"
24632   path="${complete%% *}"
24633   tmp="$complete EOL"
24634   arguments="${tmp#* }"
24635 
24636   # Input might be given as Windows format, start by converting to
24637   # unix format.
24638   new_path=`$CYGPATH -u "$path"`
24639 
24640   # Now try to locate executable using which
24641   new_path=`$WHICH "$new_path" 2> /dev/null`
24642   # bat and cmd files are not always considered executable in cygwin causing which
24643   # to not find them
24644   if test "x$new_path" = x \
24645       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24646       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24647     new_path=`$CYGPATH -u "$path"`
24648   fi
24649   if test "x$new_path" = x; then
24650     # Oops. Which didn't find the executable.
24651     # The splitting of arguments from the executable at a space might have been incorrect,
24652     # since paths with space are more likely in Windows. Give it another try with the whole
24653     # argument.
24654     path="$complete"
24655     arguments="EOL"
24656     new_path=`$CYGPATH -u "$path"`
24657     new_path=`$WHICH "$new_path" 2> /dev/null`
24658     # bat and cmd files are not always considered executable in cygwin causing which
24659     # to not find them
24660     if test "x$new_path" = x \
24661         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24662         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24663       new_path=`$CYGPATH -u "$path"`
24664     fi
24665     if test "x$new_path" = x; then
24666       # It's still not found. Now this is an unrecoverable error.
24667       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24668 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24669       has_space=`$ECHO "$complete" | $GREP " "`
24670       if test "x$has_space" != x; then
24671         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24672 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24673       fi
24674       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24675     fi
24676   fi
24677 
24678   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24679   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24680   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24681   # "foo.exe" is OK but "foo" is an error.
24682   #
24683   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24684   # It is also a way to make sure we got the proper file name for the real test later on.
24685   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24686   if test "x$test_shortpath" = x; then
24687     # Short path failed, file does not exist as specified.
24688     # Try adding .exe or .cmd
24689     if test -f "${new_path}.exe"; then
24690       input_to_shortpath="${new_path}.exe"
24691     elif test -f "${new_path}.cmd"; then
24692       input_to_shortpath="${new_path}.cmd"
24693     else
24694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24695 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24696       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24697 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24698       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24699     fi
24700   else
24701     input_to_shortpath="$new_path"
24702   fi
24703 
24704   # Call helper function which possibly converts this using DOS-style short mode.
24705   # If so, the updated path is stored in $new_path.
24706   new_path="$input_to_shortpath"
24707 
24708   input_path="$input_to_shortpath"
24709   # Check if we need to convert this using DOS-style short mode. If the path
24710   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24711   # take no chances and rewrite it.
24712   # Note: m4 eats our [], so we need to use [ and ] instead.
24713   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24714   if test "x$has_forbidden_chars" != x; then
24715     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24716     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24717     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24718     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24719       # Going to short mode and back again did indeed matter. Since short mode is
24720       # case insensitive, let's make it lowercase to improve readability.
24721       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24722       # Now convert it back to Unix-stile (cygpath)
24723       input_path=`$CYGPATH -u "$shortmode_path"`
24724       new_path="$input_path"
24725     fi
24726   fi
24727 
24728   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24729   if test "x$test_cygdrive_prefix" = x; then
24730     # As a simple fix, exclude /usr/bin since it's not a real path.
24731     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24732       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24733       # a path prefixed by /cygdrive for fixpath to work.
24734       new_path="$CYGWIN_ROOT_PATH$input_path"
24735     fi
24736   fi
24737 
24738   # remove trailing .exe if any
24739   new_path="${new_path/%.exe/}"
24740 
24741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24742 
24743   # First separate the path from the arguments. This will split at the first
24744   # space.
24745   complete="$DUMPBIN"
24746   path="${complete%% *}"
24747   tmp="$complete EOL"
24748   arguments="${tmp#* }"
24749 
24750   # Input might be given as Windows format, start by converting to
24751   # unix format.
24752   new_path="$path"
24753 
24754   windows_path="$new_path"
24755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24756     unix_path=`$CYGPATH -u "$windows_path"`
24757     new_path="$unix_path"
24758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24760     new_path="$unix_path"
24761   fi
24762 
24763 
24764   # Now try to locate executable using which
24765   new_path=`$WHICH "$new_path" 2> /dev/null`
24766 
24767   if test "x$new_path" = x; then
24768     # Oops. Which didn't find the executable.
24769     # The splitting of arguments from the executable at a space might have been incorrect,
24770     # since paths with space are more likely in Windows. Give it another try with the whole
24771     # argument.
24772     path="$complete"
24773     arguments="EOL"
24774     new_path="$path"
24775 
24776   windows_path="$new_path"
24777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24778     unix_path=`$CYGPATH -u "$windows_path"`
24779     new_path="$unix_path"
24780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24782     new_path="$unix_path"
24783   fi
24784 
24785 
24786     new_path=`$WHICH "$new_path" 2> /dev/null`
24787 
24788     if test "x$new_path" = x; then
24789       # It's still not found. Now this is an unrecoverable error.
24790       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24791 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24792       has_space=`$ECHO "$complete" | $GREP " "`
24793       if test "x$has_space" != x; then
24794         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24795 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24796       fi
24797       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24798     fi
24799   fi
24800 
24801   # Now new_path has a complete unix path to the binary
24802   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24803     # Keep paths in /bin as-is, but remove trailing .exe if any
24804     new_path="${new_path/%.exe/}"
24805     # Do not save /bin paths to all_fixpath_prefixes!
24806   else
24807     # Not in mixed or Windows style, start by that.
24808     new_path=`cmd //c echo $new_path`
24809 
24810   input_path="$new_path"
24811   # Check if we need to convert this using DOS-style short mode. If the path
24812   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24813   # take no chances and rewrite it.
24814   # Note: m4 eats our [], so we need to use [ and ] instead.
24815   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24816   if test "x$has_forbidden_chars" != x; then
24817     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24818     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24819   fi
24820 
24821     # Output is in $new_path
24822 
24823   windows_path="$new_path"
24824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24825     unix_path=`$CYGPATH -u "$windows_path"`
24826     new_path="$unix_path"
24827   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24828     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24829     new_path="$unix_path"
24830   fi
24831 
24832     # remove trailing .exe if any
24833     new_path="${new_path/%.exe/}"
24834 
24835     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24836     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24837   fi
24838 
24839   else
24840     # We're on a posix platform. Hooray! :)
24841     # First separate the path from the arguments. This will split at the first
24842     # space.
24843     complete="$DUMPBIN"
24844     path="${complete%% *}"
24845     tmp="$complete EOL"
24846     arguments="${tmp#* }"
24847 
24848     # Cannot rely on the command "which" here since it doesn't always work.
24849     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24850     if test -z "$is_absolute_path"; then
24851       # Path to executable is not absolute. Find it.
24852       IFS_save="$IFS"
24853       IFS=:
24854       for p in $PATH; do
24855         if test -f "$p/$path" && test -x "$p/$path"; then
24856           new_path="$p/$path"
24857           break
24858         fi
24859       done
24860       IFS="$IFS_save"
24861     else
24862       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24863 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24864       new_path="$path"
24865     fi
24866 
24867     if test "x$new_path" = x; then
24868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24869 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24870       has_space=`$ECHO "$complete" | $GREP " "`
24871       if test "x$has_space" != x; then
24872         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24873 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24874       fi
24875       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24876     fi
24877   fi
24878 
24879   # Now join together the path and the arguments once again
24880   if test "x$arguments" != xEOL; then
24881     new_complete="$new_path ${arguments% *}"
24882   else
24883     new_complete="$new_path"
24884   fi
24885 
24886   if test "x$complete" != "x$new_complete"; then
24887     DUMPBIN="$new_complete"
24888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24889 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24890   fi
24891 
24892 
24893       COMPILER_TYPE=CL
24894       # silence copyright notice and other headers.
24895       COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
24896 
24897 fi
24898 
24899 
24900 
24901   ac_ext=c
24902 ac_cpp='$CPP $CPPFLAGS'
24903 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24904 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24905 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24907 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24908 # On Suns, sometimes $CPP names a directory.
24909 if test -n "$CPP" && test -d "$CPP"; then
24910   CPP=
24911 fi
24912 if test -z "$CPP"; then
24913   if ${ac_cv_prog_CPP+:} false; then :
24914   $as_echo_n "(cached) " >&6
24915 else
24916       # Double quotes because CPP needs to be expanded
24917     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24918     do
24919       ac_preproc_ok=false
24920 for ac_c_preproc_warn_flag in '' yes
24921 do
24922   # Use a header file that comes with gcc, so configuring glibc
24923   # with a fresh cross-compiler works.
24924   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24925   # <limits.h> exists even on freestanding compilers.
24926   # On the NeXT, cc -E runs the code through the compiler's parser,
24927   # not just through cpp. "Syntax error" is here to catch this case.
24928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24929 /* end confdefs.h.  */
24930 #ifdef __STDC__
24931 # include <limits.h>
24932 #else
24933 # include <assert.h>
24934 #endif
24935                      Syntax error
24936 _ACEOF
24937 if ac_fn_c_try_cpp "$LINENO"; then :
24938 
24939 else
24940   # Broken: fails on valid input.
24941 continue
24942 fi
24943 rm -f conftest.err conftest.i conftest.$ac_ext
24944 
24945   # OK, works on sane cases.  Now check whether nonexistent headers
24946   # can be detected and how.
24947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24948 /* end confdefs.h.  */
24949 #include <ac_nonexistent.h>
24950 _ACEOF
24951 if ac_fn_c_try_cpp "$LINENO"; then :
24952   # Broken: success on invalid input.
24953 continue
24954 else
24955   # Passes both tests.
24956 ac_preproc_ok=:
24957 break
24958 fi
24959 rm -f conftest.err conftest.i conftest.$ac_ext
24960 
24961 done
24962 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24963 rm -f conftest.i conftest.err conftest.$ac_ext
24964 if $ac_preproc_ok; then :
24965   break
24966 fi
24967 
24968     done
24969     ac_cv_prog_CPP=$CPP
24970 
24971 fi
24972   CPP=$ac_cv_prog_CPP
24973 else
24974   ac_cv_prog_CPP=$CPP
24975 fi
24976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24977 $as_echo "$CPP" >&6; }
24978 ac_preproc_ok=false
24979 for ac_c_preproc_warn_flag in '' yes
24980 do
24981   # Use a header file that comes with gcc, so configuring glibc
24982   # with a fresh cross-compiler works.
24983   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24984   # <limits.h> exists even on freestanding compilers.
24985   # On the NeXT, cc -E runs the code through the compiler's parser,
24986   # not just through cpp. "Syntax error" is here to catch this case.
24987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24988 /* end confdefs.h.  */
24989 #ifdef __STDC__
24990 # include <limits.h>
24991 #else
24992 # include <assert.h>
24993 #endif
24994                      Syntax error
24995 _ACEOF
24996 if ac_fn_c_try_cpp "$LINENO"; then :
24997 
24998 else
24999   # Broken: fails on valid input.
25000 continue
25001 fi
25002 rm -f conftest.err conftest.i conftest.$ac_ext
25003 
25004   # OK, works on sane cases.  Now check whether nonexistent headers
25005   # can be detected and how.
25006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25007 /* end confdefs.h.  */
25008 #include <ac_nonexistent.h>
25009 _ACEOF
25010 if ac_fn_c_try_cpp "$LINENO"; then :
25011   # Broken: success on invalid input.
25012 continue
25013 else
25014   # Passes both tests.
25015 ac_preproc_ok=:
25016 break
25017 fi
25018 rm -f conftest.err conftest.i conftest.$ac_ext
25019 
25020 done
25021 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25022 rm -f conftest.i conftest.err conftest.$ac_ext
25023 if $ac_preproc_ok; then :
25024 
25025 else
25026   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25027 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25028 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
25029 See \`config.log' for more details" "$LINENO" 5; }
25030 fi
25031 
25032 ac_ext=cpp
25033 ac_cpp='$CXXCPP $CPPFLAGS'
25034 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25035 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25036 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25037 
25038 
25039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25040 
25041   # First separate the path from the arguments. This will split at the first
25042   # space.
25043   complete="$CPP"
25044   path="${complete%% *}"
25045   tmp="$complete EOL"
25046   arguments="${tmp#* }"
25047 
25048   # Input might be given as Windows format, start by converting to
25049   # unix format.
25050   new_path=`$CYGPATH -u "$path"`
25051 
25052   # Now try to locate executable using which
25053   new_path=`$WHICH "$new_path" 2> /dev/null`
25054   # bat and cmd files are not always considered executable in cygwin causing which
25055   # to not find them
25056   if test "x$new_path" = x \
25057       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25058       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25059     new_path=`$CYGPATH -u "$path"`
25060   fi
25061   if test "x$new_path" = x; then
25062     # Oops. Which didn't find the executable.
25063     # The splitting of arguments from the executable at a space might have been incorrect,
25064     # since paths with space are more likely in Windows. Give it another try with the whole
25065     # argument.
25066     path="$complete"
25067     arguments="EOL"
25068     new_path=`$CYGPATH -u "$path"`
25069     new_path=`$WHICH "$new_path" 2> /dev/null`
25070     # bat and cmd files are not always considered executable in cygwin causing which
25071     # to not find them
25072     if test "x$new_path" = x \
25073         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25074         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25075       new_path=`$CYGPATH -u "$path"`
25076     fi
25077     if test "x$new_path" = x; then
25078       # It's still not found. Now this is an unrecoverable error.
25079       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25080 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25081       has_space=`$ECHO "$complete" | $GREP " "`
25082       if test "x$has_space" != x; then
25083         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25084 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25085       fi
25086       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25087     fi
25088   fi
25089 
25090   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25091   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25092   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25093   # "foo.exe" is OK but "foo" is an error.
25094   #
25095   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25096   # It is also a way to make sure we got the proper file name for the real test later on.
25097   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25098   if test "x$test_shortpath" = x; then
25099     # Short path failed, file does not exist as specified.
25100     # Try adding .exe or .cmd
25101     if test -f "${new_path}.exe"; then
25102       input_to_shortpath="${new_path}.exe"
25103     elif test -f "${new_path}.cmd"; then
25104       input_to_shortpath="${new_path}.cmd"
25105     else
25106       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
25107 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
25108       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25109 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25110       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25111     fi
25112   else
25113     input_to_shortpath="$new_path"
25114   fi
25115 
25116   # Call helper function which possibly converts this using DOS-style short mode.
25117   # If so, the updated path is stored in $new_path.
25118   new_path="$input_to_shortpath"
25119 
25120   input_path="$input_to_shortpath"
25121   # Check if we need to convert this using DOS-style short mode. If the path
25122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25123   # take no chances and rewrite it.
25124   # Note: m4 eats our [], so we need to use [ and ] instead.
25125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25126   if test "x$has_forbidden_chars" != x; then
25127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25128     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25129     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25130     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25131       # Going to short mode and back again did indeed matter. Since short mode is
25132       # case insensitive, let's make it lowercase to improve readability.
25133       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25134       # Now convert it back to Unix-stile (cygpath)
25135       input_path=`$CYGPATH -u "$shortmode_path"`
25136       new_path="$input_path"
25137     fi
25138   fi
25139 
25140   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25141   if test "x$test_cygdrive_prefix" = x; then
25142     # As a simple fix, exclude /usr/bin since it's not a real path.
25143     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25144       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25145       # a path prefixed by /cygdrive for fixpath to work.
25146       new_path="$CYGWIN_ROOT_PATH$input_path"
25147     fi
25148   fi
25149 
25150   # remove trailing .exe if any
25151   new_path="${new_path/%.exe/}"
25152 
25153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25154 
25155   # First separate the path from the arguments. This will split at the first
25156   # space.
25157   complete="$CPP"
25158   path="${complete%% *}"
25159   tmp="$complete EOL"
25160   arguments="${tmp#* }"
25161 
25162   # Input might be given as Windows format, start by converting to
25163   # unix format.
25164   new_path="$path"
25165 
25166   windows_path="$new_path"
25167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25168     unix_path=`$CYGPATH -u "$windows_path"`
25169     new_path="$unix_path"
25170   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25171     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25172     new_path="$unix_path"
25173   fi
25174 
25175 
25176   # Now try to locate executable using which
25177   new_path=`$WHICH "$new_path" 2> /dev/null`
25178 
25179   if test "x$new_path" = x; then
25180     # Oops. Which didn't find the executable.
25181     # The splitting of arguments from the executable at a space might have been incorrect,
25182     # since paths with space are more likely in Windows. Give it another try with the whole
25183     # argument.
25184     path="$complete"
25185     arguments="EOL"
25186     new_path="$path"
25187 
25188   windows_path="$new_path"
25189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25190     unix_path=`$CYGPATH -u "$windows_path"`
25191     new_path="$unix_path"
25192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25194     new_path="$unix_path"
25195   fi
25196 
25197 
25198     new_path=`$WHICH "$new_path" 2> /dev/null`
25199 
25200     if test "x$new_path" = x; then
25201       # It's still not found. Now this is an unrecoverable error.
25202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25203 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25204       has_space=`$ECHO "$complete" | $GREP " "`
25205       if test "x$has_space" != x; then
25206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25208       fi
25209       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25210     fi
25211   fi
25212 
25213   # Now new_path has a complete unix path to the binary
25214   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25215     # Keep paths in /bin as-is, but remove trailing .exe if any
25216     new_path="${new_path/%.exe/}"
25217     # Do not save /bin paths to all_fixpath_prefixes!
25218   else
25219     # Not in mixed or Windows style, start by that.
25220     new_path=`cmd //c echo $new_path`
25221 
25222   input_path="$new_path"
25223   # Check if we need to convert this using DOS-style short mode. If the path
25224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25225   # take no chances and rewrite it.
25226   # Note: m4 eats our [], so we need to use [ and ] instead.
25227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25228   if test "x$has_forbidden_chars" != x; then
25229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25230     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25231   fi
25232 
25233     # Output is in $new_path
25234 
25235   windows_path="$new_path"
25236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25237     unix_path=`$CYGPATH -u "$windows_path"`
25238     new_path="$unix_path"
25239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25241     new_path="$unix_path"
25242   fi
25243 
25244     # remove trailing .exe if any
25245     new_path="${new_path/%.exe/}"
25246 
25247     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25248     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25249   fi
25250 
25251   else
25252     # We're on a posix platform. Hooray! :)
25253     # First separate the path from the arguments. This will split at the first
25254     # space.
25255     complete="$CPP"
25256     path="${complete%% *}"
25257     tmp="$complete EOL"
25258     arguments="${tmp#* }"
25259 
25260     # Cannot rely on the command "which" here since it doesn't always work.
25261     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25262     if test -z "$is_absolute_path"; then
25263       # Path to executable is not absolute. Find it.
25264       IFS_save="$IFS"
25265       IFS=:
25266       for p in $PATH; do
25267         if test -f "$p/$path" && test -x "$p/$path"; then
25268           new_path="$p/$path"
25269           break
25270         fi
25271       done
25272       IFS="$IFS_save"
25273     else
25274       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
25275 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
25276       new_path="$path"
25277     fi
25278 
25279     if test "x$new_path" = x; then
25280       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25281 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25282       has_space=`$ECHO "$complete" | $GREP " "`
25283       if test "x$has_space" != x; then
25284         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25285 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25286       fi
25287       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25288     fi
25289   fi
25290 
25291   # Now join together the path and the arguments once again
25292   if test "x$arguments" != xEOL; then
25293     new_complete="$new_path ${arguments% *}"
25294   else
25295     new_complete="$new_path"
25296   fi
25297 
25298   if test "x$complete" != "x$new_complete"; then
25299     CPP="$new_complete"
25300     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25301 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25302   fi
25303 
25304 
25305   ac_ext=cpp
25306 ac_cpp='$CXXCPP $CPPFLAGS'
25307 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25308 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25309 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25311 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25312 if test -z "$CXXCPP"; then
25313   if ${ac_cv_prog_CXXCPP+:} false; then :
25314   $as_echo_n "(cached) " >&6
25315 else
25316       # Double quotes because CXXCPP needs to be expanded
25317     for CXXCPP in "$CXX -E" "/lib/cpp"
25318     do
25319       ac_preproc_ok=false
25320 for ac_cxx_preproc_warn_flag in '' yes
25321 do
25322   # Use a header file that comes with gcc, so configuring glibc
25323   # with a fresh cross-compiler works.
25324   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25325   # <limits.h> exists even on freestanding compilers.
25326   # On the NeXT, cc -E runs the code through the compiler's parser,
25327   # not just through cpp. "Syntax error" is here to catch this case.
25328   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25329 /* end confdefs.h.  */
25330 #ifdef __STDC__
25331 # include <limits.h>
25332 #else
25333 # include <assert.h>
25334 #endif
25335                      Syntax error
25336 _ACEOF
25337 if ac_fn_cxx_try_cpp "$LINENO"; then :
25338 
25339 else
25340   # Broken: fails on valid input.
25341 continue
25342 fi
25343 rm -f conftest.err conftest.i conftest.$ac_ext
25344 
25345   # OK, works on sane cases.  Now check whether nonexistent headers
25346   # can be detected and how.
25347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25348 /* end confdefs.h.  */
25349 #include <ac_nonexistent.h>
25350 _ACEOF
25351 if ac_fn_cxx_try_cpp "$LINENO"; then :
25352   # Broken: success on invalid input.
25353 continue
25354 else
25355   # Passes both tests.
25356 ac_preproc_ok=:
25357 break
25358 fi
25359 rm -f conftest.err conftest.i conftest.$ac_ext
25360 
25361 done
25362 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25363 rm -f conftest.i conftest.err conftest.$ac_ext
25364 if $ac_preproc_ok; then :
25365   break
25366 fi
25367 
25368     done
25369     ac_cv_prog_CXXCPP=$CXXCPP
25370 
25371 fi
25372   CXXCPP=$ac_cv_prog_CXXCPP
25373 else
25374   ac_cv_prog_CXXCPP=$CXXCPP
25375 fi
25376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25377 $as_echo "$CXXCPP" >&6; }
25378 ac_preproc_ok=false
25379 for ac_cxx_preproc_warn_flag in '' yes
25380 do
25381   # Use a header file that comes with gcc, so configuring glibc
25382   # with a fresh cross-compiler works.
25383   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25384   # <limits.h> exists even on freestanding compilers.
25385   # On the NeXT, cc -E runs the code through the compiler's parser,
25386   # not just through cpp. "Syntax error" is here to catch this case.
25387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25388 /* end confdefs.h.  */
25389 #ifdef __STDC__
25390 # include <limits.h>
25391 #else
25392 # include <assert.h>
25393 #endif
25394                      Syntax error
25395 _ACEOF
25396 if ac_fn_cxx_try_cpp "$LINENO"; then :
25397 
25398 else
25399   # Broken: fails on valid input.
25400 continue
25401 fi
25402 rm -f conftest.err conftest.i conftest.$ac_ext
25403 
25404   # OK, works on sane cases.  Now check whether nonexistent headers
25405   # can be detected and how.
25406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25407 /* end confdefs.h.  */
25408 #include <ac_nonexistent.h>
25409 _ACEOF
25410 if ac_fn_cxx_try_cpp "$LINENO"; then :
25411   # Broken: success on invalid input.
25412 continue
25413 else
25414   # Passes both tests.
25415 ac_preproc_ok=:
25416 break
25417 fi
25418 rm -f conftest.err conftest.i conftest.$ac_ext
25419 
25420 done
25421 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25422 rm -f conftest.i conftest.err conftest.$ac_ext
25423 if $ac_preproc_ok; then :
25424 
25425 else
25426   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25427 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25428 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25429 See \`config.log' for more details" "$LINENO" 5; }
25430 fi
25431 
25432 ac_ext=cpp
25433 ac_cpp='$CXXCPP $CPPFLAGS'
25434 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25435 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25436 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25437 
25438 
25439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25440 
25441   # First separate the path from the arguments. This will split at the first
25442   # space.
25443   complete="$CXXCPP"
25444   path="${complete%% *}"
25445   tmp="$complete EOL"
25446   arguments="${tmp#* }"
25447 
25448   # Input might be given as Windows format, start by converting to
25449   # unix format.
25450   new_path=`$CYGPATH -u "$path"`
25451 
25452   # Now try to locate executable using which
25453   new_path=`$WHICH "$new_path" 2> /dev/null`
25454   # bat and cmd files are not always considered executable in cygwin causing which
25455   # to not find them
25456   if test "x$new_path" = x \
25457       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25458       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25459     new_path=`$CYGPATH -u "$path"`
25460   fi
25461   if test "x$new_path" = x; then
25462     # Oops. Which didn't find the executable.
25463     # The splitting of arguments from the executable at a space might have been incorrect,
25464     # since paths with space are more likely in Windows. Give it another try with the whole
25465     # argument.
25466     path="$complete"
25467     arguments="EOL"
25468     new_path=`$CYGPATH -u "$path"`
25469     new_path=`$WHICH "$new_path" 2> /dev/null`
25470     # bat and cmd files are not always considered executable in cygwin causing which
25471     # to not find them
25472     if test "x$new_path" = x \
25473         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25474         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25475       new_path=`$CYGPATH -u "$path"`
25476     fi
25477     if test "x$new_path" = x; then
25478       # It's still not found. Now this is an unrecoverable error.
25479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25480 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25481       has_space=`$ECHO "$complete" | $GREP " "`
25482       if test "x$has_space" != x; then
25483         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25484 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25485       fi
25486       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25487     fi
25488   fi
25489 
25490   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25491   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25492   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25493   # "foo.exe" is OK but "foo" is an error.
25494   #
25495   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25496   # It is also a way to make sure we got the proper file name for the real test later on.
25497   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25498   if test "x$test_shortpath" = x; then
25499     # Short path failed, file does not exist as specified.
25500     # Try adding .exe or .cmd
25501     if test -f "${new_path}.exe"; then
25502       input_to_shortpath="${new_path}.exe"
25503     elif test -f "${new_path}.cmd"; then
25504       input_to_shortpath="${new_path}.cmd"
25505     else
25506       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25507 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25508       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25509 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25510       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25511     fi
25512   else
25513     input_to_shortpath="$new_path"
25514   fi
25515 
25516   # Call helper function which possibly converts this using DOS-style short mode.
25517   # If so, the updated path is stored in $new_path.
25518   new_path="$input_to_shortpath"
25519 
25520   input_path="$input_to_shortpath"
25521   # Check if we need to convert this using DOS-style short mode. If the path
25522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25523   # take no chances and rewrite it.
25524   # Note: m4 eats our [], so we need to use [ and ] instead.
25525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25526   if test "x$has_forbidden_chars" != x; then
25527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25528     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25529     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25530     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25531       # Going to short mode and back again did indeed matter. Since short mode is
25532       # case insensitive, let's make it lowercase to improve readability.
25533       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25534       # Now convert it back to Unix-stile (cygpath)
25535       input_path=`$CYGPATH -u "$shortmode_path"`
25536       new_path="$input_path"
25537     fi
25538   fi
25539 
25540   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25541   if test "x$test_cygdrive_prefix" = x; then
25542     # As a simple fix, exclude /usr/bin since it's not a real path.
25543     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25544       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25545       # a path prefixed by /cygdrive for fixpath to work.
25546       new_path="$CYGWIN_ROOT_PATH$input_path"
25547     fi
25548   fi
25549 
25550   # remove trailing .exe if any
25551   new_path="${new_path/%.exe/}"
25552 
25553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25554 
25555   # First separate the path from the arguments. This will split at the first
25556   # space.
25557   complete="$CXXCPP"
25558   path="${complete%% *}"
25559   tmp="$complete EOL"
25560   arguments="${tmp#* }"
25561 
25562   # Input might be given as Windows format, start by converting to
25563   # unix format.
25564   new_path="$path"
25565 
25566   windows_path="$new_path"
25567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25568     unix_path=`$CYGPATH -u "$windows_path"`
25569     new_path="$unix_path"
25570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25572     new_path="$unix_path"
25573   fi
25574 
25575 
25576   # Now try to locate executable using which
25577   new_path=`$WHICH "$new_path" 2> /dev/null`
25578 
25579   if test "x$new_path" = x; then
25580     # Oops. Which didn't find the executable.
25581     # The splitting of arguments from the executable at a space might have been incorrect,
25582     # since paths with space are more likely in Windows. Give it another try with the whole
25583     # argument.
25584     path="$complete"
25585     arguments="EOL"
25586     new_path="$path"
25587 
25588   windows_path="$new_path"
25589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25590     unix_path=`$CYGPATH -u "$windows_path"`
25591     new_path="$unix_path"
25592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25593     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25594     new_path="$unix_path"
25595   fi
25596 
25597 
25598     new_path=`$WHICH "$new_path" 2> /dev/null`
25599 
25600     if test "x$new_path" = x; then
25601       # It's still not found. Now this is an unrecoverable error.
25602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25603 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25604       has_space=`$ECHO "$complete" | $GREP " "`
25605       if test "x$has_space" != x; then
25606         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25607 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25608       fi
25609       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25610     fi
25611   fi
25612 
25613   # Now new_path has a complete unix path to the binary
25614   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25615     # Keep paths in /bin as-is, but remove trailing .exe if any
25616     new_path="${new_path/%.exe/}"
25617     # Do not save /bin paths to all_fixpath_prefixes!
25618   else
25619     # Not in mixed or Windows style, start by that.
25620     new_path=`cmd //c echo $new_path`
25621 
25622   input_path="$new_path"
25623   # Check if we need to convert this using DOS-style short mode. If the path
25624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25625   # take no chances and rewrite it.
25626   # Note: m4 eats our [], so we need to use [ and ] instead.
25627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25628   if test "x$has_forbidden_chars" != x; then
25629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25631   fi
25632 
25633     # Output is in $new_path
25634 
25635   windows_path="$new_path"
25636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25637     unix_path=`$CYGPATH -u "$windows_path"`
25638     new_path="$unix_path"
25639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25640     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25641     new_path="$unix_path"
25642   fi
25643 
25644     # remove trailing .exe if any
25645     new_path="${new_path/%.exe/}"
25646 
25647     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25648     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25649   fi
25650 
25651   else
25652     # We're on a posix platform. Hooray! :)
25653     # First separate the path from the arguments. This will split at the first
25654     # space.
25655     complete="$CXXCPP"
25656     path="${complete%% *}"
25657     tmp="$complete EOL"
25658     arguments="${tmp#* }"
25659 
25660     # Cannot rely on the command "which" here since it doesn't always work.
25661     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25662     if test -z "$is_absolute_path"; then
25663       # Path to executable is not absolute. Find it.
25664       IFS_save="$IFS"
25665       IFS=:
25666       for p in $PATH; do
25667         if test -f "$p/$path" && test -x "$p/$path"; then
25668           new_path="$p/$path"
25669           break
25670         fi
25671       done
25672       IFS="$IFS_save"
25673     else
25674       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25675 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25676       new_path="$path"
25677     fi
25678 
25679     if test "x$new_path" = x; then
25680       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25681 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25682       has_space=`$ECHO "$complete" | $GREP " "`
25683       if test "x$has_space" != x; then
25684         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25685 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25686       fi
25687       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25688     fi
25689   fi
25690 
25691   # Now join together the path and the arguments once again
25692   if test "x$arguments" != xEOL; then
25693     new_complete="$new_path ${arguments% *}"
25694   else
25695     new_complete="$new_path"
25696   fi
25697 
25698   if test "x$complete" != "x$new_complete"; then
25699     CXXCPP="$new_complete"
25700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25701 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25702   fi
25703 
25704 
25705   if test "x$COMPILE_TYPE" != "xcross"; then
25706     # If we are not cross compiling, use the same compilers for
25707     # building the build platform executables. The cross-compilation
25708     # case needed to be done earlier, but this can only be done after
25709     # the native tools have been localized.
25710     BUILD_CC="$CC"
25711     BUILD_CXX="$CXX"
25712     BUILD_LD="$LD"
25713   fi
25714 
25715   # for solaris we really need solaris tools, and not gnu equivalent
25716   #   these seems to normally reside in /usr/ccs/bin so add that to path before
25717   #   starting to probe
25718   #
25719   #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25720   #         so that it can be overriden --with-tools-dir
25721   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25722     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25723   fi
25724 
25725   # Find the right assembler.
25726   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25727     # Extract the first word of "as", so it can be a program name with args.
25728 set dummy as; ac_word=$2
25729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25730 $as_echo_n "checking for $ac_word... " >&6; }
25731 if ${ac_cv_path_AS+:} false; then :
25732   $as_echo_n "(cached) " >&6
25733 else
25734   case $AS in
25735   [\\/]* | ?:[\\/]*)
25736   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25737   ;;
25738   *)
25739   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25740 for as_dir in $PATH
25741 do
25742   IFS=$as_save_IFS
25743   test -z "$as_dir" && as_dir=.
25744     for ac_exec_ext in '' $ac_executable_extensions; do
25745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25746     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25748     break 2
25749   fi
25750 done
25751   done
25752 IFS=$as_save_IFS
25753 
25754   ;;
25755 esac
25756 fi
25757 AS=$ac_cv_path_AS
25758 if test -n "$AS"; then
25759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25760 $as_echo "$AS" >&6; }
25761 else
25762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25763 $as_echo "no" >&6; }
25764 fi
25765 
25766 
25767 
25768   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25769 
25770   # First separate the path from the arguments. This will split at the first
25771   # space.
25772   complete="$AS"
25773   path="${complete%% *}"
25774   tmp="$complete EOL"
25775   arguments="${tmp#* }"
25776 
25777   # Input might be given as Windows format, start by converting to
25778   # unix format.
25779   new_path=`$CYGPATH -u "$path"`
25780 
25781   # Now try to locate executable using which
25782   new_path=`$WHICH "$new_path" 2> /dev/null`
25783   # bat and cmd files are not always considered executable in cygwin causing which
25784   # to not find them
25785   if test "x$new_path" = x \
25786       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25787       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25788     new_path=`$CYGPATH -u "$path"`
25789   fi
25790   if test "x$new_path" = x; then
25791     # Oops. Which didn't find the executable.
25792     # The splitting of arguments from the executable at a space might have been incorrect,
25793     # since paths with space are more likely in Windows. Give it another try with the whole
25794     # argument.
25795     path="$complete"
25796     arguments="EOL"
25797     new_path=`$CYGPATH -u "$path"`
25798     new_path=`$WHICH "$new_path" 2> /dev/null`
25799     # bat and cmd files are not always considered executable in cygwin causing which
25800     # to not find them
25801     if test "x$new_path" = x \
25802         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25803         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25804       new_path=`$CYGPATH -u "$path"`
25805     fi
25806     if test "x$new_path" = x; then
25807       # It's still not found. Now this is an unrecoverable error.
25808       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25809 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25810       has_space=`$ECHO "$complete" | $GREP " "`
25811       if test "x$has_space" != x; then
25812         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25813 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25814       fi
25815       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25816     fi
25817   fi
25818 
25819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25822   # "foo.exe" is OK but "foo" is an error.
25823   #
25824   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25825   # It is also a way to make sure we got the proper file name for the real test later on.
25826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25827   if test "x$test_shortpath" = x; then
25828     # Short path failed, file does not exist as specified.
25829     # Try adding .exe or .cmd
25830     if test -f "${new_path}.exe"; then
25831       input_to_shortpath="${new_path}.exe"
25832     elif test -f "${new_path}.cmd"; then
25833       input_to_shortpath="${new_path}.cmd"
25834     else
25835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25836 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25837       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25838 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25839       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25840     fi
25841   else
25842     input_to_shortpath="$new_path"
25843   fi
25844 
25845   # Call helper function which possibly converts this using DOS-style short mode.
25846   # If so, the updated path is stored in $new_path.
25847   new_path="$input_to_shortpath"
25848 
25849   input_path="$input_to_shortpath"
25850   # Check if we need to convert this using DOS-style short mode. If the path
25851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25852   # take no chances and rewrite it.
25853   # Note: m4 eats our [], so we need to use [ and ] instead.
25854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25855   if test "x$has_forbidden_chars" != x; then
25856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25860       # Going to short mode and back again did indeed matter. Since short mode is
25861       # case insensitive, let's make it lowercase to improve readability.
25862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25863       # Now convert it back to Unix-stile (cygpath)
25864       input_path=`$CYGPATH -u "$shortmode_path"`
25865       new_path="$input_path"
25866     fi
25867   fi
25868 
25869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25870   if test "x$test_cygdrive_prefix" = x; then
25871     # As a simple fix, exclude /usr/bin since it's not a real path.
25872     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25874       # a path prefixed by /cygdrive for fixpath to work.
25875       new_path="$CYGWIN_ROOT_PATH$input_path"
25876     fi
25877   fi
25878 
25879   # remove trailing .exe if any
25880   new_path="${new_path/%.exe/}"
25881 
25882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25883 
25884   # First separate the path from the arguments. This will split at the first
25885   # space.
25886   complete="$AS"
25887   path="${complete%% *}"
25888   tmp="$complete EOL"
25889   arguments="${tmp#* }"
25890 
25891   # Input might be given as Windows format, start by converting to
25892   # unix format.
25893   new_path="$path"
25894 
25895   windows_path="$new_path"
25896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25897     unix_path=`$CYGPATH -u "$windows_path"`
25898     new_path="$unix_path"
25899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25901     new_path="$unix_path"
25902   fi
25903 
25904 
25905   # Now try to locate executable using which
25906   new_path=`$WHICH "$new_path" 2> /dev/null`
25907 
25908   if test "x$new_path" = x; then
25909     # Oops. Which didn't find the executable.
25910     # The splitting of arguments from the executable at a space might have been incorrect,
25911     # since paths with space are more likely in Windows. Give it another try with the whole
25912     # argument.
25913     path="$complete"
25914     arguments="EOL"
25915     new_path="$path"
25916 
25917   windows_path="$new_path"
25918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25919     unix_path=`$CYGPATH -u "$windows_path"`
25920     new_path="$unix_path"
25921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25923     new_path="$unix_path"
25924   fi
25925 
25926 
25927     new_path=`$WHICH "$new_path" 2> /dev/null`
25928 
25929     if test "x$new_path" = x; then
25930       # It's still not found. Now this is an unrecoverable error.
25931       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25932 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25933       has_space=`$ECHO "$complete" | $GREP " "`
25934       if test "x$has_space" != x; then
25935         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25936 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25937       fi
25938       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25939     fi
25940   fi
25941 
25942   # Now new_path has a complete unix path to the binary
25943   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25944     # Keep paths in /bin as-is, but remove trailing .exe if any
25945     new_path="${new_path/%.exe/}"
25946     # Do not save /bin paths to all_fixpath_prefixes!
25947   else
25948     # Not in mixed or Windows style, start by that.
25949     new_path=`cmd //c echo $new_path`
25950 
25951   input_path="$new_path"
25952   # Check if we need to convert this using DOS-style short mode. If the path
25953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25954   # take no chances and rewrite it.
25955   # Note: m4 eats our [], so we need to use [ and ] instead.
25956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25957   if test "x$has_forbidden_chars" != x; then
25958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25959     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25960   fi
25961 
25962     # Output is in $new_path
25963 
25964   windows_path="$new_path"
25965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25966     unix_path=`$CYGPATH -u "$windows_path"`
25967     new_path="$unix_path"
25968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25970     new_path="$unix_path"
25971   fi
25972 
25973     # remove trailing .exe if any
25974     new_path="${new_path/%.exe/}"
25975 
25976     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25977     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25978   fi
25979 
25980   else
25981     # We're on a posix platform. Hooray! :)
25982     # First separate the path from the arguments. This will split at the first
25983     # space.
25984     complete="$AS"
25985     path="${complete%% *}"
25986     tmp="$complete EOL"
25987     arguments="${tmp#* }"
25988 
25989     # Cannot rely on the command "which" here since it doesn't always work.
25990     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25991     if test -z "$is_absolute_path"; then
25992       # Path to executable is not absolute. Find it.
25993       IFS_save="$IFS"
25994       IFS=:
25995       for p in $PATH; do
25996         if test -f "$p/$path" && test -x "$p/$path"; then
25997           new_path="$p/$path"
25998           break
25999         fi
26000       done
26001       IFS="$IFS_save"
26002     else
26003       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
26004 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
26005       new_path="$path"
26006     fi
26007 
26008     if test "x$new_path" = x; then
26009       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
26010 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
26011       has_space=`$ECHO "$complete" | $GREP " "`
26012       if test "x$has_space" != x; then
26013         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26014 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26015       fi
26016       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
26017     fi
26018   fi
26019 
26020   # Now join together the path and the arguments once again
26021   if test "x$arguments" != xEOL; then
26022     new_complete="$new_path ${arguments% *}"
26023   else
26024     new_complete="$new_path"
26025   fi
26026 
26027   if test "x$complete" != "x$new_complete"; then
26028     AS="$new_complete"
26029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
26030 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
26031   fi
26032 
26033   else
26034     AS="$CC -c"
26035   fi
26036 
26037 
26038   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26039     # Extract the first word of "nm", so it can be a program name with args.
26040 set dummy nm; ac_word=$2
26041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26042 $as_echo_n "checking for $ac_word... " >&6; }
26043 if ${ac_cv_path_NM+:} false; then :
26044   $as_echo_n "(cached) " >&6
26045 else
26046   case $NM in
26047   [\\/]* | ?:[\\/]*)
26048   ac_cv_path_NM="$NM" # Let the user override the test with a path.
26049   ;;
26050   *)
26051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26052 for as_dir in $PATH
26053 do
26054   IFS=$as_save_IFS
26055   test -z "$as_dir" && as_dir=.
26056     for ac_exec_ext in '' $ac_executable_extensions; do
26057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26058     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
26059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26060     break 2
26061   fi
26062 done
26063   done
26064 IFS=$as_save_IFS
26065 
26066   ;;
26067 esac
26068 fi
26069 NM=$ac_cv_path_NM
26070 if test -n "$NM"; then
26071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26072 $as_echo "$NM" >&6; }
26073 else
26074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26075 $as_echo "no" >&6; }
26076 fi
26077 
26078 
26079 
26080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26081 
26082   # First separate the path from the arguments. This will split at the first
26083   # space.
26084   complete="$NM"
26085   path="${complete%% *}"
26086   tmp="$complete EOL"
26087   arguments="${tmp#* }"
26088 
26089   # Input might be given as Windows format, start by converting to
26090   # unix format.
26091   new_path=`$CYGPATH -u "$path"`
26092 
26093   # Now try to locate executable using which
26094   new_path=`$WHICH "$new_path" 2> /dev/null`
26095   # bat and cmd files are not always considered executable in cygwin causing which
26096   # to not find them
26097   if test "x$new_path" = x \
26098       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26099       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26100     new_path=`$CYGPATH -u "$path"`
26101   fi
26102   if test "x$new_path" = x; then
26103     # Oops. Which didn't find the executable.
26104     # The splitting of arguments from the executable at a space might have been incorrect,
26105     # since paths with space are more likely in Windows. Give it another try with the whole
26106     # argument.
26107     path="$complete"
26108     arguments="EOL"
26109     new_path=`$CYGPATH -u "$path"`
26110     new_path=`$WHICH "$new_path" 2> /dev/null`
26111     # bat and cmd files are not always considered executable in cygwin causing which
26112     # to not find them
26113     if test "x$new_path" = x \
26114         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26115         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26116       new_path=`$CYGPATH -u "$path"`
26117     fi
26118     if test "x$new_path" = x; then
26119       # It's still not found. Now this is an unrecoverable error.
26120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26121 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26122       has_space=`$ECHO "$complete" | $GREP " "`
26123       if test "x$has_space" != x; then
26124         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26125 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26126       fi
26127       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26128     fi
26129   fi
26130 
26131   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26132   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26133   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26134   # "foo.exe" is OK but "foo" is an error.
26135   #
26136   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26137   # It is also a way to make sure we got the proper file name for the real test later on.
26138   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26139   if test "x$test_shortpath" = x; then
26140     # Short path failed, file does not exist as specified.
26141     # Try adding .exe or .cmd
26142     if test -f "${new_path}.exe"; then
26143       input_to_shortpath="${new_path}.exe"
26144     elif test -f "${new_path}.cmd"; then
26145       input_to_shortpath="${new_path}.cmd"
26146     else
26147       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26148 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26149       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26150 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26151       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26152     fi
26153   else
26154     input_to_shortpath="$new_path"
26155   fi
26156 
26157   # Call helper function which possibly converts this using DOS-style short mode.
26158   # If so, the updated path is stored in $new_path.
26159   new_path="$input_to_shortpath"
26160 
26161   input_path="$input_to_shortpath"
26162   # Check if we need to convert this using DOS-style short mode. If the path
26163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26164   # take no chances and rewrite it.
26165   # Note: m4 eats our [], so we need to use [ and ] instead.
26166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26167   if test "x$has_forbidden_chars" != x; then
26168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26169     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26170     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26171     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26172       # Going to short mode and back again did indeed matter. Since short mode is
26173       # case insensitive, let's make it lowercase to improve readability.
26174       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26175       # Now convert it back to Unix-stile (cygpath)
26176       input_path=`$CYGPATH -u "$shortmode_path"`
26177       new_path="$input_path"
26178     fi
26179   fi
26180 
26181   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26182   if test "x$test_cygdrive_prefix" = x; then
26183     # As a simple fix, exclude /usr/bin since it's not a real path.
26184     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26185       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26186       # a path prefixed by /cygdrive for fixpath to work.
26187       new_path="$CYGWIN_ROOT_PATH$input_path"
26188     fi
26189   fi
26190 
26191   # remove trailing .exe if any
26192   new_path="${new_path/%.exe/}"
26193 
26194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26195 
26196   # First separate the path from the arguments. This will split at the first
26197   # space.
26198   complete="$NM"
26199   path="${complete%% *}"
26200   tmp="$complete EOL"
26201   arguments="${tmp#* }"
26202 
26203   # Input might be given as Windows format, start by converting to
26204   # unix format.
26205   new_path="$path"
26206 
26207   windows_path="$new_path"
26208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26209     unix_path=`$CYGPATH -u "$windows_path"`
26210     new_path="$unix_path"
26211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26213     new_path="$unix_path"
26214   fi
26215 
26216 
26217   # Now try to locate executable using which
26218   new_path=`$WHICH "$new_path" 2> /dev/null`
26219 
26220   if test "x$new_path" = x; then
26221     # Oops. Which didn't find the executable.
26222     # The splitting of arguments from the executable at a space might have been incorrect,
26223     # since paths with space are more likely in Windows. Give it another try with the whole
26224     # argument.
26225     path="$complete"
26226     arguments="EOL"
26227     new_path="$path"
26228 
26229   windows_path="$new_path"
26230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26231     unix_path=`$CYGPATH -u "$windows_path"`
26232     new_path="$unix_path"
26233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26235     new_path="$unix_path"
26236   fi
26237 
26238 
26239     new_path=`$WHICH "$new_path" 2> /dev/null`
26240 
26241     if test "x$new_path" = x; then
26242       # It's still not found. Now this is an unrecoverable error.
26243       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26244 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26245       has_space=`$ECHO "$complete" | $GREP " "`
26246       if test "x$has_space" != x; then
26247         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26248 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26249       fi
26250       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26251     fi
26252   fi
26253 
26254   # Now new_path has a complete unix path to the binary
26255   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26256     # Keep paths in /bin as-is, but remove trailing .exe if any
26257     new_path="${new_path/%.exe/}"
26258     # Do not save /bin paths to all_fixpath_prefixes!
26259   else
26260     # Not in mixed or Windows style, start by that.
26261     new_path=`cmd //c echo $new_path`
26262 
26263   input_path="$new_path"
26264   # Check if we need to convert this using DOS-style short mode. If the path
26265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26266   # take no chances and rewrite it.
26267   # Note: m4 eats our [], so we need to use [ and ] instead.
26268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26269   if test "x$has_forbidden_chars" != x; then
26270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26272   fi
26273 
26274     # Output is in $new_path
26275 
26276   windows_path="$new_path"
26277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26278     unix_path=`$CYGPATH -u "$windows_path"`
26279     new_path="$unix_path"
26280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26282     new_path="$unix_path"
26283   fi
26284 
26285     # remove trailing .exe if any
26286     new_path="${new_path/%.exe/}"
26287 
26288     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26289     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26290   fi
26291 
26292   else
26293     # We're on a posix platform. Hooray! :)
26294     # First separate the path from the arguments. This will split at the first
26295     # space.
26296     complete="$NM"
26297     path="${complete%% *}"
26298     tmp="$complete EOL"
26299     arguments="${tmp#* }"
26300 
26301     # Cannot rely on the command "which" here since it doesn't always work.
26302     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26303     if test -z "$is_absolute_path"; then
26304       # Path to executable is not absolute. Find it.
26305       IFS_save="$IFS"
26306       IFS=:
26307       for p in $PATH; do
26308         if test -f "$p/$path" && test -x "$p/$path"; then
26309           new_path="$p/$path"
26310           break
26311         fi
26312       done
26313       IFS="$IFS_save"
26314     else
26315       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26316 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26317       new_path="$path"
26318     fi
26319 
26320     if test "x$new_path" = x; then
26321       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26322 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26323       has_space=`$ECHO "$complete" | $GREP " "`
26324       if test "x$has_space" != x; then
26325         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26326 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26327       fi
26328       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26329     fi
26330   fi
26331 
26332   # Now join together the path and the arguments once again
26333   if test "x$arguments" != xEOL; then
26334     new_complete="$new_path ${arguments% *}"
26335   else
26336     new_complete="$new_path"
26337   fi
26338 
26339   if test "x$complete" != "x$new_complete"; then
26340     NM="$new_complete"
26341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26342 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26343   fi
26344 
26345     # Extract the first word of "gnm", so it can be a program name with args.
26346 set dummy gnm; ac_word=$2
26347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26348 $as_echo_n "checking for $ac_word... " >&6; }
26349 if ${ac_cv_path_GNM+:} false; then :
26350   $as_echo_n "(cached) " >&6
26351 else
26352   case $GNM in
26353   [\\/]* | ?:[\\/]*)
26354   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26355   ;;
26356   *)
26357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26358 for as_dir in $PATH
26359 do
26360   IFS=$as_save_IFS
26361   test -z "$as_dir" && as_dir=.
26362     for ac_exec_ext in '' $ac_executable_extensions; do
26363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26364     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26366     break 2
26367   fi
26368 done
26369   done
26370 IFS=$as_save_IFS
26371 
26372   ;;
26373 esac
26374 fi
26375 GNM=$ac_cv_path_GNM
26376 if test -n "$GNM"; then
26377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26378 $as_echo "$GNM" >&6; }
26379 else
26380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26381 $as_echo "no" >&6; }
26382 fi
26383 
26384 
26385 
26386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26387 
26388   # First separate the path from the arguments. This will split at the first
26389   # space.
26390   complete="$GNM"
26391   path="${complete%% *}"
26392   tmp="$complete EOL"
26393   arguments="${tmp#* }"
26394 
26395   # Input might be given as Windows format, start by converting to
26396   # unix format.
26397   new_path=`$CYGPATH -u "$path"`
26398 
26399   # Now try to locate executable using which
26400   new_path=`$WHICH "$new_path" 2> /dev/null`
26401   # bat and cmd files are not always considered executable in cygwin causing which
26402   # to not find them
26403   if test "x$new_path" = x \
26404       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26405       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26406     new_path=`$CYGPATH -u "$path"`
26407   fi
26408   if test "x$new_path" = x; then
26409     # Oops. Which didn't find the executable.
26410     # The splitting of arguments from the executable at a space might have been incorrect,
26411     # since paths with space are more likely in Windows. Give it another try with the whole
26412     # argument.
26413     path="$complete"
26414     arguments="EOL"
26415     new_path=`$CYGPATH -u "$path"`
26416     new_path=`$WHICH "$new_path" 2> /dev/null`
26417     # bat and cmd files are not always considered executable in cygwin causing which
26418     # to not find them
26419     if test "x$new_path" = x \
26420         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26421         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26422       new_path=`$CYGPATH -u "$path"`
26423     fi
26424     if test "x$new_path" = x; then
26425       # It's still not found. Now this is an unrecoverable error.
26426       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26427 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26428       has_space=`$ECHO "$complete" | $GREP " "`
26429       if test "x$has_space" != x; then
26430         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26431 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26432       fi
26433       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26434     fi
26435   fi
26436 
26437   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26438   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26439   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26440   # "foo.exe" is OK but "foo" is an error.
26441   #
26442   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26443   # It is also a way to make sure we got the proper file name for the real test later on.
26444   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26445   if test "x$test_shortpath" = x; then
26446     # Short path failed, file does not exist as specified.
26447     # Try adding .exe or .cmd
26448     if test -f "${new_path}.exe"; then
26449       input_to_shortpath="${new_path}.exe"
26450     elif test -f "${new_path}.cmd"; then
26451       input_to_shortpath="${new_path}.cmd"
26452     else
26453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26454 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26455       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26456 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26457       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26458     fi
26459   else
26460     input_to_shortpath="$new_path"
26461   fi
26462 
26463   # Call helper function which possibly converts this using DOS-style short mode.
26464   # If so, the updated path is stored in $new_path.
26465   new_path="$input_to_shortpath"
26466 
26467   input_path="$input_to_shortpath"
26468   # Check if we need to convert this using DOS-style short mode. If the path
26469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26470   # take no chances and rewrite it.
26471   # Note: m4 eats our [], so we need to use [ and ] instead.
26472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26473   if test "x$has_forbidden_chars" != x; then
26474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26475     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26476     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26477     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26478       # Going to short mode and back again did indeed matter. Since short mode is
26479       # case insensitive, let's make it lowercase to improve readability.
26480       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26481       # Now convert it back to Unix-stile (cygpath)
26482       input_path=`$CYGPATH -u "$shortmode_path"`
26483       new_path="$input_path"
26484     fi
26485   fi
26486 
26487   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26488   if test "x$test_cygdrive_prefix" = x; then
26489     # As a simple fix, exclude /usr/bin since it's not a real path.
26490     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26491       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26492       # a path prefixed by /cygdrive for fixpath to work.
26493       new_path="$CYGWIN_ROOT_PATH$input_path"
26494     fi
26495   fi
26496 
26497   # remove trailing .exe if any
26498   new_path="${new_path/%.exe/}"
26499 
26500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26501 
26502   # First separate the path from the arguments. This will split at the first
26503   # space.
26504   complete="$GNM"
26505   path="${complete%% *}"
26506   tmp="$complete EOL"
26507   arguments="${tmp#* }"
26508 
26509   # Input might be given as Windows format, start by converting to
26510   # unix format.
26511   new_path="$path"
26512 
26513   windows_path="$new_path"
26514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26515     unix_path=`$CYGPATH -u "$windows_path"`
26516     new_path="$unix_path"
26517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26519     new_path="$unix_path"
26520   fi
26521 
26522 
26523   # Now try to locate executable using which
26524   new_path=`$WHICH "$new_path" 2> /dev/null`
26525 
26526   if test "x$new_path" = x; then
26527     # Oops. Which didn't find the executable.
26528     # The splitting of arguments from the executable at a space might have been incorrect,
26529     # since paths with space are more likely in Windows. Give it another try with the whole
26530     # argument.
26531     path="$complete"
26532     arguments="EOL"
26533     new_path="$path"
26534 
26535   windows_path="$new_path"
26536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26537     unix_path=`$CYGPATH -u "$windows_path"`
26538     new_path="$unix_path"
26539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26541     new_path="$unix_path"
26542   fi
26543 
26544 
26545     new_path=`$WHICH "$new_path" 2> /dev/null`
26546 
26547     if test "x$new_path" = x; then
26548       # It's still not found. Now this is an unrecoverable error.
26549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26550 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26551       has_space=`$ECHO "$complete" | $GREP " "`
26552       if test "x$has_space" != x; then
26553         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26554 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26555       fi
26556       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26557     fi
26558   fi
26559 
26560   # Now new_path has a complete unix path to the binary
26561   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26562     # Keep paths in /bin as-is, but remove trailing .exe if any
26563     new_path="${new_path/%.exe/}"
26564     # Do not save /bin paths to all_fixpath_prefixes!
26565   else
26566     # Not in mixed or Windows style, start by that.
26567     new_path=`cmd //c echo $new_path`
26568 
26569   input_path="$new_path"
26570   # Check if we need to convert this using DOS-style short mode. If the path
26571   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26572   # take no chances and rewrite it.
26573   # Note: m4 eats our [], so we need to use [ and ] instead.
26574   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26575   if test "x$has_forbidden_chars" != x; then
26576     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26577     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26578   fi
26579 
26580     # Output is in $new_path
26581 
26582   windows_path="$new_path"
26583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26584     unix_path=`$CYGPATH -u "$windows_path"`
26585     new_path="$unix_path"
26586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26588     new_path="$unix_path"
26589   fi
26590 
26591     # remove trailing .exe if any
26592     new_path="${new_path/%.exe/}"
26593 
26594     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26595     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26596   fi
26597 
26598   else
26599     # We're on a posix platform. Hooray! :)
26600     # First separate the path from the arguments. This will split at the first
26601     # space.
26602     complete="$GNM"
26603     path="${complete%% *}"
26604     tmp="$complete EOL"
26605     arguments="${tmp#* }"
26606 
26607     # Cannot rely on the command "which" here since it doesn't always work.
26608     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26609     if test -z "$is_absolute_path"; then
26610       # Path to executable is not absolute. Find it.
26611       IFS_save="$IFS"
26612       IFS=:
26613       for p in $PATH; do
26614         if test -f "$p/$path" && test -x "$p/$path"; then
26615           new_path="$p/$path"
26616           break
26617         fi
26618       done
26619       IFS="$IFS_save"
26620     else
26621       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26622 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26623       new_path="$path"
26624     fi
26625 
26626     if test "x$new_path" = x; then
26627       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26628 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26629       has_space=`$ECHO "$complete" | $GREP " "`
26630       if test "x$has_space" != x; then
26631         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26632 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26633       fi
26634       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26635     fi
26636   fi
26637 
26638   # Now join together the path and the arguments once again
26639   if test "x$arguments" != xEOL; then
26640     new_complete="$new_path ${arguments% *}"
26641   else
26642     new_complete="$new_path"
26643   fi
26644 
26645   if test "x$complete" != "x$new_complete"; then
26646     GNM="$new_complete"
26647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26648 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26649   fi
26650 
26651     # Extract the first word of "strip", so it can be a program name with args.
26652 set dummy strip; ac_word=$2
26653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26654 $as_echo_n "checking for $ac_word... " >&6; }
26655 if ${ac_cv_path_STRIP+:} false; then :
26656   $as_echo_n "(cached) " >&6
26657 else
26658   case $STRIP in
26659   [\\/]* | ?:[\\/]*)
26660   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26661   ;;
26662   *)
26663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26664 for as_dir in $PATH
26665 do
26666   IFS=$as_save_IFS
26667   test -z "$as_dir" && as_dir=.
26668     for ac_exec_ext in '' $ac_executable_extensions; do
26669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26670     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26672     break 2
26673   fi
26674 done
26675   done
26676 IFS=$as_save_IFS
26677 
26678   ;;
26679 esac
26680 fi
26681 STRIP=$ac_cv_path_STRIP
26682 if test -n "$STRIP"; then
26683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26684 $as_echo "$STRIP" >&6; }
26685 else
26686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26687 $as_echo "no" >&6; }
26688 fi
26689 
26690 
26691 
26692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26693 
26694   # First separate the path from the arguments. This will split at the first
26695   # space.
26696   complete="$STRIP"
26697   path="${complete%% *}"
26698   tmp="$complete EOL"
26699   arguments="${tmp#* }"
26700 
26701   # Input might be given as Windows format, start by converting to
26702   # unix format.
26703   new_path=`$CYGPATH -u "$path"`
26704 
26705   # Now try to locate executable using which
26706   new_path=`$WHICH "$new_path" 2> /dev/null`
26707   # bat and cmd files are not always considered executable in cygwin causing which
26708   # to not find them
26709   if test "x$new_path" = x \
26710       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26711       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26712     new_path=`$CYGPATH -u "$path"`
26713   fi
26714   if test "x$new_path" = x; then
26715     # Oops. Which didn't find the executable.
26716     # The splitting of arguments from the executable at a space might have been incorrect,
26717     # since paths with space are more likely in Windows. Give it another try with the whole
26718     # argument.
26719     path="$complete"
26720     arguments="EOL"
26721     new_path=`$CYGPATH -u "$path"`
26722     new_path=`$WHICH "$new_path" 2> /dev/null`
26723     # bat and cmd files are not always considered executable in cygwin causing which
26724     # to not find them
26725     if test "x$new_path" = x \
26726         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26727         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26728       new_path=`$CYGPATH -u "$path"`
26729     fi
26730     if test "x$new_path" = x; then
26731       # It's still not found. Now this is an unrecoverable error.
26732       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26733 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26734       has_space=`$ECHO "$complete" | $GREP " "`
26735       if test "x$has_space" != x; then
26736         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26737 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26738       fi
26739       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26740     fi
26741   fi
26742 
26743   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26744   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26745   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26746   # "foo.exe" is OK but "foo" is an error.
26747   #
26748   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26749   # It is also a way to make sure we got the proper file name for the real test later on.
26750   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26751   if test "x$test_shortpath" = x; then
26752     # Short path failed, file does not exist as specified.
26753     # Try adding .exe or .cmd
26754     if test -f "${new_path}.exe"; then
26755       input_to_shortpath="${new_path}.exe"
26756     elif test -f "${new_path}.cmd"; then
26757       input_to_shortpath="${new_path}.cmd"
26758     else
26759       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26760 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26761       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26762 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26763       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26764     fi
26765   else
26766     input_to_shortpath="$new_path"
26767   fi
26768 
26769   # Call helper function which possibly converts this using DOS-style short mode.
26770   # If so, the updated path is stored in $new_path.
26771   new_path="$input_to_shortpath"
26772 
26773   input_path="$input_to_shortpath"
26774   # Check if we need to convert this using DOS-style short mode. If the path
26775   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26776   # take no chances and rewrite it.
26777   # Note: m4 eats our [], so we need to use [ and ] instead.
26778   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26779   if test "x$has_forbidden_chars" != x; then
26780     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26781     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26782     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26783     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26784       # Going to short mode and back again did indeed matter. Since short mode is
26785       # case insensitive, let's make it lowercase to improve readability.
26786       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26787       # Now convert it back to Unix-stile (cygpath)
26788       input_path=`$CYGPATH -u "$shortmode_path"`
26789       new_path="$input_path"
26790     fi
26791   fi
26792 
26793   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26794   if test "x$test_cygdrive_prefix" = x; then
26795     # As a simple fix, exclude /usr/bin since it's not a real path.
26796     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26797       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26798       # a path prefixed by /cygdrive for fixpath to work.
26799       new_path="$CYGWIN_ROOT_PATH$input_path"
26800     fi
26801   fi
26802 
26803   # remove trailing .exe if any
26804   new_path="${new_path/%.exe/}"
26805 
26806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26807 
26808   # First separate the path from the arguments. This will split at the first
26809   # space.
26810   complete="$STRIP"
26811   path="${complete%% *}"
26812   tmp="$complete EOL"
26813   arguments="${tmp#* }"
26814 
26815   # Input might be given as Windows format, start by converting to
26816   # unix format.
26817   new_path="$path"
26818 
26819   windows_path="$new_path"
26820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26821     unix_path=`$CYGPATH -u "$windows_path"`
26822     new_path="$unix_path"
26823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26825     new_path="$unix_path"
26826   fi
26827 
26828 
26829   # Now try to locate executable using which
26830   new_path=`$WHICH "$new_path" 2> /dev/null`
26831 
26832   if test "x$new_path" = x; then
26833     # Oops. Which didn't find the executable.
26834     # The splitting of arguments from the executable at a space might have been incorrect,
26835     # since paths with space are more likely in Windows. Give it another try with the whole
26836     # argument.
26837     path="$complete"
26838     arguments="EOL"
26839     new_path="$path"
26840 
26841   windows_path="$new_path"
26842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26843     unix_path=`$CYGPATH -u "$windows_path"`
26844     new_path="$unix_path"
26845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26847     new_path="$unix_path"
26848   fi
26849 
26850 
26851     new_path=`$WHICH "$new_path" 2> /dev/null`
26852 
26853     if test "x$new_path" = x; then
26854       # It's still not found. Now this is an unrecoverable error.
26855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26856 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26857       has_space=`$ECHO "$complete" | $GREP " "`
26858       if test "x$has_space" != x; then
26859         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26860 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26861       fi
26862       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26863     fi
26864   fi
26865 
26866   # Now new_path has a complete unix path to the binary
26867   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26868     # Keep paths in /bin as-is, but remove trailing .exe if any
26869     new_path="${new_path/%.exe/}"
26870     # Do not save /bin paths to all_fixpath_prefixes!
26871   else
26872     # Not in mixed or Windows style, start by that.
26873     new_path=`cmd //c echo $new_path`
26874 
26875   input_path="$new_path"
26876   # Check if we need to convert this using DOS-style short mode. If the path
26877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26878   # take no chances and rewrite it.
26879   # Note: m4 eats our [], so we need to use [ and ] instead.
26880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26881   if test "x$has_forbidden_chars" != x; then
26882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26883     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26884   fi
26885 
26886     # Output is in $new_path
26887 
26888   windows_path="$new_path"
26889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26890     unix_path=`$CYGPATH -u "$windows_path"`
26891     new_path="$unix_path"
26892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26894     new_path="$unix_path"
26895   fi
26896 
26897     # remove trailing .exe if any
26898     new_path="${new_path/%.exe/}"
26899 
26900     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26901     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26902   fi
26903 
26904   else
26905     # We're on a posix platform. Hooray! :)
26906     # First separate the path from the arguments. This will split at the first
26907     # space.
26908     complete="$STRIP"
26909     path="${complete%% *}"
26910     tmp="$complete EOL"
26911     arguments="${tmp#* }"
26912 
26913     # Cannot rely on the command "which" here since it doesn't always work.
26914     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26915     if test -z "$is_absolute_path"; then
26916       # Path to executable is not absolute. Find it.
26917       IFS_save="$IFS"
26918       IFS=:
26919       for p in $PATH; do
26920         if test -f "$p/$path" && test -x "$p/$path"; then
26921           new_path="$p/$path"
26922           break
26923         fi
26924       done
26925       IFS="$IFS_save"
26926     else
26927       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26928 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26929       new_path="$path"
26930     fi
26931 
26932     if test "x$new_path" = x; then
26933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26934 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26935       has_space=`$ECHO "$complete" | $GREP " "`
26936       if test "x$has_space" != x; then
26937         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26938 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26939       fi
26940       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26941     fi
26942   fi
26943 
26944   # Now join together the path and the arguments once again
26945   if test "x$arguments" != xEOL; then
26946     new_complete="$new_path ${arguments% *}"
26947   else
26948     new_complete="$new_path"
26949   fi
26950 
26951   if test "x$complete" != "x$new_complete"; then
26952     STRIP="$new_complete"
26953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26954 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26955   fi
26956 
26957     # Extract the first word of "mcs", so it can be a program name with args.
26958 set dummy mcs; ac_word=$2
26959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26960 $as_echo_n "checking for $ac_word... " >&6; }
26961 if ${ac_cv_path_MCS+:} false; then :
26962   $as_echo_n "(cached) " >&6
26963 else
26964   case $MCS in
26965   [\\/]* | ?:[\\/]*)
26966   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26967   ;;
26968   *)
26969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26970 for as_dir in $PATH
26971 do
26972   IFS=$as_save_IFS
26973   test -z "$as_dir" && as_dir=.
26974     for ac_exec_ext in '' $ac_executable_extensions; do
26975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26976     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26978     break 2
26979   fi
26980 done
26981   done
26982 IFS=$as_save_IFS
26983 
26984   ;;
26985 esac
26986 fi
26987 MCS=$ac_cv_path_MCS
26988 if test -n "$MCS"; then
26989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26990 $as_echo "$MCS" >&6; }
26991 else
26992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26993 $as_echo "no" >&6; }
26994 fi
26995 
26996 
26997 
26998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26999 
27000   # First separate the path from the arguments. This will split at the first
27001   # space.
27002   complete="$MCS"
27003   path="${complete%% *}"
27004   tmp="$complete EOL"
27005   arguments="${tmp#* }"
27006 
27007   # Input might be given as Windows format, start by converting to
27008   # unix format.
27009   new_path=`$CYGPATH -u "$path"`
27010 
27011   # Now try to locate executable using which
27012   new_path=`$WHICH "$new_path" 2> /dev/null`
27013   # bat and cmd files are not always considered executable in cygwin causing which
27014   # to not find them
27015   if test "x$new_path" = x \
27016       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27017       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27018     new_path=`$CYGPATH -u "$path"`
27019   fi
27020   if test "x$new_path" = x; then
27021     # Oops. Which didn't find the executable.
27022     # The splitting of arguments from the executable at a space might have been incorrect,
27023     # since paths with space are more likely in Windows. Give it another try with the whole
27024     # argument.
27025     path="$complete"
27026     arguments="EOL"
27027     new_path=`$CYGPATH -u "$path"`
27028     new_path=`$WHICH "$new_path" 2> /dev/null`
27029     # bat and cmd files are not always considered executable in cygwin causing which
27030     # to not find them
27031     if test "x$new_path" = x \
27032         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27033         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27034       new_path=`$CYGPATH -u "$path"`
27035     fi
27036     if test "x$new_path" = x; then
27037       # It's still not found. Now this is an unrecoverable error.
27038       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27039 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27040       has_space=`$ECHO "$complete" | $GREP " "`
27041       if test "x$has_space" != x; then
27042         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27043 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27044       fi
27045       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27046     fi
27047   fi
27048 
27049   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27050   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27051   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27052   # "foo.exe" is OK but "foo" is an error.
27053   #
27054   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27055   # It is also a way to make sure we got the proper file name for the real test later on.
27056   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27057   if test "x$test_shortpath" = x; then
27058     # Short path failed, file does not exist as specified.
27059     # Try adding .exe or .cmd
27060     if test -f "${new_path}.exe"; then
27061       input_to_shortpath="${new_path}.exe"
27062     elif test -f "${new_path}.cmd"; then
27063       input_to_shortpath="${new_path}.cmd"
27064     else
27065       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
27066 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
27067       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27068 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27069       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27070     fi
27071   else
27072     input_to_shortpath="$new_path"
27073   fi
27074 
27075   # Call helper function which possibly converts this using DOS-style short mode.
27076   # If so, the updated path is stored in $new_path.
27077   new_path="$input_to_shortpath"
27078 
27079   input_path="$input_to_shortpath"
27080   # Check if we need to convert this using DOS-style short mode. If the path
27081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27082   # take no chances and rewrite it.
27083   # Note: m4 eats our [], so we need to use [ and ] instead.
27084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27085   if test "x$has_forbidden_chars" != x; then
27086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27087     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27088     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27089     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27090       # Going to short mode and back again did indeed matter. Since short mode is
27091       # case insensitive, let's make it lowercase to improve readability.
27092       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27093       # Now convert it back to Unix-stile (cygpath)
27094       input_path=`$CYGPATH -u "$shortmode_path"`
27095       new_path="$input_path"
27096     fi
27097   fi
27098 
27099   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27100   if test "x$test_cygdrive_prefix" = x; then
27101     # As a simple fix, exclude /usr/bin since it's not a real path.
27102     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27103       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27104       # a path prefixed by /cygdrive for fixpath to work.
27105       new_path="$CYGWIN_ROOT_PATH$input_path"
27106     fi
27107   fi
27108 
27109   # remove trailing .exe if any
27110   new_path="${new_path/%.exe/}"
27111 
27112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27113 
27114   # First separate the path from the arguments. This will split at the first
27115   # space.
27116   complete="$MCS"
27117   path="${complete%% *}"
27118   tmp="$complete EOL"
27119   arguments="${tmp#* }"
27120 
27121   # Input might be given as Windows format, start by converting to
27122   # unix format.
27123   new_path="$path"
27124 
27125   windows_path="$new_path"
27126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27127     unix_path=`$CYGPATH -u "$windows_path"`
27128     new_path="$unix_path"
27129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27131     new_path="$unix_path"
27132   fi
27133 
27134 
27135   # Now try to locate executable using which
27136   new_path=`$WHICH "$new_path" 2> /dev/null`
27137 
27138   if test "x$new_path" = x; then
27139     # Oops. Which didn't find the executable.
27140     # The splitting of arguments from the executable at a space might have been incorrect,
27141     # since paths with space are more likely in Windows. Give it another try with the whole
27142     # argument.
27143     path="$complete"
27144     arguments="EOL"
27145     new_path="$path"
27146 
27147   windows_path="$new_path"
27148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27149     unix_path=`$CYGPATH -u "$windows_path"`
27150     new_path="$unix_path"
27151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27153     new_path="$unix_path"
27154   fi
27155 
27156 
27157     new_path=`$WHICH "$new_path" 2> /dev/null`
27158 
27159     if test "x$new_path" = x; then
27160       # It's still not found. Now this is an unrecoverable error.
27161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27162 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27163       has_space=`$ECHO "$complete" | $GREP " "`
27164       if test "x$has_space" != x; then
27165         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27166 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27167       fi
27168       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27169     fi
27170   fi
27171 
27172   # Now new_path has a complete unix path to the binary
27173   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27174     # Keep paths in /bin as-is, but remove trailing .exe if any
27175     new_path="${new_path/%.exe/}"
27176     # Do not save /bin paths to all_fixpath_prefixes!
27177   else
27178     # Not in mixed or Windows style, start by that.
27179     new_path=`cmd //c echo $new_path`
27180 
27181   input_path="$new_path"
27182   # Check if we need to convert this using DOS-style short mode. If the path
27183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27184   # take no chances and rewrite it.
27185   # Note: m4 eats our [], so we need to use [ and ] instead.
27186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27187   if test "x$has_forbidden_chars" != x; then
27188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27189     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27190   fi
27191 
27192     # Output is in $new_path
27193 
27194   windows_path="$new_path"
27195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196     unix_path=`$CYGPATH -u "$windows_path"`
27197     new_path="$unix_path"
27198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27200     new_path="$unix_path"
27201   fi
27202 
27203     # remove trailing .exe if any
27204     new_path="${new_path/%.exe/}"
27205 
27206     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27207     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27208   fi
27209 
27210   else
27211     # We're on a posix platform. Hooray! :)
27212     # First separate the path from the arguments. This will split at the first
27213     # space.
27214     complete="$MCS"
27215     path="${complete%% *}"
27216     tmp="$complete EOL"
27217     arguments="${tmp#* }"
27218 
27219     # Cannot rely on the command "which" here since it doesn't always work.
27220     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27221     if test -z "$is_absolute_path"; then
27222       # Path to executable is not absolute. Find it.
27223       IFS_save="$IFS"
27224       IFS=:
27225       for p in $PATH; do
27226         if test -f "$p/$path" && test -x "$p/$path"; then
27227           new_path="$p/$path"
27228           break
27229         fi
27230       done
27231       IFS="$IFS_save"
27232     else
27233       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
27234 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
27235       new_path="$path"
27236     fi
27237 
27238     if test "x$new_path" = x; then
27239       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27240 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27241       has_space=`$ECHO "$complete" | $GREP " "`
27242       if test "x$has_space" != x; then
27243         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27244 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27245       fi
27246       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27247     fi
27248   fi
27249 
27250   # Now join together the path and the arguments once again
27251   if test "x$arguments" != xEOL; then
27252     new_complete="$new_path ${arguments% *}"
27253   else
27254     new_complete="$new_path"
27255   fi
27256 
27257   if test "x$complete" != "x$new_complete"; then
27258     MCS="$new_complete"
27259     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
27260 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
27261   fi
27262 
27263   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
27264     # Extract the first word of "otool", so it can be a program name with args.
27265 set dummy otool; ac_word=$2
27266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27267 $as_echo_n "checking for $ac_word... " >&6; }
27268 if ${ac_cv_path_OTOOL+:} false; then :
27269   $as_echo_n "(cached) " >&6
27270 else
27271   case $OTOOL in
27272   [\\/]* | ?:[\\/]*)
27273   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
27274   ;;
27275   *)
27276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27277 for as_dir in $PATH
27278 do
27279   IFS=$as_save_IFS
27280   test -z "$as_dir" && as_dir=.
27281     for ac_exec_ext in '' $ac_executable_extensions; do
27282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27283     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
27284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27285     break 2
27286   fi
27287 done
27288   done
27289 IFS=$as_save_IFS
27290 
27291   ;;
27292 esac
27293 fi
27294 OTOOL=$ac_cv_path_OTOOL
27295 if test -n "$OTOOL"; then
27296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
27297 $as_echo "$OTOOL" >&6; }
27298 else
27299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27300 $as_echo "no" >&6; }
27301 fi
27302 
27303 
27304     if test "x$OTOOL" = "x"; then
27305       OTOOL="true"
27306     fi
27307     if test -n "$ac_tool_prefix"; then
27308   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
27309 set dummy ${ac_tool_prefix}nm; ac_word=$2
27310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27311 $as_echo_n "checking for $ac_word... " >&6; }
27312 if ${ac_cv_prog_NM+:} false; then :
27313   $as_echo_n "(cached) " >&6
27314 else
27315   if test -n "$NM"; then
27316   ac_cv_prog_NM="$NM" # Let the user override the test.
27317 else
27318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27319 for as_dir in $PATH
27320 do
27321   IFS=$as_save_IFS
27322   test -z "$as_dir" && as_dir=.
27323     for ac_exec_ext in '' $ac_executable_extensions; do
27324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27325     ac_cv_prog_NM="${ac_tool_prefix}nm"
27326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27327     break 2
27328   fi
27329 done
27330   done
27331 IFS=$as_save_IFS
27332 
27333 fi
27334 fi
27335 NM=$ac_cv_prog_NM
27336 if test -n "$NM"; then
27337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27338 $as_echo "$NM" >&6; }
27339 else
27340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27341 $as_echo "no" >&6; }
27342 fi
27343 
27344 
27345 fi
27346 if test -z "$ac_cv_prog_NM"; then
27347   ac_ct_NM=$NM
27348   # Extract the first word of "nm", so it can be a program name with args.
27349 set dummy nm; ac_word=$2
27350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27351 $as_echo_n "checking for $ac_word... " >&6; }
27352 if ${ac_cv_prog_ac_ct_NM+:} false; then :
27353   $as_echo_n "(cached) " >&6
27354 else
27355   if test -n "$ac_ct_NM"; then
27356   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27357 else
27358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27359 for as_dir in $PATH
27360 do
27361   IFS=$as_save_IFS
27362   test -z "$as_dir" && as_dir=.
27363     for ac_exec_ext in '' $ac_executable_extensions; do
27364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27365     ac_cv_prog_ac_ct_NM="nm"
27366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27367     break 2
27368   fi
27369 done
27370   done
27371 IFS=$as_save_IFS
27372 
27373 fi
27374 fi
27375 ac_ct_NM=$ac_cv_prog_ac_ct_NM
27376 if test -n "$ac_ct_NM"; then
27377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27378 $as_echo "$ac_ct_NM" >&6; }
27379 else
27380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27381 $as_echo "no" >&6; }
27382 fi
27383 
27384   if test "x$ac_ct_NM" = x; then
27385     NM=""
27386   else
27387     case $cross_compiling:$ac_tool_warned in
27388 yes:)
27389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27390 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27391 ac_tool_warned=yes ;;
27392 esac
27393     NM=$ac_ct_NM
27394   fi
27395 else
27396   NM="$ac_cv_prog_NM"
27397 fi
27398 
27399 
27400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27401 
27402   # First separate the path from the arguments. This will split at the first
27403   # space.
27404   complete="$NM"
27405   path="${complete%% *}"
27406   tmp="$complete EOL"
27407   arguments="${tmp#* }"
27408 
27409   # Input might be given as Windows format, start by converting to
27410   # unix format.
27411   new_path=`$CYGPATH -u "$path"`
27412 
27413   # Now try to locate executable using which
27414   new_path=`$WHICH "$new_path" 2> /dev/null`
27415   # bat and cmd files are not always considered executable in cygwin causing which
27416   # to not find them
27417   if test "x$new_path" = x \
27418       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27419       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27420     new_path=`$CYGPATH -u "$path"`
27421   fi
27422   if test "x$new_path" = x; then
27423     # Oops. Which didn't find the executable.
27424     # The splitting of arguments from the executable at a space might have been incorrect,
27425     # since paths with space are more likely in Windows. Give it another try with the whole
27426     # argument.
27427     path="$complete"
27428     arguments="EOL"
27429     new_path=`$CYGPATH -u "$path"`
27430     new_path=`$WHICH "$new_path" 2> /dev/null`
27431     # bat and cmd files are not always considered executable in cygwin causing which
27432     # to not find them
27433     if test "x$new_path" = x \
27434         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27435         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27436       new_path=`$CYGPATH -u "$path"`
27437     fi
27438     if test "x$new_path" = x; then
27439       # It's still not found. Now this is an unrecoverable error.
27440       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27441 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27442       has_space=`$ECHO "$complete" | $GREP " "`
27443       if test "x$has_space" != x; then
27444         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27445 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27446       fi
27447       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27448     fi
27449   fi
27450 
27451   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27452   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27453   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27454   # "foo.exe" is OK but "foo" is an error.
27455   #
27456   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27457   # It is also a way to make sure we got the proper file name for the real test later on.
27458   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27459   if test "x$test_shortpath" = x; then
27460     # Short path failed, file does not exist as specified.
27461     # Try adding .exe or .cmd
27462     if test -f "${new_path}.exe"; then
27463       input_to_shortpath="${new_path}.exe"
27464     elif test -f "${new_path}.cmd"; then
27465       input_to_shortpath="${new_path}.cmd"
27466     else
27467       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27468 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27469       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27470 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27471       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27472     fi
27473   else
27474     input_to_shortpath="$new_path"
27475   fi
27476 
27477   # Call helper function which possibly converts this using DOS-style short mode.
27478   # If so, the updated path is stored in $new_path.
27479   new_path="$input_to_shortpath"
27480 
27481   input_path="$input_to_shortpath"
27482   # Check if we need to convert this using DOS-style short mode. If the path
27483   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27484   # take no chances and rewrite it.
27485   # Note: m4 eats our [], so we need to use [ and ] instead.
27486   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27487   if test "x$has_forbidden_chars" != x; then
27488     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27489     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27490     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27491     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27492       # Going to short mode and back again did indeed matter. Since short mode is
27493       # case insensitive, let's make it lowercase to improve readability.
27494       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27495       # Now convert it back to Unix-stile (cygpath)
27496       input_path=`$CYGPATH -u "$shortmode_path"`
27497       new_path="$input_path"
27498     fi
27499   fi
27500 
27501   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27502   if test "x$test_cygdrive_prefix" = x; then
27503     # As a simple fix, exclude /usr/bin since it's not a real path.
27504     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27505       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27506       # a path prefixed by /cygdrive for fixpath to work.
27507       new_path="$CYGWIN_ROOT_PATH$input_path"
27508     fi
27509   fi
27510 
27511   # remove trailing .exe if any
27512   new_path="${new_path/%.exe/}"
27513 
27514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27515 
27516   # First separate the path from the arguments. This will split at the first
27517   # space.
27518   complete="$NM"
27519   path="${complete%% *}"
27520   tmp="$complete EOL"
27521   arguments="${tmp#* }"
27522 
27523   # Input might be given as Windows format, start by converting to
27524   # unix format.
27525   new_path="$path"
27526 
27527   windows_path="$new_path"
27528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27529     unix_path=`$CYGPATH -u "$windows_path"`
27530     new_path="$unix_path"
27531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27532     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27533     new_path="$unix_path"
27534   fi
27535 
27536 
27537   # Now try to locate executable using which
27538   new_path=`$WHICH "$new_path" 2> /dev/null`
27539 
27540   if test "x$new_path" = x; then
27541     # Oops. Which didn't find the executable.
27542     # The splitting of arguments from the executable at a space might have been incorrect,
27543     # since paths with space are more likely in Windows. Give it another try with the whole
27544     # argument.
27545     path="$complete"
27546     arguments="EOL"
27547     new_path="$path"
27548 
27549   windows_path="$new_path"
27550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27551     unix_path=`$CYGPATH -u "$windows_path"`
27552     new_path="$unix_path"
27553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27554     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27555     new_path="$unix_path"
27556   fi
27557 
27558 
27559     new_path=`$WHICH "$new_path" 2> /dev/null`
27560 
27561     if test "x$new_path" = x; then
27562       # It's still not found. Now this is an unrecoverable error.
27563       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27564 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27565       has_space=`$ECHO "$complete" | $GREP " "`
27566       if test "x$has_space" != x; then
27567         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27568 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27569       fi
27570       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27571     fi
27572   fi
27573 
27574   # Now new_path has a complete unix path to the binary
27575   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27576     # Keep paths in /bin as-is, but remove trailing .exe if any
27577     new_path="${new_path/%.exe/}"
27578     # Do not save /bin paths to all_fixpath_prefixes!
27579   else
27580     # Not in mixed or Windows style, start by that.
27581     new_path=`cmd //c echo $new_path`
27582 
27583   input_path="$new_path"
27584   # Check if we need to convert this using DOS-style short mode. If the path
27585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27586   # take no chances and rewrite it.
27587   # Note: m4 eats our [], so we need to use [ and ] instead.
27588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27589   if test "x$has_forbidden_chars" != x; then
27590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27592   fi
27593 
27594     # Output is in $new_path
27595 
27596   windows_path="$new_path"
27597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27598     unix_path=`$CYGPATH -u "$windows_path"`
27599     new_path="$unix_path"
27600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27602     new_path="$unix_path"
27603   fi
27604 
27605     # remove trailing .exe if any
27606     new_path="${new_path/%.exe/}"
27607 
27608     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27609     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27610   fi
27611 
27612   else
27613     # We're on a posix platform. Hooray! :)
27614     # First separate the path from the arguments. This will split at the first
27615     # space.
27616     complete="$NM"
27617     path="${complete%% *}"
27618     tmp="$complete EOL"
27619     arguments="${tmp#* }"
27620 
27621     # Cannot rely on the command "which" here since it doesn't always work.
27622     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27623     if test -z "$is_absolute_path"; then
27624       # Path to executable is not absolute. Find it.
27625       IFS_save="$IFS"
27626       IFS=:
27627       for p in $PATH; do
27628         if test -f "$p/$path" && test -x "$p/$path"; then
27629           new_path="$p/$path"
27630           break
27631         fi
27632       done
27633       IFS="$IFS_save"
27634     else
27635       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27636 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27637       new_path="$path"
27638     fi
27639 
27640     if test "x$new_path" = x; then
27641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27642 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27643       has_space=`$ECHO "$complete" | $GREP " "`
27644       if test "x$has_space" != x; then
27645         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27646 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27647       fi
27648       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27649     fi
27650   fi
27651 
27652   # Now join together the path and the arguments once again
27653   if test "x$arguments" != xEOL; then
27654     new_complete="$new_path ${arguments% *}"
27655   else
27656     new_complete="$new_path"
27657   fi
27658 
27659   if test "x$complete" != "x$new_complete"; then
27660     NM="$new_complete"
27661     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27662 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27663   fi
27664 
27665     GNM="$NM"
27666 
27667     if test -n "$ac_tool_prefix"; then
27668   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27669 set dummy ${ac_tool_prefix}strip; ac_word=$2
27670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27671 $as_echo_n "checking for $ac_word... " >&6; }
27672 if ${ac_cv_prog_STRIP+:} false; then :
27673   $as_echo_n "(cached) " >&6
27674 else
27675   if test -n "$STRIP"; then
27676   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27677 else
27678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27679 for as_dir in $PATH
27680 do
27681   IFS=$as_save_IFS
27682   test -z "$as_dir" && as_dir=.
27683     for ac_exec_ext in '' $ac_executable_extensions; do
27684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27685     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27687     break 2
27688   fi
27689 done
27690   done
27691 IFS=$as_save_IFS
27692 
27693 fi
27694 fi
27695 STRIP=$ac_cv_prog_STRIP
27696 if test -n "$STRIP"; then
27697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27698 $as_echo "$STRIP" >&6; }
27699 else
27700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27701 $as_echo "no" >&6; }
27702 fi
27703 
27704 
27705 fi
27706 if test -z "$ac_cv_prog_STRIP"; then
27707   ac_ct_STRIP=$STRIP
27708   # Extract the first word of "strip", so it can be a program name with args.
27709 set dummy strip; ac_word=$2
27710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27711 $as_echo_n "checking for $ac_word... " >&6; }
27712 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27713   $as_echo_n "(cached) " >&6
27714 else
27715   if test -n "$ac_ct_STRIP"; then
27716   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27717 else
27718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27719 for as_dir in $PATH
27720 do
27721   IFS=$as_save_IFS
27722   test -z "$as_dir" && as_dir=.
27723     for ac_exec_ext in '' $ac_executable_extensions; do
27724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27725     ac_cv_prog_ac_ct_STRIP="strip"
27726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27727     break 2
27728   fi
27729 done
27730   done
27731 IFS=$as_save_IFS
27732 
27733 fi
27734 fi
27735 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27736 if test -n "$ac_ct_STRIP"; then
27737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27738 $as_echo "$ac_ct_STRIP" >&6; }
27739 else
27740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27741 $as_echo "no" >&6; }
27742 fi
27743 
27744   if test "x$ac_ct_STRIP" = x; then
27745     STRIP=""
27746   else
27747     case $cross_compiling:$ac_tool_warned in
27748 yes:)
27749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27750 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27751 ac_tool_warned=yes ;;
27752 esac
27753     STRIP=$ac_ct_STRIP
27754   fi
27755 else
27756   STRIP="$ac_cv_prog_STRIP"
27757 fi
27758 
27759 
27760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27761 
27762   # First separate the path from the arguments. This will split at the first
27763   # space.
27764   complete="$STRIP"
27765   path="${complete%% *}"
27766   tmp="$complete EOL"
27767   arguments="${tmp#* }"
27768 
27769   # Input might be given as Windows format, start by converting to
27770   # unix format.
27771   new_path=`$CYGPATH -u "$path"`
27772 
27773   # Now try to locate executable using which
27774   new_path=`$WHICH "$new_path" 2> /dev/null`
27775   # bat and cmd files are not always considered executable in cygwin causing which
27776   # to not find them
27777   if test "x$new_path" = x \
27778       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27779       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27780     new_path=`$CYGPATH -u "$path"`
27781   fi
27782   if test "x$new_path" = x; then
27783     # Oops. Which didn't find the executable.
27784     # The splitting of arguments from the executable at a space might have been incorrect,
27785     # since paths with space are more likely in Windows. Give it another try with the whole
27786     # argument.
27787     path="$complete"
27788     arguments="EOL"
27789     new_path=`$CYGPATH -u "$path"`
27790     new_path=`$WHICH "$new_path" 2> /dev/null`
27791     # bat and cmd files are not always considered executable in cygwin causing which
27792     # to not find them
27793     if test "x$new_path" = x \
27794         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27795         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27796       new_path=`$CYGPATH -u "$path"`
27797     fi
27798     if test "x$new_path" = x; then
27799       # It's still not found. Now this is an unrecoverable error.
27800       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27801 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27802       has_space=`$ECHO "$complete" | $GREP " "`
27803       if test "x$has_space" != x; then
27804         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27805 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27806       fi
27807       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27808     fi
27809   fi
27810 
27811   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27812   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27813   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27814   # "foo.exe" is OK but "foo" is an error.
27815   #
27816   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27817   # It is also a way to make sure we got the proper file name for the real test later on.
27818   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27819   if test "x$test_shortpath" = x; then
27820     # Short path failed, file does not exist as specified.
27821     # Try adding .exe or .cmd
27822     if test -f "${new_path}.exe"; then
27823       input_to_shortpath="${new_path}.exe"
27824     elif test -f "${new_path}.cmd"; then
27825       input_to_shortpath="${new_path}.cmd"
27826     else
27827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27828 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27829       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27830 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27831       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27832     fi
27833   else
27834     input_to_shortpath="$new_path"
27835   fi
27836 
27837   # Call helper function which possibly converts this using DOS-style short mode.
27838   # If so, the updated path is stored in $new_path.
27839   new_path="$input_to_shortpath"
27840 
27841   input_path="$input_to_shortpath"
27842   # Check if we need to convert this using DOS-style short mode. If the path
27843   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27844   # take no chances and rewrite it.
27845   # Note: m4 eats our [], so we need to use [ and ] instead.
27846   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27847   if test "x$has_forbidden_chars" != x; then
27848     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27849     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27850     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27851     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27852       # Going to short mode and back again did indeed matter. Since short mode is
27853       # case insensitive, let's make it lowercase to improve readability.
27854       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27855       # Now convert it back to Unix-stile (cygpath)
27856       input_path=`$CYGPATH -u "$shortmode_path"`
27857       new_path="$input_path"
27858     fi
27859   fi
27860 
27861   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27862   if test "x$test_cygdrive_prefix" = x; then
27863     # As a simple fix, exclude /usr/bin since it's not a real path.
27864     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27865       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27866       # a path prefixed by /cygdrive for fixpath to work.
27867       new_path="$CYGWIN_ROOT_PATH$input_path"
27868     fi
27869   fi
27870 
27871   # remove trailing .exe if any
27872   new_path="${new_path/%.exe/}"
27873 
27874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27875 
27876   # First separate the path from the arguments. This will split at the first
27877   # space.
27878   complete="$STRIP"
27879   path="${complete%% *}"
27880   tmp="$complete EOL"
27881   arguments="${tmp#* }"
27882 
27883   # Input might be given as Windows format, start by converting to
27884   # unix format.
27885   new_path="$path"
27886 
27887   windows_path="$new_path"
27888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27889     unix_path=`$CYGPATH -u "$windows_path"`
27890     new_path="$unix_path"
27891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27893     new_path="$unix_path"
27894   fi
27895 
27896 
27897   # Now try to locate executable using which
27898   new_path=`$WHICH "$new_path" 2> /dev/null`
27899 
27900   if test "x$new_path" = x; then
27901     # Oops. Which didn't find the executable.
27902     # The splitting of arguments from the executable at a space might have been incorrect,
27903     # since paths with space are more likely in Windows. Give it another try with the whole
27904     # argument.
27905     path="$complete"
27906     arguments="EOL"
27907     new_path="$path"
27908 
27909   windows_path="$new_path"
27910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27911     unix_path=`$CYGPATH -u "$windows_path"`
27912     new_path="$unix_path"
27913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27915     new_path="$unix_path"
27916   fi
27917 
27918 
27919     new_path=`$WHICH "$new_path" 2> /dev/null`
27920 
27921     if test "x$new_path" = x; then
27922       # It's still not found. Now this is an unrecoverable error.
27923       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27924 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27925       has_space=`$ECHO "$complete" | $GREP " "`
27926       if test "x$has_space" != x; then
27927         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27928 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27929       fi
27930       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27931     fi
27932   fi
27933 
27934   # Now new_path has a complete unix path to the binary
27935   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27936     # Keep paths in /bin as-is, but remove trailing .exe if any
27937     new_path="${new_path/%.exe/}"
27938     # Do not save /bin paths to all_fixpath_prefixes!
27939   else
27940     # Not in mixed or Windows style, start by that.
27941     new_path=`cmd //c echo $new_path`
27942 
27943   input_path="$new_path"
27944   # Check if we need to convert this using DOS-style short mode. If the path
27945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27946   # take no chances and rewrite it.
27947   # Note: m4 eats our [], so we need to use [ and ] instead.
27948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27949   if test "x$has_forbidden_chars" != x; then
27950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27952   fi
27953 
27954     # Output is in $new_path
27955 
27956   windows_path="$new_path"
27957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27958     unix_path=`$CYGPATH -u "$windows_path"`
27959     new_path="$unix_path"
27960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27962     new_path="$unix_path"
27963   fi
27964 
27965     # remove trailing .exe if any
27966     new_path="${new_path/%.exe/}"
27967 
27968     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27969     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27970   fi
27971 
27972   else
27973     # We're on a posix platform. Hooray! :)
27974     # First separate the path from the arguments. This will split at the first
27975     # space.
27976     complete="$STRIP"
27977     path="${complete%% *}"
27978     tmp="$complete EOL"
27979     arguments="${tmp#* }"
27980 
27981     # Cannot rely on the command "which" here since it doesn't always work.
27982     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27983     if test -z "$is_absolute_path"; then
27984       # Path to executable is not absolute. Find it.
27985       IFS_save="$IFS"
27986       IFS=:
27987       for p in $PATH; do
27988         if test -f "$p/$path" && test -x "$p/$path"; then
27989           new_path="$p/$path"
27990           break
27991         fi
27992       done
27993       IFS="$IFS_save"
27994     else
27995       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27996 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27997       new_path="$path"
27998     fi
27999 
28000     if test "x$new_path" = x; then
28001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
28002 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
28003       has_space=`$ECHO "$complete" | $GREP " "`
28004       if test "x$has_space" != x; then
28005         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28006 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28007       fi
28008       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
28009     fi
28010   fi
28011 
28012   # Now join together the path and the arguments once again
28013   if test "x$arguments" != xEOL; then
28014     new_complete="$new_path ${arguments% *}"
28015   else
28016     new_complete="$new_path"
28017   fi
28018 
28019   if test "x$complete" != "x$new_complete"; then
28020     STRIP="$new_complete"
28021     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
28022 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
28023   fi
28024 
28025   fi
28026 
28027   # objcopy is used for moving debug symbols to separate files when
28028   # full debug symbols are enabled.
28029   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
28030     if test -n "$ac_tool_prefix"; then
28031   for ac_prog in gobjcopy objcopy
28032   do
28033     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28034 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28036 $as_echo_n "checking for $ac_word... " >&6; }
28037 if ${ac_cv_prog_OBJCOPY+:} false; then :
28038   $as_echo_n "(cached) " >&6
28039 else
28040   if test -n "$OBJCOPY"; then
28041   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
28042 else
28043 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28044 for as_dir in $PATH
28045 do
28046   IFS=$as_save_IFS
28047   test -z "$as_dir" && as_dir=.
28048     for ac_exec_ext in '' $ac_executable_extensions; do
28049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28050     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
28051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28052     break 2
28053   fi
28054 done
28055   done
28056 IFS=$as_save_IFS
28057 
28058 fi
28059 fi
28060 OBJCOPY=$ac_cv_prog_OBJCOPY
28061 if test -n "$OBJCOPY"; then
28062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
28063 $as_echo "$OBJCOPY" >&6; }
28064 else
28065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28066 $as_echo "no" >&6; }
28067 fi
28068 
28069 
28070     test -n "$OBJCOPY" && break
28071   done
28072 fi
28073 if test -z "$OBJCOPY"; then
28074   ac_ct_OBJCOPY=$OBJCOPY
28075   for ac_prog in gobjcopy objcopy
28076 do
28077   # Extract the first word of "$ac_prog", so it can be a program name with args.
28078 set dummy $ac_prog; ac_word=$2
28079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28080 $as_echo_n "checking for $ac_word... " >&6; }
28081 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
28082   $as_echo_n "(cached) " >&6
28083 else
28084   if test -n "$ac_ct_OBJCOPY"; then
28085   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
28086 else
28087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28088 for as_dir in $PATH
28089 do
28090   IFS=$as_save_IFS
28091   test -z "$as_dir" && as_dir=.
28092     for ac_exec_ext in '' $ac_executable_extensions; do
28093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28094     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
28095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28096     break 2
28097   fi
28098 done
28099   done
28100 IFS=$as_save_IFS
28101 
28102 fi
28103 fi
28104 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
28105 if test -n "$ac_ct_OBJCOPY"; then
28106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
28107 $as_echo "$ac_ct_OBJCOPY" >&6; }
28108 else
28109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28110 $as_echo "no" >&6; }
28111 fi
28112 
28113 
28114   test -n "$ac_ct_OBJCOPY" && break
28115 done
28116 
28117   if test "x$ac_ct_OBJCOPY" = x; then
28118     OBJCOPY=""
28119   else
28120     case $cross_compiling:$ac_tool_warned in
28121 yes:)
28122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28123 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28124 ac_tool_warned=yes ;;
28125 esac
28126     OBJCOPY=$ac_ct_OBJCOPY
28127   fi
28128 fi
28129 
28130     # Only call fixup if objcopy was found.
28131     if test -n "$OBJCOPY"; then
28132 
28133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28134 
28135   # First separate the path from the arguments. This will split at the first
28136   # space.
28137   complete="$OBJCOPY"
28138   path="${complete%% *}"
28139   tmp="$complete EOL"
28140   arguments="${tmp#* }"
28141 
28142   # Input might be given as Windows format, start by converting to
28143   # unix format.
28144   new_path=`$CYGPATH -u "$path"`
28145 
28146   # Now try to locate executable using which
28147   new_path=`$WHICH "$new_path" 2> /dev/null`
28148   # bat and cmd files are not always considered executable in cygwin causing which
28149   # to not find them
28150   if test "x$new_path" = x \
28151       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28152       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28153     new_path=`$CYGPATH -u "$path"`
28154   fi
28155   if test "x$new_path" = x; then
28156     # Oops. Which didn't find the executable.
28157     # The splitting of arguments from the executable at a space might have been incorrect,
28158     # since paths with space are more likely in Windows. Give it another try with the whole
28159     # argument.
28160     path="$complete"
28161     arguments="EOL"
28162     new_path=`$CYGPATH -u "$path"`
28163     new_path=`$WHICH "$new_path" 2> /dev/null`
28164     # bat and cmd files are not always considered executable in cygwin causing which
28165     # to not find them
28166     if test "x$new_path" = x \
28167         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28168         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28169       new_path=`$CYGPATH -u "$path"`
28170     fi
28171     if test "x$new_path" = x; then
28172       # It's still not found. Now this is an unrecoverable error.
28173       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28174 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28175       has_space=`$ECHO "$complete" | $GREP " "`
28176       if test "x$has_space" != x; then
28177         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28178 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28179       fi
28180       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28181     fi
28182   fi
28183 
28184   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28185   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28186   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28187   # "foo.exe" is OK but "foo" is an error.
28188   #
28189   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28190   # It is also a way to make sure we got the proper file name for the real test later on.
28191   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28192   if test "x$test_shortpath" = x; then
28193     # Short path failed, file does not exist as specified.
28194     # Try adding .exe or .cmd
28195     if test -f "${new_path}.exe"; then
28196       input_to_shortpath="${new_path}.exe"
28197     elif test -f "${new_path}.cmd"; then
28198       input_to_shortpath="${new_path}.cmd"
28199     else
28200       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
28201 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
28202       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28203 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28204       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28205     fi
28206   else
28207     input_to_shortpath="$new_path"
28208   fi
28209 
28210   # Call helper function which possibly converts this using DOS-style short mode.
28211   # If so, the updated path is stored in $new_path.
28212   new_path="$input_to_shortpath"
28213 
28214   input_path="$input_to_shortpath"
28215   # Check if we need to convert this using DOS-style short mode. If the path
28216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28217   # take no chances and rewrite it.
28218   # Note: m4 eats our [], so we need to use [ and ] instead.
28219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28220   if test "x$has_forbidden_chars" != x; then
28221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28222     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28223     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28224     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28225       # Going to short mode and back again did indeed matter. Since short mode is
28226       # case insensitive, let's make it lowercase to improve readability.
28227       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28228       # Now convert it back to Unix-stile (cygpath)
28229       input_path=`$CYGPATH -u "$shortmode_path"`
28230       new_path="$input_path"
28231     fi
28232   fi
28233 
28234   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28235   if test "x$test_cygdrive_prefix" = x; then
28236     # As a simple fix, exclude /usr/bin since it's not a real path.
28237     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28238       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28239       # a path prefixed by /cygdrive for fixpath to work.
28240       new_path="$CYGWIN_ROOT_PATH$input_path"
28241     fi
28242   fi
28243 
28244   # remove trailing .exe if any
28245   new_path="${new_path/%.exe/}"
28246 
28247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28248 
28249   # First separate the path from the arguments. This will split at the first
28250   # space.
28251   complete="$OBJCOPY"
28252   path="${complete%% *}"
28253   tmp="$complete EOL"
28254   arguments="${tmp#* }"
28255 
28256   # Input might be given as Windows format, start by converting to
28257   # unix format.
28258   new_path="$path"
28259 
28260   windows_path="$new_path"
28261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28262     unix_path=`$CYGPATH -u "$windows_path"`
28263     new_path="$unix_path"
28264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28266     new_path="$unix_path"
28267   fi
28268 
28269 
28270   # Now try to locate executable using which
28271   new_path=`$WHICH "$new_path" 2> /dev/null`
28272 
28273   if test "x$new_path" = x; then
28274     # Oops. Which didn't find the executable.
28275     # The splitting of arguments from the executable at a space might have been incorrect,
28276     # since paths with space are more likely in Windows. Give it another try with the whole
28277     # argument.
28278     path="$complete"
28279     arguments="EOL"
28280     new_path="$path"
28281 
28282   windows_path="$new_path"
28283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28284     unix_path=`$CYGPATH -u "$windows_path"`
28285     new_path="$unix_path"
28286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28288     new_path="$unix_path"
28289   fi
28290 
28291 
28292     new_path=`$WHICH "$new_path" 2> /dev/null`
28293 
28294     if test "x$new_path" = x; then
28295       # It's still not found. Now this is an unrecoverable error.
28296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28297 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28298       has_space=`$ECHO "$complete" | $GREP " "`
28299       if test "x$has_space" != x; then
28300         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28301 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28302       fi
28303       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28304     fi
28305   fi
28306 
28307   # Now new_path has a complete unix path to the binary
28308   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28309     # Keep paths in /bin as-is, but remove trailing .exe if any
28310     new_path="${new_path/%.exe/}"
28311     # Do not save /bin paths to all_fixpath_prefixes!
28312   else
28313     # Not in mixed or Windows style, start by that.
28314     new_path=`cmd //c echo $new_path`
28315 
28316   input_path="$new_path"
28317   # Check if we need to convert this using DOS-style short mode. If the path
28318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28319   # take no chances and rewrite it.
28320   # Note: m4 eats our [], so we need to use [ and ] instead.
28321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28322   if test "x$has_forbidden_chars" != x; then
28323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28324     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28325   fi
28326 
28327     # Output is in $new_path
28328 
28329   windows_path="$new_path"
28330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28331     unix_path=`$CYGPATH -u "$windows_path"`
28332     new_path="$unix_path"
28333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28335     new_path="$unix_path"
28336   fi
28337 
28338     # remove trailing .exe if any
28339     new_path="${new_path/%.exe/}"
28340 
28341     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28342     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28343   fi
28344 
28345   else
28346     # We're on a posix platform. Hooray! :)
28347     # First separate the path from the arguments. This will split at the first
28348     # space.
28349     complete="$OBJCOPY"
28350     path="${complete%% *}"
28351     tmp="$complete EOL"
28352     arguments="${tmp#* }"
28353 
28354     # Cannot rely on the command "which" here since it doesn't always work.
28355     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28356     if test -z "$is_absolute_path"; then
28357       # Path to executable is not absolute. Find it.
28358       IFS_save="$IFS"
28359       IFS=:
28360       for p in $PATH; do
28361         if test -f "$p/$path" && test -x "$p/$path"; then
28362           new_path="$p/$path"
28363           break
28364         fi
28365       done
28366       IFS="$IFS_save"
28367     else
28368       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28369 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28370       new_path="$path"
28371     fi
28372 
28373     if test "x$new_path" = x; then
28374       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28375 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28376       has_space=`$ECHO "$complete" | $GREP " "`
28377       if test "x$has_space" != x; then
28378         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28379 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28380       fi
28381       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28382     fi
28383   fi
28384 
28385   # Now join together the path and the arguments once again
28386   if test "x$arguments" != xEOL; then
28387     new_complete="$new_path ${arguments% *}"
28388   else
28389     new_complete="$new_path"
28390   fi
28391 
28392   if test "x$complete" != "x$new_complete"; then
28393     OBJCOPY="$new_complete"
28394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28395 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28396   fi
28397 
28398     fi
28399   fi
28400 
28401   if test -n "$ac_tool_prefix"; then
28402   for ac_prog in gobjdump objdump
28403   do
28404     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28405 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28407 $as_echo_n "checking for $ac_word... " >&6; }
28408 if ${ac_cv_prog_OBJDUMP+:} false; then :
28409   $as_echo_n "(cached) " >&6
28410 else
28411   if test -n "$OBJDUMP"; then
28412   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28413 else
28414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28415 for as_dir in $PATH
28416 do
28417   IFS=$as_save_IFS
28418   test -z "$as_dir" && as_dir=.
28419     for ac_exec_ext in '' $ac_executable_extensions; do
28420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28421     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28423     break 2
28424   fi
28425 done
28426   done
28427 IFS=$as_save_IFS
28428 
28429 fi
28430 fi
28431 OBJDUMP=$ac_cv_prog_OBJDUMP
28432 if test -n "$OBJDUMP"; then
28433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28434 $as_echo "$OBJDUMP" >&6; }
28435 else
28436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28437 $as_echo "no" >&6; }
28438 fi
28439 
28440 
28441     test -n "$OBJDUMP" && break
28442   done
28443 fi
28444 if test -z "$OBJDUMP"; then
28445   ac_ct_OBJDUMP=$OBJDUMP
28446   for ac_prog in gobjdump objdump
28447 do
28448   # Extract the first word of "$ac_prog", so it can be a program name with args.
28449 set dummy $ac_prog; ac_word=$2
28450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28451 $as_echo_n "checking for $ac_word... " >&6; }
28452 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28453   $as_echo_n "(cached) " >&6
28454 else
28455   if test -n "$ac_ct_OBJDUMP"; then
28456   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28457 else
28458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28459 for as_dir in $PATH
28460 do
28461   IFS=$as_save_IFS
28462   test -z "$as_dir" && as_dir=.
28463     for ac_exec_ext in '' $ac_executable_extensions; do
28464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28465     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28467     break 2
28468   fi
28469 done
28470   done
28471 IFS=$as_save_IFS
28472 
28473 fi
28474 fi
28475 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28476 if test -n "$ac_ct_OBJDUMP"; then
28477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28478 $as_echo "$ac_ct_OBJDUMP" >&6; }
28479 else
28480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28481 $as_echo "no" >&6; }
28482 fi
28483 
28484 
28485   test -n "$ac_ct_OBJDUMP" && break
28486 done
28487 
28488   if test "x$ac_ct_OBJDUMP" = x; then
28489     OBJDUMP=""
28490   else
28491     case $cross_compiling:$ac_tool_warned in
28492 yes:)
28493 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28494 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28495 ac_tool_warned=yes ;;
28496 esac
28497     OBJDUMP=$ac_ct_OBJDUMP
28498   fi
28499 fi
28500 
28501   if test "x$OBJDUMP" != x; then
28502     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28503 
28504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28505 
28506   # First separate the path from the arguments. This will split at the first
28507   # space.
28508   complete="$OBJDUMP"
28509   path="${complete%% *}"
28510   tmp="$complete EOL"
28511   arguments="${tmp#* }"
28512 
28513   # Input might be given as Windows format, start by converting to
28514   # unix format.
28515   new_path=`$CYGPATH -u "$path"`
28516 
28517   # Now try to locate executable using which
28518   new_path=`$WHICH "$new_path" 2> /dev/null`
28519   # bat and cmd files are not always considered executable in cygwin causing which
28520   # to not find them
28521   if test "x$new_path" = x \
28522       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28523       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28524     new_path=`$CYGPATH -u "$path"`
28525   fi
28526   if test "x$new_path" = x; then
28527     # Oops. Which didn't find the executable.
28528     # The splitting of arguments from the executable at a space might have been incorrect,
28529     # since paths with space are more likely in Windows. Give it another try with the whole
28530     # argument.
28531     path="$complete"
28532     arguments="EOL"
28533     new_path=`$CYGPATH -u "$path"`
28534     new_path=`$WHICH "$new_path" 2> /dev/null`
28535     # bat and cmd files are not always considered executable in cygwin causing which
28536     # to not find them
28537     if test "x$new_path" = x \
28538         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28539         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28540       new_path=`$CYGPATH -u "$path"`
28541     fi
28542     if test "x$new_path" = x; then
28543       # It's still not found. Now this is an unrecoverable error.
28544       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28545 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28546       has_space=`$ECHO "$complete" | $GREP " "`
28547       if test "x$has_space" != x; then
28548         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28549 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28550       fi
28551       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28552     fi
28553   fi
28554 
28555   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28556   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28557   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28558   # "foo.exe" is OK but "foo" is an error.
28559   #
28560   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28561   # It is also a way to make sure we got the proper file name for the real test later on.
28562   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28563   if test "x$test_shortpath" = x; then
28564     # Short path failed, file does not exist as specified.
28565     # Try adding .exe or .cmd
28566     if test -f "${new_path}.exe"; then
28567       input_to_shortpath="${new_path}.exe"
28568     elif test -f "${new_path}.cmd"; then
28569       input_to_shortpath="${new_path}.cmd"
28570     else
28571       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28572 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28573       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28574 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28575       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28576     fi
28577   else
28578     input_to_shortpath="$new_path"
28579   fi
28580 
28581   # Call helper function which possibly converts this using DOS-style short mode.
28582   # If so, the updated path is stored in $new_path.
28583   new_path="$input_to_shortpath"
28584 
28585   input_path="$input_to_shortpath"
28586   # Check if we need to convert this using DOS-style short mode. If the path
28587   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28588   # take no chances and rewrite it.
28589   # Note: m4 eats our [], so we need to use [ and ] instead.
28590   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28591   if test "x$has_forbidden_chars" != x; then
28592     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28593     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28594     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28595     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28596       # Going to short mode and back again did indeed matter. Since short mode is
28597       # case insensitive, let's make it lowercase to improve readability.
28598       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28599       # Now convert it back to Unix-stile (cygpath)
28600       input_path=`$CYGPATH -u "$shortmode_path"`
28601       new_path="$input_path"
28602     fi
28603   fi
28604 
28605   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28606   if test "x$test_cygdrive_prefix" = x; then
28607     # As a simple fix, exclude /usr/bin since it's not a real path.
28608     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28609       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28610       # a path prefixed by /cygdrive for fixpath to work.
28611       new_path="$CYGWIN_ROOT_PATH$input_path"
28612     fi
28613   fi
28614 
28615   # remove trailing .exe if any
28616   new_path="${new_path/%.exe/}"
28617 
28618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28619 
28620   # First separate the path from the arguments. This will split at the first
28621   # space.
28622   complete="$OBJDUMP"
28623   path="${complete%% *}"
28624   tmp="$complete EOL"
28625   arguments="${tmp#* }"
28626 
28627   # Input might be given as Windows format, start by converting to
28628   # unix format.
28629   new_path="$path"
28630 
28631   windows_path="$new_path"
28632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28633     unix_path=`$CYGPATH -u "$windows_path"`
28634     new_path="$unix_path"
28635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28637     new_path="$unix_path"
28638   fi
28639 
28640 
28641   # Now try to locate executable using which
28642   new_path=`$WHICH "$new_path" 2> /dev/null`
28643 
28644   if test "x$new_path" = x; then
28645     # Oops. Which didn't find the executable.
28646     # The splitting of arguments from the executable at a space might have been incorrect,
28647     # since paths with space are more likely in Windows. Give it another try with the whole
28648     # argument.
28649     path="$complete"
28650     arguments="EOL"
28651     new_path="$path"
28652 
28653   windows_path="$new_path"
28654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28655     unix_path=`$CYGPATH -u "$windows_path"`
28656     new_path="$unix_path"
28657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28658     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28659     new_path="$unix_path"
28660   fi
28661 
28662 
28663     new_path=`$WHICH "$new_path" 2> /dev/null`
28664 
28665     if test "x$new_path" = x; then
28666       # It's still not found. Now this is an unrecoverable error.
28667       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28668 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28669       has_space=`$ECHO "$complete" | $GREP " "`
28670       if test "x$has_space" != x; then
28671         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28672 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28673       fi
28674       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28675     fi
28676   fi
28677 
28678   # Now new_path has a complete unix path to the binary
28679   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28680     # Keep paths in /bin as-is, but remove trailing .exe if any
28681     new_path="${new_path/%.exe/}"
28682     # Do not save /bin paths to all_fixpath_prefixes!
28683   else
28684     # Not in mixed or Windows style, start by that.
28685     new_path=`cmd //c echo $new_path`
28686 
28687   input_path="$new_path"
28688   # Check if we need to convert this using DOS-style short mode. If the path
28689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28690   # take no chances and rewrite it.
28691   # Note: m4 eats our [], so we need to use [ and ] instead.
28692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28693   if test "x$has_forbidden_chars" != x; then
28694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28695     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28696   fi
28697 
28698     # Output is in $new_path
28699 
28700   windows_path="$new_path"
28701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28702     unix_path=`$CYGPATH -u "$windows_path"`
28703     new_path="$unix_path"
28704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28706     new_path="$unix_path"
28707   fi
28708 
28709     # remove trailing .exe if any
28710     new_path="${new_path/%.exe/}"
28711 
28712     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28713     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28714   fi
28715 
28716   else
28717     # We're on a posix platform. Hooray! :)
28718     # First separate the path from the arguments. This will split at the first
28719     # space.
28720     complete="$OBJDUMP"
28721     path="${complete%% *}"
28722     tmp="$complete EOL"
28723     arguments="${tmp#* }"
28724 
28725     # Cannot rely on the command "which" here since it doesn't always work.
28726     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28727     if test -z "$is_absolute_path"; then
28728       # Path to executable is not absolute. Find it.
28729       IFS_save="$IFS"
28730       IFS=:
28731       for p in $PATH; do
28732         if test -f "$p/$path" && test -x "$p/$path"; then
28733           new_path="$p/$path"
28734           break
28735         fi
28736       done
28737       IFS="$IFS_save"
28738     else
28739       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28740 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28741       new_path="$path"
28742     fi
28743 
28744     if test "x$new_path" = x; then
28745       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28746 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28747       has_space=`$ECHO "$complete" | $GREP " "`
28748       if test "x$has_space" != x; then
28749         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28750 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28751       fi
28752       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28753     fi
28754   fi
28755 
28756   # Now join together the path and the arguments once again
28757   if test "x$arguments" != xEOL; then
28758     new_complete="$new_path ${arguments% *}"
28759   else
28760     new_complete="$new_path"
28761   fi
28762 
28763   if test "x$complete" != "x$new_complete"; then
28764     OBJDUMP="$new_complete"
28765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28766 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28767   fi
28768 
28769   fi
28770 
28771 
28772 
28773   # Restore old path without tools dir
28774   PATH="$OLD_PATH"
28775 
28776 
28777 # FIXME: Currently we must test this after paths but before flags. Fix!
28778 
28779 # And we can test some aspects on the target using configure macros.
28780 
28781 
28782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28783 $as_echo_n "checking for ANSI C header files... " >&6; }
28784 if ${ac_cv_header_stdc+:} false; then :
28785   $as_echo_n "(cached) " >&6
28786 else
28787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28788 /* end confdefs.h.  */
28789 #include <stdlib.h>
28790 #include <stdarg.h>
28791 #include <string.h>
28792 #include <float.h>
28793 
28794 int
28795 main ()
28796 {
28797 
28798   ;
28799   return 0;
28800 }
28801 _ACEOF
28802 if ac_fn_cxx_try_compile "$LINENO"; then :
28803   ac_cv_header_stdc=yes
28804 else
28805   ac_cv_header_stdc=no
28806 fi
28807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28808 
28809 if test $ac_cv_header_stdc = yes; then
28810   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28812 /* end confdefs.h.  */
28813 #include <string.h>
28814 
28815 _ACEOF
28816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28817   $EGREP "memchr" >/dev/null 2>&1; then :
28818 
28819 else
28820   ac_cv_header_stdc=no
28821 fi
28822 rm -f conftest*
28823 
28824 fi
28825 
28826 if test $ac_cv_header_stdc = yes; then
28827   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28829 /* end confdefs.h.  */
28830 #include <stdlib.h>
28831 
28832 _ACEOF
28833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28834   $EGREP "free" >/dev/null 2>&1; then :
28835 
28836 else
28837   ac_cv_header_stdc=no
28838 fi
28839 rm -f conftest*
28840 
28841 fi
28842 
28843 if test $ac_cv_header_stdc = yes; then
28844   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28845   if test "$cross_compiling" = yes; then :
28846   :
28847 else
28848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28849 /* end confdefs.h.  */
28850 #include <ctype.h>
28851 #include <stdlib.h>
28852 #if ((' ' & 0x0FF) == 0x020)
28853 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28854 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28855 #else
28856 # define ISLOWER(c) \
28857                    (('a' <= (c) && (c) <= 'i') \
28858                      || ('j' <= (c) && (c) <= 'r') \
28859                      || ('s' <= (c) && (c) <= 'z'))
28860 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28861 #endif
28862 
28863 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28864 int
28865 main ()
28866 {
28867   int i;
28868   for (i = 0; i < 256; i++)
28869     if (XOR (islower (i), ISLOWER (i))
28870         || toupper (i) != TOUPPER (i))
28871       return 2;
28872   return 0;
28873 }
28874 _ACEOF
28875 if ac_fn_cxx_try_run "$LINENO"; then :
28876 
28877 else
28878   ac_cv_header_stdc=no
28879 fi
28880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28881   conftest.$ac_objext conftest.beam conftest.$ac_ext
28882 fi
28883 
28884 fi
28885 fi
28886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28887 $as_echo "$ac_cv_header_stdc" >&6; }
28888 if test $ac_cv_header_stdc = yes; then
28889 
28890 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28891 
28892 fi
28893 
28894 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28895 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28896                   inttypes.h stdint.h unistd.h
28897 do :
28898   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28899 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28900 "
28901 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28902   cat >>confdefs.h <<_ACEOF
28903 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28904 _ACEOF
28905 
28906 fi
28907 
28908 done
28909 
28910 
28911 
28912   ###############################################################################
28913   #
28914   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28915   # (The JVM can use 32 or 64 bit Java pointers but that decision
28916   # is made at runtime.)
28917   #
28918 
28919   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28920     # Always specify -m flag on Solaris
28921     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28922 
28923   # When we add flags to the "official" CFLAGS etc, we need to
28924   # keep track of these additions in ADDED_CFLAGS etc. These
28925   # will later be checked to make sure only controlled additions
28926   # have been made to CFLAGS etc.
28927   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28928   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28929   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28930 
28931   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28932   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28933   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28934 
28935   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28936   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28937   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28938 
28939   elif test "x$COMPILE_TYPE" = xreduced; then
28940     if test "x$OPENJDK_TARGET_OS" != xwindows; then
28941       # Specify -m if running reduced on other Posix platforms
28942 
28943   # When we add flags to the "official" CFLAGS etc, we need to
28944   # keep track of these additions in ADDED_CFLAGS etc. These
28945   # will later be checked to make sure only controlled additions
28946   # have been made to CFLAGS etc.
28947   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28948   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28949   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28950 
28951   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28952   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28953   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28954 
28955   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28956   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28957   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28958 
28959     fi
28960   fi
28961 
28962   # Make compilation sanity check
28963   for ac_header in stdio.h
28964 do :
28965   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28966 if test "x$ac_cv_header_stdio_h" = xyes; then :
28967   cat >>confdefs.h <<_ACEOF
28968 #define HAVE_STDIO_H 1
28969 _ACEOF
28970 
28971 else
28972 
28973     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28974 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28975     if test "x$COMPILE_TYPE" = xreduced; then
28976       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28977 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28978     elif test "x$COMPILE_TYPE" = xcross; then
28979       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28980 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28981     fi
28982     as_fn_error $? "Cannot continue." "$LINENO" 5
28983 
28984 fi
28985 
28986 done
28987 
28988 
28989   # The cast to long int works around a bug in the HP C Compiler
28990 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28991 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28992 # This bug is HP SR number 8606223364.
28993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28994 $as_echo_n "checking size of int *... " >&6; }
28995 if ${ac_cv_sizeof_int_p+:} false; then :
28996   $as_echo_n "(cached) " >&6
28997 else
28998   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28999 
29000 else
29001   if test "$ac_cv_type_int_p" = yes; then
29002      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29003 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29004 as_fn_error 77 "cannot compute sizeof (int *)
29005 See \`config.log' for more details" "$LINENO" 5; }
29006    else
29007      ac_cv_sizeof_int_p=0
29008    fi
29009 fi
29010 
29011 fi
29012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29013 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29014 
29015 
29016 
29017 cat >>confdefs.h <<_ACEOF
29018 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29019 _ACEOF
29020 
29021 
29022 
29023   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
29024   if test "x$ac_cv_sizeof_int_p" = x; then
29025     # The test failed, lets stick to the assumed value.
29026     { $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
29027 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29028   else
29029     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29030 
29031     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29032       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
29033       # Let's try to implicitely set the compilers target architecture and retry the test
29034       { $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
29035 $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;}
29036       { $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
29037 $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;}
29038 
29039   # When we add flags to the "official" CFLAGS etc, we need to
29040   # keep track of these additions in ADDED_CFLAGS etc. These
29041   # will later be checked to make sure only controlled additions
29042   # have been made to CFLAGS etc.
29043   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29044   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29045   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29046 
29047   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29048   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29049   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29050 
29051   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29052   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29053   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29054 
29055 
29056       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
29057       unset ac_cv_sizeof_int_p
29058       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
29059       cat >>confdefs.h <<_ACEOF
29060 #undef SIZEOF_INT_P
29061 _ACEOF
29062 
29063       # The cast to long int works around a bug in the HP C Compiler
29064 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29065 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29066 # This bug is HP SR number 8606223364.
29067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29068 $as_echo_n "checking size of int *... " >&6; }
29069 if ${ac_cv_sizeof_int_p+:} false; then :
29070   $as_echo_n "(cached) " >&6
29071 else
29072   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29073 
29074 else
29075   if test "$ac_cv_type_int_p" = yes; then
29076      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29077 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29078 as_fn_error 77 "cannot compute sizeof (int *)
29079 See \`config.log' for more details" "$LINENO" 5; }
29080    else
29081      ac_cv_sizeof_int_p=0
29082    fi
29083 fi
29084 
29085 fi
29086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29087 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29088 
29089 
29090 
29091 cat >>confdefs.h <<_ACEOF
29092 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29093 _ACEOF
29094 
29095 
29096 
29097       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29098 
29099       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29100         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
29101       fi
29102     fi
29103   fi
29104 
29105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29106 $as_echo_n "checking for target address size... " >&6; }
29107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29108 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29109 
29110 
29111   ###############################################################################
29112   #
29113   # Is the target little of big endian?
29114   #
29115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29116 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29117 if ${ac_cv_c_bigendian+:} false; then :
29118   $as_echo_n "(cached) " >&6
29119 else
29120   ac_cv_c_bigendian=unknown
29121     # See if we're dealing with a universal compiler.
29122     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29123 /* end confdefs.h.  */
29124 #ifndef __APPLE_CC__
29125                not a universal capable compiler
29126              #endif
29127              typedef int dummy;
29128 
29129 _ACEOF
29130 if ac_fn_cxx_try_compile "$LINENO"; then :
29131 
29132         # Check for potential -arch flags.  It is not universal unless
29133         # there are at least two -arch flags with different values.
29134         ac_arch=
29135         ac_prev=
29136         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29137          if test -n "$ac_prev"; then
29138            case $ac_word in
29139              i?86 | x86_64 | ppc | ppc64)
29140                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29141                  ac_arch=$ac_word
29142                else
29143                  ac_cv_c_bigendian=universal
29144                  break
29145                fi
29146                ;;
29147            esac
29148            ac_prev=
29149          elif test "x$ac_word" = "x-arch"; then
29150            ac_prev=arch
29151          fi
29152        done
29153 fi
29154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29155     if test $ac_cv_c_bigendian = unknown; then
29156       # See if sys/param.h defines the BYTE_ORDER macro.
29157       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29158 /* end confdefs.h.  */
29159 #include <sys/types.h>
29160              #include <sys/param.h>
29161 
29162 int
29163 main ()
29164 {
29165 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29166                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29167                      && LITTLE_ENDIAN)
29168               bogus endian macros
29169              #endif
29170 
29171   ;
29172   return 0;
29173 }
29174 _ACEOF
29175 if ac_fn_cxx_try_compile "$LINENO"; then :
29176   # It does; now see whether it defined to BIG_ENDIAN or not.
29177          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29178 /* end confdefs.h.  */
29179 #include <sys/types.h>
29180                 #include <sys/param.h>
29181 
29182 int
29183 main ()
29184 {
29185 #if BYTE_ORDER != BIG_ENDIAN
29186                  not big endian
29187                 #endif
29188 
29189   ;
29190   return 0;
29191 }
29192 _ACEOF
29193 if ac_fn_cxx_try_compile "$LINENO"; then :
29194   ac_cv_c_bigendian=yes
29195 else
29196   ac_cv_c_bigendian=no
29197 fi
29198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29199 fi
29200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29201     fi
29202     if test $ac_cv_c_bigendian = unknown; then
29203       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29204       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29205 /* end confdefs.h.  */
29206 #include <limits.h>
29207 
29208 int
29209 main ()
29210 {
29211 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29212               bogus endian macros
29213              #endif
29214 
29215   ;
29216   return 0;
29217 }
29218 _ACEOF
29219 if ac_fn_cxx_try_compile "$LINENO"; then :
29220   # It does; now see whether it defined to _BIG_ENDIAN or not.
29221          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29222 /* end confdefs.h.  */
29223 #include <limits.h>
29224 
29225 int
29226 main ()
29227 {
29228 #ifndef _BIG_ENDIAN
29229                  not big endian
29230                 #endif
29231 
29232   ;
29233   return 0;
29234 }
29235 _ACEOF
29236 if ac_fn_cxx_try_compile "$LINENO"; then :
29237   ac_cv_c_bigendian=yes
29238 else
29239   ac_cv_c_bigendian=no
29240 fi
29241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29242 fi
29243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29244     fi
29245     if test $ac_cv_c_bigendian = unknown; then
29246       # Compile a test program.
29247       if test "$cross_compiling" = yes; then :
29248   # Try to guess by grepping values from an object file.
29249          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29250 /* end confdefs.h.  */
29251 short int ascii_mm[] =
29252                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29253                 short int ascii_ii[] =
29254                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29255                 int use_ascii (int i) {
29256                   return ascii_mm[i] + ascii_ii[i];
29257                 }
29258                 short int ebcdic_ii[] =
29259                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29260                 short int ebcdic_mm[] =
29261                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29262                 int use_ebcdic (int i) {
29263                   return ebcdic_mm[i] + ebcdic_ii[i];
29264                 }
29265                 extern int foo;
29266 
29267 int
29268 main ()
29269 {
29270 return use_ascii (foo) == use_ebcdic (foo);
29271   ;
29272   return 0;
29273 }
29274 _ACEOF
29275 if ac_fn_cxx_try_compile "$LINENO"; then :
29276   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29277               ac_cv_c_bigendian=yes
29278             fi
29279             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29280               if test "$ac_cv_c_bigendian" = unknown; then
29281                 ac_cv_c_bigendian=no
29282               else
29283                 # finding both strings is unlikely to happen, but who knows?
29284                 ac_cv_c_bigendian=unknown
29285               fi
29286             fi
29287 fi
29288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29289 else
29290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29291 /* end confdefs.h.  */
29292 $ac_includes_default
29293 int
29294 main ()
29295 {
29296 
29297              /* Are we little or big endian?  From Harbison&Steele.  */
29298              union
29299              {
29300                long int l;
29301                char c[sizeof (long int)];
29302              } u;
29303              u.l = 1;
29304              return u.c[sizeof (long int) - 1] == 1;
29305 
29306   ;
29307   return 0;
29308 }
29309 _ACEOF
29310 if ac_fn_cxx_try_run "$LINENO"; then :
29311   ac_cv_c_bigendian=no
29312 else
29313   ac_cv_c_bigendian=yes
29314 fi
29315 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29316   conftest.$ac_objext conftest.beam conftest.$ac_ext
29317 fi
29318 
29319     fi
29320 fi
29321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29322 $as_echo "$ac_cv_c_bigendian" >&6; }
29323  case $ac_cv_c_bigendian in #(
29324    yes)
29325      ENDIAN="big";; #(
29326    no)
29327      ENDIAN="little" ;; #(
29328    universal)
29329      ENDIAN="universal_endianness"
29330      ;; #(
29331    *)
29332      ENDIAN="unknown" ;;
29333  esac
29334 
29335 
29336   if test "x$ENDIAN" = xuniversal_endianness; then
29337     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29338   fi
29339   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29340     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
29341   fi
29342 
29343 
29344 # Configure flags for the tools
29345 
29346 
29347   ###############################################################################
29348   #
29349   # How to compile shared libraries.
29350   #
29351 
29352   if test "x$GCC" = xyes; then
29353     COMPILER_NAME=gcc
29354     PICFLAG="-fPIC"
29355     LIBRARY_PREFIX=lib
29356     SHARED_LIBRARY='lib$1.so'
29357     STATIC_LIBRARY='lib$1.a'
29358     SHARED_LIBRARY_FLAGS="-shared"
29359     SHARED_LIBRARY_SUFFIX='.so'
29360     STATIC_LIBRARY_SUFFIX='.a'
29361     OBJ_SUFFIX='.o'
29362     EXE_SUFFIX=''
29363     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29364     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29365     C_FLAG_REORDER=''
29366     CXX_FLAG_REORDER=''
29367     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29368     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29369     LD="$CC"
29370     LDEXE="$CC"
29371     LDCXX="$CXX"
29372     LDEXECXX="$CXX"
29373     POST_STRIP_CMD="$STRIP -g"
29374 
29375     # Linking is different on MacOSX
29376     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29377       # Might change in the future to clang.
29378       COMPILER_NAME=gcc
29379       SHARED_LIBRARY='lib$1.dylib'
29380       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29381       SHARED_LIBRARY_SUFFIX='.dylib'
29382       EXE_SUFFIX=''
29383       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29384       SET_SHARED_LIBRARY_MAPFILE=''
29385       SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29386       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29387       POST_STRIP_CMD="$STRIP -S"
29388     fi
29389   else
29390     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29391       # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29392       COMPILER_NAME=ossc
29393       PICFLAG="-KPIC"
29394       LIBRARY_PREFIX=lib
29395       SHARED_LIBRARY='lib$1.so'
29396       STATIC_LIBRARY='lib$1.a'
29397       SHARED_LIBRARY_FLAGS="-G"
29398       SHARED_LIBRARY_SUFFIX='.so'
29399       STATIC_LIBRARY_SUFFIX='.a'
29400       OBJ_SUFFIX='.o'
29401       EXE_SUFFIX=''
29402       SET_SHARED_LIBRARY_NAME=''
29403       SET_SHARED_LIBRARY_MAPFILE='-M$1'
29404       C_FLAG_REORDER='-xF'
29405       CXX_FLAG_REORDER='-xF'
29406       SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29407       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29408       CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29409       CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29410       CFLAGS_JDKLIB_EXTRA='-xstrconst'
29411       POST_STRIP_CMD="$STRIP -x"
29412       POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29413     fi
29414     if test "x$OPENJDK_TARGET_OS" = xaix; then
29415         COMPILER_NAME=xlc
29416         PICFLAG="-qpic=large"
29417         LIBRARY_PREFIX=lib
29418         SHARED_LIBRARY='lib$1.so'
29419         STATIC_LIBRARY='lib$1.a'
29420         SHARED_LIBRARY_FLAGS="-qmkshrobj"
29421         SHARED_LIBRARY_SUFFIX='.so'
29422         STATIC_LIBRARY_SUFFIX='.a'
29423         OBJ_SUFFIX='.o'
29424         EXE_SUFFIX=''
29425         SET_SHARED_LIBRARY_NAME=''
29426         SET_SHARED_LIBRARY_MAPFILE=''
29427         C_FLAG_REORDER=''
29428         CXX_FLAG_REORDER=''
29429         SET_SHARED_LIBRARY_ORIGIN=''
29430         SET_EXECUTABLE_ORIGIN=""
29431         CFLAGS_JDK=""
29432         CXXFLAGS_JDK=""
29433         CFLAGS_JDKLIB_EXTRA=''
29434         POST_STRIP_CMD="$STRIP -X32_64"
29435         POST_MCS_CMD=""
29436     fi
29437     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29438       # If it is not gcc, then assume it is the MS Visual Studio compiler
29439       COMPILER_NAME=cl
29440       PICFLAG=""
29441       LIBRARY_PREFIX=
29442       SHARED_LIBRARY='$1.dll'
29443       STATIC_LIBRARY='$1.lib'
29444       SHARED_LIBRARY_FLAGS="-LD"
29445       SHARED_LIBRARY_SUFFIX='.dll'
29446       STATIC_LIBRARY_SUFFIX='.lib'
29447       OBJ_SUFFIX='.obj'
29448       EXE_SUFFIX='.exe'
29449       SET_SHARED_LIBRARY_NAME=''
29450       SET_SHARED_LIBRARY_MAPFILE=''
29451       SET_SHARED_LIBRARY_ORIGIN=''
29452       SET_EXECUTABLE_ORIGIN=''
29453     fi
29454   fi
29455 
29456 
29457 
29458 
29459 
29460 
29461 
29462 
29463 
29464 
29465 
29466 
29467 
29468 
29469 
29470 
29471 
29472 
29473 
29474   # The (cross) compiler is now configured, we can now test capabilities
29475   # of the target platform.
29476 
29477 
29478 
29479   ###############################################################################
29480   #
29481   # Setup the opt flags for different compilers
29482   # and different operating systems.
29483   #
29484 
29485   #
29486   # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29487   #
29488   if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29489     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29490     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29491     CFLAGS="$CFLAGS -mstackrealign"
29492     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29493 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29494     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29495 /* end confdefs.h.  */
29496 int main() { return 0; }
29497 _ACEOF
29498 if ac_fn_cxx_try_link "$LINENO"; then :
29499 
29500           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29501 $as_echo "yes" >&6; }
29502 
29503 else
29504 
29505           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29506 $as_echo "no" >&6; }
29507           as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29508 
29509 
29510 fi
29511 rm -f core conftest.err conftest.$ac_objext \
29512     conftest$ac_exeext conftest.$ac_ext
29513   fi
29514 
29515   C_FLAG_DEPS="-MMD -MF"
29516   CXX_FLAG_DEPS="-MMD -MF"
29517 
29518   case $COMPILER_TYPE in
29519     CC )
29520       case $COMPILER_NAME in
29521         gcc )
29522           case $OPENJDK_TARGET_OS in
29523             macosx )
29524               # On MacOSX we optimize for size, something
29525               # we should do for all platforms?
29526               C_O_FLAG_HI="-Os"
29527               C_O_FLAG_NORM="-Os"
29528               C_O_FLAG_NONE=""
29529               ;;
29530             *)
29531               C_O_FLAG_HI="-O3"
29532               C_O_FLAG_NORM="-O2"
29533               C_O_FLAG_NONE="-O0"
29534               ;;
29535           esac
29536           CXX_O_FLAG_HI="$C_O_FLAG_HI"
29537           CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29538           CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29539           CFLAGS_DEBUG_SYMBOLS="-g"
29540           CXXFLAGS_DEBUG_SYMBOLS="-g"
29541           if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29542             CFLAGS_DEBUG_SYMBOLS="-g1"
29543             CXXFLAGS_DEBUG_SYMBOLS="-g1"
29544           fi
29545           ;;
29546         ossc )
29547           #
29548           # Forte has different names for this with their C++ compiler...
29549           #
29550           C_FLAG_DEPS="-xMMD -xMF"
29551           CXX_FLAG_DEPS="-xMMD -xMF"
29552 
29553           # Extra options used with HIGHEST
29554           #
29555           # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29556           #          done with care, there are some assumptions below that need to
29557           #          be understood about the use of pointers, and IEEE behavior.
29558           #
29559           # Use non-standard floating point mode (not IEEE 754)
29560           CC_HIGHEST="$CC_HIGHEST -fns"
29561           # Do some simplification of floating point arithmetic (not IEEE 754)
29562           CC_HIGHEST="$CC_HIGHEST -fsimple"
29563           # Use single precision floating point with 'float'
29564           CC_HIGHEST="$CC_HIGHEST -fsingle"
29565           # Assume memory references via basic pointer types do not alias
29566           #   (Source with excessing pointer casting and data access with mixed
29567           #    pointer types are not recommended)
29568           CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29569           # Use intrinsic or inline versions for math/std functions
29570           #   (If you expect perfect errno behavior, do not use this)
29571           CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29572           # Loop data dependency optimizations (need -xO3 or higher)
29573           CC_HIGHEST="$CC_HIGHEST -xdepend"
29574           # Pointer parameters to functions do not overlap
29575           #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29576           #    If you pass in multiple pointers to the same data, do not use this)
29577           CC_HIGHEST="$CC_HIGHEST -xrestrict"
29578           # Inline some library routines
29579           #   (If you expect perfect errno behavior, do not use this)
29580           CC_HIGHEST="$CC_HIGHEST -xlibmil"
29581           # Use optimized math routines
29582           #   (If you expect perfect errno behavior, do not use this)
29583           #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29584           #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29585 
29586           if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29587             CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29588             CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29589           fi
29590 
29591           case $OPENJDK_TARGET_CPU_ARCH in
29592             x86)
29593               C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29594               C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29595               C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29596               C_O_FLAG_NONE="-xregs=no%frameptr"
29597               CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29598               CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29599               CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29600               CXX_O_FLAG_NONE="-xregs=no%frameptr"
29601               if test "x$OPENJDK_TARGET_CPU" = xx86; then
29602                 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29603                 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29604               fi
29605               ;;
29606             sparc)
29607               CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29608               CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29609               C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29610               C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29611               C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29612               C_O_FLAG_NONE=""
29613               CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29614               CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29615               CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29616               CXX_O_FLAG_NONE=""
29617               ;;
29618           esac
29619 
29620           CFLAGS_DEBUG_SYMBOLS="-g -xs"
29621           CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29622           ;;
29623         xlc )
29624           C_FLAG_DEPS="-qmakedep=gcc -MF"
29625           CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29626           C_O_FLAG_HIGHEST="-O3"
29627           C_O_FLAG_HI="-O3 -qstrict"
29628           C_O_FLAG_NORM="-O2"
29629           C_O_FLAG_NONE=""
29630           CXX_O_FLAG_HIGHEST="-O3"
29631           CXX_O_FLAG_HI="-O3 -qstrict"
29632           CXX_O_FLAG_NORM="-O2"
29633           CXX_O_FLAG_NONE=""
29634           CFLAGS_DEBUG_SYMBOLS="-g"
29635           CXXFLAGS_DEBUG_SYMBOLS="-g"
29636           LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29637           CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29638           CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29639           ;;
29640       esac
29641       ;;
29642     CL )
29643       C_O_FLAG_HIGHEST="-O2"
29644       C_O_FLAG_HI="-O1"
29645       C_O_FLAG_NORM="-O1"
29646       C_O_FLAG_NONE="-Od"
29647       CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29648       CXX_O_FLAG_HI="$C_O_FLAG_HI"
29649       CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29650       CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29651       ;;
29652   esac
29653 
29654   if test -z "$C_O_FLAG_HIGHEST"; then
29655     C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29656   fi
29657 
29658   if test -z "$CXX_O_FLAG_HIGHEST"; then
29659     CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29660   fi
29661 
29662 
29663 
29664 
29665 
29666 
29667 
29668 
29669 
29670 
29671 
29672 
29673 
29674 
29675   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29676     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29677 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29678   fi
29679 
29680   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29681     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29682 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29683   fi
29684 
29685   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29686     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29687 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29688   fi
29689 
29690 
29691 # Check whether --with-extra-cflags was given.
29692 if test "${with_extra_cflags+set}" = set; then :
29693   withval=$with_extra_cflags;
29694 fi
29695 
29696 
29697 
29698 # Check whether --with-extra-cxxflags was given.
29699 if test "${with_extra_cxxflags+set}" = set; then :
29700   withval=$with_extra_cxxflags;
29701 fi
29702 
29703 
29704 
29705 # Check whether --with-extra-ldflags was given.
29706 if test "${with_extra_ldflags+set}" = set; then :
29707   withval=$with_extra_ldflags;
29708 fi
29709 
29710 
29711   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29712   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29713   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29714 
29715   # Hotspot needs these set in their legacy form
29716   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29717   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29718   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29719 
29720 
29721 
29722 
29723 
29724   ###############################################################################
29725   #
29726   # Now setup the CFLAGS and LDFLAGS for the JDK build.
29727   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29728   #    CFLAGS_JDK    - C Compiler flags
29729   #    CXXFLAGS_JDK  - C++ Compiler flags
29730   #    COMMON_CCXXFLAGS_JDK - common to C and C++
29731   #
29732   case $COMPILER_NAME in
29733     gcc )
29734       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29735       -pipe \
29736       -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29737       CXXSTD_CXXFLAG="-std=gnu++98"
29738 
29739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS\"" >&5
29740 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS\"... " >&6; }
29741   supports=yes
29742 
29743   saved_cxxflags="$CXXFLAGS"
29744   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS"
29745   ac_ext=cpp
29746 ac_cpp='$CXXCPP $CPPFLAGS'
29747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29750 
29751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29752 /* end confdefs.h.  */
29753 int i;
29754 _ACEOF
29755 if ac_fn_cxx_try_compile "$LINENO"; then :
29756 
29757 else
29758   supports=no
29759 fi
29760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29761   ac_ext=cpp
29762 ac_cpp='$CXXCPP $CPPFLAGS'
29763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29766 
29767   CXXFLAGS="$saved_cxxflags"
29768 
29769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29770 $as_echo "$supports" >&6; }
29771   if test "x$supports" = "xyes" ; then
29772     :
29773   else
29774     CXXSTD_CXXFLAG=""
29775   fi
29776 
29777       CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
29778 
29779       case $OPENJDK_TARGET_CPU_ARCH in
29780         arm )
29781           # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29782           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29783           ;;
29784         ppc )
29785           # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29786           ;;
29787         * )
29788           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
29789           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29790           ;;
29791       esac
29792 
29793   REFERENCE_VERSION=6
29794 
29795   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
29796     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
29797   fi
29798 
29799   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
29800     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported" "$LINENO" 5
29801   fi
29802 
29803   # Version comparison method inspired by http://stackoverflow.com/a/24067243
29804   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
29805 
29806   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
29807 
29808   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
29809   # runs afoul of the more aggressive versions of these optimisations.
29810   # Notably, value range propagation now assumes that the this pointer of C++
29811   # member functions is non-null.
29812   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
29813 
29814 
29815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
29816 $as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
29817   supports=yes
29818 
29819   saved_cflags="$CFLAGS"
29820   CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
29821   ac_ext=c
29822 ac_cpp='$CPP $CPPFLAGS'
29823 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29824 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29826 
29827 
29828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29829 /* end confdefs.h.  */
29830 int i;
29831 _ACEOF
29832 if ac_fn_c_try_compile "$LINENO"; then :
29833 
29834 else
29835   supports=no
29836 fi
29837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29838   ac_ext=cpp
29839 ac_cpp='$CXXCPP $CPPFLAGS'
29840 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29841 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29842 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29843 
29844   CFLAGS="$saved_cflags"
29845 
29846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29847 $as_echo "$supports" >&6; }
29848   if test "x$supports" = "xyes" ; then
29849     C_COMP_SUPPORTS="yes"
29850   else
29851     C_COMP_SUPPORTS="no"
29852   fi
29853 
29854 
29855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
29856 $as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
29857   supports=yes
29858 
29859   saved_cxxflags="$CXXFLAGS"
29860   CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
29861   ac_ext=cpp
29862 ac_cpp='$CXXCPP $CPPFLAGS'
29863 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29864 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29865 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29866 
29867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29868 /* end confdefs.h.  */
29869 int i;
29870 _ACEOF
29871 if ac_fn_cxx_try_compile "$LINENO"; then :
29872 
29873 else
29874   supports=no
29875 fi
29876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29877   ac_ext=cpp
29878 ac_cpp='$CXXCPP $CPPFLAGS'
29879 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29880 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29881 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29882 
29883   CXXFLAGS="$saved_cxxflags"
29884 
29885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29886 $as_echo "$supports" >&6; }
29887   if test "x$supports" = "xyes" ; then
29888     CXX_COMP_SUPPORTS="yes"
29889   else
29890     CXX_COMP_SUPPORTS="no"
29891   fi
29892 
29893 
29894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
29895 $as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
29896   supports=no
29897   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
29898 
29899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29900 $as_echo "$supports" >&6; }
29901   if test "x$supports" = "xyes" ; then
29902     :
29903   else
29904     NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""
29905   fi
29906 
29907 
29908   NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
29909 
29910 
29911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
29912 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
29913   supports=yes
29914 
29915   saved_cflags="$CFLAGS"
29916   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
29917   ac_ext=c
29918 ac_cpp='$CPP $CPPFLAGS'
29919 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29920 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29921 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29922 
29923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29924 /* end confdefs.h.  */
29925 int i;
29926 _ACEOF
29927 if ac_fn_c_try_compile "$LINENO"; then :
29928 
29929 else
29930   supports=no
29931 fi
29932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29933   ac_ext=cpp
29934 ac_cpp='$CXXCPP $CPPFLAGS'
29935 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29936 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29937 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29938 
29939   CFLAGS="$saved_cflags"
29940 
29941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29942 $as_echo "$supports" >&6; }
29943   if test "x$supports" = "xyes" ; then
29944     C_COMP_SUPPORTS="yes"
29945   else
29946     C_COMP_SUPPORTS="no"
29947   fi
29948 
29949 
29950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
29951 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
29952   supports=yes
29953 
29954   saved_cxxflags="$CXXFLAGS"
29955   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
29956   ac_ext=cpp
29957 ac_cpp='$CXXCPP $CPPFLAGS'
29958 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29959 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29960 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29961 
29962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29963 /* end confdefs.h.  */
29964 int i;
29965 _ACEOF
29966 if ac_fn_cxx_try_compile "$LINENO"; then :
29967 
29968 else
29969   supports=no
29970 fi
29971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29972   ac_ext=cpp
29973 ac_cpp='$CXXCPP $CPPFLAGS'
29974 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29975 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29976 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29977 
29978   CXXFLAGS="$saved_cxxflags"
29979 
29980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29981 $as_echo "$supports" >&6; }
29982   if test "x$supports" = "xyes" ; then
29983     CXX_COMP_SUPPORTS="yes"
29984   else
29985     CXX_COMP_SUPPORTS="no"
29986   fi
29987 
29988 
29989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
29990 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
29991   supports=no
29992   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
29993 
29994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29995 $as_echo "$supports" >&6; }
29996   if test "x$supports" = "xyes" ; then
29997     :
29998   else
29999     NO_LIFETIME_DSE_CFLAG=""
30000   fi
30001 
30002   CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
30003 
30004 
30005 
30006   else
30007     :
30008   fi
30009 
30010       ;;
30011     ossc )
30012       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
30013       case $OPENJDK_TARGET_CPU_ARCH in
30014         x86 )
30015           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
30016           CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
30017           ;;
30018       esac
30019 
30020       CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
30021       CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
30022 
30023       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
30024       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
30025       ;;
30026     xlc )
30027       CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
30028       CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
30029 
30030       LDFLAGS_JDK="$LDFLAGS_JDK"
30031       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
30032       ;;
30033     cl )
30034       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
30035       -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
30036       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
30037       -DWIN32 -DIAL"
30038       case $OPENJDK_TARGET_CPU in
30039         x86 )
30040           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
30041           ;;
30042         x86_64 )
30043           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
30044           ;;
30045       esac
30046       ;;
30047   esac
30048 
30049   ###############################################################################
30050 
30051   # Adjust flags according to debug level.
30052   case $DEBUG_LEVEL in
30053     fastdebug )
30054       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
30055       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
30056       C_O_FLAG_HI="$C_O_FLAG_NORM"
30057       C_O_FLAG_NORM="$C_O_FLAG_NORM"
30058       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
30059       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
30060       JAVAC_FLAGS="$JAVAC_FLAGS -g"
30061       ;;
30062     slowdebug )
30063       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
30064       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
30065       C_O_FLAG_HI="$C_O_FLAG_NONE"
30066       C_O_FLAG_NORM="$C_O_FLAG_NONE"
30067       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
30068       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
30069       JAVAC_FLAGS="$JAVAC_FLAGS -g"
30070       ;;
30071   esac
30072 
30073   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
30074 
30075   # The package path is used only on macosx?
30076   PACKAGE_PATH=/opt/local
30077 
30078 
30079   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
30080     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
30081     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
30082     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
30083     #   Note: -Dmacro         is the same as    #define macro 1
30084     #         -Dmacro=        is the same as    #define macro
30085     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30086       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
30087     else
30088       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
30089     fi
30090   else
30091     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
30092   fi
30093   if test "x$OPENJDK_TARGET_OS" = xlinux; then
30094     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
30095   fi
30096   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30097     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DWINDOWS"
30098   fi
30099   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30100     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DSOLARIS"
30101   fi
30102   if test "x$OPENJDK_TARGET_OS" = xaix; then
30103     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DAIX -DPPC64"
30104   fi
30105   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30106     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
30107     # Setting these parameters makes it an error to link to macosx APIs that are
30108     # newer than the given OS version and makes the linked binaries compatible even
30109     # if built on a newer version of the OS.
30110     # The expected format is X.Y.Z
30111     MACOSX_VERSION_MIN=10.7.0
30112 
30113     # The macro takes the version with no dots, ex: 1070
30114     # Let the flags variables get resolved in make for easier override on make
30115     # command line.
30116     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
30117     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
30118   fi
30119   if test "x$OPENJDK_TARGET_OS" = xbsd; then
30120     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
30121   fi
30122   if test "x$DEBUG_LEVEL" = xrelease; then
30123     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
30124   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30125     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
30126   fi
30127   else
30128     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
30129   fi
30130 
30131   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
30132   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
30133 
30134   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
30135       -I${JDK_OUTPUTDIR}/include \
30136       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
30137       -I${JDK_TOPDIR}/src/share/javavm/export \
30138       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
30139       -I${JDK_TOPDIR}/src/share/native/common \
30140       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
30141 
30142   # The shared libraries are compiled using the picflag.
30143   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
30144   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
30145 
30146   # Executable flags
30147   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
30148   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
30149 
30150   # Now this is odd. The JDK native libraries have to link against libjvm.so
30151   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
30152   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
30153   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
30154   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
30155   # libraries will link to whatever is in memory. Yuck.
30156   #
30157   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
30158   if test "x$COMPILER_NAME" = xcl; then
30159     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
30160     if test "x$OPENJDK_TARGET_CPU" = xx86; then
30161       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
30162     fi
30163     # TODO: make -debug optional "--disable-full-debug-symbols"
30164     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
30165     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
30166     LDFLAGS_JDKLIB_SUFFIX=""
30167     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
30168       LDFLAGS_STACK_SIZE=1048576
30169     else
30170       LDFLAGS_STACK_SIZE=327680
30171     fi
30172     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
30173   else
30174     if test "x$COMPILER_NAME" = xgcc; then
30175       # If this is a --hash-style=gnu system, use --hash-style=both, why?
30176       HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
30177       if test -n "$HAS_GNU_HASH"; then
30178         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
30179       fi
30180       if test "x$OPENJDK_TARGET_OS" = xlinux; then
30181         # And since we now know that the linker is gnu, then add:
30182         #   -z defs, to forbid undefined symbols in object files
30183         #   -z noexecstack, to mark stack regions as non-executable
30184         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
30185         if test "x$DEBUG_LEVEL" = "xrelease"; then
30186           # When building release libraries, tell the linker optimize them.
30187           # Should this be supplied to the OSS linker as well?
30188           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
30189         fi
30190       fi
30191     fi
30192     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
30193         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
30194 
30195     # On some platforms (mac) the linker warns about non existing -L dirs.
30196     # Add server first if available. Linking aginst client does not always produce the same results.
30197     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
30198     # Default to server for other variants.
30199     if test "x$JVM_VARIANT_SERVER" = xtrue; then
30200       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
30201     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
30202       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
30203     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
30204       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
30205     else
30206       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
30207     fi
30208 
30209     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
30210     if test "x$COMPILER_NAME" = xossc; then
30211       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
30212     fi
30213 
30214     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
30215     if test "x$OPENJDK_TARGET_OS" = xlinux; then
30216       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
30217     fi
30218   fi
30219 
30220 
30221 
30222 
30223 
30224 
30225 
30226 
30227 
30228 
30229 
30230 
30231 
30232 
30233   # Some Zero and Shark settings.
30234   # ZERO_ARCHFLAG tells the compiler which mode to build for
30235   case "${OPENJDK_TARGET_CPU}" in
30236     s390)
30237       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
30238       ;;
30239     *)
30240       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30241   esac
30242 
30243 
30244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
30245 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
30246   supports=yes
30247 
30248   saved_cflags="$CFLAGS"
30249   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
30250   ac_ext=c
30251 ac_cpp='$CPP $CPPFLAGS'
30252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30255 
30256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30257 /* end confdefs.h.  */
30258 int i;
30259 _ACEOF
30260 if ac_fn_c_try_compile "$LINENO"; then :
30261 
30262 else
30263   supports=no
30264 fi
30265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30266   ac_ext=cpp
30267 ac_cpp='$CXXCPP $CPPFLAGS'
30268 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30269 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30270 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30271 
30272   CFLAGS="$saved_cflags"
30273 
30274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30275 $as_echo "$supports" >&6; }
30276   if test "x$supports" = "xyes" ; then
30277     C_COMP_SUPPORTS="yes"
30278   else
30279     C_COMP_SUPPORTS="no"
30280   fi
30281 
30282 
30283   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
30284 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
30285   supports=yes
30286 
30287   saved_cxxflags="$CXXFLAGS"
30288   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
30289   ac_ext=cpp
30290 ac_cpp='$CXXCPP $CPPFLAGS'
30291 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30292 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30293 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30294 
30295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30296 /* end confdefs.h.  */
30297 int i;
30298 _ACEOF
30299 if ac_fn_cxx_try_compile "$LINENO"; then :
30300 
30301 else
30302   supports=no
30303 fi
30304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30305   ac_ext=cpp
30306 ac_cpp='$CXXCPP $CPPFLAGS'
30307 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30308 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30309 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30310 
30311   CXXFLAGS="$saved_cxxflags"
30312 
30313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30314 $as_echo "$supports" >&6; }
30315   if test "x$supports" = "xyes" ; then
30316     CXX_COMP_SUPPORTS="yes"
30317   else
30318     CXX_COMP_SUPPORTS="no"
30319   fi
30320 
30321 
30322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
30323 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
30324   supports=no
30325   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
30326 
30327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30328 $as_echo "$supports" >&6; }
30329   if test "x$supports" = "xyes" ; then
30330     :
30331   else
30332     ZERO_ARCHFLAG=""
30333   fi
30334 
30335 
30336 
30337   # Check that the compiler supports -mX (or -qX on AIX) flags
30338   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
30339 
30340 
30341   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30342 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30343   supports=yes
30344 
30345   saved_cflags="$CFLAGS"
30346   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30347   ac_ext=c
30348 ac_cpp='$CPP $CPPFLAGS'
30349 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30350 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30351 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30352 
30353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30354 /* end confdefs.h.  */
30355 int i;
30356 _ACEOF
30357 if ac_fn_c_try_compile "$LINENO"; then :
30358 
30359 else
30360   supports=no
30361 fi
30362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30363   ac_ext=cpp
30364 ac_cpp='$CXXCPP $CPPFLAGS'
30365 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30366 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30367 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30368 
30369   CFLAGS="$saved_cflags"
30370 
30371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30372 $as_echo "$supports" >&6; }
30373   if test "x$supports" = "xyes" ; then
30374     C_COMP_SUPPORTS="yes"
30375   else
30376     C_COMP_SUPPORTS="no"
30377   fi
30378 
30379 
30380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30381 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30382   supports=yes
30383 
30384   saved_cxxflags="$CXXFLAGS"
30385   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30386   ac_ext=cpp
30387 ac_cpp='$CXXCPP $CPPFLAGS'
30388 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30389 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30390 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30391 
30392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30393 /* end confdefs.h.  */
30394 int i;
30395 _ACEOF
30396 if ac_fn_cxx_try_compile "$LINENO"; then :
30397 
30398 else
30399   supports=no
30400 fi
30401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30402   ac_ext=cpp
30403 ac_cpp='$CXXCPP $CPPFLAGS'
30404 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30405 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30406 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30407 
30408   CXXFLAGS="$saved_cxxflags"
30409 
30410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30411 $as_echo "$supports" >&6; }
30412   if test "x$supports" = "xyes" ; then
30413     CXX_COMP_SUPPORTS="yes"
30414   else
30415     CXX_COMP_SUPPORTS="no"
30416   fi
30417 
30418 
30419   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30420 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30421   supports=no
30422   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
30423 
30424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30425 $as_echo "$supports" >&6; }
30426   if test "x$supports" = "xyes" ; then
30427     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30428   else
30429     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30430   fi
30431 
30432 
30433 
30434 
30435   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30436   USING_BROKEN_SUSE_LD=no
30437   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30438     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30439 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30440     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30441     echo "int main() { }" > main.c
30442     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30443       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30444 $as_echo "no" >&6; }
30445       USING_BROKEN_SUSE_LD=no
30446     else
30447       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30448 $as_echo "yes" >&6; }
30449       USING_BROKEN_SUSE_LD=yes
30450     fi
30451     rm -rf version-script.map main.c
30452   fi
30453 
30454 
30455 
30456 # Setup debug symbols (need objcopy from the toolchain for that)
30457 
30458   #
30459   # ENABLE_DEBUG_SYMBOLS
30460   # This must be done after the toolchain is setup, since we're looking at objcopy.
30461   #
30462   # Check whether --enable-debug-symbols was given.
30463 if test "${enable_debug_symbols+set}" = set; then :
30464   enableval=$enable_debug_symbols;
30465 fi
30466 
30467 
30468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30469 $as_echo_n "checking if we should generate debug symbols... " >&6; }
30470 
30471   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30472     # explicit enabling of enable-debug-symbols and can't find objcopy
30473     #   this is an error
30474     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30475   fi
30476 
30477   if test "x$enable_debug_symbols" = "xyes"; then
30478     ENABLE_DEBUG_SYMBOLS=true
30479   elif test "x$enable_debug_symbols" = "xno"; then
30480     ENABLE_DEBUG_SYMBOLS=false
30481   else
30482     # Default is on if objcopy is found
30483     if test "x$OBJCOPY" != x; then
30484       ENABLE_DEBUG_SYMBOLS=true
30485     # MacOS X and Windows don't use objcopy but default is on for those OSes
30486     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30487       ENABLE_DEBUG_SYMBOLS=true
30488     else
30489       ENABLE_DEBUG_SYMBOLS=false
30490     fi
30491   fi
30492 
30493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30494 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30495 
30496   #
30497   # ZIP_DEBUGINFO_FILES
30498   #
30499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30500 $as_echo_n "checking if we should zip debug-info files... " >&6; }
30501   # Check whether --enable-zip-debug-info was given.
30502 if test "${enable_zip_debug_info+set}" = set; then :
30503   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30504 else
30505   enable_zip_debug_info="yes"
30506 fi
30507 
30508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30509 $as_echo "${enable_zip_debug_info}" >&6; }
30510 
30511   if test "x${enable_zip_debug_info}" = "xno"; then
30512     ZIP_DEBUGINFO_FILES=false
30513   else
30514     ZIP_DEBUGINFO_FILES=true
30515   fi
30516 
30517 
30518 
30519 
30520 
30521 
30522 
30523 ###############################################################################
30524 #
30525 # Check dependencies for external and internal libraries.
30526 #
30527 ###############################################################################
30528 
30529 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30530 
30531   # When using cygwin or msys, we need a wrapper binary that renames
30532   # /cygdrive/c/ arguments into c:/ arguments and peeks into
30533   # @files and rewrites these too! This wrapper binary is
30534   # called fixpath.
30535   FIXPATH=
30536   if test "x$OPENJDK_BUILD_OS" = xwindows; then
30537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30538 $as_echo_n "checking if fixpath can be created... " >&6; }
30539     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30540     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30541     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30542       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30543       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30544       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30545       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30546     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30547       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30548       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30549 
30550       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30551       # @ was chosen as separator to minimize risk of other tools messing around with it
30552       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30553       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30554 
30555       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30556     fi
30557     rm -f $OUTPUT_ROOT/fixpath*
30558     cd $OUTPUT_ROOT
30559     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30560     cd $CURDIR
30561 
30562     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30563       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30564 $as_echo "no" >&6; }
30565       cat $OUTPUT_ROOT/fixpath1.log
30566       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30567     fi
30568     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30569 $as_echo "yes" >&6; }
30570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30571 $as_echo_n "checking if fixpath.exe works... " >&6; }
30572     cd $OUTPUT_ROOT
30573     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30574     cd $CURDIR
30575     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30576       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30577 $as_echo "no" >&6; }
30578       cat $OUTPUT_ROOT/fixpath2.log
30579       as_fn_error $? "fixpath did not work!" "$LINENO" 5
30580     fi
30581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30582 $as_echo "yes" >&6; }
30583     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30584   fi
30585 
30586 
30587 
30588 
30589 
30590 
30591   ###############################################################################
30592   #
30593   # OS specific settings that we never will need to probe.
30594   #
30595   if test "x$OPENJDK_TARGET_OS" = xlinux; then
30596     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30597 $as_echo_n "checking what is not needed on Linux?... " >&6; }
30598     PULSE_NOT_NEEDED=yes
30599     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30600 $as_echo "pulse" >&6; }
30601   fi
30602 
30603   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30604     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30605 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
30606     ALSA_NOT_NEEDED=yes
30607     PULSE_NOT_NEEDED=yes
30608     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30609 $as_echo "alsa pulse" >&6; }
30610   fi
30611 
30612   if test "x$OPENJDK_TARGET_OS" = xaix; then
30613     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30614 $as_echo_n "checking what is not needed on AIX?... " >&6; }
30615     ALSA_NOT_NEEDED=yes
30616     PULSE_NOT_NEEDED=yes
30617     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30618 $as_echo "alsa pulse" >&6; }
30619   fi
30620 
30621 
30622   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30623     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30624 $as_echo_n "checking what is not needed on Windows?... " >&6; }
30625     CUPS_NOT_NEEDED=yes
30626     ALSA_NOT_NEEDED=yes
30627     PULSE_NOT_NEEDED=yes
30628     X11_NOT_NEEDED=yes
30629     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30630 $as_echo "alsa cups pulse x11" >&6; }
30631   fi
30632 
30633   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30634     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30635 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30636     ALSA_NOT_NEEDED=yes
30637     PULSE_NOT_NEEDED=yes
30638     X11_NOT_NEEDED=yes
30639     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30640 $as_echo "alsa pulse x11" >&6; }
30641   fi
30642 
30643   if test "x$OPENJDK_TARGET_OS" = xbsd; then
30644     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30645 $as_echo_n "checking what is not needed on bsd?... " >&6; }
30646     ALSA_NOT_NEEDED=yes
30647     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30648 $as_echo "alsa" >&6; }
30649   fi
30650 
30651   if test "x$OPENJDK" = "xfalse"; then
30652     FREETYPE_NOT_NEEDED=yes
30653   fi
30654 
30655   if test "x$SUPPORT_HEADFUL" = xno; then
30656     X11_NOT_NEEDED=yes
30657   fi
30658 
30659   # Deprecated and now ignored
30660 
30661   # Check whether --enable-macosx-runtime-support was given.
30662 if test "${enable_macosx_runtime_support+set}" = set; then :
30663   enableval=$enable_macosx_runtime_support;
30664 fi
30665 
30666   if test "x$enable_macosx_runtime_support" != x; then
30667     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30668 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30669   fi
30670 
30671 
30672 
30673 
30674   ###############################################################################
30675   #
30676   # Check for X Windows
30677   #
30678 
30679   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30680   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30681   # --x-libraries for the sysroot, if that seems to be correct.
30682   if test "x$SYS_ROOT" != "x/"; then
30683     if test "x$x_includes" = xNONE; then
30684       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30685         x_includes="$SYS_ROOT/usr/X11R6/include"
30686       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30687         x_includes="$SYS_ROOT/usr/include"
30688       fi
30689     fi
30690     if test "x$x_libraries" = xNONE; then
30691       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30692         x_libraries="$SYS_ROOT/usr/X11R6/lib"
30693       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30694         x_libraries="$SYS_ROOT/usr/lib64"
30695       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30696         x_libraries="$SYS_ROOT/usr/lib"
30697       fi
30698     fi
30699   fi
30700 
30701   # Now let autoconf do it's magic
30702   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30703 $as_echo_n "checking for X... " >&6; }
30704 
30705 
30706 # Check whether --with-x was given.
30707 if test "${with_x+set}" = set; then :
30708   withval=$with_x;
30709 fi
30710 
30711 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30712 if test "x$with_x" = xno; then
30713   # The user explicitly disabled X.
30714   have_x=disabled
30715 else
30716   case $x_includes,$x_libraries in #(
30717     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30718     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30719   $as_echo_n "(cached) " >&6
30720 else
30721   # One or both of the vars are not set, and there is no cached value.
30722 ac_x_includes=no ac_x_libraries=no
30723 rm -f -r conftest.dir
30724 if mkdir conftest.dir; then
30725   cd conftest.dir
30726   cat >Imakefile <<'_ACEOF'
30727 incroot:
30728         @echo incroot='${INCROOT}'
30729 usrlibdir:
30730         @echo usrlibdir='${USRLIBDIR}'
30731 libdir:
30732         @echo libdir='${LIBDIR}'
30733 _ACEOF
30734   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30735     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30736     for ac_var in incroot usrlibdir libdir; do
30737       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30738     done
30739     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30740     for ac_extension in a so sl dylib la dll; do
30741       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30742          test -f "$ac_im_libdir/libX11.$ac_extension"; then
30743         ac_im_usrlibdir=$ac_im_libdir; break
30744       fi
30745     done
30746     # Screen out bogus values from the imake configuration.  They are
30747     # bogus both because they are the default anyway, and because
30748     # using them would break gcc on systems where it needs fixed includes.
30749     case $ac_im_incroot in
30750         /usr/include) ac_x_includes= ;;
30751         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30752     esac
30753     case $ac_im_usrlibdir in
30754         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
30755         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30756     esac
30757   fi
30758   cd ..
30759   rm -f -r conftest.dir
30760 fi
30761 
30762 # Standard set of common directories for X headers.
30763 # Check X11 before X11Rn because it is often a symlink to the current release.
30764 ac_x_header_dirs='
30765 /usr/X11/include
30766 /usr/X11R7/include
30767 /usr/X11R6/include
30768 /usr/X11R5/include
30769 /usr/X11R4/include
30770 
30771 /usr/include/X11
30772 /usr/include/X11R7
30773 /usr/include/X11R6
30774 /usr/include/X11R5
30775 /usr/include/X11R4
30776 
30777 /usr/local/X11/include
30778 /usr/local/X11R7/include
30779 /usr/local/X11R6/include
30780 /usr/local/X11R5/include
30781 /usr/local/X11R4/include
30782 
30783 /usr/local/include/X11
30784 /usr/local/include/X11R7
30785 /usr/local/include/X11R6
30786 /usr/local/include/X11R5
30787 /usr/local/include/X11R4
30788 
30789 /usr/X386/include
30790 /usr/x386/include
30791 /usr/XFree86/include/X11
30792 
30793 /usr/include
30794 /usr/local/include
30795 /usr/unsupported/include
30796 /usr/athena/include
30797 /usr/local/x11r5/include
30798 /usr/lpp/Xamples/include
30799 
30800 /usr/openwin/include
30801 /usr/openwin/share/include'
30802 
30803 if test "$ac_x_includes" = no; then
30804   # Guess where to find include files, by looking for Xlib.h.
30805   # First, try using that file with no special directory specified.
30806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30807 /* end confdefs.h.  */
30808 #include <X11/Xlib.h>
30809 _ACEOF
30810 if ac_fn_cxx_try_cpp "$LINENO"; then :
30811   # We can compile using X headers with no special include directory.
30812 ac_x_includes=
30813 else
30814   for ac_dir in $ac_x_header_dirs; do
30815   if test -r "$ac_dir/X11/Xlib.h"; then
30816     ac_x_includes=$ac_dir
30817     break
30818   fi
30819 done
30820 fi
30821 rm -f conftest.err conftest.i conftest.$ac_ext
30822 fi # $ac_x_includes = no
30823 
30824 if test "$ac_x_libraries" = no; then
30825   # Check for the libraries.
30826   # See if we find them without any special options.
30827   # Don't add to $LIBS permanently.
30828   ac_save_LIBS=$LIBS
30829   LIBS="-lX11 $LIBS"
30830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30831 /* end confdefs.h.  */
30832 #include <X11/Xlib.h>
30833 int
30834 main ()
30835 {
30836 XrmInitialize ()
30837   ;
30838   return 0;
30839 }
30840 _ACEOF
30841 if ac_fn_cxx_try_link "$LINENO"; then :
30842   LIBS=$ac_save_LIBS
30843 # We can link X programs with no special library path.
30844 ac_x_libraries=
30845 else
30846   LIBS=$ac_save_LIBS
30847 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30848 do
30849   # Don't even attempt the hair of trying to link an X program!
30850   for ac_extension in a so sl dylib la dll; do
30851     if test -r "$ac_dir/libX11.$ac_extension"; then
30852       ac_x_libraries=$ac_dir
30853       break 2
30854     fi
30855   done
30856 done
30857 fi
30858 rm -f core conftest.err conftest.$ac_objext \
30859     conftest$ac_exeext conftest.$ac_ext
30860 fi # $ac_x_libraries = no
30861 
30862 case $ac_x_includes,$ac_x_libraries in #(
30863   no,* | *,no | *\'*)
30864     # Didn't find X, or a directory has "'" in its name.
30865     ac_cv_have_x="have_x=no";; #(
30866   *)
30867     # Record where we found X for the cache.
30868     ac_cv_have_x="have_x=yes\
30869         ac_x_includes='$ac_x_includes'\
30870         ac_x_libraries='$ac_x_libraries'"
30871 esac
30872 fi
30873 ;; #(
30874     *) have_x=yes;;
30875   esac
30876   eval "$ac_cv_have_x"
30877 fi # $with_x != no
30878 
30879 if test "$have_x" != yes; then
30880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30881 $as_echo "$have_x" >&6; }
30882   no_x=yes
30883 else
30884   # If each of the values was on the command line, it overrides each guess.
30885   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30886   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30887   # Update the cache value to reflect the command line values.
30888   ac_cv_have_x="have_x=yes\
30889         ac_x_includes='$x_includes'\
30890         ac_x_libraries='$x_libraries'"
30891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30892 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30893 fi
30894 
30895   if test "$no_x" = yes; then
30896   # Not all programs may use this symbol, but it does not hurt to define it.
30897 
30898 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30899 
30900   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30901 else
30902   if test -n "$x_includes"; then
30903     X_CFLAGS="$X_CFLAGS -I$x_includes"
30904   fi
30905 
30906   # It would also be nice to do this for all -L options, not just this one.
30907   if test -n "$x_libraries"; then
30908     X_LIBS="$X_LIBS -L$x_libraries"
30909     # For Solaris; some versions of Sun CC require a space after -R and
30910     # others require no space.  Words are not sufficient . . . .
30911     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30912 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30913     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30914     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30915     ac_cxx_werror_flag=yes
30916     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30917 /* end confdefs.h.  */
30918 
30919 int
30920 main ()
30921 {
30922 
30923   ;
30924   return 0;
30925 }
30926 _ACEOF
30927 if ac_fn_cxx_try_link "$LINENO"; then :
30928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30929 $as_echo "no" >&6; }
30930        X_LIBS="$X_LIBS -R$x_libraries"
30931 else
30932   LIBS="$ac_xsave_LIBS -R $x_libraries"
30933        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30934 /* end confdefs.h.  */
30935 
30936 int
30937 main ()
30938 {
30939 
30940   ;
30941   return 0;
30942 }
30943 _ACEOF
30944 if ac_fn_cxx_try_link "$LINENO"; then :
30945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30946 $as_echo "yes" >&6; }
30947           X_LIBS="$X_LIBS -R $x_libraries"
30948 else
30949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30950 $as_echo "neither works" >&6; }
30951 fi
30952 rm -f core conftest.err conftest.$ac_objext \
30953     conftest$ac_exeext conftest.$ac_ext
30954 fi
30955 rm -f core conftest.err conftest.$ac_objext \
30956     conftest$ac_exeext conftest.$ac_ext
30957     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30958     LIBS=$ac_xsave_LIBS
30959   fi
30960 
30961   # Check for system-dependent libraries X programs must link with.
30962   # Do this before checking for the system-independent R6 libraries
30963   # (-lICE), since we may need -lsocket or whatever for X linking.
30964 
30965   if test "$ISC" = yes; then
30966     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30967   else
30968     # Martyn Johnson says this is needed for Ultrix, if the X
30969     # libraries were built with DECnet support.  And Karl Berry says
30970     # the Alpha needs dnet_stub (dnet does not exist).
30971     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30972     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30973 /* end confdefs.h.  */
30974 
30975 /* Override any GCC internal prototype to avoid an error.
30976    Use char because int might match the return type of a GCC
30977    builtin and then its argument prototype would still apply.  */
30978 #ifdef __cplusplus
30979 extern "C"
30980 #endif
30981 char XOpenDisplay ();
30982 int
30983 main ()
30984 {
30985 return XOpenDisplay ();
30986   ;
30987   return 0;
30988 }
30989 _ACEOF
30990 if ac_fn_cxx_try_link "$LINENO"; then :
30991 
30992 else
30993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30994 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30995 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30996   $as_echo_n "(cached) " >&6
30997 else
30998   ac_check_lib_save_LIBS=$LIBS
30999 LIBS="-ldnet  $LIBS"
31000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31001 /* end confdefs.h.  */
31002 
31003 /* Override any GCC internal prototype to avoid an error.
31004    Use char because int might match the return type of a GCC
31005    builtin and then its argument prototype would still apply.  */
31006 #ifdef __cplusplus
31007 extern "C"
31008 #endif
31009 char dnet_ntoa ();
31010 int
31011 main ()
31012 {
31013 return dnet_ntoa ();
31014   ;
31015   return 0;
31016 }
31017 _ACEOF
31018 if ac_fn_cxx_try_link "$LINENO"; then :
31019   ac_cv_lib_dnet_dnet_ntoa=yes
31020 else
31021   ac_cv_lib_dnet_dnet_ntoa=no
31022 fi
31023 rm -f core conftest.err conftest.$ac_objext \
31024     conftest$ac_exeext conftest.$ac_ext
31025 LIBS=$ac_check_lib_save_LIBS
31026 fi
31027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
31028 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
31029 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
31030   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
31031 fi
31032 
31033     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
31034       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
31035 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
31036 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
31037   $as_echo_n "(cached) " >&6
31038 else
31039   ac_check_lib_save_LIBS=$LIBS
31040 LIBS="-ldnet_stub  $LIBS"
31041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31042 /* end confdefs.h.  */
31043 
31044 /* Override any GCC internal prototype to avoid an error.
31045    Use char because int might match the return type of a GCC
31046    builtin and then its argument prototype would still apply.  */
31047 #ifdef __cplusplus
31048 extern "C"
31049 #endif
31050 char dnet_ntoa ();
31051 int
31052 main ()
31053 {
31054 return dnet_ntoa ();
31055   ;
31056   return 0;
31057 }
31058 _ACEOF
31059 if ac_fn_cxx_try_link "$LINENO"; then :
31060   ac_cv_lib_dnet_stub_dnet_ntoa=yes
31061 else
31062   ac_cv_lib_dnet_stub_dnet_ntoa=no
31063 fi
31064 rm -f core conftest.err conftest.$ac_objext \
31065     conftest$ac_exeext conftest.$ac_ext
31066 LIBS=$ac_check_lib_save_LIBS
31067 fi
31068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
31069 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
31070 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
31071   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
31072 fi
31073 
31074     fi
31075 fi
31076 rm -f core conftest.err conftest.$ac_objext \
31077     conftest$ac_exeext conftest.$ac_ext
31078     LIBS="$ac_xsave_LIBS"
31079 
31080     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
31081     # to get the SysV transport functions.
31082     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
31083     # needs -lnsl.
31084     # The nsl library prevents programs from opening the X display
31085     # on Irix 5.2, according to T.E. Dickey.
31086     # The functions gethostbyname, getservbyname, and inet_addr are
31087     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
31088     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
31089 if test "x$ac_cv_func_gethostbyname" = xyes; then :
31090 
31091 fi
31092 
31093     if test $ac_cv_func_gethostbyname = no; then
31094       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
31095 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
31096 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
31097   $as_echo_n "(cached) " >&6
31098 else
31099   ac_check_lib_save_LIBS=$LIBS
31100 LIBS="-lnsl  $LIBS"
31101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31102 /* end confdefs.h.  */
31103 
31104 /* Override any GCC internal prototype to avoid an error.
31105    Use char because int might match the return type of a GCC
31106    builtin and then its argument prototype would still apply.  */
31107 #ifdef __cplusplus
31108 extern "C"
31109 #endif
31110 char gethostbyname ();
31111 int
31112 main ()
31113 {
31114 return gethostbyname ();
31115   ;
31116   return 0;
31117 }
31118 _ACEOF
31119 if ac_fn_cxx_try_link "$LINENO"; then :
31120   ac_cv_lib_nsl_gethostbyname=yes
31121 else
31122   ac_cv_lib_nsl_gethostbyname=no
31123 fi
31124 rm -f core conftest.err conftest.$ac_objext \
31125     conftest$ac_exeext conftest.$ac_ext
31126 LIBS=$ac_check_lib_save_LIBS
31127 fi
31128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
31129 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
31130 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
31131   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
31132 fi
31133 
31134       if test $ac_cv_lib_nsl_gethostbyname = no; then
31135         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
31136 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
31137 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
31138   $as_echo_n "(cached) " >&6
31139 else
31140   ac_check_lib_save_LIBS=$LIBS
31141 LIBS="-lbsd  $LIBS"
31142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31143 /* end confdefs.h.  */
31144 
31145 /* Override any GCC internal prototype to avoid an error.
31146    Use char because int might match the return type of a GCC
31147    builtin and then its argument prototype would still apply.  */
31148 #ifdef __cplusplus
31149 extern "C"
31150 #endif
31151 char gethostbyname ();
31152 int
31153 main ()
31154 {
31155 return gethostbyname ();
31156   ;
31157   return 0;
31158 }
31159 _ACEOF
31160 if ac_fn_cxx_try_link "$LINENO"; then :
31161   ac_cv_lib_bsd_gethostbyname=yes
31162 else
31163   ac_cv_lib_bsd_gethostbyname=no
31164 fi
31165 rm -f core conftest.err conftest.$ac_objext \
31166     conftest$ac_exeext conftest.$ac_ext
31167 LIBS=$ac_check_lib_save_LIBS
31168 fi
31169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
31170 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
31171 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
31172   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
31173 fi
31174 
31175       fi
31176     fi
31177 
31178     # lieder@skyler.mavd.honeywell.com says without -lsocket,
31179     # socket/setsockopt and other routines are undefined under SCO ODT
31180     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
31181     # on later versions), says Simon Leinen: it contains gethostby*
31182     # variants that don't use the name server (or something).  -lsocket
31183     # must be given before -lnsl if both are needed.  We assume that
31184     # if connect needs -lnsl, so does gethostbyname.
31185     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
31186 if test "x$ac_cv_func_connect" = xyes; then :
31187 
31188 fi
31189 
31190     if test $ac_cv_func_connect = no; then
31191       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
31192 $as_echo_n "checking for connect in -lsocket... " >&6; }
31193 if ${ac_cv_lib_socket_connect+:} false; then :
31194   $as_echo_n "(cached) " >&6
31195 else
31196   ac_check_lib_save_LIBS=$LIBS
31197 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
31198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31199 /* end confdefs.h.  */
31200 
31201 /* Override any GCC internal prototype to avoid an error.
31202    Use char because int might match the return type of a GCC
31203    builtin and then its argument prototype would still apply.  */
31204 #ifdef __cplusplus
31205 extern "C"
31206 #endif
31207 char connect ();
31208 int
31209 main ()
31210 {
31211 return connect ();
31212   ;
31213   return 0;
31214 }
31215 _ACEOF
31216 if ac_fn_cxx_try_link "$LINENO"; then :
31217   ac_cv_lib_socket_connect=yes
31218 else
31219   ac_cv_lib_socket_connect=no
31220 fi
31221 rm -f core conftest.err conftest.$ac_objext \
31222     conftest$ac_exeext conftest.$ac_ext
31223 LIBS=$ac_check_lib_save_LIBS
31224 fi
31225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
31226 $as_echo "$ac_cv_lib_socket_connect" >&6; }
31227 if test "x$ac_cv_lib_socket_connect" = xyes; then :
31228   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
31229 fi
31230 
31231     fi
31232 
31233     # Guillermo Gomez says -lposix is necessary on A/UX.
31234     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
31235 if test "x$ac_cv_func_remove" = xyes; then :
31236 
31237 fi
31238 
31239     if test $ac_cv_func_remove = no; then
31240       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
31241 $as_echo_n "checking for remove in -lposix... " >&6; }
31242 if ${ac_cv_lib_posix_remove+:} false; then :
31243   $as_echo_n "(cached) " >&6
31244 else
31245   ac_check_lib_save_LIBS=$LIBS
31246 LIBS="-lposix  $LIBS"
31247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31248 /* end confdefs.h.  */
31249 
31250 /* Override any GCC internal prototype to avoid an error.
31251    Use char because int might match the return type of a GCC
31252    builtin and then its argument prototype would still apply.  */
31253 #ifdef __cplusplus
31254 extern "C"
31255 #endif
31256 char remove ();
31257 int
31258 main ()
31259 {
31260 return remove ();
31261   ;
31262   return 0;
31263 }
31264 _ACEOF
31265 if ac_fn_cxx_try_link "$LINENO"; then :
31266   ac_cv_lib_posix_remove=yes
31267 else
31268   ac_cv_lib_posix_remove=no
31269 fi
31270 rm -f core conftest.err conftest.$ac_objext \
31271     conftest$ac_exeext conftest.$ac_ext
31272 LIBS=$ac_check_lib_save_LIBS
31273 fi
31274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
31275 $as_echo "$ac_cv_lib_posix_remove" >&6; }
31276 if test "x$ac_cv_lib_posix_remove" = xyes; then :
31277   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
31278 fi
31279 
31280     fi
31281 
31282     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
31283     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
31284 if test "x$ac_cv_func_shmat" = xyes; then :
31285 
31286 fi
31287 
31288     if test $ac_cv_func_shmat = no; then
31289       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
31290 $as_echo_n "checking for shmat in -lipc... " >&6; }
31291 if ${ac_cv_lib_ipc_shmat+:} false; then :
31292   $as_echo_n "(cached) " >&6
31293 else
31294   ac_check_lib_save_LIBS=$LIBS
31295 LIBS="-lipc  $LIBS"
31296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31297 /* end confdefs.h.  */
31298 
31299 /* Override any GCC internal prototype to avoid an error.
31300    Use char because int might match the return type of a GCC
31301    builtin and then its argument prototype would still apply.  */
31302 #ifdef __cplusplus
31303 extern "C"
31304 #endif
31305 char shmat ();
31306 int
31307 main ()
31308 {
31309 return shmat ();
31310   ;
31311   return 0;
31312 }
31313 _ACEOF
31314 if ac_fn_cxx_try_link "$LINENO"; then :
31315   ac_cv_lib_ipc_shmat=yes
31316 else
31317   ac_cv_lib_ipc_shmat=no
31318 fi
31319 rm -f core conftest.err conftest.$ac_objext \
31320     conftest$ac_exeext conftest.$ac_ext
31321 LIBS=$ac_check_lib_save_LIBS
31322 fi
31323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
31324 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
31325 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
31326   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
31327 fi
31328 
31329     fi
31330   fi
31331 
31332   # Check for libraries that X11R6 Xt/Xaw programs need.
31333   ac_save_LDFLAGS=$LDFLAGS
31334   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
31335   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
31336   # check for ICE first), but we must link in the order -lSM -lICE or
31337   # we get undefined symbols.  So assume we have SM if we have ICE.
31338   # These have to be linked with before -lX11, unlike the other
31339   # libraries we check for below, so use a different variable.
31340   # John Interrante, Karl Berry
31341   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
31342 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
31343 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
31344   $as_echo_n "(cached) " >&6
31345 else
31346   ac_check_lib_save_LIBS=$LIBS
31347 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
31348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31349 /* end confdefs.h.  */
31350 
31351 /* Override any GCC internal prototype to avoid an error.
31352    Use char because int might match the return type of a GCC
31353    builtin and then its argument prototype would still apply.  */
31354 #ifdef __cplusplus
31355 extern "C"
31356 #endif
31357 char IceConnectionNumber ();
31358 int
31359 main ()
31360 {
31361 return IceConnectionNumber ();
31362   ;
31363   return 0;
31364 }
31365 _ACEOF
31366 if ac_fn_cxx_try_link "$LINENO"; then :
31367   ac_cv_lib_ICE_IceConnectionNumber=yes
31368 else
31369   ac_cv_lib_ICE_IceConnectionNumber=no
31370 fi
31371 rm -f core conftest.err conftest.$ac_objext \
31372     conftest$ac_exeext conftest.$ac_ext
31373 LIBS=$ac_check_lib_save_LIBS
31374 fi
31375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
31376 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
31377 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
31378   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
31379 fi
31380 
31381   LDFLAGS=$ac_save_LDFLAGS
31382 
31383 fi
31384 
31385 
31386   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31387   # this doesn't make sense so we remove it.
31388   if test "x$COMPILE_TYPE" = xcross; then
31389     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31390   fi
31391 
31392   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31393 
31394   # Print a helpful message on how to acquire the necessary build dependency.
31395   # x11 is the help tag: freetype, cups, pulse, alsa etc
31396   MISSING_DEPENDENCY=x11
31397 
31398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31399     cygwin_help $MISSING_DEPENDENCY
31400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31401     msys_help $MISSING_DEPENDENCY
31402   else
31403     PKGHANDLER_COMMAND=
31404 
31405     case $PKGHANDLER in
31406       apt-get)
31407         apt_help     $MISSING_DEPENDENCY ;;
31408       yum)
31409         yum_help     $MISSING_DEPENDENCY ;;
31410       port)
31411         port_help    $MISSING_DEPENDENCY ;;
31412       pkgutil)
31413         pkgutil_help $MISSING_DEPENDENCY ;;
31414       pkgadd)
31415         pkgadd_help  $MISSING_DEPENDENCY ;;
31416     esac
31417 
31418     if test "x$PKGHANDLER_COMMAND" != x; then
31419       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31420     fi
31421   fi
31422 
31423     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31424   fi
31425 
31426   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31427     OPENWIN_HOME="/usr/openwin"
31428   fi
31429 
31430 
31431 
31432   #
31433   # Weird Sol10 something check...TODO change to try compile
31434   #
31435   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31436     if test "`uname -r`" = "5.10"; then
31437       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31438         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31439       fi
31440     fi
31441   fi
31442 
31443   ac_ext=c
31444 ac_cpp='$CPP $CPPFLAGS'
31445 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31446 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31448 
31449   OLD_CFLAGS="$CFLAGS"
31450   CFLAGS="$CFLAGS $X_CFLAGS"
31451 
31452   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31453   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31454 do :
31455   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31456 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31457         # include <X11/Xlib.h>
31458         # include <X11/Xutil.h>
31459 
31460 
31461 "
31462 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31463   cat >>confdefs.h <<_ACEOF
31464 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31465 _ACEOF
31466  X11_A_OK=yes
31467 else
31468   X11_A_OK=no; break
31469 fi
31470 
31471 done
31472 
31473 
31474   CFLAGS="$OLD_CFLAGS"
31475   ac_ext=cpp
31476 ac_cpp='$CXXCPP $CPPFLAGS'
31477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31478 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31480 
31481 
31482   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31483 
31484   # Print a helpful message on how to acquire the necessary build dependency.
31485   # x11 is the help tag: freetype, cups, pulse, alsa etc
31486   MISSING_DEPENDENCY=x11
31487 
31488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31489     cygwin_help $MISSING_DEPENDENCY
31490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31491     msys_help $MISSING_DEPENDENCY
31492   else
31493     PKGHANDLER_COMMAND=
31494 
31495     case $PKGHANDLER in
31496       apt-get)
31497         apt_help     $MISSING_DEPENDENCY ;;
31498       yum)
31499         yum_help     $MISSING_DEPENDENCY ;;
31500       port)
31501         port_help    $MISSING_DEPENDENCY ;;
31502       pkgutil)
31503         pkgutil_help $MISSING_DEPENDENCY ;;
31504       pkgadd)
31505         pkgadd_help  $MISSING_DEPENDENCY ;;
31506     esac
31507 
31508     if test "x$PKGHANDLER_COMMAND" != x; then
31509       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31510     fi
31511   fi
31512 
31513     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31514   fi
31515 
31516 
31517 
31518 
31519 
31520 
31521   ###############################################################################
31522   #
31523   # The common unix printing system cups is used to print from java.
31524   #
31525 
31526 # Check whether --with-cups was given.
31527 if test "${with_cups+set}" = set; then :
31528   withval=$with_cups;
31529 fi
31530 
31531 
31532 # Check whether --with-cups-include was given.
31533 if test "${with_cups_include+set}" = set; then :
31534   withval=$with_cups_include;
31535 fi
31536 
31537 
31538   if test "x$CUPS_NOT_NEEDED" = xyes; then
31539     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31540       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31541 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31542     fi
31543     CUPS_CFLAGS=
31544   else
31545     CUPS_FOUND=no
31546 
31547     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31548       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31549     fi
31550 
31551     if test "x${with_cups}" != x; then
31552       CUPS_CFLAGS="-I${with_cups}/include"
31553       CUPS_FOUND=yes
31554     fi
31555     if test "x${with_cups_include}" != x; then
31556       CUPS_CFLAGS="-I${with_cups_include}"
31557       CUPS_FOUND=yes
31558     fi
31559     if test "x$CUPS_FOUND" = xno; then
31560 
31561 
31562   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31563     # Source the builddeps file again, to make sure it uses the latest variables!
31564     . $builddepsfile
31565     # Look for a target and build machine specific resource!
31566     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31567     if test "x$resource" = x; then
31568       # Ok, lets instead look for a target specific resource
31569       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31570     fi
31571     if test "x$resource" = x; then
31572       # Ok, lets instead look for a build specific resource
31573       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31574     fi
31575     if test "x$resource" = x; then
31576       # Ok, lets instead look for a generic resource
31577       # (The cups comes from M4 and not the shell, thus no need for eval here.)
31578       resource=${builddep_cups}
31579     fi
31580     if test "x$resource" != x; then
31581       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31582 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31583       # If the resource in the builddeps.conf file is an existing directory,
31584       # for example /java/linux/cups
31585       if test -d ${resource}; then
31586         depdir=${resource}
31587       else
31588 
31589   # cups is for example mymodule
31590   # $resource is for example libs/general/libmymod_1_2_3.zip
31591   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31592   # $with_builddeps_dir is for example /localhome/builddeps
31593   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31594   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31595   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31596   filename=`basename $resource`
31597   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31598   filebase=${filename%%.*}
31599   extension=${filename#*.}
31600   installdir=$with_builddeps_dir/$filebase
31601   if test ! -f $installdir/$filename.unpacked; then
31602     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31603 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31604     if test ! -d $installdir; then
31605       mkdir -p $installdir
31606     fi
31607     if test ! -d $installdir; then
31608       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31609     fi
31610     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31611     touch $tmpfile
31612     if test ! -f $tmpfile; then
31613       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31614     fi
31615 
31616   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31617   # $tmpfile is the local file name for the downloaded file.
31618   VALID_TOOL=no
31619   if test "x$BDEPS_FTP" = xwget; then
31620     VALID_TOOL=yes
31621     wget -O $tmpfile $with_builddeps_server/$resource
31622   fi
31623   if test "x$BDEPS_FTP" = xlftp; then
31624     VALID_TOOL=yes
31625     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31626   fi
31627   if test "x$BDEPS_FTP" = xftp; then
31628     VALID_TOOL=yes
31629     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31630     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31631     FTPUSERPWD=${FTPSERVER%%@*}
31632     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31633       FTPUSER=${userpwd%%:*}
31634       FTPPWD=${userpwd#*@}
31635       FTPSERVER=${FTPSERVER#*@}
31636     else
31637       FTPUSER=ftp
31638       FTPPWD=ftp
31639     fi
31640     # the "pass" command does not work on some
31641     # ftp clients (read ftp.exe) but if it works,
31642     # passive mode is better!
31643     ( \
31644         echo "user $FTPUSER $FTPPWD"        ; \
31645         echo "pass"                         ; \
31646         echo "bin"                          ; \
31647         echo "get $FTPPATH $tmpfile"              ; \
31648     ) | ftp -in $FTPSERVER
31649   fi
31650   if test "x$VALID_TOOL" != xyes; then
31651     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31652   fi
31653 
31654     mv $tmpfile $installdir/$filename
31655     if test ! -s $installdir/$filename; then
31656       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31657     fi
31658     case "$extension" in
31659       zip)  echo "Unzipping $installdir/$filename..."
31660         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31661         ;;
31662       tar.gz) echo "Untaring $installdir/$filename..."
31663         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31664         ;;
31665       tgz) echo "Untaring $installdir/$filename..."
31666         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31667         ;;
31668       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31669         ;;
31670     esac
31671   fi
31672   if test -f $installdir/$filename.unpacked; then
31673     depdir=$installdir
31674   fi
31675 
31676       fi
31677       # Source the builddeps file again, because in the previous command, the depdir
31678       # was updated to point at the current build dependency install directory.
31679       . $builddepsfile
31680       # Now extract variables from the builddeps.conf files.
31681       theroot=${builddep_cups_ROOT}
31682       thecflags=${builddep_cups_CFLAGS}
31683       thelibs=${builddep_cups_LIBS}
31684       if test "x$depdir" = x; then
31685         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31686       fi
31687       CUPS=$depdir
31688       if test "x$theroot" != x; then
31689         CUPS="$theroot"
31690       fi
31691       if test "x$thecflags" != x; then
31692         CUPS_CFLAGS="$thecflags"
31693       fi
31694       if test "x$thelibs" != x; then
31695         CUPS_LIBS="$thelibs"
31696       fi
31697       CUPS_FOUND=yes
31698 
31699     fi
31700 
31701   fi
31702 
31703     fi
31704     if test "x$CUPS_FOUND" = xno; then
31705       # Are the cups headers installed in the default /usr/include location?
31706       for ac_header in cups/cups.h cups/ppd.h
31707 do :
31708   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31709 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31710 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31711   cat >>confdefs.h <<_ACEOF
31712 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31713 _ACEOF
31714 
31715             CUPS_FOUND=yes
31716             CUPS_CFLAGS=
31717             DEFAULT_CUPS=yes
31718 
31719 
31720 fi
31721 
31722 done
31723 
31724     fi
31725     if test "x$CUPS_FOUND" = xno; then
31726       # Getting nervous now? Lets poke around for standard Solaris third-party
31727       # package installation locations.
31728       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31729 $as_echo_n "checking for cups headers... " >&6; }
31730       if test -s /opt/sfw/cups/include/cups/cups.h; then
31731         # An SFW package seems to be installed!
31732         CUPS_FOUND=yes
31733         CUPS_CFLAGS="-I/opt/sfw/cups/include"
31734       elif test -s /opt/csw/include/cups/cups.h; then
31735         # A CSW package seems to be installed!
31736         CUPS_FOUND=yes
31737         CUPS_CFLAGS="-I/opt/csw/include"
31738       fi
31739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31740 $as_echo "$CUPS_FOUND" >&6; }
31741     fi
31742     if test "x$CUPS_FOUND" = xno; then
31743 
31744   # Print a helpful message on how to acquire the necessary build dependency.
31745   # cups is the help tag: freetype, cups, pulse, alsa etc
31746   MISSING_DEPENDENCY=cups
31747 
31748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31749     cygwin_help $MISSING_DEPENDENCY
31750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31751     msys_help $MISSING_DEPENDENCY
31752   else
31753     PKGHANDLER_COMMAND=
31754 
31755     case $PKGHANDLER in
31756       apt-get)
31757         apt_help     $MISSING_DEPENDENCY ;;
31758       yum)
31759         yum_help     $MISSING_DEPENDENCY ;;
31760       port)
31761         port_help    $MISSING_DEPENDENCY ;;
31762       pkgutil)
31763         pkgutil_help $MISSING_DEPENDENCY ;;
31764       pkgadd)
31765         pkgadd_help  $MISSING_DEPENDENCY ;;
31766     esac
31767 
31768     if test "x$PKGHANDLER_COMMAND" != x; then
31769       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31770     fi
31771   fi
31772 
31773       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31774     fi
31775   fi
31776 
31777 
31778 
31779 
31780 
31781 
31782   ###############################################################################
31783   #
31784   # The ubiquitous freetype library is used to render fonts.
31785   #
31786 
31787 # Check whether --with-freetype was given.
31788 if test "${with_freetype+set}" = set; then :
31789   withval=$with_freetype;
31790 fi
31791 
31792 
31793 # Check whether --with-freetype-include was given.
31794 if test "${with_freetype_include+set}" = set; then :
31795   withval=$with_freetype_include;
31796 fi
31797 
31798 
31799 # Check whether --with-freetype-lib was given.
31800 if test "${with_freetype_lib+set}" = set; then :
31801   withval=$with_freetype_lib;
31802 fi
31803 
31804   # Check whether --enable-freetype-bundling was given.
31805 if test "${enable_freetype_bundling+set}" = set; then :
31806   enableval=$enable_freetype_bundling;
31807 fi
31808 
31809 
31810   FREETYPE_CFLAGS=
31811   FREETYPE_LIBS=
31812   FREETYPE_BUNDLE_LIB_PATH=
31813 
31814   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31815     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31816       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31817 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31818     fi
31819     if test "x$enable_freetype_bundling" != x; then
31820       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31821 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31822     fi
31823   else
31824     # freetype is needed to build; go get it!
31825 
31826     BUNDLE_FREETYPE="$enable_freetype_bundling"
31827 
31828     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31829       # User has specified settings
31830 
31831       if test "x$BUNDLE_FREETYPE" = x; then
31832         # If not specified, default is to bundle freetype
31833         BUNDLE_FREETYPE=yes
31834       fi
31835 
31836       if test "x$with_freetype" != x; then
31837         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31838         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31839       fi
31840 
31841       # Allow --with-freetype-lib and --with-freetype-include to override
31842       if test "x$with_freetype_include" != x; then
31843         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31844       fi
31845       if test "x$with_freetype_lib" != x; then
31846         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31847       fi
31848 
31849       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31850         # Okay, we got it. Check that it works.
31851 
31852   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31853   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31854   METHOD="--with-freetype"
31855 
31856   # First check if the files exists.
31857   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31858     # We found an arbitrary include file. That's a good sign.
31859     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31860 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31861     FOUND_FREETYPE=yes
31862 
31863     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31864     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31865       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31866 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31867       FOUND_FREETYPE=no
31868     else
31869       if test "x$OPENJDK_TARGET_OS" = xwindows; then
31870         # On Windows, we will need both .lib and .dll file.
31871         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31872           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31873 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31874           FOUND_FREETYPE=no
31875         fi
31876       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
31877         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31878         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31879       fi
31880     fi
31881   fi
31882 
31883   if test "x$FOUND_FREETYPE" = xyes; then
31884 
31885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31886 
31887   # Input might be given as Windows format, start by converting to
31888   # unix format.
31889   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31890   new_path=`$CYGPATH -u "$path"`
31891 
31892   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31893   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31894   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31895   # "foo.exe" is OK but "foo" is an error.
31896   #
31897   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31898   # It is also a way to make sure we got the proper file name for the real test later on.
31899   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31900   if test "x$test_shortpath" = x; then
31901     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31902 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31903     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31904   fi
31905 
31906   # Call helper function which possibly converts this using DOS-style short mode.
31907   # If so, the updated path is stored in $new_path.
31908 
31909   input_path="$new_path"
31910   # Check if we need to convert this using DOS-style short mode. If the path
31911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31912   # take no chances and rewrite it.
31913   # Note: m4 eats our [], so we need to use [ and ] instead.
31914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31915   if test "x$has_forbidden_chars" != x; then
31916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31917     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31918     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31919     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31920       # Going to short mode and back again did indeed matter. Since short mode is
31921       # case insensitive, let's make it lowercase to improve readability.
31922       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31923       # Now convert it back to Unix-stile (cygpath)
31924       input_path=`$CYGPATH -u "$shortmode_path"`
31925       new_path="$input_path"
31926     fi
31927   fi
31928 
31929   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31930   if test "x$test_cygdrive_prefix" = x; then
31931     # As a simple fix, exclude /usr/bin since it's not a real path.
31932     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31933       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31934       # a path prefixed by /cygdrive for fixpath to work.
31935       new_path="$CYGWIN_ROOT_PATH$input_path"
31936     fi
31937   fi
31938 
31939 
31940   if test "x$path" != "x$new_path"; then
31941     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31943 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31944   fi
31945 
31946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31947 
31948   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31949   has_colon=`$ECHO $path | $GREP ^.:`
31950   new_path="$path"
31951   if test "x$has_colon" = x; then
31952     # Not in mixed or Windows style, start by that.
31953     new_path=`cmd //c echo $path`
31954   fi
31955 
31956 
31957   input_path="$new_path"
31958   # Check if we need to convert this using DOS-style short mode. If the path
31959   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31960   # take no chances and rewrite it.
31961   # Note: m4 eats our [], so we need to use [ and ] instead.
31962   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31963   if test "x$has_forbidden_chars" != x; then
31964     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31965     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31966   fi
31967 
31968 
31969   windows_path="$new_path"
31970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31971     unix_path=`$CYGPATH -u "$windows_path"`
31972     new_path="$unix_path"
31973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31975     new_path="$unix_path"
31976   fi
31977 
31978   if test "x$path" != "x$new_path"; then
31979     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31980     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31981 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31982   fi
31983 
31984   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31985   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31986 
31987   else
31988     # We're on a posix platform. Hooray! :)
31989     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31990     has_space=`$ECHO "$path" | $GREP " "`
31991     if test "x$has_space" != x; then
31992       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31993 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31994       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31995     fi
31996 
31997     # Use eval to expand a potential ~
31998     eval path="$path"
31999     if test ! -f "$path" && test ! -d "$path"; then
32000       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32001     fi
32002 
32003     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32004   fi
32005 
32006 
32007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32008 
32009   # Input might be given as Windows format, start by converting to
32010   # unix format.
32011   path="$POTENTIAL_FREETYPE_LIB_PATH"
32012   new_path=`$CYGPATH -u "$path"`
32013 
32014   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32015   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32016   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32017   # "foo.exe" is OK but "foo" is an error.
32018   #
32019   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32020   # It is also a way to make sure we got the proper file name for the real test later on.
32021   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32022   if test "x$test_shortpath" = x; then
32023     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32024 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32025     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32026   fi
32027 
32028   # Call helper function which possibly converts this using DOS-style short mode.
32029   # If so, the updated path is stored in $new_path.
32030 
32031   input_path="$new_path"
32032   # Check if we need to convert this using DOS-style short mode. If the path
32033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32034   # take no chances and rewrite it.
32035   # Note: m4 eats our [], so we need to use [ and ] instead.
32036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32037   if test "x$has_forbidden_chars" != x; then
32038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32039     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32040     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32041     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32042       # Going to short mode and back again did indeed matter. Since short mode is
32043       # case insensitive, let's make it lowercase to improve readability.
32044       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32045       # Now convert it back to Unix-stile (cygpath)
32046       input_path=`$CYGPATH -u "$shortmode_path"`
32047       new_path="$input_path"
32048     fi
32049   fi
32050 
32051   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32052   if test "x$test_cygdrive_prefix" = x; then
32053     # As a simple fix, exclude /usr/bin since it's not a real path.
32054     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32055       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32056       # a path prefixed by /cygdrive for fixpath to work.
32057       new_path="$CYGWIN_ROOT_PATH$input_path"
32058     fi
32059   fi
32060 
32061 
32062   if test "x$path" != "x$new_path"; then
32063     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32064     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32065 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32066   fi
32067 
32068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32069 
32070   path="$POTENTIAL_FREETYPE_LIB_PATH"
32071   has_colon=`$ECHO $path | $GREP ^.:`
32072   new_path="$path"
32073   if test "x$has_colon" = x; then
32074     # Not in mixed or Windows style, start by that.
32075     new_path=`cmd //c echo $path`
32076   fi
32077 
32078 
32079   input_path="$new_path"
32080   # Check if we need to convert this using DOS-style short mode. If the path
32081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32082   # take no chances and rewrite it.
32083   # Note: m4 eats our [], so we need to use [ and ] instead.
32084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32085   if test "x$has_forbidden_chars" != x; then
32086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32087     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32088   fi
32089 
32090 
32091   windows_path="$new_path"
32092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32093     unix_path=`$CYGPATH -u "$windows_path"`
32094     new_path="$unix_path"
32095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32097     new_path="$unix_path"
32098   fi
32099 
32100   if test "x$path" != "x$new_path"; then
32101     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32102     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32103 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32104   fi
32105 
32106   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32107   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32108 
32109   else
32110     # We're on a posix platform. Hooray! :)
32111     path="$POTENTIAL_FREETYPE_LIB_PATH"
32112     has_space=`$ECHO "$path" | $GREP " "`
32113     if test "x$has_space" != x; then
32114       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32115 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32116       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32117     fi
32118 
32119     # Use eval to expand a potential ~
32120     eval path="$path"
32121     if test ! -f "$path" && test ! -d "$path"; then
32122       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32123     fi
32124 
32125     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32126   fi
32127 
32128 
32129     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32130     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32131 $as_echo_n "checking for freetype includes... " >&6; }
32132     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32133 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32134     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32135     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32136 $as_echo_n "checking for freetype libraries... " >&6; }
32137     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32138 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32139   fi
32140 
32141         if test "x$FOUND_FREETYPE" != xyes; then
32142           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
32143         fi
32144       else
32145         # User specified only one of lib or include. This is an error.
32146         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
32147           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
32148 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
32149           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
32150         else
32151           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
32152 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
32153           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
32154         fi
32155       fi
32156     else
32157       # User did not specify settings, but we need freetype. Try to locate it.
32158 
32159       if test "x$BUNDLE_FREETYPE" = x; then
32160         # If not specified, default is to bundle freetype only on windows
32161         if test "x$OPENJDK_TARGET_OS" = xwindows; then
32162           BUNDLE_FREETYPE=yes
32163         else
32164           BUNDLE_FREETYPE=no
32165         fi
32166       fi
32167 
32168       if test "x$FOUND_FREETYPE" != xyes; then
32169         # Check builddeps
32170 
32171 
32172   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
32173     # Source the builddeps file again, to make sure it uses the latest variables!
32174     . $builddepsfile
32175     # Look for a target and build machine specific resource!
32176     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
32177     if test "x$resource" = x; then
32178       # Ok, lets instead look for a target specific resource
32179       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
32180     fi
32181     if test "x$resource" = x; then
32182       # Ok, lets instead look for a build specific resource
32183       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
32184     fi
32185     if test "x$resource" = x; then
32186       # Ok, lets instead look for a generic resource
32187       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
32188       resource=${builddep_freetype2}
32189     fi
32190     if test "x$resource" != x; then
32191       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
32192 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
32193       # If the resource in the builddeps.conf file is an existing directory,
32194       # for example /java/linux/cups
32195       if test -d ${resource}; then
32196         depdir=${resource}
32197       else
32198 
32199   # freetype2 is for example mymodule
32200   # $resource is for example libs/general/libmymod_1_2_3.zip
32201   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32202   # $with_builddeps_dir is for example /localhome/builddeps
32203   # depdir is the name of the variable into which we store the depdir, eg MYMOD
32204   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32205   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32206   filename=`basename $resource`
32207   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32208   filebase=${filename%%.*}
32209   extension=${filename#*.}
32210   installdir=$with_builddeps_dir/$filebase
32211   if test ! -f $installdir/$filename.unpacked; then
32212     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
32213 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32214     if test ! -d $installdir; then
32215       mkdir -p $installdir
32216     fi
32217     if test ! -d $installdir; then
32218       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
32219     fi
32220     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
32221     touch $tmpfile
32222     if test ! -f $tmpfile; then
32223       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
32224     fi
32225 
32226   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32227   # $tmpfile is the local file name for the downloaded file.
32228   VALID_TOOL=no
32229   if test "x$BDEPS_FTP" = xwget; then
32230     VALID_TOOL=yes
32231     wget -O $tmpfile $with_builddeps_server/$resource
32232   fi
32233   if test "x$BDEPS_FTP" = xlftp; then
32234     VALID_TOOL=yes
32235     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32236   fi
32237   if test "x$BDEPS_FTP" = xftp; then
32238     VALID_TOOL=yes
32239     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32240     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32241     FTPUSERPWD=${FTPSERVER%%@*}
32242     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32243       FTPUSER=${userpwd%%:*}
32244       FTPPWD=${userpwd#*@}
32245       FTPSERVER=${FTPSERVER#*@}
32246     else
32247       FTPUSER=ftp
32248       FTPPWD=ftp
32249     fi
32250     # the "pass" command does not work on some
32251     # ftp clients (read ftp.exe) but if it works,
32252     # passive mode is better!
32253     ( \
32254         echo "user $FTPUSER $FTPPWD"        ; \
32255         echo "pass"                         ; \
32256         echo "bin"                          ; \
32257         echo "get $FTPPATH $tmpfile"              ; \
32258     ) | ftp -in $FTPSERVER
32259   fi
32260   if test "x$VALID_TOOL" != xyes; then
32261     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32262   fi
32263 
32264     mv $tmpfile $installdir/$filename
32265     if test ! -s $installdir/$filename; then
32266       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32267     fi
32268     case "$extension" in
32269       zip)  echo "Unzipping $installdir/$filename..."
32270         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32271         ;;
32272       tar.gz) echo "Untaring $installdir/$filename..."
32273         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32274         ;;
32275       tgz) echo "Untaring $installdir/$filename..."
32276         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32277         ;;
32278       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32279         ;;
32280     esac
32281   fi
32282   if test -f $installdir/$filename.unpacked; then
32283     depdir=$installdir
32284   fi
32285 
32286       fi
32287       # Source the builddeps file again, because in the previous command, the depdir
32288       # was updated to point at the current build dependency install directory.
32289       . $builddepsfile
32290       # Now extract variables from the builddeps.conf files.
32291       theroot=${builddep_freetype2_ROOT}
32292       thecflags=${builddep_freetype2_CFLAGS}
32293       thelibs=${builddep_freetype2_LIBS}
32294       if test "x$depdir" = x; then
32295         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
32296       fi
32297       FREETYPE=$depdir
32298       if test "x$theroot" != x; then
32299         FREETYPE="$theroot"
32300       fi
32301       if test "x$thecflags" != x; then
32302         FREETYPE_CFLAGS="$thecflags"
32303       fi
32304       if test "x$thelibs" != x; then
32305         FREETYPE_LIBS="$thelibs"
32306       fi
32307       FOUND_FREETYPE=yes
32308       else FOUND_FREETYPE=no
32309 
32310     fi
32311     else FOUND_FREETYPE=no
32312 
32313   fi
32314 
32315         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32316         if test "x$FOUND_FREETYPE" = xyes; then
32317           if test "x$BUNDLE_FREETYPE" = xyes; then
32318             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
32319 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
32320             FOUND_FREETYPE=no
32321           else
32322             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32323 $as_echo_n "checking for freetype... " >&6; }
32324             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
32325 $as_echo "yes (using builddeps)" >&6; }
32326           fi
32327         fi
32328       fi
32329 
32330       if test "x$FOUND_FREETYPE" != xyes; then
32331         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
32332         if test "x$PKG_CONFIG" != x; then
32333 
32334 pkg_failed=no
32335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
32336 $as_echo_n "checking for FREETYPE... " >&6; }
32337 
32338 if test -n "$FREETYPE_CFLAGS"; then
32339     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
32340  elif test -n "$PKG_CONFIG"; then
32341     if test -n "$PKG_CONFIG" && \
32342     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32343   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32344   ac_status=$?
32345   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32346   test $ac_status = 0; }; then
32347   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
32348 else
32349   pkg_failed=yes
32350 fi
32351  else
32352     pkg_failed=untried
32353 fi
32354 if test -n "$FREETYPE_LIBS"; then
32355     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
32356  elif test -n "$PKG_CONFIG"; then
32357     if test -n "$PKG_CONFIG" && \
32358     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32359   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32360   ac_status=$?
32361   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32362   test $ac_status = 0; }; then
32363   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
32364 else
32365   pkg_failed=yes
32366 fi
32367  else
32368     pkg_failed=untried
32369 fi
32370 
32371 
32372 
32373 if test $pkg_failed = yes; then
32374 
32375 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32376         _pkg_short_errors_supported=yes
32377 else
32378         _pkg_short_errors_supported=no
32379 fi
32380         if test $_pkg_short_errors_supported = yes; then
32381                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
32382         else
32383                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
32384         fi
32385         # Put the nasty error message in config.log where it belongs
32386         echo "$FREETYPE_PKG_ERRORS" >&5
32387 
32388         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32389 $as_echo "no" >&6; }
32390                 FOUND_FREETYPE=no
32391 elif test $pkg_failed = untried; then
32392         FOUND_FREETYPE=no
32393 else
32394         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
32395         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
32396         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32397 $as_echo "yes" >&6; }
32398         FOUND_FREETYPE=yes
32399 fi
32400           if test "x$FOUND_FREETYPE" = xyes; then
32401             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32402             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
32403             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32404             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32405               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
32406             fi
32407             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32408             if test "x$BUNDLE_FREETYPE" = xyes; then
32409               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
32410 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
32411               FOUND_FREETYPE=no
32412             else
32413               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32414 $as_echo_n "checking for freetype... " >&6; }
32415               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
32416 $as_echo "yes (using pkg-config)" >&6; }
32417             fi
32418           fi
32419         fi
32420       fi
32421 
32422       if test "x$FOUND_FREETYPE" != xyes; then
32423         # Check in well-known locations
32424         if test "x$OPENJDK_TARGET_OS" = xwindows; then
32425           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32426 
32427   windows_path="$FREETYPE_BASE_DIR"
32428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32429     unix_path=`$CYGPATH -u "$windows_path"`
32430     FREETYPE_BASE_DIR="$unix_path"
32431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32433     FREETYPE_BASE_DIR="$unix_path"
32434   fi
32435 
32436 
32437   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32438   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32439   METHOD="well-known location"
32440 
32441   # First check if the files exists.
32442   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32443     # We found an arbitrary include file. That's a good sign.
32444     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32445 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32446     FOUND_FREETYPE=yes
32447 
32448     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32449     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32450       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32451 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32452       FOUND_FREETYPE=no
32453     else
32454       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32455         # On Windows, we will need both .lib and .dll file.
32456         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32457           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32458 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32459           FOUND_FREETYPE=no
32460         fi
32461       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
32462         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32463         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32464       fi
32465     fi
32466   fi
32467 
32468   if test "x$FOUND_FREETYPE" = xyes; then
32469 
32470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32471 
32472   # Input might be given as Windows format, start by converting to
32473   # unix format.
32474   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32475   new_path=`$CYGPATH -u "$path"`
32476 
32477   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32478   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32479   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32480   # "foo.exe" is OK but "foo" is an error.
32481   #
32482   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32483   # It is also a way to make sure we got the proper file name for the real test later on.
32484   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32485   if test "x$test_shortpath" = x; then
32486     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32487 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32488     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32489   fi
32490 
32491   # Call helper function which possibly converts this using DOS-style short mode.
32492   # If so, the updated path is stored in $new_path.
32493 
32494   input_path="$new_path"
32495   # Check if we need to convert this using DOS-style short mode. If the path
32496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32497   # take no chances and rewrite it.
32498   # Note: m4 eats our [], so we need to use [ and ] instead.
32499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32500   if test "x$has_forbidden_chars" != x; then
32501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32502     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32503     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32504     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32505       # Going to short mode and back again did indeed matter. Since short mode is
32506       # case insensitive, let's make it lowercase to improve readability.
32507       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32508       # Now convert it back to Unix-stile (cygpath)
32509       input_path=`$CYGPATH -u "$shortmode_path"`
32510       new_path="$input_path"
32511     fi
32512   fi
32513 
32514   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32515   if test "x$test_cygdrive_prefix" = x; then
32516     # As a simple fix, exclude /usr/bin since it's not a real path.
32517     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32518       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32519       # a path prefixed by /cygdrive for fixpath to work.
32520       new_path="$CYGWIN_ROOT_PATH$input_path"
32521     fi
32522   fi
32523 
32524 
32525   if test "x$path" != "x$new_path"; then
32526     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32528 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32529   fi
32530 
32531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32532 
32533   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32534   has_colon=`$ECHO $path | $GREP ^.:`
32535   new_path="$path"
32536   if test "x$has_colon" = x; then
32537     # Not in mixed or Windows style, start by that.
32538     new_path=`cmd //c echo $path`
32539   fi
32540 
32541 
32542   input_path="$new_path"
32543   # Check if we need to convert this using DOS-style short mode. If the path
32544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32545   # take no chances and rewrite it.
32546   # Note: m4 eats our [], so we need to use [ and ] instead.
32547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32548   if test "x$has_forbidden_chars" != x; then
32549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32550     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32551   fi
32552 
32553 
32554   windows_path="$new_path"
32555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32556     unix_path=`$CYGPATH -u "$windows_path"`
32557     new_path="$unix_path"
32558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32560     new_path="$unix_path"
32561   fi
32562 
32563   if test "x$path" != "x$new_path"; then
32564     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32566 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32567   fi
32568 
32569   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32570   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32571 
32572   else
32573     # We're on a posix platform. Hooray! :)
32574     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32575     has_space=`$ECHO "$path" | $GREP " "`
32576     if test "x$has_space" != x; then
32577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32578 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32579       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32580     fi
32581 
32582     # Use eval to expand a potential ~
32583     eval path="$path"
32584     if test ! -f "$path" && test ! -d "$path"; then
32585       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32586     fi
32587 
32588     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32589   fi
32590 
32591 
32592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32593 
32594   # Input might be given as Windows format, start by converting to
32595   # unix format.
32596   path="$POTENTIAL_FREETYPE_LIB_PATH"
32597   new_path=`$CYGPATH -u "$path"`
32598 
32599   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32600   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32601   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32602   # "foo.exe" is OK but "foo" is an error.
32603   #
32604   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32605   # It is also a way to make sure we got the proper file name for the real test later on.
32606   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32607   if test "x$test_shortpath" = x; then
32608     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32609 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32610     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32611   fi
32612 
32613   # Call helper function which possibly converts this using DOS-style short mode.
32614   # If so, the updated path is stored in $new_path.
32615 
32616   input_path="$new_path"
32617   # Check if we need to convert this using DOS-style short mode. If the path
32618   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32619   # take no chances and rewrite it.
32620   # Note: m4 eats our [], so we need to use [ and ] instead.
32621   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32622   if test "x$has_forbidden_chars" != x; then
32623     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32624     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32625     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32626     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32627       # Going to short mode and back again did indeed matter. Since short mode is
32628       # case insensitive, let's make it lowercase to improve readability.
32629       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32630       # Now convert it back to Unix-stile (cygpath)
32631       input_path=`$CYGPATH -u "$shortmode_path"`
32632       new_path="$input_path"
32633     fi
32634   fi
32635 
32636   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32637   if test "x$test_cygdrive_prefix" = x; then
32638     # As a simple fix, exclude /usr/bin since it's not a real path.
32639     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32640       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32641       # a path prefixed by /cygdrive for fixpath to work.
32642       new_path="$CYGWIN_ROOT_PATH$input_path"
32643     fi
32644   fi
32645 
32646 
32647   if test "x$path" != "x$new_path"; then
32648     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32649     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32650 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32651   fi
32652 
32653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32654 
32655   path="$POTENTIAL_FREETYPE_LIB_PATH"
32656   has_colon=`$ECHO $path | $GREP ^.:`
32657   new_path="$path"
32658   if test "x$has_colon" = x; then
32659     # Not in mixed or Windows style, start by that.
32660     new_path=`cmd //c echo $path`
32661   fi
32662 
32663 
32664   input_path="$new_path"
32665   # Check if we need to convert this using DOS-style short mode. If the path
32666   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32667   # take no chances and rewrite it.
32668   # Note: m4 eats our [], so we need to use [ and ] instead.
32669   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32670   if test "x$has_forbidden_chars" != x; then
32671     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32672     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32673   fi
32674 
32675 
32676   windows_path="$new_path"
32677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32678     unix_path=`$CYGPATH -u "$windows_path"`
32679     new_path="$unix_path"
32680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32682     new_path="$unix_path"
32683   fi
32684 
32685   if test "x$path" != "x$new_path"; then
32686     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32688 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32689   fi
32690 
32691   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32692   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32693 
32694   else
32695     # We're on a posix platform. Hooray! :)
32696     path="$POTENTIAL_FREETYPE_LIB_PATH"
32697     has_space=`$ECHO "$path" | $GREP " "`
32698     if test "x$has_space" != x; then
32699       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32700 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32701       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32702     fi
32703 
32704     # Use eval to expand a potential ~
32705     eval path="$path"
32706     if test ! -f "$path" && test ! -d "$path"; then
32707       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32708     fi
32709 
32710     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32711   fi
32712 
32713 
32714     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32715     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32716 $as_echo_n "checking for freetype includes... " >&6; }
32717     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32718 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32719     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32720     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32721 $as_echo_n "checking for freetype libraries... " >&6; }
32722     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32723 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32724   fi
32725 
32726           if test "x$FOUND_FREETYPE" != xyes; then
32727             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32728 
32729   windows_path="$FREETYPE_BASE_DIR"
32730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32731     unix_path=`$CYGPATH -u "$windows_path"`
32732     FREETYPE_BASE_DIR="$unix_path"
32733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32735     FREETYPE_BASE_DIR="$unix_path"
32736   fi
32737 
32738 
32739   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32740   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32741   METHOD="well-known location"
32742 
32743   # First check if the files exists.
32744   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32745     # We found an arbitrary include file. That's a good sign.
32746     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32747 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32748     FOUND_FREETYPE=yes
32749 
32750     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32751     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32752       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32753 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32754       FOUND_FREETYPE=no
32755     else
32756       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32757         # On Windows, we will need both .lib and .dll file.
32758         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32759           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32760 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32761           FOUND_FREETYPE=no
32762         fi
32763       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
32764         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32765         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32766       fi
32767     fi
32768   fi
32769 
32770   if test "x$FOUND_FREETYPE" = xyes; then
32771 
32772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32773 
32774   # Input might be given as Windows format, start by converting to
32775   # unix format.
32776   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32777   new_path=`$CYGPATH -u "$path"`
32778 
32779   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32780   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32781   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32782   # "foo.exe" is OK but "foo" is an error.
32783   #
32784   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32785   # It is also a way to make sure we got the proper file name for the real test later on.
32786   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32787   if test "x$test_shortpath" = x; then
32788     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32789 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32790     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32791   fi
32792 
32793   # Call helper function which possibly converts this using DOS-style short mode.
32794   # If so, the updated path is stored in $new_path.
32795 
32796   input_path="$new_path"
32797   # Check if we need to convert this using DOS-style short mode. If the path
32798   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32799   # take no chances and rewrite it.
32800   # Note: m4 eats our [], so we need to use [ and ] instead.
32801   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32802   if test "x$has_forbidden_chars" != x; then
32803     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32804     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32805     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32806     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32807       # Going to short mode and back again did indeed matter. Since short mode is
32808       # case insensitive, let's make it lowercase to improve readability.
32809       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32810       # Now convert it back to Unix-stile (cygpath)
32811       input_path=`$CYGPATH -u "$shortmode_path"`
32812       new_path="$input_path"
32813     fi
32814   fi
32815 
32816   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32817   if test "x$test_cygdrive_prefix" = x; then
32818     # As a simple fix, exclude /usr/bin since it's not a real path.
32819     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32820       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32821       # a path prefixed by /cygdrive for fixpath to work.
32822       new_path="$CYGWIN_ROOT_PATH$input_path"
32823     fi
32824   fi
32825 
32826 
32827   if test "x$path" != "x$new_path"; then
32828     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32829     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32830 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32831   fi
32832 
32833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32834 
32835   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32836   has_colon=`$ECHO $path | $GREP ^.:`
32837   new_path="$path"
32838   if test "x$has_colon" = x; then
32839     # Not in mixed or Windows style, start by that.
32840     new_path=`cmd //c echo $path`
32841   fi
32842 
32843 
32844   input_path="$new_path"
32845   # Check if we need to convert this using DOS-style short mode. If the path
32846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32847   # take no chances and rewrite it.
32848   # Note: m4 eats our [], so we need to use [ and ] instead.
32849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32850   if test "x$has_forbidden_chars" != x; then
32851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32852     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32853   fi
32854 
32855 
32856   windows_path="$new_path"
32857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32858     unix_path=`$CYGPATH -u "$windows_path"`
32859     new_path="$unix_path"
32860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32862     new_path="$unix_path"
32863   fi
32864 
32865   if test "x$path" != "x$new_path"; then
32866     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32867     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32868 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32869   fi
32870 
32871   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32872   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32873 
32874   else
32875     # We're on a posix platform. Hooray! :)
32876     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32877     has_space=`$ECHO "$path" | $GREP " "`
32878     if test "x$has_space" != x; then
32879       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32880 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32881       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32882     fi
32883 
32884     # Use eval to expand a potential ~
32885     eval path="$path"
32886     if test ! -f "$path" && test ! -d "$path"; then
32887       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32888     fi
32889 
32890     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32891   fi
32892 
32893 
32894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32895 
32896   # Input might be given as Windows format, start by converting to
32897   # unix format.
32898   path="$POTENTIAL_FREETYPE_LIB_PATH"
32899   new_path=`$CYGPATH -u "$path"`
32900 
32901   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32902   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32903   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32904   # "foo.exe" is OK but "foo" is an error.
32905   #
32906   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32907   # It is also a way to make sure we got the proper file name for the real test later on.
32908   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32909   if test "x$test_shortpath" = x; then
32910     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32911 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32912     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32913   fi
32914 
32915   # Call helper function which possibly converts this using DOS-style short mode.
32916   # If so, the updated path is stored in $new_path.
32917 
32918   input_path="$new_path"
32919   # Check if we need to convert this using DOS-style short mode. If the path
32920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32921   # take no chances and rewrite it.
32922   # Note: m4 eats our [], so we need to use [ and ] instead.
32923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32924   if test "x$has_forbidden_chars" != x; then
32925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32926     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32927     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32928     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32929       # Going to short mode and back again did indeed matter. Since short mode is
32930       # case insensitive, let's make it lowercase to improve readability.
32931       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32932       # Now convert it back to Unix-stile (cygpath)
32933       input_path=`$CYGPATH -u "$shortmode_path"`
32934       new_path="$input_path"
32935     fi
32936   fi
32937 
32938   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32939   if test "x$test_cygdrive_prefix" = x; then
32940     # As a simple fix, exclude /usr/bin since it's not a real path.
32941     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32942       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32943       # a path prefixed by /cygdrive for fixpath to work.
32944       new_path="$CYGWIN_ROOT_PATH$input_path"
32945     fi
32946   fi
32947 
32948 
32949   if test "x$path" != "x$new_path"; then
32950     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32952 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32953   fi
32954 
32955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32956 
32957   path="$POTENTIAL_FREETYPE_LIB_PATH"
32958   has_colon=`$ECHO $path | $GREP ^.:`
32959   new_path="$path"
32960   if test "x$has_colon" = x; then
32961     # Not in mixed or Windows style, start by that.
32962     new_path=`cmd //c echo $path`
32963   fi
32964 
32965 
32966   input_path="$new_path"
32967   # Check if we need to convert this using DOS-style short mode. If the path
32968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32969   # take no chances and rewrite it.
32970   # Note: m4 eats our [], so we need to use [ and ] instead.
32971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32972   if test "x$has_forbidden_chars" != x; then
32973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32974     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32975   fi
32976 
32977 
32978   windows_path="$new_path"
32979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32980     unix_path=`$CYGPATH -u "$windows_path"`
32981     new_path="$unix_path"
32982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32984     new_path="$unix_path"
32985   fi
32986 
32987   if test "x$path" != "x$new_path"; then
32988     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32990 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32991   fi
32992 
32993   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32994   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32995 
32996   else
32997     # We're on a posix platform. Hooray! :)
32998     path="$POTENTIAL_FREETYPE_LIB_PATH"
32999     has_space=`$ECHO "$path" | $GREP " "`
33000     if test "x$has_space" != x; then
33001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33002 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33003       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33004     fi
33005 
33006     # Use eval to expand a potential ~
33007     eval path="$path"
33008     if test ! -f "$path" && test ! -d "$path"; then
33009       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33010     fi
33011 
33012     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33013   fi
33014 
33015 
33016     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33017     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33018 $as_echo_n "checking for freetype includes... " >&6; }
33019     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33020 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33021     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33022     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33023 $as_echo_n "checking for freetype libraries... " >&6; }
33024     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33025 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33026   fi
33027 
33028           fi
33029         else
33030           if test "x$SYS_ROOT" = "x/"; then
33031             FREETYPE_ROOT=
33032           else
33033             FREETYPE_ROOT="$SYS_ROOT"
33034           fi
33035           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33036 
33037   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33038   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
33039   METHOD="well-known location"
33040 
33041   # First check if the files exists.
33042   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33043     # We found an arbitrary include file. That's a good sign.
33044     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33045 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33046     FOUND_FREETYPE=yes
33047 
33048     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33049     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33050       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33051 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33052       FOUND_FREETYPE=no
33053     else
33054       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33055         # On Windows, we will need both .lib and .dll file.
33056         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33057           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33058 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33059           FOUND_FREETYPE=no
33060         fi
33061       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
33062         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33063         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33064       fi
33065     fi
33066   fi
33067 
33068   if test "x$FOUND_FREETYPE" = xyes; then
33069 
33070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33071 
33072   # Input might be given as Windows format, start by converting to
33073   # unix format.
33074   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33075   new_path=`$CYGPATH -u "$path"`
33076 
33077   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33078   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33079   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33080   # "foo.exe" is OK but "foo" is an error.
33081   #
33082   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33083   # It is also a way to make sure we got the proper file name for the real test later on.
33084   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33085   if test "x$test_shortpath" = x; then
33086     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33087 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33088     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33089   fi
33090 
33091   # Call helper function which possibly converts this using DOS-style short mode.
33092   # If so, the updated path is stored in $new_path.
33093 
33094   input_path="$new_path"
33095   # Check if we need to convert this using DOS-style short mode. If the path
33096   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33097   # take no chances and rewrite it.
33098   # Note: m4 eats our [], so we need to use [ and ] instead.
33099   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33100   if test "x$has_forbidden_chars" != x; then
33101     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33102     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33103     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33104     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33105       # Going to short mode and back again did indeed matter. Since short mode is
33106       # case insensitive, let's make it lowercase to improve readability.
33107       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33108       # Now convert it back to Unix-stile (cygpath)
33109       input_path=`$CYGPATH -u "$shortmode_path"`
33110       new_path="$input_path"
33111     fi
33112   fi
33113 
33114   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33115   if test "x$test_cygdrive_prefix" = x; then
33116     # As a simple fix, exclude /usr/bin since it's not a real path.
33117     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33118       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33119       # a path prefixed by /cygdrive for fixpath to work.
33120       new_path="$CYGWIN_ROOT_PATH$input_path"
33121     fi
33122   fi
33123 
33124 
33125   if test "x$path" != "x$new_path"; then
33126     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33128 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33129   fi
33130 
33131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33132 
33133   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33134   has_colon=`$ECHO $path | $GREP ^.:`
33135   new_path="$path"
33136   if test "x$has_colon" = x; then
33137     # Not in mixed or Windows style, start by that.
33138     new_path=`cmd //c echo $path`
33139   fi
33140 
33141 
33142   input_path="$new_path"
33143   # Check if we need to convert this using DOS-style short mode. If the path
33144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33145   # take no chances and rewrite it.
33146   # Note: m4 eats our [], so we need to use [ and ] instead.
33147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33148   if test "x$has_forbidden_chars" != x; then
33149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33150     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33151   fi
33152 
33153 
33154   windows_path="$new_path"
33155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33156     unix_path=`$CYGPATH -u "$windows_path"`
33157     new_path="$unix_path"
33158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33160     new_path="$unix_path"
33161   fi
33162 
33163   if test "x$path" != "x$new_path"; then
33164     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33166 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33167   fi
33168 
33169   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33170   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33171 
33172   else
33173     # We're on a posix platform. Hooray! :)
33174     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33175     has_space=`$ECHO "$path" | $GREP " "`
33176     if test "x$has_space" != x; then
33177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33178 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33179       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33180     fi
33181 
33182     # Use eval to expand a potential ~
33183     eval path="$path"
33184     if test ! -f "$path" && test ! -d "$path"; then
33185       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33186     fi
33187 
33188     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33189   fi
33190 
33191 
33192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33193 
33194   # Input might be given as Windows format, start by converting to
33195   # unix format.
33196   path="$POTENTIAL_FREETYPE_LIB_PATH"
33197   new_path=`$CYGPATH -u "$path"`
33198 
33199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33202   # "foo.exe" is OK but "foo" is an error.
33203   #
33204   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33205   # It is also a way to make sure we got the proper file name for the real test later on.
33206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33207   if test "x$test_shortpath" = x; then
33208     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33209 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33210     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33211   fi
33212 
33213   # Call helper function which possibly converts this using DOS-style short mode.
33214   # If so, the updated path is stored in $new_path.
33215 
33216   input_path="$new_path"
33217   # Check if we need to convert this using DOS-style short mode. If the path
33218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33219   # take no chances and rewrite it.
33220   # Note: m4 eats our [], so we need to use [ and ] instead.
33221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33222   if test "x$has_forbidden_chars" != x; then
33223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33224     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33225     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33226     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33227       # Going to short mode and back again did indeed matter. Since short mode is
33228       # case insensitive, let's make it lowercase to improve readability.
33229       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33230       # Now convert it back to Unix-stile (cygpath)
33231       input_path=`$CYGPATH -u "$shortmode_path"`
33232       new_path="$input_path"
33233     fi
33234   fi
33235 
33236   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33237   if test "x$test_cygdrive_prefix" = x; then
33238     # As a simple fix, exclude /usr/bin since it's not a real path.
33239     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33240       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33241       # a path prefixed by /cygdrive for fixpath to work.
33242       new_path="$CYGWIN_ROOT_PATH$input_path"
33243     fi
33244   fi
33245 
33246 
33247   if test "x$path" != "x$new_path"; then
33248     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33250 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33251   fi
33252 
33253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33254 
33255   path="$POTENTIAL_FREETYPE_LIB_PATH"
33256   has_colon=`$ECHO $path | $GREP ^.:`
33257   new_path="$path"
33258   if test "x$has_colon" = x; then
33259     # Not in mixed or Windows style, start by that.
33260     new_path=`cmd //c echo $path`
33261   fi
33262 
33263 
33264   input_path="$new_path"
33265   # Check if we need to convert this using DOS-style short mode. If the path
33266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33267   # take no chances and rewrite it.
33268   # Note: m4 eats our [], so we need to use [ and ] instead.
33269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33270   if test "x$has_forbidden_chars" != x; then
33271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33272     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33273   fi
33274 
33275 
33276   windows_path="$new_path"
33277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33278     unix_path=`$CYGPATH -u "$windows_path"`
33279     new_path="$unix_path"
33280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33282     new_path="$unix_path"
33283   fi
33284 
33285   if test "x$path" != "x$new_path"; then
33286     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33287     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33288 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33289   fi
33290 
33291   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33292   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33293 
33294   else
33295     # We're on a posix platform. Hooray! :)
33296     path="$POTENTIAL_FREETYPE_LIB_PATH"
33297     has_space=`$ECHO "$path" | $GREP " "`
33298     if test "x$has_space" != x; then
33299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33300 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33301       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33302     fi
33303 
33304     # Use eval to expand a potential ~
33305     eval path="$path"
33306     if test ! -f "$path" && test ! -d "$path"; then
33307       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33308     fi
33309 
33310     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33311   fi
33312 
33313 
33314     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33316 $as_echo_n "checking for freetype includes... " >&6; }
33317     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33318 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33319     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33320     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33321 $as_echo_n "checking for freetype libraries... " >&6; }
33322     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33323 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33324   fi
33325 
33326 
33327           if test "x$FOUND_FREETYPE" != xyes; then
33328             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
33329 
33330   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33331   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
33332   METHOD="well-known location"
33333 
33334   # First check if the files exists.
33335   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33336     # We found an arbitrary include file. That's a good sign.
33337     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33338 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33339     FOUND_FREETYPE=yes
33340 
33341     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33342     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33343       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33344 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33345       FOUND_FREETYPE=no
33346     else
33347       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33348         # On Windows, we will need both .lib and .dll file.
33349         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33350           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33351 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33352           FOUND_FREETYPE=no
33353         fi
33354       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
33355         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33356         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33357       fi
33358     fi
33359   fi
33360 
33361   if test "x$FOUND_FREETYPE" = xyes; then
33362 
33363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33364 
33365   # Input might be given as Windows format, start by converting to
33366   # unix format.
33367   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33368   new_path=`$CYGPATH -u "$path"`
33369 
33370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33373   # "foo.exe" is OK but "foo" is an error.
33374   #
33375   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33376   # It is also a way to make sure we got the proper file name for the real test later on.
33377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33378   if test "x$test_shortpath" = x; then
33379     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33380 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33381     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33382   fi
33383 
33384   # Call helper function which possibly converts this using DOS-style short mode.
33385   # If so, the updated path is stored in $new_path.
33386 
33387   input_path="$new_path"
33388   # Check if we need to convert this using DOS-style short mode. If the path
33389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33390   # take no chances and rewrite it.
33391   # Note: m4 eats our [], so we need to use [ and ] instead.
33392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33393   if test "x$has_forbidden_chars" != x; then
33394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33395     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33396     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33397     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33398       # Going to short mode and back again did indeed matter. Since short mode is
33399       # case insensitive, let's make it lowercase to improve readability.
33400       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33401       # Now convert it back to Unix-stile (cygpath)
33402       input_path=`$CYGPATH -u "$shortmode_path"`
33403       new_path="$input_path"
33404     fi
33405   fi
33406 
33407   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33408   if test "x$test_cygdrive_prefix" = x; then
33409     # As a simple fix, exclude /usr/bin since it's not a real path.
33410     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33411       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33412       # a path prefixed by /cygdrive for fixpath to work.
33413       new_path="$CYGWIN_ROOT_PATH$input_path"
33414     fi
33415   fi
33416 
33417 
33418   if test "x$path" != "x$new_path"; then
33419     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33421 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33422   fi
33423 
33424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33425 
33426   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33427   has_colon=`$ECHO $path | $GREP ^.:`
33428   new_path="$path"
33429   if test "x$has_colon" = x; then
33430     # Not in mixed or Windows style, start by that.
33431     new_path=`cmd //c echo $path`
33432   fi
33433 
33434 
33435   input_path="$new_path"
33436   # Check if we need to convert this using DOS-style short mode. If the path
33437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33438   # take no chances and rewrite it.
33439   # Note: m4 eats our [], so we need to use [ and ] instead.
33440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33441   if test "x$has_forbidden_chars" != x; then
33442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33444   fi
33445 
33446 
33447   windows_path="$new_path"
33448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33449     unix_path=`$CYGPATH -u "$windows_path"`
33450     new_path="$unix_path"
33451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33453     new_path="$unix_path"
33454   fi
33455 
33456   if test "x$path" != "x$new_path"; then
33457     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33459 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33460   fi
33461 
33462   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33463   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33464 
33465   else
33466     # We're on a posix platform. Hooray! :)
33467     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33468     has_space=`$ECHO "$path" | $GREP " "`
33469     if test "x$has_space" != x; then
33470       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33471 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33472       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33473     fi
33474 
33475     # Use eval to expand a potential ~
33476     eval path="$path"
33477     if test ! -f "$path" && test ! -d "$path"; then
33478       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33479     fi
33480 
33481     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33482   fi
33483 
33484 
33485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33486 
33487   # Input might be given as Windows format, start by converting to
33488   # unix format.
33489   path="$POTENTIAL_FREETYPE_LIB_PATH"
33490   new_path=`$CYGPATH -u "$path"`
33491 
33492   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33493   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33494   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33495   # "foo.exe" is OK but "foo" is an error.
33496   #
33497   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33498   # It is also a way to make sure we got the proper file name for the real test later on.
33499   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33500   if test "x$test_shortpath" = x; then
33501     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33502 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33503     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33504   fi
33505 
33506   # Call helper function which possibly converts this using DOS-style short mode.
33507   # If so, the updated path is stored in $new_path.
33508 
33509   input_path="$new_path"
33510   # Check if we need to convert this using DOS-style short mode. If the path
33511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33512   # take no chances and rewrite it.
33513   # Note: m4 eats our [], so we need to use [ and ] instead.
33514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33515   if test "x$has_forbidden_chars" != x; then
33516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33517     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33518     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33519     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33520       # Going to short mode and back again did indeed matter. Since short mode is
33521       # case insensitive, let's make it lowercase to improve readability.
33522       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33523       # Now convert it back to Unix-stile (cygpath)
33524       input_path=`$CYGPATH -u "$shortmode_path"`
33525       new_path="$input_path"
33526     fi
33527   fi
33528 
33529   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33530   if test "x$test_cygdrive_prefix" = x; then
33531     # As a simple fix, exclude /usr/bin since it's not a real path.
33532     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33533       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33534       # a path prefixed by /cygdrive for fixpath to work.
33535       new_path="$CYGWIN_ROOT_PATH$input_path"
33536     fi
33537   fi
33538 
33539 
33540   if test "x$path" != "x$new_path"; then
33541     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33542     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33543 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33544   fi
33545 
33546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33547 
33548   path="$POTENTIAL_FREETYPE_LIB_PATH"
33549   has_colon=`$ECHO $path | $GREP ^.:`
33550   new_path="$path"
33551   if test "x$has_colon" = x; then
33552     # Not in mixed or Windows style, start by that.
33553     new_path=`cmd //c echo $path`
33554   fi
33555 
33556 
33557   input_path="$new_path"
33558   # Check if we need to convert this using DOS-style short mode. If the path
33559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33560   # take no chances and rewrite it.
33561   # Note: m4 eats our [], so we need to use [ and ] instead.
33562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33563   if test "x$has_forbidden_chars" != x; then
33564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33565     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33566   fi
33567 
33568 
33569   windows_path="$new_path"
33570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33571     unix_path=`$CYGPATH -u "$windows_path"`
33572     new_path="$unix_path"
33573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33575     new_path="$unix_path"
33576   fi
33577 
33578   if test "x$path" != "x$new_path"; then
33579     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33580     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33581 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33582   fi
33583 
33584   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33585   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33586 
33587   else
33588     # We're on a posix platform. Hooray! :)
33589     path="$POTENTIAL_FREETYPE_LIB_PATH"
33590     has_space=`$ECHO "$path" | $GREP " "`
33591     if test "x$has_space" != x; then
33592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33593 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33594       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33595     fi
33596 
33597     # Use eval to expand a potential ~
33598     eval path="$path"
33599     if test ! -f "$path" && test ! -d "$path"; then
33600       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33601     fi
33602 
33603     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33604   fi
33605 
33606 
33607     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33609 $as_echo_n "checking for freetype includes... " >&6; }
33610     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33611 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33612     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33613     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33614 $as_echo_n "checking for freetype libraries... " >&6; }
33615     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33616 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33617   fi
33618 
33619           fi
33620 
33621           if test "x$FOUND_FREETYPE" != xyes; then
33622             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33623             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33624 
33625   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33626   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33627   METHOD="well-known location"
33628 
33629   # First check if the files exists.
33630   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33631     # We found an arbitrary include file. That's a good sign.
33632     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33633 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33634     FOUND_FREETYPE=yes
33635 
33636     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33637     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33638       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33639 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33640       FOUND_FREETYPE=no
33641     else
33642       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33643         # On Windows, we will need both .lib and .dll file.
33644         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33645           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33646 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33647           FOUND_FREETYPE=no
33648         fi
33649       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
33650         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33651         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33652       fi
33653     fi
33654   fi
33655 
33656   if test "x$FOUND_FREETYPE" = xyes; then
33657 
33658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33659 
33660   # Input might be given as Windows format, start by converting to
33661   # unix format.
33662   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33663   new_path=`$CYGPATH -u "$path"`
33664 
33665   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33666   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33667   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33668   # "foo.exe" is OK but "foo" is an error.
33669   #
33670   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33671   # It is also a way to make sure we got the proper file name for the real test later on.
33672   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33673   if test "x$test_shortpath" = x; then
33674     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33675 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33676     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33677   fi
33678 
33679   # Call helper function which possibly converts this using DOS-style short mode.
33680   # If so, the updated path is stored in $new_path.
33681 
33682   input_path="$new_path"
33683   # Check if we need to convert this using DOS-style short mode. If the path
33684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33685   # take no chances and rewrite it.
33686   # Note: m4 eats our [], so we need to use [ and ] instead.
33687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33688   if test "x$has_forbidden_chars" != x; then
33689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33690     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33691     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33692     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33693       # Going to short mode and back again did indeed matter. Since short mode is
33694       # case insensitive, let's make it lowercase to improve readability.
33695       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33696       # Now convert it back to Unix-stile (cygpath)
33697       input_path=`$CYGPATH -u "$shortmode_path"`
33698       new_path="$input_path"
33699     fi
33700   fi
33701 
33702   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33703   if test "x$test_cygdrive_prefix" = x; then
33704     # As a simple fix, exclude /usr/bin since it's not a real path.
33705     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33706       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33707       # a path prefixed by /cygdrive for fixpath to work.
33708       new_path="$CYGWIN_ROOT_PATH$input_path"
33709     fi
33710   fi
33711 
33712 
33713   if test "x$path" != "x$new_path"; then
33714     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33716 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33717   fi
33718 
33719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33720 
33721   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33722   has_colon=`$ECHO $path | $GREP ^.:`
33723   new_path="$path"
33724   if test "x$has_colon" = x; then
33725     # Not in mixed or Windows style, start by that.
33726     new_path=`cmd //c echo $path`
33727   fi
33728 
33729 
33730   input_path="$new_path"
33731   # Check if we need to convert this using DOS-style short mode. If the path
33732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33733   # take no chances and rewrite it.
33734   # Note: m4 eats our [], so we need to use [ and ] instead.
33735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33736   if test "x$has_forbidden_chars" != x; then
33737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33739   fi
33740 
33741 
33742   windows_path="$new_path"
33743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33744     unix_path=`$CYGPATH -u "$windows_path"`
33745     new_path="$unix_path"
33746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33748     new_path="$unix_path"
33749   fi
33750 
33751   if test "x$path" != "x$new_path"; then
33752     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33753     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33754 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33755   fi
33756 
33757   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33758   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33759 
33760   else
33761     # We're on a posix platform. Hooray! :)
33762     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33763     has_space=`$ECHO "$path" | $GREP " "`
33764     if test "x$has_space" != x; then
33765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33766 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33767       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33768     fi
33769 
33770     # Use eval to expand a potential ~
33771     eval path="$path"
33772     if test ! -f "$path" && test ! -d "$path"; then
33773       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33774     fi
33775 
33776     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33777   fi
33778 
33779 
33780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33781 
33782   # Input might be given as Windows format, start by converting to
33783   # unix format.
33784   path="$POTENTIAL_FREETYPE_LIB_PATH"
33785   new_path=`$CYGPATH -u "$path"`
33786 
33787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33790   # "foo.exe" is OK but "foo" is an error.
33791   #
33792   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33793   # It is also a way to make sure we got the proper file name for the real test later on.
33794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33795   if test "x$test_shortpath" = x; then
33796     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33797 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33798     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33799   fi
33800 
33801   # Call helper function which possibly converts this using DOS-style short mode.
33802   # If so, the updated path is stored in $new_path.
33803 
33804   input_path="$new_path"
33805   # Check if we need to convert this using DOS-style short mode. If the path
33806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33807   # take no chances and rewrite it.
33808   # Note: m4 eats our [], so we need to use [ and ] instead.
33809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33810   if test "x$has_forbidden_chars" != x; then
33811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33815       # Going to short mode and back again did indeed matter. Since short mode is
33816       # case insensitive, let's make it lowercase to improve readability.
33817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33818       # Now convert it back to Unix-stile (cygpath)
33819       input_path=`$CYGPATH -u "$shortmode_path"`
33820       new_path="$input_path"
33821     fi
33822   fi
33823 
33824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33825   if test "x$test_cygdrive_prefix" = x; then
33826     # As a simple fix, exclude /usr/bin since it's not a real path.
33827     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33829       # a path prefixed by /cygdrive for fixpath to work.
33830       new_path="$CYGWIN_ROOT_PATH$input_path"
33831     fi
33832   fi
33833 
33834 
33835   if test "x$path" != "x$new_path"; then
33836     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33838 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33839   fi
33840 
33841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33842 
33843   path="$POTENTIAL_FREETYPE_LIB_PATH"
33844   has_colon=`$ECHO $path | $GREP ^.:`
33845   new_path="$path"
33846   if test "x$has_colon" = x; then
33847     # Not in mixed or Windows style, start by that.
33848     new_path=`cmd //c echo $path`
33849   fi
33850 
33851 
33852   input_path="$new_path"
33853   # Check if we need to convert this using DOS-style short mode. If the path
33854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33855   # take no chances and rewrite it.
33856   # Note: m4 eats our [], so we need to use [ and ] instead.
33857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33858   if test "x$has_forbidden_chars" != x; then
33859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33861   fi
33862 
33863 
33864   windows_path="$new_path"
33865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33866     unix_path=`$CYGPATH -u "$windows_path"`
33867     new_path="$unix_path"
33868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33870     new_path="$unix_path"
33871   fi
33872 
33873   if test "x$path" != "x$new_path"; then
33874     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33876 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33877   fi
33878 
33879   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33880   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33881 
33882   else
33883     # We're on a posix platform. Hooray! :)
33884     path="$POTENTIAL_FREETYPE_LIB_PATH"
33885     has_space=`$ECHO "$path" | $GREP " "`
33886     if test "x$has_space" != x; then
33887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33888 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33889       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33890     fi
33891 
33892     # Use eval to expand a potential ~
33893     eval path="$path"
33894     if test ! -f "$path" && test ! -d "$path"; then
33895       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33896     fi
33897 
33898     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33899   fi
33900 
33901 
33902     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33904 $as_echo_n "checking for freetype includes... " >&6; }
33905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33906 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33907     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33908     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33909 $as_echo_n "checking for freetype libraries... " >&6; }
33910     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33911 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33912   fi
33913 
33914             else
33915 
33916   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33917   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33918   METHOD="well-known location"
33919 
33920   # First check if the files exists.
33921   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33922     # We found an arbitrary include file. That's a good sign.
33923     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33924 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33925     FOUND_FREETYPE=yes
33926 
33927     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33928     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33929       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33930 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33931       FOUND_FREETYPE=no
33932     else
33933       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33934         # On Windows, we will need both .lib and .dll file.
33935         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33936           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33937 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33938           FOUND_FREETYPE=no
33939         fi
33940       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
33941         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33942         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33943       fi
33944     fi
33945   fi
33946 
33947   if test "x$FOUND_FREETYPE" = xyes; then
33948 
33949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33950 
33951   # Input might be given as Windows format, start by converting to
33952   # unix format.
33953   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33954   new_path=`$CYGPATH -u "$path"`
33955 
33956   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33957   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33958   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33959   # "foo.exe" is OK but "foo" is an error.
33960   #
33961   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33962   # It is also a way to make sure we got the proper file name for the real test later on.
33963   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33964   if test "x$test_shortpath" = x; then
33965     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33966 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33967     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33968   fi
33969 
33970   # Call helper function which possibly converts this using DOS-style short mode.
33971   # If so, the updated path is stored in $new_path.
33972 
33973   input_path="$new_path"
33974   # Check if we need to convert this using DOS-style short mode. If the path
33975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33976   # take no chances and rewrite it.
33977   # Note: m4 eats our [], so we need to use [ and ] instead.
33978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33979   if test "x$has_forbidden_chars" != x; then
33980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33981     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33982     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33983     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33984       # Going to short mode and back again did indeed matter. Since short mode is
33985       # case insensitive, let's make it lowercase to improve readability.
33986       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33987       # Now convert it back to Unix-stile (cygpath)
33988       input_path=`$CYGPATH -u "$shortmode_path"`
33989       new_path="$input_path"
33990     fi
33991   fi
33992 
33993   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33994   if test "x$test_cygdrive_prefix" = x; then
33995     # As a simple fix, exclude /usr/bin since it's not a real path.
33996     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33997       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33998       # a path prefixed by /cygdrive for fixpath to work.
33999       new_path="$CYGWIN_ROOT_PATH$input_path"
34000     fi
34001   fi
34002 
34003 
34004   if test "x$path" != "x$new_path"; then
34005     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34007 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34008   fi
34009 
34010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34011 
34012   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34013   has_colon=`$ECHO $path | $GREP ^.:`
34014   new_path="$path"
34015   if test "x$has_colon" = x; then
34016     # Not in mixed or Windows style, start by that.
34017     new_path=`cmd //c echo $path`
34018   fi
34019 
34020 
34021   input_path="$new_path"
34022   # Check if we need to convert this using DOS-style short mode. If the path
34023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34024   # take no chances and rewrite it.
34025   # Note: m4 eats our [], so we need to use [ and ] instead.
34026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34027   if test "x$has_forbidden_chars" != x; then
34028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34029     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34030   fi
34031 
34032 
34033   windows_path="$new_path"
34034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34035     unix_path=`$CYGPATH -u "$windows_path"`
34036     new_path="$unix_path"
34037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34039     new_path="$unix_path"
34040   fi
34041 
34042   if test "x$path" != "x$new_path"; then
34043     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34044     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34045 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34046   fi
34047 
34048   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34049   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34050 
34051   else
34052     # We're on a posix platform. Hooray! :)
34053     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34054     has_space=`$ECHO "$path" | $GREP " "`
34055     if test "x$has_space" != x; then
34056       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34057 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34058       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34059     fi
34060 
34061     # Use eval to expand a potential ~
34062     eval path="$path"
34063     if test ! -f "$path" && test ! -d "$path"; then
34064       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34065     fi
34066 
34067     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34068   fi
34069 
34070 
34071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34072 
34073   # Input might be given as Windows format, start by converting to
34074   # unix format.
34075   path="$POTENTIAL_FREETYPE_LIB_PATH"
34076   new_path=`$CYGPATH -u "$path"`
34077 
34078   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34079   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34080   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34081   # "foo.exe" is OK but "foo" is an error.
34082   #
34083   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34084   # It is also a way to make sure we got the proper file name for the real test later on.
34085   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34086   if test "x$test_shortpath" = x; then
34087     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34088 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34089     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
34090   fi
34091 
34092   # Call helper function which possibly converts this using DOS-style short mode.
34093   # If so, the updated path is stored in $new_path.
34094 
34095   input_path="$new_path"
34096   # Check if we need to convert this using DOS-style short mode. If the path
34097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34098   # take no chances and rewrite it.
34099   # Note: m4 eats our [], so we need to use [ and ] instead.
34100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34101   if test "x$has_forbidden_chars" != x; then
34102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34106       # Going to short mode and back again did indeed matter. Since short mode is
34107       # case insensitive, let's make it lowercase to improve readability.
34108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34109       # Now convert it back to Unix-stile (cygpath)
34110       input_path=`$CYGPATH -u "$shortmode_path"`
34111       new_path="$input_path"
34112     fi
34113   fi
34114 
34115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34116   if test "x$test_cygdrive_prefix" = x; then
34117     # As a simple fix, exclude /usr/bin since it's not a real path.
34118     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34120       # a path prefixed by /cygdrive for fixpath to work.
34121       new_path="$CYGWIN_ROOT_PATH$input_path"
34122     fi
34123   fi
34124 
34125 
34126   if test "x$path" != "x$new_path"; then
34127     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34129 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34130   fi
34131 
34132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34133 
34134   path="$POTENTIAL_FREETYPE_LIB_PATH"
34135   has_colon=`$ECHO $path | $GREP ^.:`
34136   new_path="$path"
34137   if test "x$has_colon" = x; then
34138     # Not in mixed or Windows style, start by that.
34139     new_path=`cmd //c echo $path`
34140   fi
34141 
34142 
34143   input_path="$new_path"
34144   # Check if we need to convert this using DOS-style short mode. If the path
34145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34146   # take no chances and rewrite it.
34147   # Note: m4 eats our [], so we need to use [ and ] instead.
34148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34149   if test "x$has_forbidden_chars" != x; then
34150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34152   fi
34153 
34154 
34155   windows_path="$new_path"
34156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34157     unix_path=`$CYGPATH -u "$windows_path"`
34158     new_path="$unix_path"
34159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34161     new_path="$unix_path"
34162   fi
34163 
34164   if test "x$path" != "x$new_path"; then
34165     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34167 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34168   fi
34169 
34170   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34171   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34172 
34173   else
34174     # We're on a posix platform. Hooray! :)
34175     path="$POTENTIAL_FREETYPE_LIB_PATH"
34176     has_space=`$ECHO "$path" | $GREP " "`
34177     if test "x$has_space" != x; then
34178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34179 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34180       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34181     fi
34182 
34183     # Use eval to expand a potential ~
34184     eval path="$path"
34185     if test ! -f "$path" && test ! -d "$path"; then
34186       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34187     fi
34188 
34189     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34190   fi
34191 
34192 
34193     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34194     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34195 $as_echo_n "checking for freetype includes... " >&6; }
34196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34197 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34198     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34199     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34200 $as_echo_n "checking for freetype libraries... " >&6; }
34201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34202 $as_echo "$FREETYPE_LIB_PATH" >&6; }
34203   fi
34204 
34205               if test "x$FOUND_FREETYPE" != xyes; then
34206 
34207   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
34208   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
34209   METHOD="well-known location"
34210 
34211   # First check if the files exists.
34212   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
34213     # We found an arbitrary include file. That's a good sign.
34214     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
34215 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
34216     FOUND_FREETYPE=yes
34217 
34218     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
34219     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
34220       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
34221 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
34222       FOUND_FREETYPE=no
34223     else
34224       if test "x$OPENJDK_TARGET_OS" = xwindows; then
34225         # On Windows, we will need both .lib and .dll file.
34226         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
34227           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
34228 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
34229           FOUND_FREETYPE=no
34230         fi
34231       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
34232         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
34233         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
34234       fi
34235     fi
34236   fi
34237 
34238   if test "x$FOUND_FREETYPE" = xyes; then
34239 
34240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34241 
34242   # Input might be given as Windows format, start by converting to
34243   # unix format.
34244   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34245   new_path=`$CYGPATH -u "$path"`
34246 
34247   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34248   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34249   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34250   # "foo.exe" is OK but "foo" is an error.
34251   #
34252   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34253   # It is also a way to make sure we got the proper file name for the real test later on.
34254   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34255   if test "x$test_shortpath" = x; then
34256     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34257 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34258     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
34259   fi
34260 
34261   # Call helper function which possibly converts this using DOS-style short mode.
34262   # If so, the updated path is stored in $new_path.
34263 
34264   input_path="$new_path"
34265   # Check if we need to convert this using DOS-style short mode. If the path
34266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34267   # take no chances and rewrite it.
34268   # Note: m4 eats our [], so we need to use [ and ] instead.
34269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34270   if test "x$has_forbidden_chars" != x; then
34271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34275       # Going to short mode and back again did indeed matter. Since short mode is
34276       # case insensitive, let's make it lowercase to improve readability.
34277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34278       # Now convert it back to Unix-stile (cygpath)
34279       input_path=`$CYGPATH -u "$shortmode_path"`
34280       new_path="$input_path"
34281     fi
34282   fi
34283 
34284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34285   if test "x$test_cygdrive_prefix" = x; then
34286     # As a simple fix, exclude /usr/bin since it's not a real path.
34287     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34289       # a path prefixed by /cygdrive for fixpath to work.
34290       new_path="$CYGWIN_ROOT_PATH$input_path"
34291     fi
34292   fi
34293 
34294 
34295   if test "x$path" != "x$new_path"; then
34296     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34298 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34299   fi
34300 
34301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34302 
34303   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34304   has_colon=`$ECHO $path | $GREP ^.:`
34305   new_path="$path"
34306   if test "x$has_colon" = x; then
34307     # Not in mixed or Windows style, start by that.
34308     new_path=`cmd //c echo $path`
34309   fi
34310 
34311 
34312   input_path="$new_path"
34313   # Check if we need to convert this using DOS-style short mode. If the path
34314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34315   # take no chances and rewrite it.
34316   # Note: m4 eats our [], so we need to use [ and ] instead.
34317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34318   if test "x$has_forbidden_chars" != x; then
34319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34320     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34321   fi
34322 
34323 
34324   windows_path="$new_path"
34325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34326     unix_path=`$CYGPATH -u "$windows_path"`
34327     new_path="$unix_path"
34328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34330     new_path="$unix_path"
34331   fi
34332 
34333   if test "x$path" != "x$new_path"; then
34334     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34336 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34337   fi
34338 
34339   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34340   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34341 
34342   else
34343     # We're on a posix platform. Hooray! :)
34344     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34345     has_space=`$ECHO "$path" | $GREP " "`
34346     if test "x$has_space" != x; then
34347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34348 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34349       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34350     fi
34351 
34352     # Use eval to expand a potential ~
34353     eval path="$path"
34354     if test ! -f "$path" && test ! -d "$path"; then
34355       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34356     fi
34357 
34358     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34359   fi
34360 
34361 
34362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34363 
34364   # Input might be given as Windows format, start by converting to
34365   # unix format.
34366   path="$POTENTIAL_FREETYPE_LIB_PATH"
34367   new_path=`$CYGPATH -u "$path"`
34368 
34369   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34370   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34371   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34372   # "foo.exe" is OK but "foo" is an error.
34373   #
34374   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34375   # It is also a way to make sure we got the proper file name for the real test later on.
34376   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34377   if test "x$test_shortpath" = x; then
34378     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34379 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34380     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
34381   fi
34382 
34383   # Call helper function which possibly converts this using DOS-style short mode.
34384   # If so, the updated path is stored in $new_path.
34385 
34386   input_path="$new_path"
34387   # Check if we need to convert this using DOS-style short mode. If the path
34388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34389   # take no chances and rewrite it.
34390   # Note: m4 eats our [], so we need to use [ and ] instead.
34391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34392   if test "x$has_forbidden_chars" != x; then
34393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34394     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34395     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34396     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34397       # Going to short mode and back again did indeed matter. Since short mode is
34398       # case insensitive, let's make it lowercase to improve readability.
34399       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34400       # Now convert it back to Unix-stile (cygpath)
34401       input_path=`$CYGPATH -u "$shortmode_path"`
34402       new_path="$input_path"
34403     fi
34404   fi
34405 
34406   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34407   if test "x$test_cygdrive_prefix" = x; then
34408     # As a simple fix, exclude /usr/bin since it's not a real path.
34409     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34410       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34411       # a path prefixed by /cygdrive for fixpath to work.
34412       new_path="$CYGWIN_ROOT_PATH$input_path"
34413     fi
34414   fi
34415 
34416 
34417   if test "x$path" != "x$new_path"; then
34418     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34419     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34420 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34421   fi
34422 
34423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34424 
34425   path="$POTENTIAL_FREETYPE_LIB_PATH"
34426   has_colon=`$ECHO $path | $GREP ^.:`
34427   new_path="$path"
34428   if test "x$has_colon" = x; then
34429     # Not in mixed or Windows style, start by that.
34430     new_path=`cmd //c echo $path`
34431   fi
34432 
34433 
34434   input_path="$new_path"
34435   # Check if we need to convert this using DOS-style short mode. If the path
34436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34437   # take no chances and rewrite it.
34438   # Note: m4 eats our [], so we need to use [ and ] instead.
34439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34440   if test "x$has_forbidden_chars" != x; then
34441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34442     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34443   fi
34444 
34445 
34446   windows_path="$new_path"
34447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34448     unix_path=`$CYGPATH -u "$windows_path"`
34449     new_path="$unix_path"
34450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34452     new_path="$unix_path"
34453   fi
34454 
34455   if test "x$path" != "x$new_path"; then
34456     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34457     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34458 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34459   fi
34460 
34461   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34462   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34463 
34464   else
34465     # We're on a posix platform. Hooray! :)
34466     path="$POTENTIAL_FREETYPE_LIB_PATH"
34467     has_space=`$ECHO "$path" | $GREP " "`
34468     if test "x$has_space" != x; then
34469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34470 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34471       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34472     fi
34473 
34474     # Use eval to expand a potential ~
34475     eval path="$path"
34476     if test ! -f "$path" && test ! -d "$path"; then
34477       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34478     fi
34479 
34480     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34481   fi
34482 
34483 
34484     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34485     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34486 $as_echo_n "checking for freetype includes... " >&6; }
34487     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34488 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34489     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34490     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34491 $as_echo_n "checking for freetype libraries... " >&6; }
34492     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34493 $as_echo "$FREETYPE_LIB_PATH" >&6; }
34494   fi
34495 
34496               fi
34497             fi
34498           fi
34499         fi
34500       fi # end check in well-known locations
34501 
34502       if test "x$FOUND_FREETYPE" != xyes; then
34503 
34504   # Print a helpful message on how to acquire the necessary build dependency.
34505   # freetype is the help tag: freetype, cups, pulse, alsa etc
34506   MISSING_DEPENDENCY=freetype
34507 
34508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34509     cygwin_help $MISSING_DEPENDENCY
34510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34511     msys_help $MISSING_DEPENDENCY
34512   else
34513     PKGHANDLER_COMMAND=
34514 
34515     case $PKGHANDLER in
34516       apt-get)
34517         apt_help     $MISSING_DEPENDENCY ;;
34518       yum)
34519         yum_help     $MISSING_DEPENDENCY ;;
34520       port)
34521         port_help    $MISSING_DEPENDENCY ;;
34522       pkgutil)
34523         pkgutil_help $MISSING_DEPENDENCY ;;
34524       pkgadd)
34525         pkgadd_help  $MISSING_DEPENDENCY ;;
34526     esac
34527 
34528     if test "x$PKGHANDLER_COMMAND" != x; then
34529       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34530     fi
34531   fi
34532 
34533         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34534       fi
34535     fi # end user specified settings
34536 
34537     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34538     if test "x$FREETYPE_CFLAGS" = x; then
34539 
34540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34541 
34542   # Input might be given as Windows format, start by converting to
34543   # unix format.
34544   path="$FREETYPE_INCLUDE_PATH"
34545   new_path=`$CYGPATH -u "$path"`
34546 
34547   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34548   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34549   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34550   # "foo.exe" is OK but "foo" is an error.
34551   #
34552   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34553   # It is also a way to make sure we got the proper file name for the real test later on.
34554   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34555   if test "x$test_shortpath" = x; then
34556     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34557 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34558     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34559   fi
34560 
34561   # Call helper function which possibly converts this using DOS-style short mode.
34562   # If so, the updated path is stored in $new_path.
34563 
34564   input_path="$new_path"
34565   # Check if we need to convert this using DOS-style short mode. If the path
34566   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34567   # take no chances and rewrite it.
34568   # Note: m4 eats our [], so we need to use [ and ] instead.
34569   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34570   if test "x$has_forbidden_chars" != x; then
34571     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34572     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34573     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34574     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34575       # Going to short mode and back again did indeed matter. Since short mode is
34576       # case insensitive, let's make it lowercase to improve readability.
34577       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34578       # Now convert it back to Unix-stile (cygpath)
34579       input_path=`$CYGPATH -u "$shortmode_path"`
34580       new_path="$input_path"
34581     fi
34582   fi
34583 
34584   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34585   if test "x$test_cygdrive_prefix" = x; then
34586     # As a simple fix, exclude /usr/bin since it's not a real path.
34587     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34588       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34589       # a path prefixed by /cygdrive for fixpath to work.
34590       new_path="$CYGWIN_ROOT_PATH$input_path"
34591     fi
34592   fi
34593 
34594 
34595   if test "x$path" != "x$new_path"; then
34596     FREETYPE_INCLUDE_PATH="$new_path"
34597     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34598 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34599   fi
34600 
34601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34602 
34603   path="$FREETYPE_INCLUDE_PATH"
34604   has_colon=`$ECHO $path | $GREP ^.:`
34605   new_path="$path"
34606   if test "x$has_colon" = x; then
34607     # Not in mixed or Windows style, start by that.
34608     new_path=`cmd //c echo $path`
34609   fi
34610 
34611 
34612   input_path="$new_path"
34613   # Check if we need to convert this using DOS-style short mode. If the path
34614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34615   # take no chances and rewrite it.
34616   # Note: m4 eats our [], so we need to use [ and ] instead.
34617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34618   if test "x$has_forbidden_chars" != x; then
34619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34620     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34621   fi
34622 
34623 
34624   windows_path="$new_path"
34625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34626     unix_path=`$CYGPATH -u "$windows_path"`
34627     new_path="$unix_path"
34628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34630     new_path="$unix_path"
34631   fi
34632 
34633   if test "x$path" != "x$new_path"; then
34634     FREETYPE_INCLUDE_PATH="$new_path"
34635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34636 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34637   fi
34638 
34639   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34640   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34641 
34642   else
34643     # We're on a posix platform. Hooray! :)
34644     path="$FREETYPE_INCLUDE_PATH"
34645     has_space=`$ECHO "$path" | $GREP " "`
34646     if test "x$has_space" != x; then
34647       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34648 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34649       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34650     fi
34651 
34652     # Use eval to expand a potential ~
34653     eval path="$path"
34654     if test ! -f "$path" && test ! -d "$path"; then
34655       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34656     fi
34657 
34658     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34659   fi
34660 
34661       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34662         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34663       else
34664         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34665       fi
34666     fi
34667 
34668     if test "x$FREETYPE_LIBS" = x; then
34669 
34670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34671 
34672   # Input might be given as Windows format, start by converting to
34673   # unix format.
34674   path="$FREETYPE_LIB_PATH"
34675   new_path=`$CYGPATH -u "$path"`
34676 
34677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34680   # "foo.exe" is OK but "foo" is an error.
34681   #
34682   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34683   # It is also a way to make sure we got the proper file name for the real test later on.
34684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34685   if test "x$test_shortpath" = x; then
34686     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34687 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34688     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34689   fi
34690 
34691   # Call helper function which possibly converts this using DOS-style short mode.
34692   # If so, the updated path is stored in $new_path.
34693 
34694   input_path="$new_path"
34695   # Check if we need to convert this using DOS-style short mode. If the path
34696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34697   # take no chances and rewrite it.
34698   # Note: m4 eats our [], so we need to use [ and ] instead.
34699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34700   if test "x$has_forbidden_chars" != x; then
34701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34702     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34703     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34704     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34705       # Going to short mode and back again did indeed matter. Since short mode is
34706       # case insensitive, let's make it lowercase to improve readability.
34707       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34708       # Now convert it back to Unix-stile (cygpath)
34709       input_path=`$CYGPATH -u "$shortmode_path"`
34710       new_path="$input_path"
34711     fi
34712   fi
34713 
34714   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34715   if test "x$test_cygdrive_prefix" = x; then
34716     # As a simple fix, exclude /usr/bin since it's not a real path.
34717     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34718       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34719       # a path prefixed by /cygdrive for fixpath to work.
34720       new_path="$CYGWIN_ROOT_PATH$input_path"
34721     fi
34722   fi
34723 
34724 
34725   if test "x$path" != "x$new_path"; then
34726     FREETYPE_LIB_PATH="$new_path"
34727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34728 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34729   fi
34730 
34731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34732 
34733   path="$FREETYPE_LIB_PATH"
34734   has_colon=`$ECHO $path | $GREP ^.:`
34735   new_path="$path"
34736   if test "x$has_colon" = x; then
34737     # Not in mixed or Windows style, start by that.
34738     new_path=`cmd //c echo $path`
34739   fi
34740 
34741 
34742   input_path="$new_path"
34743   # Check if we need to convert this using DOS-style short mode. If the path
34744   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34745   # take no chances and rewrite it.
34746   # Note: m4 eats our [], so we need to use [ and ] instead.
34747   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34748   if test "x$has_forbidden_chars" != x; then
34749     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34750     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34751   fi
34752 
34753 
34754   windows_path="$new_path"
34755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34756     unix_path=`$CYGPATH -u "$windows_path"`
34757     new_path="$unix_path"
34758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34760     new_path="$unix_path"
34761   fi
34762 
34763   if test "x$path" != "x$new_path"; then
34764     FREETYPE_LIB_PATH="$new_path"
34765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34766 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34767   fi
34768 
34769   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34770   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34771 
34772   else
34773     # We're on a posix platform. Hooray! :)
34774     path="$FREETYPE_LIB_PATH"
34775     has_space=`$ECHO "$path" | $GREP " "`
34776     if test "x$has_space" != x; then
34777       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34778 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34779       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34780     fi
34781 
34782     # Use eval to expand a potential ~
34783     eval path="$path"
34784     if test ! -f "$path" && test ! -d "$path"; then
34785       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34786     fi
34787 
34788     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34789   fi
34790 
34791       if test "x$OPENJDK_TARGET_OS" = xwindows; then
34792         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34793       else
34794         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34795       fi
34796     fi
34797 
34798     # Try to compile it
34799     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34800 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
34801     ac_ext=cpp
34802 ac_cpp='$CXXCPP $CPPFLAGS'
34803 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34804 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34805 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34806 
34807     PREV_CXXCFLAGS="$CXXFLAGS"
34808     PREV_LIBS="$LIBS"
34809     PREV_CXX="$CXX"
34810     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34811     LIBS="$LIBS $FREETYPE_LIBS"
34812     CXX="$FIXPATH $CXX"
34813     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34814 /* end confdefs.h.  */
34815 
34816           #include<ft2build.h>
34817           #include FT_FREETYPE_H
34818           int main () {
34819             FT_Init_FreeType(NULL);
34820             return 0;
34821           }
34822 
34823 _ACEOF
34824 if ac_fn_cxx_try_link "$LINENO"; then :
34825 
34826           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34827 $as_echo "yes" >&6; }
34828 
34829 else
34830 
34831           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34832 $as_echo "no" >&6; }
34833           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34834 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34835           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34836 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34837 
34838 
34839   # Print a helpful message on how to acquire the necessary build dependency.
34840   # freetype is the help tag: freetype, cups, pulse, alsa etc
34841   MISSING_DEPENDENCY=freetype
34842 
34843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34844     cygwin_help $MISSING_DEPENDENCY
34845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34846     msys_help $MISSING_DEPENDENCY
34847   else
34848     PKGHANDLER_COMMAND=
34849 
34850     case $PKGHANDLER in
34851       apt-get)
34852         apt_help     $MISSING_DEPENDENCY ;;
34853       yum)
34854         yum_help     $MISSING_DEPENDENCY ;;
34855       port)
34856         port_help    $MISSING_DEPENDENCY ;;
34857       pkgutil)
34858         pkgutil_help $MISSING_DEPENDENCY ;;
34859       pkgadd)
34860         pkgadd_help  $MISSING_DEPENDENCY ;;
34861     esac
34862 
34863     if test "x$PKGHANDLER_COMMAND" != x; then
34864       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34865     fi
34866   fi
34867 
34868 
34869           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34870 
34871 
34872 fi
34873 rm -f core conftest.err conftest.$ac_objext \
34874     conftest$ac_exeext conftest.$ac_ext
34875     CXXCFLAGS="$PREV_CXXFLAGS"
34876     LIBS="$PREV_LIBS"
34877     CXX="$PREV_CXX"
34878     ac_ext=cpp
34879 ac_cpp='$CXXCPP $CPPFLAGS'
34880 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34881 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34882 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34883 
34884 
34885     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34886 $as_echo_n "checking if we should bundle freetype... " >&6; }
34887     if test "x$BUNDLE_FREETYPE" = xyes; then
34888       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34889     fi
34890     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34891 $as_echo "$BUNDLE_FREETYPE" >&6; }
34892 
34893   fi # end freetype needed
34894 
34895 
34896 
34897 
34898 
34899 
34900 
34901   ###############################################################################
34902   #
34903   # Check for alsa headers and libraries. Used on Linux/GNU systems.
34904   #
34905 
34906 # Check whether --with-alsa was given.
34907 if test "${with_alsa+set}" = set; then :
34908   withval=$with_alsa;
34909 fi
34910 
34911 
34912 # Check whether --with-alsa-include was given.
34913 if test "${with_alsa_include+set}" = set; then :
34914   withval=$with_alsa_include;
34915 fi
34916 
34917 
34918 # Check whether --with-alsa-lib was given.
34919 if test "${with_alsa_lib+set}" = set; then :
34920   withval=$with_alsa_lib;
34921 fi
34922 
34923 
34924   if test "x$ALSA_NOT_NEEDED" = xyes; then
34925     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34926       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34927 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34928     fi
34929     ALSA_CFLAGS=
34930     ALSA_LIBS=
34931   else
34932     ALSA_FOUND=no
34933 
34934     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34935       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34936     fi
34937 
34938     if test "x${with_alsa}" != x; then
34939       ALSA_LIBS="-L${with_alsa}/lib -lasound"
34940       ALSA_CFLAGS="-I${with_alsa}/include"
34941       ALSA_FOUND=yes
34942     fi
34943     if test "x${with_alsa_include}" != x; then
34944       ALSA_CFLAGS="-I${with_alsa_include}"
34945       ALSA_FOUND=yes
34946     fi
34947     if test "x${with_alsa_lib}" != x; then
34948       ALSA_LIBS="-L${with_alsa_lib} -lasound"
34949       ALSA_FOUND=yes
34950     fi
34951     if test "x$ALSA_FOUND" = xno; then
34952 
34953 
34954   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34955     # Source the builddeps file again, to make sure it uses the latest variables!
34956     . $builddepsfile
34957     # Look for a target and build machine specific resource!
34958     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34959     if test "x$resource" = x; then
34960       # Ok, lets instead look for a target specific resource
34961       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34962     fi
34963     if test "x$resource" = x; then
34964       # Ok, lets instead look for a build specific resource
34965       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34966     fi
34967     if test "x$resource" = x; then
34968       # Ok, lets instead look for a generic resource
34969       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34970       resource=${builddep_alsa}
34971     fi
34972     if test "x$resource" != x; then
34973       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34974 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34975       # If the resource in the builddeps.conf file is an existing directory,
34976       # for example /java/linux/cups
34977       if test -d ${resource}; then
34978         depdir=${resource}
34979       else
34980 
34981   # alsa is for example mymodule
34982   # $resource is for example libs/general/libmymod_1_2_3.zip
34983   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34984   # $with_builddeps_dir is for example /localhome/builddeps
34985   # depdir is the name of the variable into which we store the depdir, eg MYMOD
34986   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34987   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34988   filename=`basename $resource`
34989   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34990   filebase=${filename%%.*}
34991   extension=${filename#*.}
34992   installdir=$with_builddeps_dir/$filebase
34993   if test ! -f $installdir/$filename.unpacked; then
34994     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34995 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34996     if test ! -d $installdir; then
34997       mkdir -p $installdir
34998     fi
34999     if test ! -d $installdir; then
35000       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
35001     fi
35002     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
35003     touch $tmpfile
35004     if test ! -f $tmpfile; then
35005       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
35006     fi
35007 
35008   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
35009   # $tmpfile is the local file name for the downloaded file.
35010   VALID_TOOL=no
35011   if test "x$BDEPS_FTP" = xwget; then
35012     VALID_TOOL=yes
35013     wget -O $tmpfile $with_builddeps_server/$resource
35014   fi
35015   if test "x$BDEPS_FTP" = xlftp; then
35016     VALID_TOOL=yes
35017     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
35018   fi
35019   if test "x$BDEPS_FTP" = xftp; then
35020     VALID_TOOL=yes
35021     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
35022     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
35023     FTPUSERPWD=${FTPSERVER%%@*}
35024     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
35025       FTPUSER=${userpwd%%:*}
35026       FTPPWD=${userpwd#*@}
35027       FTPSERVER=${FTPSERVER#*@}
35028     else
35029       FTPUSER=ftp
35030       FTPPWD=ftp
35031     fi
35032     # the "pass" command does not work on some
35033     # ftp clients (read ftp.exe) but if it works,
35034     # passive mode is better!
35035     ( \
35036         echo "user $FTPUSER $FTPPWD"        ; \
35037         echo "pass"                         ; \
35038         echo "bin"                          ; \
35039         echo "get $FTPPATH $tmpfile"              ; \
35040     ) | ftp -in $FTPSERVER
35041   fi
35042   if test "x$VALID_TOOL" != xyes; then
35043     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
35044   fi
35045 
35046     mv $tmpfile $installdir/$filename
35047     if test ! -s $installdir/$filename; then
35048       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
35049     fi
35050     case "$extension" in
35051       zip)  echo "Unzipping $installdir/$filename..."
35052         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
35053         ;;
35054       tar.gz) echo "Untaring $installdir/$filename..."
35055         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
35056         ;;
35057       tgz) echo "Untaring $installdir/$filename..."
35058         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
35059         ;;
35060       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
35061         ;;
35062     esac
35063   fi
35064   if test -f $installdir/$filename.unpacked; then
35065     depdir=$installdir
35066   fi
35067 
35068       fi
35069       # Source the builddeps file again, because in the previous command, the depdir
35070       # was updated to point at the current build dependency install directory.
35071       . $builddepsfile
35072       # Now extract variables from the builddeps.conf files.
35073       theroot=${builddep_alsa_ROOT}
35074       thecflags=${builddep_alsa_CFLAGS}
35075       thelibs=${builddep_alsa_LIBS}
35076       if test "x$depdir" = x; then
35077         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
35078       fi
35079       ALSA=$depdir
35080       if test "x$theroot" != x; then
35081         ALSA="$theroot"
35082       fi
35083       if test "x$thecflags" != x; then
35084         ALSA_CFLAGS="$thecflags"
35085       fi
35086       if test "x$thelibs" != x; then
35087         ALSA_LIBS="$thelibs"
35088       fi
35089       ALSA_FOUND=yes
35090       else ALSA_FOUND=no
35091 
35092     fi
35093     else ALSA_FOUND=no
35094 
35095   fi
35096 
35097     fi
35098     if test "x$ALSA_FOUND" = xno; then
35099 
35100 pkg_failed=no
35101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
35102 $as_echo_n "checking for ALSA... " >&6; }
35103 
35104 if test -n "$ALSA_CFLAGS"; then
35105     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
35106  elif test -n "$PKG_CONFIG"; then
35107     if test -n "$PKG_CONFIG" && \
35108     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
35109   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
35110   ac_status=$?
35111   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35112   test $ac_status = 0; }; then
35113   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
35114 else
35115   pkg_failed=yes
35116 fi
35117  else
35118     pkg_failed=untried
35119 fi
35120 if test -n "$ALSA_LIBS"; then
35121     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
35122  elif test -n "$PKG_CONFIG"; then
35123     if test -n "$PKG_CONFIG" && \
35124     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
35125   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
35126   ac_status=$?
35127   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35128   test $ac_status = 0; }; then
35129   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
35130 else
35131   pkg_failed=yes
35132 fi
35133  else
35134     pkg_failed=untried
35135 fi
35136 
35137 
35138 
35139 if test $pkg_failed = yes; then
35140 
35141 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35142         _pkg_short_errors_supported=yes
35143 else
35144         _pkg_short_errors_supported=no
35145 fi
35146         if test $_pkg_short_errors_supported = yes; then
35147                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
35148         else
35149                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
35150         fi
35151         # Put the nasty error message in config.log where it belongs
35152         echo "$ALSA_PKG_ERRORS" >&5
35153 
35154         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35155 $as_echo "no" >&6; }
35156                 ALSA_FOUND=no
35157 elif test $pkg_failed = untried; then
35158         ALSA_FOUND=no
35159 else
35160         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
35161         ALSA_LIBS=$pkg_cv_ALSA_LIBS
35162         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35163 $as_echo "yes" >&6; }
35164         ALSA_FOUND=yes
35165 fi
35166     fi
35167     if test "x$ALSA_FOUND" = xno; then
35168       for ac_header in alsa/asoundlib.h
35169 do :
35170   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
35171 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
35172   cat >>confdefs.h <<_ACEOF
35173 #define HAVE_ALSA_ASOUNDLIB_H 1
35174 _ACEOF
35175 
35176             ALSA_FOUND=yes
35177             ALSA_CFLAGS=-Iignoreme
35178             ALSA_LIBS=-lasound
35179             DEFAULT_ALSA=yes
35180 
35181 else
35182   ALSA_FOUND=no
35183 fi
35184 
35185 done
35186 
35187     fi
35188     if test "x$ALSA_FOUND" = xno; then
35189 
35190   # Print a helpful message on how to acquire the necessary build dependency.
35191   # alsa is the help tag: freetype, cups, pulse, alsa etc
35192   MISSING_DEPENDENCY=alsa
35193 
35194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35195     cygwin_help $MISSING_DEPENDENCY
35196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35197     msys_help $MISSING_DEPENDENCY
35198   else
35199     PKGHANDLER_COMMAND=
35200 
35201     case $PKGHANDLER in
35202       apt-get)
35203         apt_help     $MISSING_DEPENDENCY ;;
35204       yum)
35205         yum_help     $MISSING_DEPENDENCY ;;
35206       port)
35207         port_help    $MISSING_DEPENDENCY ;;
35208       pkgutil)
35209         pkgutil_help $MISSING_DEPENDENCY ;;
35210       pkgadd)
35211         pkgadd_help  $MISSING_DEPENDENCY ;;
35212     esac
35213 
35214     if test "x$PKGHANDLER_COMMAND" != x; then
35215       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35216     fi
35217   fi
35218 
35219       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
35220     fi
35221   fi
35222 
35223 
35224 
35225 
35226 
35227 
35228   ###############################################################################
35229   #
35230   # Check for the jpeg library
35231   #
35232 
35233   USE_EXTERNAL_LIBJPEG=true
35234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
35235 $as_echo_n "checking for main in -ljpeg... " >&6; }
35236 if ${ac_cv_lib_jpeg_main+:} false; then :
35237   $as_echo_n "(cached) " >&6
35238 else
35239   ac_check_lib_save_LIBS=$LIBS
35240 LIBS="-ljpeg  $LIBS"
35241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35242 /* end confdefs.h.  */
35243 
35244 
35245 int
35246 main ()
35247 {
35248 return main ();
35249   ;
35250   return 0;
35251 }
35252 _ACEOF
35253 if ac_fn_cxx_try_link "$LINENO"; then :
35254   ac_cv_lib_jpeg_main=yes
35255 else
35256   ac_cv_lib_jpeg_main=no
35257 fi
35258 rm -f core conftest.err conftest.$ac_objext \
35259     conftest$ac_exeext conftest.$ac_ext
35260 LIBS=$ac_check_lib_save_LIBS
35261 fi
35262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
35263 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
35264 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
35265   cat >>confdefs.h <<_ACEOF
35266 #define HAVE_LIBJPEG 1
35267 _ACEOF
35268 
35269   LIBS="-ljpeg $LIBS"
35270 
35271 else
35272    USE_EXTERNAL_LIBJPEG=false
35273       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
35274 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
35275 
35276 fi
35277 
35278 
35279 
35280   ###############################################################################
35281   #
35282   # Check for the gif library
35283   #
35284 
35285 
35286 # Check whether --with-giflib was given.
35287 if test "${with_giflib+set}" = set; then :
35288   withval=$with_giflib;
35289 fi
35290 
35291 
35292 
35293   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
35294 $as_echo_n "checking for which giflib to use... " >&6; }
35295 
35296   # default is bundled
35297   DEFAULT_GIFLIB=bundled
35298 
35299   #
35300   # if user didn't specify, use DEFAULT_GIFLIB
35301   #
35302   if test "x${with_giflib}" = "x"; then
35303     with_giflib=${DEFAULT_GIFLIB}
35304   fi
35305 
35306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
35307 $as_echo "${with_giflib}" >&6; }
35308 
35309   if test "x${with_giflib}" = "xbundled"; then
35310     USE_EXTERNAL_LIBGIF=false
35311   elif test "x${with_giflib}" = "xsystem"; then
35312     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
35313 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
35314 
35315 else
35316    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
35317 fi
35318 
35319 
35320     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
35321 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
35322 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
35323   $as_echo_n "(cached) " >&6
35324 else
35325   ac_check_lib_save_LIBS=$LIBS
35326 LIBS="-lgif  $LIBS"
35327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35328 /* end confdefs.h.  */
35329 
35330 /* Override any GCC internal prototype to avoid an error.
35331    Use char because int might match the return type of a GCC
35332    builtin and then its argument prototype would still apply.  */
35333 #ifdef __cplusplus
35334 extern "C"
35335 #endif
35336 char DGifGetCode ();
35337 int
35338 main ()
35339 {
35340 return DGifGetCode ();
35341   ;
35342   return 0;
35343 }
35344 _ACEOF
35345 if ac_fn_cxx_try_link "$LINENO"; then :
35346   ac_cv_lib_gif_DGifGetCode=yes
35347 else
35348   ac_cv_lib_gif_DGifGetCode=no
35349 fi
35350 rm -f core conftest.err conftest.$ac_objext \
35351     conftest$ac_exeext conftest.$ac_ext
35352 LIBS=$ac_check_lib_save_LIBS
35353 fi
35354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
35355 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
35356 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
35357   cat >>confdefs.h <<_ACEOF
35358 #define HAVE_LIBGIF 1
35359 _ACEOF
35360 
35361   LIBS="-lgif $LIBS"
35362 
35363 else
35364    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
35365 fi
35366 
35367 
35368     USE_EXTERNAL_LIBGIF=true
35369   else
35370     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
35371   fi
35372 
35373 
35374   ###############################################################################
35375   #
35376   # Check for the zlib library
35377   #
35378 
35379 
35380 # Check whether --with-zlib was given.
35381 if test "${with_zlib+set}" = set; then :
35382   withval=$with_zlib;
35383 fi
35384 
35385 
35386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
35387 $as_echo_n "checking for compress in -lz... " >&6; }
35388 if ${ac_cv_lib_z_compress+:} false; then :
35389   $as_echo_n "(cached) " >&6
35390 else
35391   ac_check_lib_save_LIBS=$LIBS
35392 LIBS="-lz  $LIBS"
35393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35394 /* end confdefs.h.  */
35395 
35396 /* Override any GCC internal prototype to avoid an error.
35397    Use char because int might match the return type of a GCC
35398    builtin and then its argument prototype would still apply.  */
35399 #ifdef __cplusplus
35400 extern "C"
35401 #endif
35402 char compress ();
35403 int
35404 main ()
35405 {
35406 return compress ();
35407   ;
35408   return 0;
35409 }
35410 _ACEOF
35411 if ac_fn_cxx_try_link "$LINENO"; then :
35412   ac_cv_lib_z_compress=yes
35413 else
35414   ac_cv_lib_z_compress=no
35415 fi
35416 rm -f core conftest.err conftest.$ac_objext \
35417     conftest$ac_exeext conftest.$ac_ext
35418 LIBS=$ac_check_lib_save_LIBS
35419 fi
35420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35421 $as_echo "$ac_cv_lib_z_compress" >&6; }
35422 if test "x$ac_cv_lib_z_compress" = xyes; then :
35423    ZLIB_FOUND=yes
35424 else
35425    ZLIB_FOUND=no
35426 fi
35427 
35428 
35429   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35430 $as_echo_n "checking for which zlib to use... " >&6; }
35431 
35432   DEFAULT_ZLIB=bundled
35433   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35434     #
35435     # On macosx default is system...on others default is
35436     #
35437     DEFAULT_ZLIB=system
35438   fi
35439 
35440   if test "x${ZLIB_FOUND}" != "xyes"; then
35441     #
35442     # If we don't find any system...set default to bundled
35443     #
35444     DEFAULT_ZLIB=bundled
35445   fi
35446 
35447   #
35448   # If user didn't specify, use DEFAULT_ZLIB
35449   #
35450   if test "x${with_zlib}" = "x"; then
35451     with_zlib=${DEFAULT_ZLIB}
35452   fi
35453 
35454   if test "x${with_zlib}" = "xbundled"; then
35455     USE_EXTERNAL_LIBZ=false
35456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35457 $as_echo "bundled" >&6; }
35458   elif test "x${with_zlib}" = "xsystem"; then
35459     if test "x${ZLIB_FOUND}" = "xyes"; then
35460       USE_EXTERNAL_LIBZ=true
35461       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35462 $as_echo "system" >&6; }
35463     else
35464       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35465 $as_echo "system not found" >&6; }
35466       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35467     fi
35468   else
35469     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35470   fi
35471 
35472 
35473 
35474   ###############################################################################
35475   LIBZIP_CAN_USE_MMAP=true
35476 
35477 
35478 
35479   ###############################################################################
35480   #
35481   # Check if altzone exists in time.h
35482   #
35483 
35484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35485 /* end confdefs.h.  */
35486 #include <time.h>
35487 int
35488 main ()
35489 {
35490 return (int)altzone;
35491   ;
35492   return 0;
35493 }
35494 _ACEOF
35495 if ac_fn_cxx_try_link "$LINENO"; then :
35496   has_altzone=yes
35497 else
35498   has_altzone=no
35499 fi
35500 rm -f core conftest.err conftest.$ac_objext \
35501     conftest$ac_exeext conftest.$ac_ext
35502   if test "x$has_altzone" = xyes; then
35503 
35504 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35505 
35506   fi
35507 
35508   ###############################################################################
35509   #
35510   # Check the maths library
35511   #
35512 
35513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35514 $as_echo_n "checking for cos in -lm... " >&6; }
35515 if ${ac_cv_lib_m_cos+:} false; then :
35516   $as_echo_n "(cached) " >&6
35517 else
35518   ac_check_lib_save_LIBS=$LIBS
35519 LIBS="-lm  $LIBS"
35520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35521 /* end confdefs.h.  */
35522 
35523 /* Override any GCC internal prototype to avoid an error.
35524    Use char because int might match the return type of a GCC
35525    builtin and then its argument prototype would still apply.  */
35526 #ifdef __cplusplus
35527 extern "C"
35528 #endif
35529 char cos ();
35530 int
35531 main ()
35532 {
35533 return cos ();
35534   ;
35535   return 0;
35536 }
35537 _ACEOF
35538 if ac_fn_cxx_try_link "$LINENO"; then :
35539   ac_cv_lib_m_cos=yes
35540 else
35541   ac_cv_lib_m_cos=no
35542 fi
35543 rm -f core conftest.err conftest.$ac_objext \
35544     conftest$ac_exeext conftest.$ac_ext
35545 LIBS=$ac_check_lib_save_LIBS
35546 fi
35547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35548 $as_echo "$ac_cv_lib_m_cos" >&6; }
35549 if test "x$ac_cv_lib_m_cos" = xyes; then :
35550   cat >>confdefs.h <<_ACEOF
35551 #define HAVE_LIBM 1
35552 _ACEOF
35553 
35554   LIBS="-lm $LIBS"
35555 
35556 else
35557 
35558         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35559 $as_echo "$as_me: Maths library was not found" >&6;}
35560 
35561 
35562 fi
35563 
35564 
35565 
35566   ###############################################################################
35567   #
35568   # Check for libdl.so
35569 
35570   save_LIBS="$LIBS"
35571   LIBS=""
35572   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35573 $as_echo_n "checking for dlopen in -ldl... " >&6; }
35574 if ${ac_cv_lib_dl_dlopen+:} false; then :
35575   $as_echo_n "(cached) " >&6
35576 else
35577   ac_check_lib_save_LIBS=$LIBS
35578 LIBS="-ldl  $LIBS"
35579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35580 /* end confdefs.h.  */
35581 
35582 /* Override any GCC internal prototype to avoid an error.
35583    Use char because int might match the return type of a GCC
35584    builtin and then its argument prototype would still apply.  */
35585 #ifdef __cplusplus
35586 extern "C"
35587 #endif
35588 char dlopen ();
35589 int
35590 main ()
35591 {
35592 return dlopen ();
35593   ;
35594   return 0;
35595 }
35596 _ACEOF
35597 if ac_fn_cxx_try_link "$LINENO"; then :
35598   ac_cv_lib_dl_dlopen=yes
35599 else
35600   ac_cv_lib_dl_dlopen=no
35601 fi
35602 rm -f core conftest.err conftest.$ac_objext \
35603     conftest$ac_exeext conftest.$ac_ext
35604 LIBS=$ac_check_lib_save_LIBS
35605 fi
35606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35607 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35608 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35609   cat >>confdefs.h <<_ACEOF
35610 #define HAVE_LIBDL 1
35611 _ACEOF
35612 
35613   LIBS="-ldl $LIBS"
35614 
35615 fi
35616 
35617   LIBDL="$LIBS"
35618 
35619   LIBS="$save_LIBS"
35620 
35621 
35622   ###############################################################################
35623   #
35624   # statically link libstdc++ before C++ ABI is stablized on Linux unless
35625   # dynamic build is configured on command line.
35626   #
35627 
35628 # Check whether --with-stdc++lib was given.
35629 if test "${with_stdc__lib+set}" = set; then :
35630   withval=$with_stdc__lib;
35631         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35632                 && test "x$with_stdc__lib" != xdefault; then
35633           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35634         fi
35635 
35636 else
35637   with_stdc__lib=default
35638 
35639 fi
35640 
35641 
35642   if test "x$OPENJDK_TARGET_OS" = xlinux; then
35643     # Test if -lstdc++ works.
35644     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35645 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35646     ac_ext=cpp
35647 ac_cpp='$CXXCPP $CPPFLAGS'
35648 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35649 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35650 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35651 
35652     OLD_CXXFLAGS="$CXXFLAGS"
35653     CXXFLAGS="$CXXFLAGS -lstdc++"
35654     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35655 /* end confdefs.h.  */
35656 
35657 int
35658 main ()
35659 {
35660 return 0;
35661   ;
35662   return 0;
35663 }
35664 _ACEOF
35665 if ac_fn_cxx_try_link "$LINENO"; then :
35666   has_dynamic_libstdcxx=yes
35667 else
35668   has_dynamic_libstdcxx=no
35669 fi
35670 rm -f core conftest.err conftest.$ac_objext \
35671     conftest$ac_exeext conftest.$ac_ext
35672     CXXFLAGS="$OLD_CXXFLAGS"
35673     ac_ext=cpp
35674 ac_cpp='$CXXCPP $CPPFLAGS'
35675 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35676 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35677 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35678 
35679     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35680 $as_echo "$has_dynamic_libstdcxx" >&6; }
35681 
35682     # Test if stdc++ can be linked statically.
35683     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35684 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35685     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35686     ac_ext=cpp
35687 ac_cpp='$CXXCPP $CPPFLAGS'
35688 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35689 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35690 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35691 
35692     OLD_LIBS="$LIBS"
35693     OLD_CXX="$CXX"
35694     LIBS="$STATIC_STDCXX_FLAGS"
35695     CXX="$CC"
35696     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35697 /* end confdefs.h.  */
35698 
35699 int
35700 main ()
35701 {
35702 return 0;
35703   ;
35704   return 0;
35705 }
35706 _ACEOF
35707 if ac_fn_cxx_try_link "$LINENO"; then :
35708   has_static_libstdcxx=yes
35709 else
35710   has_static_libstdcxx=no
35711 fi
35712 rm -f core conftest.err conftest.$ac_objext \
35713     conftest$ac_exeext conftest.$ac_ext
35714     LIBS="$OLD_LIBS"
35715     CXX="$OLD_CXX"
35716     ac_ext=cpp
35717 ac_cpp='$CXXCPP $CPPFLAGS'
35718 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35719 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35720 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35721 
35722     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35723 $as_echo "$has_static_libstdcxx" >&6; }
35724 
35725     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35726       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35727     fi
35728 
35729     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35730       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35731     fi
35732 
35733     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35734       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35735     fi
35736 
35737     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35738 $as_echo_n "checking how to link with libstdc++... " >&6; }
35739     # If dynamic was requested, it's available since it would fail above otherwise.
35740     # If dynamic wasn't requested, go with static unless it isn't available.
35741     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35742       LIBCXX="$LIBCXX -lstdc++"
35743       LDCXX="$CXX"
35744       STATIC_CXX_SETTING="STATIC_CXX=false"
35745       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35746 $as_echo "dynamic" >&6; }
35747     else
35748       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35749       LDCXX="$CC"
35750       STATIC_CXX_SETTING="STATIC_CXX=true"
35751       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35752 $as_echo "static" >&6; }
35753     fi
35754   fi
35755 
35756 
35757   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35758     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35759 
35760 pkg_failed=no
35761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35762 $as_echo_n "checking for LIBFFI... " >&6; }
35763 
35764 if test -n "$LIBFFI_CFLAGS"; then
35765     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35766  elif test -n "$PKG_CONFIG"; then
35767     if test -n "$PKG_CONFIG" && \
35768     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35769   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35770   ac_status=$?
35771   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35772   test $ac_status = 0; }; then
35773   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35774 else
35775   pkg_failed=yes
35776 fi
35777  else
35778     pkg_failed=untried
35779 fi
35780 if test -n "$LIBFFI_LIBS"; then
35781     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35782  elif test -n "$PKG_CONFIG"; then
35783     if test -n "$PKG_CONFIG" && \
35784     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35785   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35786   ac_status=$?
35787   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35788   test $ac_status = 0; }; then
35789   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35790 else
35791   pkg_failed=yes
35792 fi
35793  else
35794     pkg_failed=untried
35795 fi
35796 
35797 
35798 
35799 if test $pkg_failed = yes; then
35800 
35801 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35802         _pkg_short_errors_supported=yes
35803 else
35804         _pkg_short_errors_supported=no
35805 fi
35806         if test $_pkg_short_errors_supported = yes; then
35807                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35808         else
35809                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35810         fi
35811         # Put the nasty error message in config.log where it belongs
35812         echo "$LIBFFI_PKG_ERRORS" >&5
35813 
35814         as_fn_error $? "Package requirements (libffi) were not met:
35815 
35816 $LIBFFI_PKG_ERRORS
35817 
35818 Consider adjusting the PKG_CONFIG_PATH environment variable if you
35819 installed software in a non-standard prefix.
35820 
35821 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35822 and LIBFFI_LIBS to avoid the need to call pkg-config.
35823 See the pkg-config man page for more details.
35824 " "$LINENO" 5
35825 elif test $pkg_failed = untried; then
35826         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35827 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35828 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35829 is in your PATH or set the PKG_CONFIG environment variable to the full
35830 path to pkg-config.
35831 
35832 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35833 and LIBFFI_LIBS to avoid the need to call pkg-config.
35834 See the pkg-config man page for more details.
35835 
35836 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35837 See \`config.log' for more details" "$LINENO" 5; }
35838 else
35839         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35840         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35842 $as_echo "yes" >&6; }
35843         :
35844 fi
35845 
35846   fi
35847 
35848   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35849     # Extract the first word of "llvm-config", so it can be a program name with args.
35850 set dummy llvm-config; ac_word=$2
35851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35852 $as_echo_n "checking for $ac_word... " >&6; }
35853 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35854   $as_echo_n "(cached) " >&6
35855 else
35856   if test -n "$LLVM_CONFIG"; then
35857   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35858 else
35859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35860 for as_dir in $PATH
35861 do
35862   IFS=$as_save_IFS
35863   test -z "$as_dir" && as_dir=.
35864     for ac_exec_ext in '' $ac_executable_extensions; do
35865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35866     ac_cv_prog_LLVM_CONFIG="llvm-config"
35867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35868     break 2
35869   fi
35870 done
35871   done
35872 IFS=$as_save_IFS
35873 
35874 fi
35875 fi
35876 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35877 if test -n "$LLVM_CONFIG"; then
35878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35879 $as_echo "$LLVM_CONFIG" >&6; }
35880 else
35881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35882 $as_echo "no" >&6; }
35883 fi
35884 
35885 
35886 
35887     if test "x$LLVM_CONFIG" != xllvm-config; then
35888       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35889     fi
35890 
35891     llvm_components="jit mcjit engine nativecodegen native"
35892     unset LLVM_CFLAGS
35893     for flag in $("$LLVM_CONFIG" --cxxflags); do
35894       if echo "${flag}" | grep -q '^-[ID]'; then
35895         if test "${flag}" != "-D_DEBUG" ; then
35896           if test "${LLVM_CFLAGS}" != "" ; then
35897             LLVM_CFLAGS="${LLVM_CFLAGS} "
35898           fi
35899           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35900         fi
35901       fi
35902     done
35903     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35904     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35905 
35906     unset LLVM_LDFLAGS
35907     for flag in $("${LLVM_CONFIG}" --ldflags); do
35908       if echo "${flag}" | grep -q '^-L'; then
35909         if test "${LLVM_LDFLAGS}" != ""; then
35910           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35911         fi
35912         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35913       fi
35914     done
35915 
35916     unset LLVM_LIBS
35917     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35918       if echo "${flag}" | grep -q '^-l'; then
35919         if test "${LLVM_LIBS}" != ""; then
35920           LLVM_LIBS="${LLVM_LIBS} "
35921         fi
35922         LLVM_LIBS="${LLVM_LIBS}${flag}"
35923       fi
35924     done
35925 
35926 
35927 
35928 
35929   fi
35930 
35931   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35932   if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35933     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35934   fi
35935 
35936   # TODO better (platform agnostic) test
35937   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35938     LIBCXX="-lstdc++"
35939   fi
35940 
35941 
35942 
35943 
35944 
35945 ###############################################################################
35946 #
35947 # We need to do some final tweaking, when everything else is done.
35948 #
35949 ###############################################################################
35950 
35951 
35952   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35953 
35954 
35955   # The name of the Service Agent jar.
35956   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35957   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35958     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35959   fi
35960 
35961 
35962 
35963     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35964 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35965 
35966     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35967       ENABLE_INTREE_EC=yes
35968       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35969 $as_echo "yes" >&6; }
35970     else
35971       ENABLE_INTREE_EC=no
35972       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35973 $as_echo "no" >&6; }
35974     fi
35975 
35976 
35977 
35978 
35979 ###############################################################################
35980 #
35981 # Configure parts of the build that only affect the build performance,
35982 # not the result.
35983 #
35984 ###############################################################################
35985 
35986 
35987   # How many cores do we have on this build system?
35988 
35989 # Check whether --with-num-cores was given.
35990 if test "${with_num_cores+set}" = set; then :
35991   withval=$with_num_cores;
35992 fi
35993 
35994   if test "x$with_num_cores" = x; then
35995     # The number of cores were not specified, try to probe them.
35996 
35997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35998 $as_echo_n "checking for number of cores... " >&6; }
35999   NUM_CORES=1
36000   FOUND_CORES=no
36001 
36002   if test -f /proc/cpuinfo; then
36003     # Looks like a Linux (or cygwin) system
36004     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
36005     FOUND_CORES=yes
36006   elif test -x /usr/sbin/psrinfo; then
36007     # Looks like a Solaris system
36008     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
36009     FOUND_CORES=yes
36010   elif test -x /usr/sbin/system_profiler; then
36011     # Looks like a MacOSX system
36012     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
36013     FOUND_CORES=yes
36014   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
36015     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
36016     FOUND_CORES=yes
36017   elif test -n "$NUMBER_OF_PROCESSORS"; then
36018     # On windows, look in the env
36019     NUM_CORES=$NUMBER_OF_PROCESSORS
36020     FOUND_CORES=yes
36021   fi
36022 
36023   if test "x$FOUND_CORES" = xyes; then
36024     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
36025 $as_echo "$NUM_CORES" >&6; }
36026   else
36027     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
36028 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
36029     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
36030 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
36031   fi
36032 
36033   else
36034     NUM_CORES=$with_num_cores
36035   fi
36036 
36037 
36038 
36039   # How much memory do we have on this build system?
36040 
36041 # Check whether --with-memory-size was given.
36042 if test "${with_memory_size+set}" = set; then :
36043   withval=$with_memory_size;
36044 fi
36045 
36046   if test "x$with_memory_size" = x; then
36047     # The memory size was not specified, try to probe it.
36048 
36049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
36050 $as_echo_n "checking for memory size... " >&6; }
36051   # Default to 1024 MB
36052   MEMORY_SIZE=1024
36053   FOUND_MEM=no
36054 
36055   if test -f /proc/meminfo; then
36056     # Looks like a Linux (or cygwin) system
36057     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
36058     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
36059     FOUND_MEM=yes
36060   elif test -x /usr/sbin/prtconf; then
36061     # Looks like a Solaris or AIX system
36062     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
36063     FOUND_MEM=yes
36064   elif test -x /usr/sbin/system_profiler; then
36065     # Looks like a MacOSX system
36066     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
36067     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
36068     FOUND_MEM=yes
36069   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
36070     # Windows, but without cygwin
36071     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
36072     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
36073     FOUND_MEM=yes
36074   fi
36075 
36076   if test "x$FOUND_MEM" = xyes; then
36077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
36078 $as_echo "$MEMORY_SIZE MB" >&6; }
36079   else
36080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
36081 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
36082     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
36083 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
36084   fi
36085 
36086   else
36087     MEMORY_SIZE=$with_memory_size
36088   fi
36089 
36090 
36091 
36092   # Provide a decent default number of parallel jobs for make depending on
36093   # number of cores, amount of memory and machine architecture.
36094 
36095 # Check whether --with-jobs was given.
36096 if test "${with_jobs+set}" = set; then :
36097   withval=$with_jobs;
36098 fi
36099 
36100   if test "x$with_jobs" = x; then
36101     # Number of jobs was not specified, calculate.
36102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
36103 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
36104     # Approximate memory in GB, rounding up a bit.
36105     memory_gb=`expr $MEMORY_SIZE / 1100`
36106     # Pick the lowest of memory in gb and number of cores.
36107     if test "$memory_gb" -lt "$NUM_CORES"; then
36108       JOBS="$memory_gb"
36109     else
36110       JOBS="$NUM_CORES"
36111       # On bigger machines, leave some room for other processes to run
36112       if test "$JOBS" -gt "4"; then
36113         JOBS=`expr $JOBS '*' 90 / 100`
36114       fi
36115     fi
36116     # Cap number of jobs to 16
36117     if test "$JOBS" -gt "16"; then
36118       JOBS=16
36119     fi
36120     if test "$JOBS" -eq "0"; then
36121       JOBS=1
36122     fi
36123     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
36124 $as_echo "$JOBS" >&6; }
36125   else
36126     JOBS=$with_jobs
36127   fi
36128 
36129 
36130 
36131 # Setup smart javac (after cores and memory have been setup)
36132 
36133 
36134 # Check whether --with-sjavac-server-java was given.
36135 if test "${with_sjavac_server_java+set}" = set; then :
36136   withval=$with_sjavac_server_java;
36137 fi
36138 
36139 
36140   if test "x$with_sjavac_server_java" != x; then
36141     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
36142     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
36143     if test "x$FOUND_VERSION" = x; then
36144       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
36145     fi
36146   else
36147     SJAVAC_SERVER_JAVA=""
36148     # Hotspot specific options.
36149 
36150   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
36151   $ECHO "Command: $JAVA -verbosegc -version" >&5
36152   OUTPUT=`$JAVA -verbosegc -version 2>&1`
36153   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36154   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36155   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36156     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
36157     JVM_ARG_OK=true
36158   else
36159     $ECHO "Arg failed:" >&5
36160     $ECHO "$OUTPUT" >&5
36161     JVM_ARG_OK=false
36162   fi
36163 
36164     # JRockit specific options.
36165 
36166   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
36167   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
36168   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
36169   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36170   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36171   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36172     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
36173     JVM_ARG_OK=true
36174   else
36175     $ECHO "Arg failed:" >&5
36176     $ECHO "$OUTPUT" >&5
36177     JVM_ARG_OK=false
36178   fi
36179 
36180     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
36181   fi
36182 
36183 
36184   if test "$MEMORY_SIZE" -gt "2500"; then
36185 
36186   $ECHO "Check if jvm arg is ok: -d64" >&5
36187   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
36188   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
36189   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36190   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36191   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36192     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
36193     JVM_ARG_OK=true
36194   else
36195     $ECHO "Arg failed:" >&5
36196     $ECHO "$OUTPUT" >&5
36197     JVM_ARG_OK=false
36198   fi
36199 
36200     if test "$JVM_ARG_OK" = true; then
36201       JVM_64BIT=true
36202       JVM_ARG_OK=false
36203     fi
36204   fi
36205 
36206   if test "$JVM_64BIT" = true; then
36207     if test "$MEMORY_SIZE" -gt "17000"; then
36208 
36209   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
36210   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
36211   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
36212   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36213   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36214   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36215     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
36216     JVM_ARG_OK=true
36217   else
36218     $ECHO "Arg failed:" >&5
36219     $ECHO "$OUTPUT" >&5
36220     JVM_ARG_OK=false
36221   fi
36222 
36223     fi
36224     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
36225 
36226   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
36227   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
36228   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
36229   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36230   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36231   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36232     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
36233     JVM_ARG_OK=true
36234   else
36235     $ECHO "Arg failed:" >&5
36236     $ECHO "$OUTPUT" >&5
36237     JVM_ARG_OK=false
36238   fi
36239 
36240     fi
36241     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
36242 
36243   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
36244   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
36245   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
36246   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36247   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36248   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36249     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
36250     JVM_ARG_OK=true
36251   else
36252     $ECHO "Arg failed:" >&5
36253     $ECHO "$OUTPUT" >&5
36254     JVM_ARG_OK=false
36255   fi
36256 
36257     fi
36258     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
36259 
36260   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
36261   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
36262   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
36263   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36264   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36265   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36266     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
36267     JVM_ARG_OK=true
36268   else
36269     $ECHO "Arg failed:" >&5
36270     $ECHO "$OUTPUT" >&5
36271     JVM_ARG_OK=false
36272   fi
36273 
36274     fi
36275   fi
36276   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
36277 
36278   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
36279   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
36280   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
36281   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36282   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36283   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36284     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
36285     JVM_ARG_OK=true
36286   else
36287     $ECHO "Arg failed:" >&5
36288     $ECHO "$OUTPUT" >&5
36289     JVM_ARG_OK=false
36290   fi
36291 
36292   fi
36293   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
36294 
36295   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
36296   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
36297   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
36298   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36299   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36300   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36301     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
36302     JVM_ARG_OK=true
36303   else
36304     $ECHO "Arg failed:" >&5
36305     $ECHO "$OUTPUT" >&5
36306     JVM_ARG_OK=false
36307   fi
36308 
36309   fi
36310   if test "$JVM_ARG_OK" = false; then
36311 
36312   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
36313   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
36314   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
36315   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36316   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36317   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36318     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
36319     JVM_ARG_OK=true
36320   else
36321     $ECHO "Arg failed:" >&5
36322     $ECHO "$OUTPUT" >&5
36323     JVM_ARG_OK=false
36324   fi
36325 
36326   fi
36327 
36328   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
36329 $as_echo_n "checking whether to use sjavac... " >&6; }
36330   # Check whether --enable-sjavac was given.
36331 if test "${enable_sjavac+set}" = set; then :
36332   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
36333 else
36334   ENABLE_SJAVAC='no'
36335 fi
36336 
36337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
36338 $as_echo "$ENABLE_SJAVAC" >&6; }
36339 
36340 
36341   if test "x$ENABLE_SJAVAC" = xyes; then
36342     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
36343   else
36344     SJAVAC_SERVER_DIR=
36345   fi
36346 
36347 
36348 
36349 # Can the C/C++ compiler use precompiled headers?
36350 
36351 
36352   ###############################################################################
36353   #
36354   # Can the C/C++ compiler use precompiled headers?
36355   #
36356   # Check whether --enable-precompiled-headers was given.
36357 if test "${enable_precompiled_headers+set}" = set; then :
36358   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
36359 else
36360   ENABLE_PRECOMPH=yes
36361 fi
36362 
36363 
36364   USE_PRECOMPILED_HEADER=1
36365   if test "x$ENABLE_PRECOMPH" = xno; then
36366     USE_PRECOMPILED_HEADER=0
36367   fi
36368 
36369   if test "x$ENABLE_PRECOMPH" = xyes; then
36370     # Check that the compiler actually supports precomp headers.
36371     if test "x$GCC" = xyes; then
36372       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
36373 $as_echo_n "checking that precompiled headers work... " >&6; }
36374       echo "int alfa();" > conftest.h
36375       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
36376       if test ! -f conftest.hpp.gch; then
36377         USE_PRECOMPILED_HEADER=0
36378         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36379 $as_echo "no" >&6; }
36380       else
36381         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36382 $as_echo "yes" >&6; }
36383       fi
36384       rm -f conftest.h conftest.hpp.gch
36385     fi
36386   fi
36387 
36388 
36389 
36390 
36391 # Setup use of ccache, if available
36392 
36393   # Check whether --enable-ccache was given.
36394 if test "${enable_ccache+set}" = set; then :
36395   enableval=$enable_ccache;
36396 fi
36397 
36398 
36399   CCACHE=
36400   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
36401 $as_echo_n "checking is ccache enabled... " >&6; }
36402   ENABLE_CCACHE=$enable_ccache
36403   if test "x$enable_ccache" = xyes; then
36404     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36405 $as_echo "yes" >&6; }
36406     OLD_PATH="$PATH"
36407     if test "x$TOOLS_DIR" != x; then
36408       PATH=$TOOLS_DIR:$PATH
36409     fi
36410 
36411   for ac_prog in ccache
36412 do
36413   # Extract the first word of "$ac_prog", so it can be a program name with args.
36414 set dummy $ac_prog; ac_word=$2
36415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36416 $as_echo_n "checking for $ac_word... " >&6; }
36417 if ${ac_cv_path_CCACHE+:} false; then :
36418   $as_echo_n "(cached) " >&6
36419 else
36420   case $CCACHE in
36421   [\\/]* | ?:[\\/]*)
36422   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
36423   ;;
36424   *)
36425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36426 for as_dir in $PATH
36427 do
36428   IFS=$as_save_IFS
36429   test -z "$as_dir" && as_dir=.
36430     for ac_exec_ext in '' $ac_executable_extensions; do
36431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36432     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36434     break 2
36435   fi
36436 done
36437   done
36438 IFS=$as_save_IFS
36439 
36440   ;;
36441 esac
36442 fi
36443 CCACHE=$ac_cv_path_CCACHE
36444 if test -n "$CCACHE"; then
36445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36446 $as_echo "$CCACHE" >&6; }
36447 else
36448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36449 $as_echo "no" >&6; }
36450 fi
36451 
36452 
36453   test -n "$CCACHE" && break
36454 done
36455 
36456 
36457   if test "x$CCACHE" = x; then
36458     if test "xccache" = x; then
36459       PROG_NAME=ccache
36460     else
36461       PROG_NAME=ccache
36462     fi
36463     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
36464 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
36465     as_fn_error $? "Cannot continue" "$LINENO" 5
36466   fi
36467 
36468 
36469     CCACHE_STATUS="enabled"
36470     PATH="$OLD_PATH"
36471   elif test "x$enable_ccache" = xno; then
36472     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
36473 $as_echo "no, explicitly disabled" >&6; }
36474   elif test "x$enable_ccache" = x; then
36475     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36476 $as_echo "no" >&6; }
36477   else
36478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
36479 $as_echo "unknown" >&6; }
36480     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
36481   fi
36482 
36483 
36484 
36485 # Check whether --with-ccache-dir was given.
36486 if test "${with_ccache_dir+set}" = set; then :
36487   withval=$with_ccache_dir;
36488 fi
36489 
36490 
36491   if test "x$with_ccache_dir" != x; then
36492     # When using a non home ccache directory, assume the use is to share ccache files
36493     # with other users. Thus change the umask.
36494     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36495     if test "x$CCACHE" = x; then
36496       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
36497 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
36498     fi
36499   fi
36500 
36501   if test "x$CCACHE" != x; then
36502 
36503   if test "x$CCACHE" != x; then
36504     # Only use ccache if it is 3.1.4 or later, which supports
36505     # precompiled headers.
36506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36507 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36508     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36509     if test "x$HAS_GOOD_CCACHE" = x; then
36510       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36511 $as_echo "no, disabling ccache" >&6; }
36512       CCACHE=
36513       CCACHE_STATUS="disabled"
36514     else
36515       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36516 $as_echo "yes" >&6; }
36517       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36518 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36519       PUSHED_FLAGS="$CXXFLAGS"
36520       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36521       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36522 /* end confdefs.h.  */
36523 
36524 int
36525 main ()
36526 {
36527 
36528   ;
36529   return 0;
36530 }
36531 _ACEOF
36532 if ac_fn_cxx_try_compile "$LINENO"; then :
36533   CC_KNOWS_CCACHE_TRICK=yes
36534 else
36535   CC_KNOWS_CCACHE_TRICK=no
36536 fi
36537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36538       CXXFLAGS="$PUSHED_FLAGS"
36539       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36540         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36541 $as_echo "yes" >&6; }
36542       else
36543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36544 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
36545         CCACHE=
36546         CCACHE_STATUS="disabled"
36547       fi
36548     fi
36549   fi
36550 
36551   if test "x$CCACHE" != x; then
36552     CCACHE_SLOPPINESS=time_macros
36553     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36554     CCACHE_FLAGS=-fpch-preprocess
36555 
36556     if test "x$SET_CCACHE_DIR" != x; then
36557       mkdir -p $CCACHE_DIR > /dev/null 2>&1
36558       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36559     fi
36560   fi
36561 
36562   fi
36563 
36564 
36565 ###############################################################################
36566 #
36567 # And now the finish...
36568 #
36569 ###############################################################################
36570 
36571 # Check for some common pitfalls
36572 
36573   if test x"$OPENJDK_BUILD_OS" = xwindows; then
36574     file_to_test="$SRC_ROOT/LICENSE"
36575     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36576       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
36577     fi
36578   fi
36579 
36580 
36581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36582 $as_echo_n "checking if build directory is on local disk... " >&6; }
36583 
36584   # df -l lists only local disks; if the given directory is not found then
36585   # a non-zero exit code is given
36586   if test "x$DF" = x; then
36587     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36588       # msys does not have df; use Windows "net use" instead.
36589       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36590       if test "x$IS_NETWORK_DISK" = x; then
36591         OUTPUT_DIR_IS_LOCAL="yes"
36592       else
36593         OUTPUT_DIR_IS_LOCAL="no"
36594       fi
36595     else
36596       # No df here, say it's local
36597       OUTPUT_DIR_IS_LOCAL="yes"
36598     fi
36599   else
36600     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36601       OUTPUT_DIR_IS_LOCAL="yes"
36602     else
36603       OUTPUT_DIR_IS_LOCAL="no"
36604     fi
36605   fi
36606 
36607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36608 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36609 
36610 
36611 
36612   # Check if the user has any old-style ALT_ variables set.
36613   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36614 
36615   # Before generating output files, test if they exist. If they do, this is a reconfigure.
36616   # Since we can't properly handle the dependencies for this, warn the user about the situation
36617   if test -e $OUTPUT_ROOT/spec.gmk; then
36618     IS_RECONFIGURE=yes
36619   else
36620     IS_RECONFIGURE=no
36621   fi
36622 
36623 
36624 # At the end, call the custom hook. (Dummy macro if no custom sources available)
36625 
36626 
36627 # We're messing a bit with internal autoconf variables to put the config.status
36628 # in the output directory instead of the current directory.
36629 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36630 
36631 # Create the actual output files. Now the main work of configure is done.
36632 cat >confcache <<\_ACEOF
36633 # This file is a shell script that caches the results of configure
36634 # tests run on this system so they can be shared between configure
36635 # scripts and configure runs, see configure's option --config-cache.
36636 # It is not useful on other systems.  If it contains results you don't
36637 # want to keep, you may remove or edit it.
36638 #
36639 # config.status only pays attention to the cache file if you give it
36640 # the --recheck option to rerun configure.
36641 #
36642 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36643 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36644 # following values.
36645 
36646 _ACEOF
36647 
36648 # The following way of writing the cache mishandles newlines in values,
36649 # but we know of no workaround that is simple, portable, and efficient.
36650 # So, we kill variables containing newlines.
36651 # Ultrix sh set writes to stderr and can't be redirected directly,
36652 # and sets the high bit in the cache file unless we assign to the vars.
36653 (
36654   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36655     eval ac_val=\$$ac_var
36656     case $ac_val in #(
36657     *${as_nl}*)
36658       case $ac_var in #(
36659       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36660 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36661       esac
36662       case $ac_var in #(
36663       _ | IFS | as_nl) ;; #(
36664       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36665       *) { eval $ac_var=; unset $ac_var;} ;;
36666       esac ;;
36667     esac
36668   done
36669 
36670   (set) 2>&1 |
36671     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36672     *${as_nl}ac_space=\ *)
36673       # `set' does not quote correctly, so add quotes: double-quote
36674       # substitution turns \\\\ into \\, and sed turns \\ into \.
36675       sed -n \
36676         "s/'/'\\\\''/g;
36677           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36678       ;; #(
36679     *)
36680       # `set' quotes correctly as required by POSIX, so do not add quotes.
36681       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36682       ;;
36683     esac |
36684     sort
36685 ) |
36686   sed '
36687      /^ac_cv_env_/b end
36688      t clear
36689      :clear
36690      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36691      t end
36692      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36693      :end' >>confcache
36694 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36695   if test -w "$cache_file"; then
36696     if test "x$cache_file" != "x/dev/null"; then
36697       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36698 $as_echo "$as_me: updating cache $cache_file" >&6;}
36699       if test ! -f "$cache_file" || test -h "$cache_file"; then
36700         cat confcache >"$cache_file"
36701       else
36702         case $cache_file in #(
36703         */* | ?:*)
36704           mv -f confcache "$cache_file"$$ &&
36705           mv -f "$cache_file"$$ "$cache_file" ;; #(
36706         *)
36707           mv -f confcache "$cache_file" ;;
36708         esac
36709       fi
36710     fi
36711   else
36712     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36713 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36714   fi
36715 fi
36716 rm -f confcache
36717 
36718 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36719 # Let make expand exec_prefix.
36720 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36721 
36722 DEFS=-DHAVE_CONFIG_H
36723 
36724 ac_libobjs=
36725 ac_ltlibobjs=
36726 U=
36727 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36728   # 1. Remove the extension, and $U if already installed.
36729   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36730   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36731   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36732   #    will be set to the directory where LIBOBJS objects are built.
36733   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36734   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36735 done
36736 LIBOBJS=$ac_libobjs
36737 
36738 LTLIBOBJS=$ac_ltlibobjs
36739 
36740 
36741 
36742 : "${CONFIG_STATUS=./config.status}"
36743 ac_write_fail=0
36744 ac_clean_files_save=$ac_clean_files
36745 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36746 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36747 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36748 as_write_fail=0
36749 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36750 #! $SHELL
36751 # Generated by $as_me.
36752 # Run this file to recreate the current configuration.
36753 # Compiler output produced by configure, useful for debugging
36754 # configure, is in config.log if it exists.
36755 
36756 debug=false
36757 ac_cs_recheck=false
36758 ac_cs_silent=false
36759 
36760 SHELL=\${CONFIG_SHELL-$SHELL}
36761 export SHELL
36762 _ASEOF
36763 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36764 ## -------------------- ##
36765 ## M4sh Initialization. ##
36766 ## -------------------- ##
36767 
36768 # Be more Bourne compatible
36769 DUALCASE=1; export DUALCASE # for MKS sh
36770 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36771   emulate sh
36772   NULLCMD=:
36773   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36774   # is contrary to our usage.  Disable this feature.
36775   alias -g '${1+"$@"}'='"$@"'
36776   setopt NO_GLOB_SUBST
36777 else
36778   case `(set -o) 2>/dev/null` in #(
36779   *posix*) :
36780     set -o posix ;; #(
36781   *) :
36782      ;;
36783 esac
36784 fi
36785 
36786 
36787 as_nl='
36788 '
36789 export as_nl
36790 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36791 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36792 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36793 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36794 # Prefer a ksh shell builtin over an external printf program on Solaris,
36795 # but without wasting forks for bash or zsh.
36796 if test -z "$BASH_VERSION$ZSH_VERSION" \
36797     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36798   as_echo='print -r --'
36799   as_echo_n='print -rn --'
36800 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36801   as_echo='printf %s\n'
36802   as_echo_n='printf %s'
36803 else
36804   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36805     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36806     as_echo_n='/usr/ucb/echo -n'
36807   else
36808     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36809     as_echo_n_body='eval
36810       arg=$1;
36811       case $arg in #(
36812       *"$as_nl"*)
36813         expr "X$arg" : "X\\(.*\\)$as_nl";
36814         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36815       esac;
36816       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36817     '
36818     export as_echo_n_body
36819     as_echo_n='sh -c $as_echo_n_body as_echo'
36820   fi
36821   export as_echo_body
36822   as_echo='sh -c $as_echo_body as_echo'
36823 fi
36824 
36825 # The user is always right.
36826 if test "${PATH_SEPARATOR+set}" != set; then
36827   PATH_SEPARATOR=:
36828   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36829     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36830       PATH_SEPARATOR=';'
36831   }
36832 fi
36833 
36834 
36835 # IFS
36836 # We need space, tab and new line, in precisely that order.  Quoting is
36837 # there to prevent editors from complaining about space-tab.
36838 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36839 # splitting by setting IFS to empty value.)
36840 IFS=" ""        $as_nl"
36841 
36842 # Find who we are.  Look in the path if we contain no directory separator.
36843 as_myself=
36844 case $0 in #((
36845   *[\\/]* ) as_myself=$0 ;;
36846   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36847 for as_dir in $PATH
36848 do
36849   IFS=$as_save_IFS
36850   test -z "$as_dir" && as_dir=.
36851     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36852   done
36853 IFS=$as_save_IFS
36854 
36855      ;;
36856 esac
36857 # We did not find ourselves, most probably we were run as `sh COMMAND'
36858 # in which case we are not to be found in the path.
36859 if test "x$as_myself" = x; then
36860   as_myself=$0
36861 fi
36862 if test ! -f "$as_myself"; then
36863   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36864   exit 1
36865 fi
36866 
36867 # Unset variables that we do not need and which cause bugs (e.g. in
36868 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36869 # suppresses any "Segmentation fault" message there.  '((' could
36870 # trigger a bug in pdksh 5.2.14.
36871 for as_var in BASH_ENV ENV MAIL MAILPATH
36872 do eval test x\${$as_var+set} = xset \
36873   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36874 done
36875 PS1='$ '
36876 PS2='> '
36877 PS4='+ '
36878 
36879 # NLS nuisances.
36880 LC_ALL=C
36881 export LC_ALL
36882 LANGUAGE=C
36883 export LANGUAGE
36884 
36885 # CDPATH.
36886 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36887 
36888 
36889 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36890 # ----------------------------------------
36891 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36892 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36893 # script with STATUS, using 1 if that was 0.
36894 as_fn_error ()
36895 {
36896   as_status=$1; test $as_status -eq 0 && as_status=1
36897   if test "$4"; then
36898     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36899     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36900   fi
36901   $as_echo "$as_me: error: $2" >&2
36902   as_fn_exit $as_status
36903 } # as_fn_error
36904 
36905 
36906 # as_fn_set_status STATUS
36907 # -----------------------
36908 # Set $? to STATUS, without forking.
36909 as_fn_set_status ()
36910 {
36911   return $1
36912 } # as_fn_set_status
36913 
36914 # as_fn_exit STATUS
36915 # -----------------
36916 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36917 as_fn_exit ()
36918 {
36919   set +e
36920   as_fn_set_status $1
36921   exit $1
36922 } # as_fn_exit
36923 
36924 # as_fn_unset VAR
36925 # ---------------
36926 # Portably unset VAR.
36927 as_fn_unset ()
36928 {
36929   { eval $1=; unset $1;}
36930 }
36931 as_unset=as_fn_unset
36932 # as_fn_append VAR VALUE
36933 # ----------------------
36934 # Append the text in VALUE to the end of the definition contained in VAR. Take
36935 # advantage of any shell optimizations that allow amortized linear growth over
36936 # repeated appends, instead of the typical quadratic growth present in naive
36937 # implementations.
36938 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36939   eval 'as_fn_append ()
36940   {
36941     eval $1+=\$2
36942   }'
36943 else
36944   as_fn_append ()
36945   {
36946     eval $1=\$$1\$2
36947   }
36948 fi # as_fn_append
36949 
36950 # as_fn_arith ARG...
36951 # ------------------
36952 # Perform arithmetic evaluation on the ARGs, and store the result in the
36953 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36954 # must be portable across $(()) and expr.
36955 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36956   eval 'as_fn_arith ()
36957   {
36958     as_val=$(( $* ))
36959   }'
36960 else
36961   as_fn_arith ()
36962   {
36963     as_val=`expr "$@" || test $? -eq 1`
36964   }
36965 fi # as_fn_arith
36966 
36967 
36968 if expr a : '\(a\)' >/dev/null 2>&1 &&
36969    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36970   as_expr=expr
36971 else
36972   as_expr=false
36973 fi
36974 
36975 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36976   as_basename=basename
36977 else
36978   as_basename=false
36979 fi
36980 
36981 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36982   as_dirname=dirname
36983 else
36984   as_dirname=false
36985 fi
36986 
36987 as_me=`$as_basename -- "$0" ||
36988 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36989          X"$0" : 'X\(//\)$' \| \
36990          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36991 $as_echo X/"$0" |
36992     sed '/^.*\/\([^/][^/]*\)\/*$/{
36993             s//\1/
36994             q
36995           }
36996           /^X\/\(\/\/\)$/{
36997             s//\1/
36998             q
36999           }
37000           /^X\/\(\/\).*/{
37001             s//\1/
37002             q
37003           }
37004           s/.*/./; q'`
37005 
37006 # Avoid depending upon Character Ranges.
37007 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
37008 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
37009 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37010 as_cr_digits='0123456789'
37011 as_cr_alnum=$as_cr_Letters$as_cr_digits
37012 
37013 ECHO_C= ECHO_N= ECHO_T=
37014 case `echo -n x` in #(((((
37015 -n*)
37016   case `echo 'xy\c'` in
37017   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
37018   xy)  ECHO_C='\c';;
37019   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
37020        ECHO_T=' ';;
37021   esac;;
37022 *)
37023   ECHO_N='-n';;
37024 esac
37025 
37026 rm -f conf$$ conf$$.exe conf$$.file
37027 if test -d conf$$.dir; then
37028   rm -f conf$$.dir/conf$$.file
37029 else
37030   rm -f conf$$.dir
37031   mkdir conf$$.dir 2>/dev/null
37032 fi
37033 if (echo >conf$$.file) 2>/dev/null; then
37034   if ln -s conf$$.file conf$$ 2>/dev/null; then
37035     as_ln_s='ln -s'
37036     # ... but there are two gotchas:
37037     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
37038     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
37039     # In both cases, we have to default to `cp -pR'.
37040     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
37041       as_ln_s='cp -pR'
37042   elif ln conf$$.file conf$$ 2>/dev/null; then
37043     as_ln_s=ln
37044   else
37045     as_ln_s='cp -pR'
37046   fi
37047 else
37048   as_ln_s='cp -pR'
37049 fi
37050 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
37051 rmdir conf$$.dir 2>/dev/null
37052 
37053 
37054 # as_fn_mkdir_p
37055 # -------------
37056 # Create "$as_dir" as a directory, including parents if necessary.
37057 as_fn_mkdir_p ()
37058 {
37059 
37060   case $as_dir in #(
37061   -*) as_dir=./$as_dir;;
37062   esac
37063   test -d "$as_dir" || eval $as_mkdir_p || {
37064     as_dirs=
37065     while :; do
37066       case $as_dir in #(
37067       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
37068       *) as_qdir=$as_dir;;
37069       esac
37070       as_dirs="'$as_qdir' $as_dirs"
37071       as_dir=`$as_dirname -- "$as_dir" ||
37072 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37073          X"$as_dir" : 'X\(//\)[^/]' \| \
37074          X"$as_dir" : 'X\(//\)$' \| \
37075          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
37076 $as_echo X"$as_dir" |
37077     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37078             s//\1/
37079             q
37080           }
37081           /^X\(\/\/\)[^/].*/{
37082             s//\1/
37083             q
37084           }
37085           /^X\(\/\/\)$/{
37086             s//\1/
37087             q
37088           }
37089           /^X\(\/\).*/{
37090             s//\1/
37091             q
37092           }
37093           s/.*/./; q'`
37094       test -d "$as_dir" && break
37095     done
37096     test -z "$as_dirs" || eval "mkdir $as_dirs"
37097   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
37098 
37099 
37100 } # as_fn_mkdir_p
37101 if mkdir -p . 2>/dev/null; then
37102   as_mkdir_p='mkdir -p "$as_dir"'
37103 else
37104   test -d ./-p && rmdir ./-p
37105   as_mkdir_p=false
37106 fi
37107 
37108 
37109 # as_fn_executable_p FILE
37110 # -----------------------
37111 # Test if FILE is an executable regular file.
37112 as_fn_executable_p ()
37113 {
37114   test -f "$1" && test -x "$1"
37115 } # as_fn_executable_p
37116 as_test_x='test -x'
37117 as_executable_p=as_fn_executable_p
37118 
37119 # Sed expression to map a string onto a valid CPP name.
37120 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
37121 
37122 # Sed expression to map a string onto a valid variable name.
37123 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
37124 
37125 
37126 exec 6>&1
37127 ## ----------------------------------- ##
37128 ## Main body of $CONFIG_STATUS script. ##
37129 ## ----------------------------------- ##
37130 _ASEOF
37131 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
37132 
37133 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37134 # Save the log message, to keep $0 and so on meaningful, and to
37135 # report actual input values of CONFIG_FILES etc. instead of their
37136 # values after options handling.
37137 ac_log="
37138 This file was extended by OpenJDK $as_me jdk8, which was
37139 generated by GNU Autoconf 2.69.  Invocation command line was
37140 
37141   CONFIG_FILES    = $CONFIG_FILES
37142   CONFIG_HEADERS  = $CONFIG_HEADERS
37143   CONFIG_LINKS    = $CONFIG_LINKS
37144   CONFIG_COMMANDS = $CONFIG_COMMANDS
37145   $ $0 $@
37146 
37147 on `(hostname || uname -n) 2>/dev/null | sed 1q`
37148 "
37149 
37150 _ACEOF
37151 
37152 case $ac_config_files in *"
37153 "*) set x $ac_config_files; shift; ac_config_files=$*;;
37154 esac
37155 
37156 case $ac_config_headers in *"
37157 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
37158 esac
37159 
37160 
37161 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37162 # Files that config.status was made for.
37163 config_files="$ac_config_files"
37164 config_headers="$ac_config_headers"
37165 
37166 _ACEOF
37167 
37168 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37169 ac_cs_usage="\
37170 \`$as_me' instantiates files and other configuration actions
37171 from templates according to the current configuration.  Unless the files
37172 and actions are specified as TAGs, all are instantiated by default.
37173 
37174 Usage: $0 [OPTION]... [TAG]...
37175 
37176   -h, --help       print this help, then exit
37177   -V, --version    print version number and configuration settings, then exit
37178       --config     print configuration, then exit
37179   -q, --quiet, --silent
37180                    do not print progress messages
37181   -d, --debug      don't remove temporary files
37182       --recheck    update $as_me by reconfiguring in the same conditions
37183       --file=FILE[:TEMPLATE]
37184                    instantiate the configuration file FILE
37185       --header=FILE[:TEMPLATE]
37186                    instantiate the configuration header FILE
37187 
37188 Configuration files:
37189 $config_files
37190 
37191 Configuration headers:
37192 $config_headers
37193 
37194 Report bugs to <build-dev@openjdk.java.net>.
37195 OpenJDK home page: <http://openjdk.java.net>."
37196 
37197 _ACEOF
37198 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37199 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
37200 ac_cs_version="\\
37201 OpenJDK config.status jdk8
37202 configured by $0, generated by GNU Autoconf 2.69,
37203   with options \\"\$ac_cs_config\\"
37204 
37205 Copyright (C) 2012 Free Software Foundation, Inc.
37206 This config.status script is free software; the Free Software Foundation
37207 gives unlimited permission to copy, distribute and modify it."
37208 
37209 ac_pwd='$ac_pwd'
37210 srcdir='$srcdir'
37211 AWK='$AWK'
37212 test -n "\$AWK" || AWK=awk
37213 _ACEOF
37214 
37215 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37216 # The default lists apply if the user does not specify any file.
37217 ac_need_defaults=:
37218 while test $# != 0
37219 do
37220   case $1 in
37221   --*=?*)
37222     ac_option=`expr "X$1" : 'X\([^=]*\)='`
37223     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
37224     ac_shift=:
37225     ;;
37226   --*=)
37227     ac_option=`expr "X$1" : 'X\([^=]*\)='`
37228     ac_optarg=
37229     ac_shift=:
37230     ;;
37231   *)
37232     ac_option=$1
37233     ac_optarg=$2
37234     ac_shift=shift
37235     ;;
37236   esac
37237 
37238   case $ac_option in
37239   # Handling of the options.
37240   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
37241     ac_cs_recheck=: ;;
37242   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
37243     $as_echo "$ac_cs_version"; exit ;;
37244   --config | --confi | --conf | --con | --co | --c )
37245     $as_echo "$ac_cs_config"; exit ;;
37246   --debug | --debu | --deb | --de | --d | -d )
37247     debug=: ;;
37248   --file | --fil | --fi | --f )
37249     $ac_shift
37250     case $ac_optarg in
37251     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37252     '') as_fn_error $? "missing file argument" ;;
37253     esac
37254     as_fn_append CONFIG_FILES " '$ac_optarg'"
37255     ac_need_defaults=false;;
37256   --header | --heade | --head | --hea )
37257     $ac_shift
37258     case $ac_optarg in
37259     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37260     esac
37261     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
37262     ac_need_defaults=false;;
37263   --he | --h)
37264     # Conflict between --help and --header
37265     as_fn_error $? "ambiguous option: \`$1'
37266 Try \`$0 --help' for more information.";;
37267   --help | --hel | -h )
37268     $as_echo "$ac_cs_usage"; exit ;;
37269   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
37270   | -silent | --silent | --silen | --sile | --sil | --si | --s)
37271     ac_cs_silent=: ;;
37272 
37273   # This is an error.
37274   -*) as_fn_error $? "unrecognized option: \`$1'
37275 Try \`$0 --help' for more information." ;;
37276 
37277   *) as_fn_append ac_config_targets " $1"
37278      ac_need_defaults=false ;;
37279 
37280   esac
37281   shift
37282 done
37283 
37284 ac_configure_extra_args=
37285 
37286 if $ac_cs_silent; then
37287   exec 6>/dev/null
37288   ac_configure_extra_args="$ac_configure_extra_args --silent"
37289 fi
37290 
37291 _ACEOF
37292 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37293 if \$ac_cs_recheck; then
37294   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
37295   shift
37296   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
37297   CONFIG_SHELL='$SHELL'
37298   export CONFIG_SHELL
37299   exec "\$@"
37300 fi
37301 
37302 _ACEOF
37303 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37304 exec 5>>config.log
37305 {
37306   echo
37307   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
37308 ## Running $as_me. ##
37309 _ASBOX
37310   $as_echo "$ac_log"
37311 } >&5
37312 
37313 _ACEOF
37314 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37315 _ACEOF
37316 
37317 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37318 
37319 # Handling of arguments.
37320 for ac_config_target in $ac_config_targets
37321 do
37322   case $ac_config_target in
37323     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
37324     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
37325     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
37326     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
37327     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
37328     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
37329     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
37330 
37331   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
37332   esac
37333 done
37334 
37335 
37336 # If the user did not use the arguments to specify the items to instantiate,
37337 # then the envvar interface is used.  Set only those that are not.
37338 # We use the long form for the default assignment because of an extremely
37339 # bizarre bug on SunOS 4.1.3.
37340 if $ac_need_defaults; then
37341   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
37342   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
37343 fi
37344 
37345 # Have a temporary directory for convenience.  Make it in the build tree
37346 # simply because there is no reason against having it here, and in addition,
37347 # creating and moving files from /tmp can sometimes cause problems.
37348 # Hook for its removal unless debugging.
37349 # Note that there is a small window in which the directory will not be cleaned:
37350 # after its creation but before its name has been assigned to `$tmp'.
37351 $debug ||
37352 {
37353   tmp= ac_tmp=
37354   trap 'exit_status=$?
37355   : "${ac_tmp:=$tmp}"
37356   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37357 ' 0
37358   trap 'as_fn_exit 1' 1 2 13 15
37359 }
37360 # Create a (secure) tmp directory for tmp files.
37361 
37362 {
37363   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37364   test -d "$tmp"
37365 }  ||
37366 {
37367   tmp=./conf$$-$RANDOM
37368   (umask 077 && mkdir "$tmp")
37369 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37370 ac_tmp=$tmp
37371 
37372 # Set up the scripts for CONFIG_FILES section.
37373 # No need to generate them if there are no CONFIG_FILES.
37374 # This happens for instance with `./config.status config.h'.
37375 if test -n "$CONFIG_FILES"; then
37376 
37377 
37378 ac_cr=`echo X | tr X '\015'`
37379 # On cygwin, bash can eat \r inside `` if the user requested igncr.
37380 # But we know of no other shell where ac_cr would be empty at this
37381 # point, so we can use a bashism as a fallback.
37382 if test "x$ac_cr" = x; then
37383   eval ac_cr=\$\'\\r\'
37384 fi
37385 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37386 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37387   ac_cs_awk_cr='\\r'
37388 else
37389   ac_cs_awk_cr=$ac_cr
37390 fi
37391 
37392 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37393 _ACEOF
37394 
37395 
37396 {
37397   echo "cat >conf$$subs.awk <<_ACEOF" &&
37398   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37399   echo "_ACEOF"
37400 } >conf$$subs.sh ||
37401   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37402 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37403 ac_delim='%!_!# '
37404 for ac_last_try in false false false false false :; do
37405   . ./conf$$subs.sh ||
37406     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37407 
37408   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37409   if test $ac_delim_n = $ac_delim_num; then
37410     break
37411   elif $ac_last_try; then
37412     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37413   else
37414     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37415   fi
37416 done
37417 rm -f conf$$subs.sh
37418 
37419 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37420 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37421 _ACEOF
37422 sed -n '
37423 h
37424 s/^/S["/; s/!.*/"]=/
37425 p
37426 g
37427 s/^[^!]*!//
37428 :repl
37429 t repl
37430 s/'"$ac_delim"'$//
37431 t delim
37432 :nl
37433 h
37434 s/\(.\{148\}\)..*/\1/
37435 t more1
37436 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37437 p
37438 n
37439 b repl
37440 :more1
37441 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37442 p
37443 g
37444 s/.\{148\}//
37445 t nl
37446 :delim
37447 h
37448 s/\(.\{148\}\)..*/\1/
37449 t more2
37450 s/["\\]/\\&/g; s/^/"/; s/$/"/
37451 p
37452 b
37453 :more2
37454 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37455 p
37456 g
37457 s/.\{148\}//
37458 t delim
37459 ' <conf$$subs.awk | sed '
37460 /^[^""]/{
37461   N
37462   s/\n//
37463 }
37464 ' >>$CONFIG_STATUS || ac_write_fail=1
37465 rm -f conf$$subs.awk
37466 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37467 _ACAWK
37468 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37469   for (key in S) S_is_set[key] = 1
37470   FS = ""
37471 
37472 }
37473 {
37474   line = $ 0
37475   nfields = split(line, field, "@")
37476   substed = 0
37477   len = length(field[1])
37478   for (i = 2; i < nfields; i++) {
37479     key = field[i]
37480     keylen = length(key)
37481     if (S_is_set[key]) {
37482       value = S[key]
37483       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37484       len += length(value) + length(field[++i])
37485       substed = 1
37486     } else
37487       len += 1 + keylen
37488   }
37489 
37490   print line
37491 }
37492 
37493 _ACAWK
37494 _ACEOF
37495 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37496 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37497   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37498 else
37499   cat
37500 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37501   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37502 _ACEOF
37503 
37504 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37505 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37506 # trailing colons and then remove the whole line if VPATH becomes empty
37507 # (actually we leave an empty line to preserve line numbers).
37508 if test "x$srcdir" = x.; then
37509   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37510 h
37511 s///
37512 s/^/:/
37513 s/[      ]*$/:/
37514 s/:\$(srcdir):/:/g
37515 s/:\${srcdir}:/:/g
37516 s/:@srcdir@:/:/g
37517 s/^:*//
37518 s/:*$//
37519 x
37520 s/\(=[   ]*\).*/\1/
37521 G
37522 s/\n//
37523 s/^[^=]*=[       ]*$//
37524 }'
37525 fi
37526 
37527 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37528 fi # test -n "$CONFIG_FILES"
37529 
37530 # Set up the scripts for CONFIG_HEADERS section.
37531 # No need to generate them if there are no CONFIG_HEADERS.
37532 # This happens for instance with `./config.status Makefile'.
37533 if test -n "$CONFIG_HEADERS"; then
37534 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37535 BEGIN {
37536 _ACEOF
37537 
37538 # Transform confdefs.h into an awk script `defines.awk', embedded as
37539 # here-document in config.status, that substitutes the proper values into
37540 # config.h.in to produce config.h.
37541 
37542 # Create a delimiter string that does not exist in confdefs.h, to ease
37543 # handling of long lines.
37544 ac_delim='%!_!# '
37545 for ac_last_try in false false :; do
37546   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37547   if test -z "$ac_tt"; then
37548     break
37549   elif $ac_last_try; then
37550     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37551   else
37552     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37553   fi
37554 done
37555 
37556 # For the awk script, D is an array of macro values keyed by name,
37557 # likewise P contains macro parameters if any.  Preserve backslash
37558 # newline sequences.
37559 
37560 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37561 sed -n '
37562 s/.\{148\}/&'"$ac_delim"'/g
37563 t rset
37564 :rset
37565 s/^[     ]*#[    ]*define[       ][      ]*/ /
37566 t def
37567 d
37568 :def
37569 s/\\$//
37570 t bsnl
37571 s/["\\]/\\&/g
37572 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37573 D["\1"]=" \3"/p
37574 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37575 d
37576 :bsnl
37577 s/["\\]/\\&/g
37578 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37579 D["\1"]=" \3\\\\\\n"\\/p
37580 t cont
37581 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37582 t cont
37583 d
37584 :cont
37585 n
37586 s/.\{148\}/&'"$ac_delim"'/g
37587 t clear
37588 :clear
37589 s/\\$//
37590 t bsnlc
37591 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37592 d
37593 :bsnlc
37594 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37595 b cont
37596 ' <confdefs.h | sed '
37597 s/'"$ac_delim"'/"\\\
37598 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37599 
37600 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37601   for (key in D) D_is_set[key] = 1
37602   FS = ""
37603 }
37604 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37605   line = \$ 0
37606   split(line, arg, " ")
37607   if (arg[1] == "#") {
37608     defundef = arg[2]
37609     mac1 = arg[3]
37610   } else {
37611     defundef = substr(arg[1], 2)
37612     mac1 = arg[2]
37613   }
37614   split(mac1, mac2, "(") #)
37615   macro = mac2[1]
37616   prefix = substr(line, 1, index(line, defundef) - 1)
37617   if (D_is_set[macro]) {
37618     # Preserve the white space surrounding the "#".
37619     print prefix "define", macro P[macro] D[macro]
37620     next
37621   } else {
37622     # Replace #undef with comments.  This is necessary, for example,
37623     # in the case of _POSIX_SOURCE, which is predefined and required
37624     # on some systems where configure will not decide to define it.
37625     if (defundef == "undef") {
37626       print "/*", prefix defundef, macro, "*/"
37627       next
37628     }
37629   }
37630 }
37631 { print }
37632 _ACAWK
37633 _ACEOF
37634 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37635   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37636 fi # test -n "$CONFIG_HEADERS"
37637 
37638 
37639 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37640 shift
37641 for ac_tag
37642 do
37643   case $ac_tag in
37644   :[FHLC]) ac_mode=$ac_tag; continue;;
37645   esac
37646   case $ac_mode$ac_tag in
37647   :[FHL]*:*);;
37648   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37649   :[FH]-) ac_tag=-:-;;
37650   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37651   esac
37652   ac_save_IFS=$IFS
37653   IFS=:
37654   set x $ac_tag
37655   IFS=$ac_save_IFS
37656   shift
37657   ac_file=$1
37658   shift
37659 
37660   case $ac_mode in
37661   :L) ac_source=$1;;
37662   :[FH])
37663     ac_file_inputs=
37664     for ac_f
37665     do
37666       case $ac_f in
37667       -) ac_f="$ac_tmp/stdin";;
37668       *) # Look for the file first in the build tree, then in the source tree
37669          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37670          # because $ac_f cannot contain `:'.
37671          test -f "$ac_f" ||
37672            case $ac_f in
37673            [\\/$]*) false;;
37674            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37675            esac ||
37676            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37677       esac
37678       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37679       as_fn_append ac_file_inputs " '$ac_f'"
37680     done
37681 
37682     # Let's still pretend it is `configure' which instantiates (i.e., don't
37683     # use $as_me), people would be surprised to read:
37684     #    /* config.h.  Generated by config.status.  */
37685     configure_input='Generated from '`
37686           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37687         `' by configure.'
37688     if test x"$ac_file" != x-; then
37689       configure_input="$ac_file.  $configure_input"
37690       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37691 $as_echo "$as_me: creating $ac_file" >&6;}
37692     fi
37693     # Neutralize special characters interpreted by sed in replacement strings.
37694     case $configure_input in #(
37695     *\&* | *\|* | *\\* )
37696        ac_sed_conf_input=`$as_echo "$configure_input" |
37697        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37698     *) ac_sed_conf_input=$configure_input;;
37699     esac
37700 
37701     case $ac_tag in
37702     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37703       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37704     esac
37705     ;;
37706   esac
37707 
37708   ac_dir=`$as_dirname -- "$ac_file" ||
37709 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37710          X"$ac_file" : 'X\(//\)[^/]' \| \
37711          X"$ac_file" : 'X\(//\)$' \| \
37712          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37713 $as_echo X"$ac_file" |
37714     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37715             s//\1/
37716             q
37717           }
37718           /^X\(\/\/\)[^/].*/{
37719             s//\1/
37720             q
37721           }
37722           /^X\(\/\/\)$/{
37723             s//\1/
37724             q
37725           }
37726           /^X\(\/\).*/{
37727             s//\1/
37728             q
37729           }
37730           s/.*/./; q'`
37731   as_dir="$ac_dir"; as_fn_mkdir_p
37732   ac_builddir=.
37733 
37734 case "$ac_dir" in
37735 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37736 *)
37737   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37738   # A ".." for each directory in $ac_dir_suffix.
37739   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37740   case $ac_top_builddir_sub in
37741   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37742   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37743   esac ;;
37744 esac
37745 ac_abs_top_builddir=$ac_pwd
37746 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37747 # for backward compatibility:
37748 ac_top_builddir=$ac_top_build_prefix
37749 
37750 case $srcdir in
37751   .)  # We are building in place.
37752     ac_srcdir=.
37753     ac_top_srcdir=$ac_top_builddir_sub
37754     ac_abs_top_srcdir=$ac_pwd ;;
37755   [\\/]* | ?:[\\/]* )  # Absolute name.
37756     ac_srcdir=$srcdir$ac_dir_suffix;
37757     ac_top_srcdir=$srcdir
37758     ac_abs_top_srcdir=$srcdir ;;
37759   *) # Relative name.
37760     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37761     ac_top_srcdir=$ac_top_build_prefix$srcdir
37762     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37763 esac
37764 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37765 
37766 
37767   case $ac_mode in
37768   :F)
37769   #
37770   # CONFIG_FILE
37771   #
37772 
37773 _ACEOF
37774 
37775 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37776 # If the template does not know about datarootdir, expand it.
37777 # FIXME: This hack should be removed a few years after 2.60.
37778 ac_datarootdir_hack=; ac_datarootdir_seen=
37779 ac_sed_dataroot='
37780 /datarootdir/ {
37781   p
37782   q
37783 }
37784 /@datadir@/p
37785 /@docdir@/p
37786 /@infodir@/p
37787 /@localedir@/p
37788 /@mandir@/p'
37789 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37790 *datarootdir*) ac_datarootdir_seen=yes;;
37791 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37792   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37793 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37794 _ACEOF
37795 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37796   ac_datarootdir_hack='
37797   s&@datadir@&$datadir&g
37798   s&@docdir@&$docdir&g
37799   s&@infodir@&$infodir&g
37800   s&@localedir@&$localedir&g
37801   s&@mandir@&$mandir&g
37802   s&\\\${datarootdir}&$datarootdir&g' ;;
37803 esac
37804 _ACEOF
37805 
37806 # Neutralize VPATH when `$srcdir' = `.'.
37807 # Shell code in configure.ac might set extrasub.
37808 # FIXME: do we really want to maintain this feature?
37809 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37810 ac_sed_extra="$ac_vpsub
37811 $extrasub
37812 _ACEOF
37813 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37814 :t
37815 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37816 s|@configure_input@|$ac_sed_conf_input|;t t
37817 s&@top_builddir@&$ac_top_builddir_sub&;t t
37818 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37819 s&@srcdir@&$ac_srcdir&;t t
37820 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37821 s&@top_srcdir@&$ac_top_srcdir&;t t
37822 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37823 s&@builddir@&$ac_builddir&;t t
37824 s&@abs_builddir@&$ac_abs_builddir&;t t
37825 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37826 $ac_datarootdir_hack
37827 "
37828 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37829   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37830 
37831 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37832   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37833   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37834       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37835   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37836 which seems to be undefined.  Please make sure it is defined" >&5
37837 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37838 which seems to be undefined.  Please make sure it is defined" >&2;}
37839 
37840   rm -f "$ac_tmp/stdin"
37841   case $ac_file in
37842   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37843   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37844   esac \
37845   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37846  ;;
37847   :H)
37848   #
37849   # CONFIG_HEADER
37850   #
37851   if test x"$ac_file" != x-; then
37852     {
37853       $as_echo "/* $configure_input  */" \
37854       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37855     } >"$ac_tmp/config.h" \
37856       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37857     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37858       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37859 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37860     else
37861       rm -f "$ac_file"
37862       mv "$ac_tmp/config.h" "$ac_file" \
37863         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37864     fi
37865   else
37866     $as_echo "/* $configure_input  */" \
37867       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37868       || as_fn_error $? "could not create -" "$LINENO" 5
37869   fi
37870  ;;
37871 
37872 
37873   esac
37874 
37875 done # for ac_tag
37876 
37877 
37878 as_fn_exit 0
37879 _ACEOF
37880 ac_clean_files=$ac_clean_files_save
37881 
37882 test $ac_write_fail = 0 ||
37883   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37884 
37885 
37886 # configure is writing to config.log, and then calls config.status.
37887 # config.status does its own redirection, appending to config.log.
37888 # Unfortunately, on DOS this fails, as config.log is still kept open
37889 # by configure, so config.status won't be able to write to it; its
37890 # output is simply discarded.  So we exec the FD to /dev/null,
37891 # effectively closing config.log, so it can be properly (re)opened and
37892 # appended to by config.status.  When coming back to configure, we
37893 # need to make the FD available again.
37894 if test "$no_create" != yes; then
37895   ac_cs_success=:
37896   ac_config_status_args=
37897   test "$silent" = yes &&
37898     ac_config_status_args="$ac_config_status_args --quiet"
37899   exec 5>/dev/null
37900   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37901   exec 5>>config.log
37902   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37903   # would make configure fail if this is the last instruction.
37904   $ac_cs_success || as_fn_exit 1
37905 fi
37906 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37907   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37908 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37909 fi
37910 
37911 
37912 
37913 # Try to move the config.log file to the output directory.
37914 if test -e ./config.log; then
37915   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37916 fi
37917 
37918 # Make the compare script executable
37919 $CHMOD +x $OUTPUT_ROOT/compare.sh
37920 
37921 # Finally output some useful information to the user
37922 
37923   # Finally output some useful information to the user
37924 
37925   printf "\n"
37926   printf "====================================================\n"
37927   printf "A new configuration has been successfully created in\n"
37928   printf "$OUTPUT_ROOT\n"
37929   if test "x$CONFIGURE_COMMAND_LINE" != x; then
37930     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37931   else
37932     printf "using default settings.\n"
37933   fi
37934 
37935   printf "\n"
37936   printf "Configuration summary:\n"
37937   printf "* Debug level:    $DEBUG_LEVEL\n"
37938   printf "* JDK variant:    $JDK_VARIANT\n"
37939   printf "* JVM variants:   $with_jvm_variants\n"
37940   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37941 
37942   printf "\n"
37943   printf "Tools summary:\n"
37944   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37945     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37946   fi
37947   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37948   printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37949   printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37950 
37951   printf "\n"
37952   printf "Build performance summary:\n"
37953   printf "* Cores to use:   $JOBS\n"
37954   printf "* Memory limit:   $MEMORY_SIZE MB\n"
37955   if test "x$CCACHE_STATUS" != "x"; then
37956     printf "* ccache status:  $CCACHE_STATUS\n"
37957   fi
37958   printf "\n"
37959 
37960   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37961     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37962     printf "will result in longer build times.\n"
37963     printf "\n"
37964   fi
37965 
37966   if test "x$FOUND_ALT_VARIABLES" != "x"; then
37967     printf "WARNING: You have old-style ALT_ environment variables set.\n"
37968     printf "These are not respected, and will be ignored. It is recommended\n"
37969     printf "that you clean your environment. The following variables are set:\n"
37970     printf "$FOUND_ALT_VARIABLES\n"
37971     printf "\n"
37972   fi
37973 
37974   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37975     printf "WARNING: Your build output directory is not on a local disk.\n"
37976     printf "This will severely degrade build performance!\n"
37977     printf "It is recommended that you create an output directory on a local disk,\n"
37978     printf "and run the configure script again from that directory.\n"
37979     printf "\n"
37980   fi
37981 
37982   if test "x$IS_RECONFIGURE" = "xyes"; then
37983     printf "WARNING: The result of this configuration has overridden an older\n"
37984     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37985     printf "proper build. Failure to do so might result in strange build problems.\n"
37986     printf "\n"
37987   fi
37988